Added 4 new clip keyframes (channel mapping, channel filter, has_video, and has_audio). These are a bit different though, as they are evaluated as boolean (-1 = ignored, 0 = disabled, 1 = enabled). Also fixed some issues with video playback (where it gets stuck in fast forward), and fixed some race conditions when opening FFmpegReader. Also added more debug output.

This commit is contained in:
Jonathan Thomas
2016-04-24 15:37:47 -05:00
parent 37f1894300
commit 4808be25ff
8 changed files with 137 additions and 33 deletions

View File

@@ -124,6 +124,9 @@ void FFmpegReader::Open() throw(InvalidFile, NoStreamsFound, InvalidCodec)
// Open reader if not already open
if (!is_open)
{
// Create a scoped lock, allowing only a single thread to run the following code at one time
const GenericScopedLock<CriticalSection> lock(getFrameCriticalSection);
// Initialize format context
pFormatCtx = NULL;
@@ -225,6 +228,11 @@ void FFmpegReader::Close()
// Close all objects, if reader is 'open'
if (is_open)
{
// Create a scoped lock, allowing only a single thread to run the following code at one time
const GenericScopedLock<CriticalSection> lock(getFrameCriticalSection);
ZmqLogger::Instance()->AppendDebugMethod("FFmpegReader::Close", "", -1, "", -1, "", -1, "", -1, "", -1, "", -1);
// Mark as "closed"
is_open = false;