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;
66 UINT32 NumberOfThreads;
72 UINT32 iYUV444Size[3];
73 UINT32 iYUV444Stride[3];
74 BYTE* pOldYUV444Data[3];
79 const H264_CONTEXT_SUBSYSTEM* subsystem;
83 BOOL firstLumaFrameDone;
84 BOOL firstChromaFrameDone;
90 FREERDP_LOCAL BOOL avc420_ensure_buffer(H264_CONTEXT* h264, UINT32 stride, UINT32 width,
94 extern const H264_CONTEXT_SUBSYSTEM g_Subsystem_mediacodec;
96#if defined(_WIN32) && defined(WITH_MEDIA_FOUNDATION)
97 extern const H264_CONTEXT_SUBSYSTEM g_Subsystem_MF;
100 extern const H264_CONTEXT_SUBSYSTEM g_Subsystem_OpenH264;
102#ifdef WITH_VIDEO_FFMPEG
103 extern const H264_CONTEXT_SUBSYSTEM g_Subsystem_libavcodec;