m_decklinkFrame = NULL;
}
- ~DeckLinkConsumer()
+ virtual ~DeckLinkConsumer()
{
SAFE_RELEASE( m_displayMode );
SAFE_RELEASE( m_deckLinkKeyer );
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
#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 );
}
}
// 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" ) )
{
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;
}