FreeRDP
h264_mf.c File Reference
#include <freerdp/log.h>
#include <freerdp/codec/h264.h>
#include <ks.h>
#include <codecapi.h>
#include <mfapi.h>
#include <mferror.h>
#include <wmcodecdsp.h>
#include <mftransform.h>
#include "h264.h"

Macros

#define TAG   FREERDP_TAG("codec")
 
#define __IMFDXGIDeviceManager_FWD_DEFINED__
 
#define __IMFDXGIDeviceManager_INTERFACE_DEFINED__
 

Typedefs

typedef interface IMFDXGIDeviceManager IMFDXGIDeviceManager
 
typedef DWORD dwFlags
 
typedef HRESULT(__stdcall * pfnMFShutdown) (void)
 
typedef HRESULT(__stdcall * pfnMFCreateSample) (IMFSample **ppIMFSample)
 
typedef HRESULT(__stdcall * pfnMFCreateMemoryBuffer) (DWORD cbMaxLength, IMFMediaBuffer **ppBuffer)
 
typedef HRESULT(__stdcall * pfnMFCreateMediaType) (IMFMediaType **ppMFType)
 

Functions

typedef HRESULT (__stdcall *pfnMFStartup)(ULONG Version
 
static HRESULT mf_find_output_type (H264_CONTEXT_MF *sys, const GUID *guid, IMFMediaType **ppMediaType)
 
static HRESULT mf_create_output_sample (H264_CONTEXT *h264, H264_CONTEXT_MF *sys)
 
static int mf_decompress (H264_CONTEXT *h264, const BYTE *pSrcData, UINT32 SrcSize)
 
static int mf_compress (H264_CONTEXT *h264, const BYTE **ppSrcYuv, const UINT32 *pStride, BYTE **ppDstData, UINT32 *pDstSize)
 
static BOOL mf_plat_loaded (H264_CONTEXT_MF *sys)
 
static void mf_uninit (H264_CONTEXT *h264)
 
static BOOL mf_init (H264_CONTEXT *h264)
 

Variables

static const GUID sCLSID_CMSH264DecoderMFT
 
static const GUID sCLSID_VideoProcessorMFT
 
static const GUID sIID_IMFTransform
 
static const GUID sMF_MT_MAJOR_TYPE
 
static const GUID sMF_MT_FRAME_SIZE
 
static const GUID sMF_MT_DEFAULT_STRIDE
 
static const GUID sMF_MT_SUBTYPE
 
static const GUID sMF_XVP_DISABLE_FRC
 
static const GUID sMFMediaType_Video
 
static const GUID sMFVideoFormat_RGB32
 
static const GUID sMFVideoFormat_ARGB32
 
static const GUID sMFVideoFormat_H264
 
static const GUID sMFVideoFormat_IYUV
 
static const GUID sIID_ICodecAPI
 
static const GUID sCODECAPI_AVLowLatencyMode
 
static const GUID sCODECAPI_AVDecVideoMaxCodedWidth
 
static const GUID sCODECAPI_AVDecVideoMaxCodedHeight
 
H264_CONTEXT_SUBSYSTEM g_Subsystem_MF
 

Macro Definition Documentation

#define __IMFDXGIDeviceManager_FWD_DEFINED__
#define __IMFDXGIDeviceManager_INTERFACE_DEFINED__
#define TAG   FREERDP_TAG("codec")

FreeRDP: A Remote Desktop Protocol Implementation H.264 Bitmap Compression

Copyright 2014 Mike McDonald Mike..nosp@m.McDo.nosp@m.nald@.nosp@m.soft.nosp@m.ware..nosp@m.dell.nosp@m..com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Typedef Documentation

typedef DWORD dwFlags
typedef HRESULT(__stdcall* pfnMFCreateMediaType) (IMFMediaType **ppMFType)
typedef HRESULT(__stdcall* pfnMFCreateMemoryBuffer) (DWORD cbMaxLength, IMFMediaBuffer **ppBuffer)
typedef HRESULT(__stdcall* pfnMFCreateSample) (IMFSample **ppIMFSample)
typedef HRESULT(__stdcall* pfnMFShutdown) (void)

Function Documentation

typedef HRESULT ( __stdcall *  pfnMFStartup)

Here is the caller graph for this function:

static int mf_compress ( H264_CONTEXT *  h264,
const BYTE **  ppSrcYuv,
const UINT32 pStride,
BYTE **  ppDstData,
UINT32 pDstSize 
)
static
static HRESULT mf_create_output_sample ( H264_CONTEXT *  h264,
H264_CONTEXT_MF *  sys 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static int mf_decompress ( H264_CONTEXT *  h264,
const BYTE pSrcData,
UINT32  SrcSize 
)
static

Here is the call graph for this function:

static HRESULT mf_find_output_type ( H264_CONTEXT_MF *  sys,
const GUID *  guid,
IMFMediaType **  ppMediaType 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static BOOL mf_init ( H264_CONTEXT *  h264)
static

Here is the call graph for this function:

static BOOL mf_plat_loaded ( H264_CONTEXT_MF *  sys)
static

Here is the caller graph for this function:

static void mf_uninit ( H264_CONTEXT *  h264)
static

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

H264_CONTEXT_SUBSYSTEM g_Subsystem_MF
Initial value:
=
{
"MediaFoundation",
}
static int mf_compress(H264_CONTEXT *h264, const BYTE **ppSrcYuv, const UINT32 *pStride, BYTE **ppDstData, UINT32 *pDstSize)
Definition: h264_mf.c:427
static BOOL mf_init(H264_CONTEXT *h264)
Definition: h264_mf.c:500
static int mf_decompress(H264_CONTEXT *h264, const BYTE *pSrcData, UINT32 SrcSize)
Definition: h264_mf.c:215
static void mf_uninit(H264_CONTEXT *h264)
Definition: h264_mf.c:440
const GUID sCLSID_CMSH264DecoderMFT
static
Initial value:
= { 0x62CE7E72, 0x4C71, 0x4d20, { 0xB1, 0x5D,
0x45, 0x28, 0x31, 0xA8, 0x7D, 0x9D } }
const GUID sCLSID_VideoProcessorMFT
static
Initial value:
= { 0x88753b26, 0x5b24, 0x49bd, { 0xb2, 0xe7,
0x0c, 0x44, 0x5c, 0x78, 0xc9, 0x82 } }
const GUID sCODECAPI_AVDecVideoMaxCodedHeight
static
Initial value:
= { 0x7262a16a, 0xd2dc, 0x4e75, { 0x9b,
0xa8, 0x65, 0xc0, 0xc6, 0xd3, 0x2b, 0x13 } }
const GUID sCODECAPI_AVDecVideoMaxCodedWidth
static
Initial value:
= { 0x5ae557b8, 0x77af, 0x41f5, { 0x9f,
0xa6, 0x4d, 0xb2, 0xfe, 0x1d, 0x4b, 0xca } }
const GUID sCODECAPI_AVLowLatencyMode
static
Initial value:
= { 0x9c27891a, 0xed7a, 0x40e1, { 0x88, 0xe8,
0xb2, 0x27, 0x27, 0xa0, 0x24, 0xee } }
const GUID sIID_ICodecAPI
static
Initial value:
= { 0x901db4c7, 0x31ce, 0x41a2, { 0x85, 0xdc, 0x8f, 0xa0,
0xbf, 0x41, 0xb8, 0xda } }
const GUID sIID_IMFTransform
static
Initial value:
= { 0xbf94c121, 0x5b05, 0x4e6f, { 0x80, 0x00, 0xba,
0x59, 0x89, 0x61, 0x41, 0x4d } }
const GUID sMF_MT_DEFAULT_STRIDE
static
Initial value:
= { 0x644b4e48, 0x1e02, 0x4516, { 0xb0, 0xeb, 0xc0,
0x1c, 0xa9, 0xd4, 0x9a, 0xc6 } }
const GUID sMF_MT_FRAME_SIZE
static
Initial value:
= { 0x1652c33d, 0xd6b2, 0x4012, { 0xb8, 0x34, 0x72,
0x03, 0x08, 0x49, 0xa3, 0x7d } }
const GUID sMF_MT_MAJOR_TYPE
static
Initial value:
= { 0x48eba18e, 0xf8c9, 0x4687, { 0xbf, 0x11, 0x0a,
0x74, 0xc9, 0xf9, 0x6a, 0x8f } }
const GUID sMF_MT_SUBTYPE
static
Initial value:
= { 0xf7e34c9a, 0x42e8, 0x4714, { 0xb7, 0x4b, 0xcb, 0x29,
0xd7, 0x2c, 0x35, 0xe5 } }
const GUID sMF_XVP_DISABLE_FRC
static
Initial value:
= { 0x2c0afa19, 0x7a97, 0x4d5a, { 0x9e, 0xe8, 0x16,
0xd4, 0xfc, 0x51, 0x8d, 0x8c } }
const GUID sMFMediaType_Video
static
Initial value:
= { 0x73646976, 0x0000, 0x0010, { 0x80, 0x00, 0x00,
0xAA, 0x00, 0x38, 0x9B, 0x71 } }
const GUID sMFVideoFormat_ARGB32
static
Initial value:
= { 21, 0x0000, 0x0010, { 0x80, 0x00, 0x00, 0xAA,
0x00, 0x38, 0x9B, 0x71 } }
const GUID sMFVideoFormat_H264
static
Initial value:
= { 0x34363248, 0x0000, 0x0010, { 0x80, 0x00, 0x00,
0xaa, 0x00, 0x38, 0x9b, 0x71 } }
const GUID sMFVideoFormat_IYUV
static
Initial value:
= { 0x56555949, 0x0000, 0x0010, { 0x80, 0x00, 0x00,
0xaa, 0x00, 0x38, 0x9b, 0x71 } }
const GUID sMFVideoFormat_RGB32
static
Initial value:
= { 22, 0x0000, 0x0010, { 0x80, 0x00, 0x00, 0xAA,
0x00, 0x38, 0x9B, 0x71 } }