mltframework / mltframework/mlt

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

Open
#98 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
1.9k
Forks
387
Avg merge
17h 28m
Merged PRs (30d)
8

Description

Make Profile("dv_pal");
Make Consumer(_Profile,"cbrts");
Make Producer(_Profile, "decklink:0");
Producer->set("buffer",50);
Producer->set("prefill",25);
Consumer->connect(*Producer);
Consumer->run();
add log 1
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 );

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in master/src/modules/decklink/producer_decklink.cpp around line 534 and inspect the queue insertion, prefill logging, and buffer-overrun path. Reproduce the reported prefill behavior and long-running 24–25 hour capture, then verify that prefill is honored and frames are no longer repeatedly dropped after extended operation.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
audio-video-rtc
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.