21 #ifndef FREERDP_LIB_CODEC_H264_H
22 #define FREERDP_LIB_CODEC_H264_H
24 #include <freerdp/api.h>
25 #include <freerdp/config.h>
26 #include <freerdp/codec/h264.h>
33 typedef BOOL (*pfnH264SubsystemInit)(H264_CONTEXT* h264);
34 typedef void (*pfnH264SubsystemUninit)(H264_CONTEXT* h264);
36 typedef int (*pfnH264SubsystemDecompress)(H264_CONTEXT* WINPR_RESTRICT h264,
37 const BYTE* WINPR_RESTRICT pSrcData, UINT32 SrcSize);
38 typedef int (*pfnH264SubsystemCompress)(H264_CONTEXT* WINPR_RESTRICT h264,
39 const BYTE** WINPR_RESTRICT pSrcYuv,
40 const UINT32* WINPR_RESTRICT pStride,
41 BYTE** WINPR_RESTRICT ppDstData,
42 UINT32* WINPR_RESTRICT pDstSize);
47 pfnH264SubsystemInit Init;
48 pfnH264SubsystemUninit Uninit;
49 pfnH264SubsystemDecompress Decompress;
50 pfnH264SubsystemCompress Compress;
60 H264_RATECONTROL_MODE RateControlMode;
65 UINT32 NumberOfThreads;
71 UINT32 iYUV444Size[3];
72 UINT32 iYUV444Stride[3];
73 BYTE* pOldYUV444Data[3];
78 const H264_CONTEXT_SUBSYSTEM* subsystem;
82 BOOL firstLumaFrameDone;
83 BOOL firstChromaFrameDone;
89 FREERDP_LOCAL BOOL avc420_ensure_buffer(H264_CONTEXT* h264, UINT32 stride, UINT32 width,
92 #ifdef WITH_MEDIACODEC
93 extern const H264_CONTEXT_SUBSYSTEM g_Subsystem_mediacodec;
95 #if defined(_WIN32) && defined(WITH_MEDIA_FOUNDATION)
96 extern const H264_CONTEXT_SUBSYSTEM g_Subsystem_MF;
99 extern const H264_CONTEXT_SUBSYSTEM g_Subsystem_OpenH264;
101 #ifdef WITH_VIDEO_FFMPEG
102 extern const H264_CONTEXT_SUBSYSTEM g_Subsystem_libavcodec;