Add flag to obs_source_frame for unbuffered video

Add 'flags' member variable to obs_source_frame structure.

The OBS_VIDEO_UNBUFFERED flags causes the video to play back as soon as
it's received (in the next frame playback), causing it to disregard the
timestamp value for the sake of video playback (however, note that the
video timestamp is still used for audio synchronization if audio is
present on the source as well).

This is partly a convenience feature, and partly a necessity for certain
plugins (such as the linux v4l plugin) where timestamp information for
the video frames can sometimes be unreliable.
This commit is contained in:
jp9000
2014-10-19 07:26:53 -07:00
parent 2c3f9c47d1
commit c3f4b0f018
6 changed files with 20 additions and 1 deletions

View File

@@ -174,6 +174,9 @@ struct obs_source_audio {
uint64_t timestamp;
};
/** Specifies that the video frame should be played as soon as possible */
#define OBS_VIDEO_UNBUFFERED (1<<0)
/**
* Source asynchronous video output structure. Used with
* obs_source_output_video to output asynchronous video. Video is buffered as
@@ -189,6 +192,7 @@ struct obs_source_frame {
uint32_t width;
uint32_t height;
uint64_t timestamp;
uint32_t flags;
enum video_format format;
float color_matrix[16];