nut: Support experimental NUT 4 features

Add the low overhead pipe mode and the extended broadcast mode.
Export the options as 'syncponts' since it impacts only that.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
Luca Barbato 2014-03-06 17:58:34 +01:00
parent 6d212599aa
commit c94e2e85cb
5 changed files with 112 additions and 9 deletions

View file

@ -36,7 +36,9 @@
#define MAX_DISTANCE (1024*32-1)
#define NUT_VERSION 3
#define NUT_MAX_VERSION 4
#define NUT_STABLE_VERSION 3
#define NUT_MIN_VERSION 2
typedef enum{
FLAG_KEY = 1, ///<if set, frame is keyframe
@ -85,6 +87,7 @@ typedef struct ChapterContext {
} ChapterContext;
typedef struct NUTContext {
const AVClass *av_class;
AVFormatContext *avf;
// int written_packet_size;
// int64_t packet_start;
@ -100,6 +103,10 @@ typedef struct NUTContext {
int header_count;
AVRational *time_base;
struct AVTreeNode *syncpoints;
#define NUT_BROADCAST 1 // use extended syncpoints
#define NUT_PIPE 2 // do not write syncpoints
int flags;
int version; // version currently in use
} NUTContext;
extern const AVCodecTag ff_nut_subtitle_tags[];