summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-10-25 20:07:44 +0200
committerwm4 <wm4@nowhere>2014-10-25 20:18:22 +0200
commit9b45b48c466765b6491778709a1c52e061480f76 (patch)
tree5f5c7715d91d5d8e6814105abc1cd330394ab1df /player
parent423a7de67625749a7563ddbd1094091dee7b40ae (diff)
downloadmpv-9b45b48c466765b6491778709a1c52e061480f76.tar.bz2
mpv-9b45b48c466765b6491778709a1c52e061480f76.tar.xz
Drop libquvi support
No development activity (or even any sign of life) for almost a year. A replacement based on youtube-dl will probably be provided before the next mpv release. Ask on the IRC channel if you want to test. Simplify the Lua check too: libquvi linking against a different Lua version than mpv was a frequent issue, but with libquvi gone, no direct dependency uses Lua, and such a clash is rather unlikely.
Diffstat (limited to 'player')
-rw-r--r--player/command.c3
-rw-r--r--player/core.h1
-rw-r--r--player/loadfile.c86
3 files changed, 2 insertions, 88 deletions
diff --git a/player/command.c b/player/command.c
index 7584ef024e..5cdd57110c 100644
--- a/player/command.c
+++ b/player/command.c
@@ -41,7 +41,6 @@
#include "stream/stream.h"
#include "demux/demux.h"
#include "demux/stheader.h"
-#include "stream/resolve/resolve.h"
#include "common/playlist.h"
#include "sub/osd.h"
#include "sub/dec_sub.h"
@@ -368,8 +367,6 @@ static int mp_property_media_title(void *ctx, struct m_property *prop,
name = mpctx->opts->media_title;
if (name && name[0])
return m_property_strdup_ro(action, arg, name);
- if (mpctx->resolve_result)
- name = mpctx->resolve_result->title;
if (name && name[0])
return m_property_strdup_ro(action, arg, name);
if (mpctx->master_demuxer) {
diff --git a/player/core.h b/player/core.h
index 1013fabac1..c0a00e454b 100644
--- a/player/core.h
+++ b/player/core.h
@@ -180,7 +180,6 @@ typedef struct MPContext {
struct playlist_entry *playing; // currently playing file
char *filename; // immutable copy of playing->filename (or NULL)
char *stream_open_filename;
- struct mp_resolve_result *resolve_result;
enum stop_play_reason stop_play;
bool playback_initialized; // playloop can be run/is running
diff --git a/player/loadfile.c b/player/loadfile.c
index b7dab134c7..cea0624b15 100644
--- a/player/loadfile.c
+++ b/player/loadfile.c
@@ -50,7 +50,6 @@
#include "audio/out/ao.h"
#include "demux/demux.h"
#include "stream/stream.h"
-#include "stream/resolve/resolve.h"
#include "sub/dec_sub.h"
#include "sub/find_subfiles.h"
#include "video/decode/dec_video.h"
@@ -721,69 +720,6 @@ struct track *mp_add_subtitles(struct MPContext *mpctx, char *filename)
STREAM_SUB);
}
-static void open_subtitles_from_resolve(struct MPContext *mpctx)
-{
- struct MPOpts *opts = mpctx->opts;
- struct mp_resolve_result *res = mpctx->resolve_result;
- if (!res)
- return;
- for (int n = 0; n < res->num_subs; n++) {
- struct mp_resolve_sub *sub = res->subs[n];
- char *s = talloc_strdup(NULL, sub->url);
- if (!s)
- s = talloc_asprintf(NULL, "memory://%s", sub->data);
- struct track *t =
- open_external_file(mpctx, s, opts->sub_demuxer_name, STREAM_SUB);
- talloc_free(s);
- if (t) {
- t->lang = talloc_strdup(t, sub->lang);
- t->no_default = true;
- }
- }
-}
-
-static struct mp_resolve_result *resolve_url(const char *filename,
- struct mpv_global *global)
-{
- if (!mp_is_url(bstr0(filename)))
- return NULL;
-#if HAVE_LIBQUVI
- return mp_resolve_quvi(filename, global);
-#else
- return NULL;
-#endif
-}
-
-static void print_resolve_contents(struct mp_log *log,
- struct mp_resolve_result *res)
-{
- mp_msg(log, MSGL_V, "Resolve:\n");
- mp_msg(log, MSGL_V, " title: %s\n", res->title);
- mp_msg(log, MSGL_V, " url: %s\n", res->url);
- for (int n = 0; n < res->num_srcs; n++) {
- mp_msg(log, MSGL_V, " source %d:\n", n);
- if (res->srcs[n]->url)
- mp_msg(log, MSGL_V, " url: %s\n", res->srcs[n]->url);
- if (res->srcs[n]->encid)
- mp_msg(log, MSGL_V, " encid: %s\n", res->srcs[n]->encid);
- }
- for (int n = 0; n < res->num_subs; n++) {
- mp_msg(log, MSGL_V, " subtitle %d:\n", n);
- if (res->subs[n]->url)
- mp_msg(log, MSGL_V, " url: %s\n", res->subs[n]->url);
- if (res->subs[n]->lang)
- mp_msg(log, MSGL_V, " lang: %s\n", res->subs[n]->lang);
- if (res->subs[n]->data) {
- mp_msg(log, MSGL_V, " data: %zd bytes\n",
- strlen(res->subs[n]->data));
- }
- }
- if (res->playlist) {
- mp_msg(log, MSGL_V, " playlist with %d entries\n",
- playlist_entry_count(res->playlist));
- }
-}
-
// Replace the current playlist entry with playlist contents. Moves the entries
// from the given playlist pl, so the entries don't actually need to be copied.
static void transfer_playlist(struct MPContext *mpctx, struct playlist *pl)
@@ -816,17 +752,6 @@ static int process_open_hooks(struct MPContext *mpctx)
}
}
- // quvi stuff
- char *filename = mpctx->stream_open_filename;
- mpctx->resolve_result = resolve_url(filename, mpctx->global);
- if (mpctx->resolve_result) {
- print_resolve_contents(mpctx->log, mpctx->resolve_result);
- if (mpctx->resolve_result->playlist) {
- transfer_playlist(mpctx, mpctx->resolve_result->playlist);
- return 1;
- }
- mpctx->stream_open_filename = mpctx->resolve_result->url;
- }
return 0;
}
@@ -1009,10 +934,8 @@ static void play_current_file(struct MPContext *mpctx)
assert(mpctx->d_sub[0] == NULL);
assert(mpctx->d_sub[1] == NULL);
- int hooks_res = process_open_hooks(mpctx);
- talloc_steal(tmp, mpctx->resolve_result);
- if (hooks_res)
- goto terminate_playback; // quit or preloaded playlist special-case
+ if (process_open_hooks(mpctx) < 0)
+ goto terminate_playback;
int stream_flags = STREAM_READ;
if (!opts->load_unsafe_playlists)
@@ -1095,7 +1018,6 @@ goto_reopen_demuxer: ;
open_subtitles_from_options(mpctx);
- open_subtitles_from_resolve(mpctx);
open_audiofiles_from_options(mpctx);
check_previous_track_selection(mpctx);
@@ -1178,9 +1100,6 @@ goto_reopen_demuxer: ;
// If there's a timeline force an absolute seek to initialize state
double startpos = rel_time_to_abs(mpctx, opts->play_start);
- if (startpos == MP_NOPTS_VALUE && mpctx->resolve_result &&
- mpctx->resolve_result->start_time > 0)
- startpos = mpctx->resolve_result->start_time;
if (startpos == MP_NOPTS_VALUE && opts->chapterrange[0] > 0) {
double start = chapter_start_time(mpctx, opts->chapterrange[0] - 1);
if (start != MP_NOPTS_VALUE)
@@ -1250,7 +1169,6 @@ terminate_playback:
m_config_restore_backups(mpctx->mconfig);
mpctx->playback_initialized = false;
- mpctx->resolve_result = NULL;
if (mpctx->playing && mpctx->stop_play == AT_END_OF_FILE) {
// Played/paused for longer than 1 second -> ok