summaryrefslogtreecommitdiffstats
path: root/libmpdemux/stheader.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-07-29 21:04:57 +0200
committerwm4 <wm4@nowhere>2012-07-30 01:42:55 +0200
commit521a5980681885a8bc41a04c4c353a64c2f47992 (patch)
tree604b83d7ec4aff0f43015e2b18b6df0605697e2c /libmpdemux/stheader.h
parent3daf32adfd69e940585737631f1fb95264938268 (diff)
downloadmpv-521a5980681885a8bc41a04c4c353a64c2f47992.tar.bz2
mpv-521a5980681885a8bc41a04c4c353a64c2f47992.tar.xz
mplayer: let frontend print stream info, instead of demuxers
When playing a file, users (i.e. me) expect mplayer to print a list of video/audio/subtitle streams. Currently, this is done in each demuxer separately. This also means the output is formatted differently depending which demuxer is active. Add code to print an uniformly formatted streams list in the player front end. Extend the streams headers to export additional information about the streams. Change the lavf and mkv demuxers to follow this new scheme, and raise the log level for the "old" printing functions. The intention is to make every demuxer behave like this eventually. The stream list output attempts to provide codec information. It's a bit hacky and doesn't always provide useful output, and I'm not sure how to do it better.
Diffstat (limited to 'libmpdemux/stheader.h')
-rw-r--r--libmpdemux/stheader.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/libmpdemux/stheader.h b/libmpdemux/stheader.h
index 58390650b2..6feefa9ef0 100644
--- a/libmpdemux/stheader.h
+++ b/libmpdemux/stheader.h
@@ -26,9 +26,24 @@
struct MPOpts;
struct demuxer;
+enum STREAM_TYPE {
+ STREAM_VIDEO = 1,
+ STREAM_AUDIO,
+ STREAM_SUBTITLE,
+};
+
// Stream headers:
+// id: the type specific id, e.g. aid or sid
+// index: index into stream array (currently one array per type)
+// demuxer_id: demuxer specific ID (-1 if unknown, otherwise >= 0)
+
#define SH_COMMON \
+ enum STREAM_TYPE stream_type; \
+ int id; \
+ int index; \
+ int demuxer_id; \
+ const char *demuxer_codecname; \
struct MPOpts *opts; \
struct demux_stream *ds; \
struct codecs *codec; \