From 3dbc9007b080028f0aebbbf8b9ab1233cd70c45b Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 21 Dec 2013 20:24:20 +0100 Subject: demux: mp_msg conversions The TV code pretends to be part of stream/, but it's actually demuxer code too. The audio_in code is shared between the TV code and stream_radio.c, so stream_radio.c needs a small hack until stream.c is converted. --- player/loadfile.c | 5 +++-- player/main.c | 2 +- player/timeline/tl_cue.c | 4 ++-- player/timeline/tl_matroska.c | 6 +++--- player/timeline/tl_mpv_edl.c | 2 +- 5 files changed, 10 insertions(+), 9 deletions(-) (limited to 'player') diff --git a/player/loadfile.c b/player/loadfile.c index 8ca793941f..1d668b9c2c 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -735,7 +735,7 @@ static struct track *open_external_file(struct MPContext *mpctx, char *filename, .ass_library = mpctx->ass_library, // demux_libass requires it }; struct demuxer *demuxer = - demux_open(stream, demuxer_name, ¶ms, mpctx->opts); + demux_open(stream, demuxer_name, ¶ms, mpctx->global); if (!demuxer) { free_stream(stream); goto err_out; @@ -1083,7 +1083,8 @@ goto_reopen_demuxer: ; mpctx->audio_delay = opts->audio_delay; - mpctx->demuxer = demux_open(mpctx->stream, opts->demuxer_name, NULL, opts); + mpctx->demuxer = demux_open(mpctx->stream, opts->demuxer_name, NULL, + mpctx->global); mpctx->master_demuxer = mpctx->demuxer; if (!mpctx->demuxer) { MP_ERR(mpctx, "Failed to recognize file format.\n"); diff --git a/player/main.c b/player/main.c index 1211a32f39..71ce31e082 100644 --- a/player/main.c +++ b/player/main.c @@ -219,7 +219,7 @@ static bool handle_help_options(struct MPContext *mpctx) if ((opts->demuxer_name && strcmp(opts->demuxer_name, "help") == 0) || (opts->audio_demuxer_name && strcmp(opts->audio_demuxer_name, "help") == 0) || (opts->sub_demuxer_name && strcmp(opts->sub_demuxer_name, "help") == 0)) { - demuxer_help(); + demuxer_help(log); MP_INFO(mpctx, "\n"); opt_exit = 1; } diff --git a/player/timeline/tl_cue.c b/player/timeline/tl_cue.c index 646aa24ee3..80eaf5ef76 100644 --- a/player/timeline/tl_cue.c +++ b/player/timeline/tl_cue.c @@ -191,7 +191,7 @@ static bool try_open(struct MPContext *mpctx, char *filename) struct stream *s = stream_open(filename, mpctx->opts); if (!s) return false; - struct demuxer *d = demux_open(s, NULL, NULL, mpctx->opts); + struct demuxer *d = demux_open(s, NULL, NULL, mpctx->global); // Since .bin files are raw PCM data with no headers, we have to explicitly // open them. Also, try to avoid to open files that are most likely not .bin // files, as that would only play noise. Checking the file extension is @@ -200,7 +200,7 @@ static bool try_open(struct MPContext *mpctx, char *filename) // CD sector size (2352 bytes) if (!d && bstr_case_endswith(bfilename, bstr0(".bin"))) { MP_WARN(mpctx, "CUE: Opening as BIN file!\n"); - d = demux_open(s, "rawaudio", NULL, mpctx->opts); + d = demux_open(s, "rawaudio", NULL, mpctx->global); } if (d) { add_source(mpctx, d); diff --git a/player/timeline/tl_matroska.c b/player/timeline/tl_matroska.c index f5a01a3860..720bd3f979 100644 --- a/player/timeline/tl_matroska.c +++ b/player/timeline/tl_matroska.c @@ -139,7 +139,7 @@ static int enable_cache(struct MPContext *mpctx, struct stream **stream, opts->stream_cache_min_percent, opts->stream_cache_seek_min_percent); - *demuxer = demux_open(*stream, "mkv", params, opts); + *demuxer = demux_open(*stream, "mkv", params, mpctx->global); if (!*demuxer) { talloc_free(filename); free_stream(*stream); @@ -177,7 +177,7 @@ static bool check_file_seg(struct MPContext *mpctx, struct demuxer ***sources, struct stream *s = stream_open(filename, mpctx->opts); if (!s) return false; - struct demuxer *d = demux_open(s, "mkv", ¶ms, mpctx->opts); + struct demuxer *d = demux_open(s, "mkv", ¶ms, mpctx->global); if (!d) { free_stream(s); @@ -264,7 +264,7 @@ static int find_ordered_chapter_sources(struct MPContext *mpctx, MP_INFO(mpctx, "Loading references from '%s'.\n", opts->ordered_chapters_files); struct playlist *pl = - playlist_parse_file(opts->ordered_chapters_files, opts); + playlist_parse_file(opts->ordered_chapters_files, mpctx->global); talloc_steal(tmp, pl); for (struct playlist_entry *e = pl->first; e; e = e->next) MP_TARRAY_APPEND(tmp, filenames, num_filenames, e->filename); diff --git a/player/timeline/tl_mpv_edl.c b/player/timeline/tl_mpv_edl.c index 473502d2c8..b256e0bdd5 100644 --- a/player/timeline/tl_mpv_edl.c +++ b/player/timeline/tl_mpv_edl.c @@ -130,7 +130,7 @@ static struct demuxer *open_file(char *filename, struct MPContext *mpctx) opts->stream_cache_def_size, opts->stream_cache_min_percent, opts->stream_cache_seek_min_percent); - d = demux_open(s, NULL, NULL, opts); + d = demux_open(s, NULL, NULL, mpctx->global); } if (!d) { MP_ERR(mpctx, "EDL: Could not open source file '%s'.\n", -- cgit v1.2.3