]> git.sesse.net Git - mlt/blobdiff - src/modules/decklink/consumer_decklink.cpp
Fix compiler warnings due to non-virtual destructors.
[mlt] / src / modules / decklink / consumer_decklink.cpp
index f8ef0cde01214065ce981a699f22294a982378c8..e6d20e09998373ac179cb0251c4a345aacf30f4c 100644 (file)
@@ -100,7 +100,7 @@ public:
                m_decklinkFrame = NULL;
        }
 
-       ~DeckLinkConsumer()
+       virtual ~DeckLinkConsumer()
        {
                SAFE_RELEASE( m_displayMode );
                SAFE_RELEASE( m_deckLinkKeyer );
@@ -315,15 +315,17 @@ public:
                if ( !mlt_frame_get_audio( frame, (void**) &pcm, &format, &frequency, &m_channels, &samples ) )
                {
 #ifdef WIN32
+#define DECKLINK_UNSIGNED_FORMAT "%lu"
                        unsigned long written = 0;
 #else
+#define DECKLINK_UNSIGNED_FORMAT "%u"
                        uint32_t written = 0;
 #endif
                        BMDTimeValue streamTime = m_count * frequency * m_duration / m_timescale;
                        m_deckLinkOutput->GetBufferedAudioSampleFrameCount( &written );
                        if ( written > (m_preroll + 1) * samples )
                        {
-                               mlt_log_verbose( getConsumer(), "renderAudio: will flush %lu audiosamples\n", written );
+                               mlt_log_verbose( getConsumer(), "renderAudio: will flush " DECKLINK_UNSIGNED_FORMAT " audiosamples\n", written );
                                m_deckLinkOutput->FlushBufferedAudioSamples();
                        };
 #ifdef WIN32
@@ -333,7 +335,7 @@ public:
 #endif
 
                        if ( written != (uint32_t) samples )
-                               mlt_log_verbose( getConsumer(), "renderAudio: samples=%d, written=%lu\n", samples, written );
+                               mlt_log_verbose( getConsumer(), "renderAudio: samples=%d, written=" DECKLINK_UNSIGNED_FORMAT "\n", samples, written );
                }
        }
 
@@ -414,9 +416,9 @@ public:
                                        // Normal non-keyer playout - needs byte swapping
                                        if ( !progressive && m_displayMode->GetFieldDominance() == bmdUpperFieldFirst )
                                                // convert lower field first to top field first
-                                               swab( (char*) image, (char*) buffer + stride, stride * ( height - 1 ) );
+                                               swab2( (char*) image, (char*) buffer + stride, stride * ( height - 1 ) );
                                        else
-                                               swab( (char*) image, (char*) buffer, stride * height );
+                                               swab2( (char*) image, (char*) buffer, stride * height );
                                }
                                else if ( !mlt_properties_get_int( MLT_FRAME_PROPERTIES( frame ), "test_image" ) )
                                {
@@ -534,8 +536,8 @@ public:
                if ( cnt != m_acnt )
                {
                        mlt_log_debug( getConsumer(),
-                               "ScheduledFrameCompleted: GetBufferedAudioSampleFrameCount %u -> %lu, m_count=%"PRIu64"\n",
-                               m_acnt, cnt, m_count );
+                               "ScheduledFrameCompleted: GetBufferedAudioSampleFrameCount %u -> " DECKLINK_UNSIGNED_FORMAT
+                               ", m_count=%"PRIu64"\n", m_acnt, cnt, m_count );
                        m_acnt = cnt;
                }