]> git.sesse.net Git - mlt/commitdiff
fix decklink build on Windows
authorDan Dennedy <dan@dennedy.org>
Thu, 19 Apr 2012 05:37:02 +0000 (22:37 -0700)
committerDan Dennedy <dan@dennedy.org>
Thu, 19 Apr 2012 05:37:02 +0000 (22:37 -0700)
src/modules/decklink/consumer_decklink.cpp
src/modules/decklink/producer_decklink.cpp

index 5fa468da937633815fb4126b31cdd84869830014..8260321bc7fd37ea0dcbe6cd0a1b1718e2dd5def 100644 (file)
@@ -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 );
index 5682a713b58dd3458d9d0c6e7b1350c5cf9a05d5..ca4b2478aeb7406d43b65c2a288c520907aa2396 100644 (file)
@@ -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 );