Fix variable declaration and win32 compilation

This commit is contained in:
David Fort
2017-06-14 16:14:19 +02:00
parent 0308123592
commit dcbb61e3b3
3 changed files with 17 additions and 5 deletions

View File

@@ -67,7 +67,7 @@ static H264_CONTEXT_SUBSYSTEM g_Subsystem_dummy =
dummy_compress
};
static BOOL avc420_ensure_buffer(H264_CONTEXT* h264, UINT32 stride, UINT32 width, UINT32 height)
BOOL avc420_ensure_buffer(H264_CONTEXT* h264, UINT32 stride, UINT32 width, UINT32 height)
{
if (!h264)
return FALSE;
@@ -444,13 +444,16 @@ INT32 avc444_decompress(H264_CONTEXT* h264, BYTE op,
static INIT_ONCE subsystems_once = INIT_ONCE_STATIC_INIT;
static H264_CONTEXT_SUBSYSTEM *subSystems[MAX_SUBSYSTEMS];
#if defined(_WIN32) && defined(WITH_MEDIA_FOUNDATION)
extern H264_CONTEXT_SUBSYSTEM g_Subsystem_MF;
#endif
static BOOL CALLBACK h264_register_subsystems(PINIT_ONCE once, PVOID param, PVOID *context) {
ZeroMemory(subSystems, sizeof(subSystems));
int i = 0;
ZeroMemory(subSystems, sizeof(subSystems));
#if defined(_WIN32) && defined(WITH_MEDIA_FOUNDATION)
extern H264_CONTEXT_SUBSYSTEM g_Subsystem_MF;
subSystems[i] = &g_Subsystem_MF
subSystems[i] = &g_Subsystem_MF;
i++;
#endif
@@ -479,9 +482,11 @@ static BOOL CALLBACK h264_register_subsystems(PINIT_ONCE once, PVOID param, PVOI
BOOL h264_context_init(H264_CONTEXT* h264)
{
int i;
InitOnceExecuteOnce(&subsystems_once, h264_register_subsystems, NULL, NULL);
for (int i = 0; i < MAX_SUBSYSTEMS; i++)
for (i = 0; i < MAX_SUBSYSTEMS; i++)
{
if (subSystems[i]->Init(h264))
{

View File

@@ -17,6 +17,7 @@
* limitations under the License.
*/
#include <freerdp/log.h>
#include <freerdp/codec/h264.h>
#include <ks.h>
@@ -31,6 +32,10 @@
#define INITGUID
#include <initguid.h>
#define TAG FREERDP_TAG("codec")
BOOL avc420_ensure_buffer(H264_CONTEXT* h264, UINT32 stride, UINT32 width, UINT32 height);
DEFINE_GUID(CLSID_CMSH264DecoderMFT, 0x62CE7E72, 0x4C71, 0x4d20, 0xB1, 0x5D,
0x45, 0x28, 0x31, 0xA8, 0x7D, 0x9D);
DEFINE_GUID(CLSID_VideoProcessorMFT, 0x88753b26, 0x5b24, 0x49bd, 0xb2, 0xe7,

View File

@@ -24,6 +24,8 @@
#include "wels/codec_api.h"
#include "wels/codec_ver.h"
#define TAG FREERDP_TAG("codec")
#if (OPENH264_MAJOR == 1) && (OPENH264_MINOR < 3) || (OPENH264_MAJOR < 1)
#error "Unsupported OpenH264 version "OPENH264_MAJOR"."OPENH264_MINOR"."OPENH264_REVISION" detected!"
#elif (OPENH264_MAJOR > 1) || (OPENH264_MINOR > 6)