Menu

#238 Decklink prefill options not work and buffer overrun after 24-25 hours.

v0.9.8
open
nobody
5
2016-02-10
2016-02-10
No
  1. Make Profile("dv_pal");
  2. Make Consumer(*Profile,"cbrts");
  3. Make Producer(*Profile, "decklink:0");
  4. Producer->set("buffer",50);
  5. Producer->set("prefill",25);
  6. Consumer->connect(*Producer);
  7. Consumer->run();
  8. add log 1
  9. add log 2

Bug 1:
Ok, now i have output: prefill is 25, queue size is 50, frames in queue 1
Prefill set to 25 but frames in queue 1.

Bug 2:
After 24-25 hours producer_decklink say "buffer overrun, frame dropped..." and drop next frames each time.
I add log 2 for check what's happening and is now waiting for the result.

// master/src/modules/decklink/producer_decklink.cpp

//string 534
// Put frame in queue
if ( frame )
{
int queueMax = mlt_properties_get_int( MLT_PRODUCER_PROPERTIES( getProducer() ), "buffer" );
pthread_mutex_lock( &m_mutex );
if ( mlt_deque_count( m_queue ) < queueMax )
{
mlt_deque_push_back( m_queue, frame );

** // add log 1
int prefillsize = mlt_properties_get_int( MLT_PRODUCER_PROPERTIES( getProducer() ), "prefill" );
mlt_log_warning( getProducer(), "prefill is %d, queue size is %d, frames in queue %d\n",prefillsize, queueMax, mlt_deque_count( m_queue )); **

            pthread_cond_broadcast( &m_condition );
        }
        else
        {
           ** // add log 2
            int prefillsize = mlt_properties_get_int( MLT_PRODUCER_PROPERTIES( getProducer() ), "prefill" );
            mlt_log_warning( getProducer(), "DROP!!! prefill is %d, queue size is %d, frames in queue %d\n",prefillsize, queueMax, mlt_deque_count( m_queue ));**

            mlt_frame_close( frame );
            mlt_properties_set_int( MLT_PRODUCER_PROPERTIES( getProducer() ), "dropped", ++m_dropped );
            mlt_log_warning( getProducer(), "buffer overrun, frame dropped %d\n", m_dropped );
        }
        pthread_mutex_unlock( &m_mutex );
    }

Discussion


Log in to post a comment.