From 51de1d8436100f725f3576aefa24a2bd2057bc28 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 22:36:56 +0200 Subject: Adding upstream version 0.37.0. Signed-off-by: Daniel Baumann --- player/main.c | 467 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 467 insertions(+) create mode 100644 player/main.c (limited to 'player/main.c') diff --git a/player/main.c b/player/main.c new file mode 100644 index 0000000..27cf9b4 --- /dev/null +++ b/player/main.c @@ -0,0 +1,467 @@ +/* + * This file is part of mpv. + * + * mpv is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * mpv is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with mpv. If not, see . + */ + +#include +#include +#include +#include +#include +#include +#include + +#include "config.h" + +#include + +#include "mpv_talloc.h" + +#include "misc/dispatch.h" +#include "misc/thread_pool.h" +#include "osdep/io.h" +#include "osdep/terminal.h" +#include "osdep/threads.h" +#include "osdep/timer.h" +#include "osdep/main-fn.h" + +#include "common/av_log.h" +#include "common/codecs.h" +#include "common/encode.h" +#include "options/m_config.h" +#include "options/m_option.h" +#include "options/m_property.h" +#include "common/common.h" +#include "common/msg.h" +#include "common/msg_control.h" +#include "common/stats.h" +#include "common/global.h" +#include "filters/f_decoder_wrapper.h" +#include "options/parse_configfile.h" +#include "options/parse_commandline.h" +#include "common/playlist.h" +#include "options/options.h" +#include "options/path.h" +#include "input/input.h" + +#include "audio/out/ao.h" +#include "misc/thread_tools.h" +#include "sub/osd.h" +#include "video/out/vo.h" + +#include "core.h" +#include "client.h" +#include "command.h" +#include "screenshot.h" + +static const char def_config[] = +#include "etc/builtin.conf.inc" +; + +#if HAVE_COCOA +#include "osdep/macosx_events.h" +#endif + +#ifndef FULLCONFIG +#define FULLCONFIG "(missing)\n" +#endif + +enum exit_reason { + EXIT_NONE, + EXIT_NORMAL, + EXIT_ERROR, +}; + +const char mp_help_text[] = +"Usage: mpv [options] [url|path/]filename\n" +"\n" +"Basic options:\n" +" --start=