diff options
Diffstat (limited to 'demux/demux.h')
-rw-r--r-- | demux/demux.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/demux/demux.h b/demux/demux.h index 41551975cc..3d66139d69 100644 --- a/demux/demux.h +++ b/demux/demux.h @@ -90,6 +90,8 @@ enum timestamp_type { #define DEMUXER_CTRL_DONTKNOW 0 #define DEMUXER_CTRL_OK 1 #define DEMUXER_CTRL_GUESS 2 + +#define DEMUXER_CTRL_SWITCHED_TRACKS 9 #define DEMUXER_CTRL_GET_TIME_LENGTH 10 #define DEMUXER_CTRL_GET_START_TIME 11 #define DEMUXER_CTRL_SWITCH_AUDIO 12 @@ -103,6 +105,7 @@ enum timestamp_type { #define SEEK_FACTOR (1 << 1) #define SEEK_FORWARD (1 << 2) #define SEEK_BACKWARD (1 << 3) +#define SEEK_SUBPREROLL (1 << 4) // demux_lavf can pass lavf buffers using FF_INPUT_BUFFER_PADDING_SIZE instead #define MP_INPUT_BUFFER_PADDING_SIZE 16 @@ -182,6 +185,7 @@ typedef struct demuxer_desc { typedef struct demux_chapter { + int original_index; uint64_t start, end; char *name; } demux_chapter_t; @@ -209,6 +213,8 @@ typedef struct demux_attachment struct demuxer_params { unsigned char (*matroska_wanted_uids)[16]; + int matroska_wanted_segment; + bool *matroska_was_valid; }; typedef struct demuxer { @@ -281,8 +287,8 @@ typedef struct { struct demux_packet *new_demux_packet(size_t len); // data must already have suitable padding struct demux_packet *new_demux_packet_fromdata(void *data, size_t len); +struct demux_packet *new_demux_packet_from(void *data, size_t len); void resize_demux_packet(struct demux_packet *dp, size_t len); -struct demux_packet *clone_demux_packet(struct demux_packet *pack); void free_demux_packet(struct demux_packet *dp); #ifndef SIZE_MAX @@ -303,8 +309,8 @@ struct demuxer *new_demuxer(struct MPOpts *opts, struct stream *stream, char *filename); void free_demuxer(struct demuxer *demuxer); -struct sh_stream *ds_gsh(struct demux_stream *ds); - +void demuxer_add_packet(demuxer_t *demuxer, struct sh_stream *stream, + demux_packet_t *dp); void ds_add_packet(struct demux_stream *ds, struct demux_packet *dp); void ds_read_packet(struct demux_stream *ds, struct stream *stream, int len, double pts, int64_t pos, bool keyframe); @@ -393,6 +399,7 @@ int demuxer_add_chapter(struct demuxer *demuxer, struct bstr name, uint64_t start, uint64_t end); int demuxer_seek_chapter(struct demuxer *demuxer, int chapter, double *seek_pts); +void demuxer_sort_chapters(demuxer_t *demuxer); /// Get current chapter index if available. int demuxer_get_current_chapter(struct demuxer *demuxer, double time_now); @@ -412,4 +419,6 @@ int demuxer_angles_count(struct demuxer *demuxer); struct sh_stream *demuxer_stream_by_demuxer_id(struct demuxer *d, enum stream_type t, int id); +bool demuxer_stream_is_selected(struct demuxer *d, struct sh_stream *stream); + #endif /* MPLAYER_DEMUXER_H */ |