MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / Synchronize

Function Synchronize

libhb/sync.c:1753–1786  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1751}
1752
1753static void Synchronize( sync_stream_t * stream )
1754{
1755 sync_common_t * common = stream->common;
1756
1757 // Sync deposits output directly into fifos, so work_loop is not
1758 // blocking when output fifos become full. Wait here before
1759 // performing any output when the output fifo for the input stream
1760 // is full
1761 if (stream->fifo_out != NULL && common->start_found)
1762 {
1763 while (!common->job->done && !*common->job->die)
1764 {
1765 if (hb_fifo_full_wait(stream->fifo_out))
1766 {
1767 break;
1768 }
1769 }
1770 }
1771
1772 hb_lock(common->mutex);
1773
1774 if (!fillQueues(common))
1775 {
1776 hb_unlock(common->mutex);
1777 return;
1778 }
1779 if (!common->found_first_pts)
1780 {
1781 checkFirstPts(common);
1782 }
1783 OutputBuffer(common);
1784
1785 hb_unlock(common->mutex);
1786}
1787
1788static void updateDuration( sync_stream_t * stream )
1789{

Callers 4

QueueBufferFunction · 0.85
syncVideoWorkFunction · 0.85
syncAudioWorkFunction · 0.85
syncSubtitleWorkFunction · 0.85

Calls 6

hb_fifo_full_waitFunction · 0.85
hb_lockFunction · 0.85
fillQueuesFunction · 0.85
hb_unlockFunction · 0.85
checkFirstPtsFunction · 0.85
OutputBufferFunction · 0.85

Tested by

no test coverage detected