From: Dan Dennedy Date: Thu, 19 Apr 2012 05:37:02 +0000 (-0700) Subject: fix decklink build on Windows X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=3e2c57731b396081ee8c012c73994e65d8a693e7;p=mlt fix decklink build on Windows --- diff --git a/src/modules/decklink/consumer_decklink.cpp b/src/modules/decklink/consumer_decklink.cpp index 5fa468da..8260321b 100644 --- a/src/modules/decklink/consumer_decklink.cpp +++ b/src/modules/decklink/consumer_decklink.cpp @@ -31,6 +31,7 @@ #include "DeckLinkAPI_h.h" #else #include "DeckLinkAPI.h" +typedef const char* BSTR; #endif #define SAFE_RELEASE(V) if (V) { V->Release(); V = NULL; } @@ -678,7 +679,7 @@ static void on_property_changed( void*, mlt_properties properties, const char *n if ( decklink->QueryInterface( IID_IDeckLinkOutput, (void**) &decklinkOutput ) == S_OK ) { char *name = NULL; - if ( decklink->GetModelName( (const char**) &name ) == S_OK ) + if ( decklink->GetModelName( (BSTR*) &name ) == S_OK ) { const char *format = "device.%d"; char *key = (char*) calloc( 1, strlen( format ) + 1 ); diff --git a/src/modules/decklink/producer_decklink.cpp b/src/modules/decklink/producer_decklink.cpp index 5682a713..ca4b2478 100644 --- a/src/modules/decklink/producer_decklink.cpp +++ b/src/modules/decklink/producer_decklink.cpp @@ -29,6 +29,7 @@ #include "DeckLinkAPI_h.h" #else #include "DeckLinkAPI.h" +typedef const char* BSTR; #endif #define SAFE_RELEASE(V) if (V) { V->Release(); V = NULL; } @@ -438,11 +439,7 @@ public: { const char* timecodeString = 0; -#ifdef WIN32 if ( timecode->GetString( (BSTR*) &timecodeString ) == S_OK ) -#else - if ( timecode->GetString( &timecodeString ) == S_OK ) -#endif { mlt_properties_set( MLT_FRAME_PROPERTIES( frame ), "meta.attr.vitc.markup", timecodeString ); mlt_log_debug( getProducer(), "timecode %s\n", timecodeString ); @@ -659,7 +656,7 @@ static void on_property_changed( void*, mlt_properties properties, const char *n if ( decklink->QueryInterface( IID_IDeckLinkInput, (void**) &decklinkInput ) == S_OK ) { char *name = NULL; - if ( decklink->GetModelName( (const char**) &name ) == S_OK ) + if ( decklink->GetModelName( (BSTR*) &name ) == S_OK ) { const char *format = "device.%d"; char *key = (char*) calloc( 1, strlen( format ) + 1 );