From 52c3eb69765a0d1070bf240353095c8ff546765b Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 11 Jul 2013 21:10:42 +0200 Subject: core: change open_stream and demux_open signature This removes the dependency on DEMUXER_TYPE_* and the file_format parameter from the stream open functions. Remove some of the playlist handling code. It looks like this was needed only for loading linked mov files with demux_mov (which was removed long ago). Delete a minor bit of dead network-related code from stream.c as well. --- stream/stream_mf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'stream/stream_mf.c') diff --git a/stream/stream_mf.c b/stream/stream_mf.c index 9b8b47188a..eef5d6fc4d 100644 --- a/stream/stream_mf.c +++ b/stream/stream_mf.c @@ -29,10 +29,10 @@ #include "demux/demux.h" static int -mf_stream_open (stream_t *stream, int mode, void *opts, int *file_format) +mf_stream_open (stream_t *stream, int mode, void *opts) { stream->type = STREAMTYPE_MF; - *file_format = DEMUXER_TYPE_MF; + stream->demuxer = "lavf"; return STREAM_OK; } -- cgit v1.2.3 From 3269bd178020c5d821e8b2d1fd807a38d63e93ce Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 12 Jul 2013 21:58:11 +0200 Subject: demux: rewrite probing and demuxer initialization Get rid of the strange and messy reliance on DEMUXER_TYPE_ constants. Instead of having two open functions for the demuxer callbacks (which somehow are both optional, but you can also decide to implement both...), just have one function. This function takes a parameter that tells the demuxer how strictly it should check for the file headers. This is a nice simplification and allows more flexibility. Remove the file extension code. This literally did nothing (anymore). Change demux_lavf so that we check our other builtin demuxers first before libavformat tries to guess by file extension. --- stream/stream_mf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'stream/stream_mf.c') diff --git a/stream/stream_mf.c b/stream/stream_mf.c index eef5d6fc4d..9354005ae4 100644 --- a/stream/stream_mf.c +++ b/stream/stream_mf.c @@ -32,7 +32,7 @@ static int mf_stream_open (stream_t *stream, int mode, void *opts) { stream->type = STREAMTYPE_MF; - stream->demuxer = "lavf"; + stream->demuxer = "mf"; return STREAM_OK; } -- cgit v1.2.3 From cb45b1c65b2fe4644342db202e5f7b9fb64f2488 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 12 Jul 2013 22:04:44 +0200 Subject: Cleanup some include statements --- stream/stream_mf.c | 1 - 1 file changed, 1 deletion(-) (limited to 'stream/stream_mf.c') diff --git a/stream/stream_mf.c b/stream/stream_mf.c index 9354005ae4..4e560da2f4 100644 --- a/stream/stream_mf.c +++ b/stream/stream_mf.c @@ -26,7 +26,6 @@ #include #include "stream.h" -#include "demux/demux.h" static int mf_stream_open (stream_t *stream, int mode, void *opts) -- cgit v1.2.3 From f406482d84b8597235e17bedfb7539a5863d869e Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 12 Jul 2013 22:11:08 +0200 Subject: stream: remove useless author/comment fields These were printed only with -v. Most streams had them set to useless or redundant values, so it's just badly maintained bloat. Since we remove the "author" field too, and since this may have copyright implications, we add the contents of the author fields to the file headers, except if the name is already part of the file header. --- stream/stream_mf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'stream/stream_mf.c') diff --git a/stream/stream_mf.c b/stream/stream_mf.c index 4e560da2f4..9f87dad6b1 100644 --- a/stream/stream_mf.c +++ b/stream/stream_mf.c @@ -2,6 +2,7 @@ * stream layer for multiple files input, based on previous work from Albeu * * Copyright (C) 2006 Benjamin Zores + * Original author: Albeu * * This file is part of MPlayer. * @@ -37,10 +38,7 @@ mf_stream_open (stream_t *stream, int mode, void *opts) } const stream_info_t stream_info_mf = { - "Multiple files input", "mf", - "Benjamin Zores, Albeu", - "", mf_stream_open, { "mf", NULL }, NULL, -- cgit v1.2.3