UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
CapturePin.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3/*=============================================================================
4 CapturePin.h: CapturePin definition
5=============================================================================*/
6
7#pragma once
8
9#include "CoreMinimal.h"
10
11class FAVIWriter;
12struct FCapturedFrame;
13
14#if PLATFORM_WINDOWS && WITH_UNREAL_DEVELOPER_TOOLS
15
17
18typedef TCHAR* PTCHAR;
19
21#if defined(__clang__)
22 #pragma clang diagnostic push
23 #pragma clang diagnostic ignored "-Woverloaded-virtual" // note: hidden overloaded virtual function 'x' declared here: different number of parameters
24#else
25 #pragma warning(push)
26 #pragma warning(disable: 4263) // 'function' : member function does not override any base class virtual member function
27 #pragma warning(disable: 4264) // 'virtual_function' : no override available for virtual member function from base
28 #if USING_CODE_ANALYSIS
29 #pragma warning(disable: 6101) // Returning uninitialized memory '*lpdwExitCode'. A successful path through the function does not set the named _Out_ parameter.
30 #pragma warning(disable: 6509) // Invalid annotation: 'return' cannot be referenced in some contexts
31 #pragma warning(disable: 28204) // 'Func' has an override at 'file' and only the override is annotated for _Param_(N): when an override is annotated, the base (this function) should be similarly annotated.
32 #endif // USING_CODE_ANALYSIS
33#endif // defined(__clang__)
34#include <streams.h>
35#if defined(__clang__)
36 #pragma clang diagnostic pop
37#else
38 #pragma warning(pop)
39#endif // defined(__clang__)
41
43
44class FAVIWriter;
45struct FCapturedFrame;
46
47class FCapturePin : public CSourceStream
48{
49protected:
50
52 const REFERENCE_TIME FrameLength;
54 int32 ImageHeight;
56 int32 ImageWidth;
58 CCritSec SharedState;
59
61 const FAVIWriter& Writer;
62
64 const FCapturedFrame* CurrentFrame;
65
67
68public:
69
72
73 // Override the version that offers exactly one media type
75 HRESULT FillBuffer(IMediaSample *pSample);
76
77 // the loop executed while running
79
80 // Set the agreed media type and set up the necessary parameters
82
83 // Support multiple display formats
86
87 // Quality control
88 // Not implemented because we aren't going in real time.
89 // If the file-writing filter slows the graph down, we just do nothing, which means
90 // wait until we're unblocked. No frames are ever dropped.
91 STDMETHODIMP Notify(IBaseFilter *pSelf, Quality q)
92 {
93 return E_FAIL;
94 }
95
96};
97#endif //#if PLATFORM_WINDOWS
98
99
FPlatformTypes::TCHAR TCHAR
Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requir...
Definition Platform.h:1135
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define THIRD_PARTY_INCLUDES_START
Definition GenericPlatformCompilerPreSetup.h:63
Definition AVIWriter.h:148
Definition Voronoi.cpp:10
Definition AVIWriter.h:69
Definition Optional.h:131