1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-26 00:42:57 +00:00
mpv/mpvcore/resolve.h
wm4 cf0e852fcd quvi: coerce libquvi 0.4 support into allowing format switching
libquvi 0.4 doesn't allow us listing the formats supported by a
streaming site without doing additional network accesses, so switching
formats was not supported with it. (It's different with libquvi 0.9.)

But the most important case is switching between SD and HD. Usually,
--quvi-format=default will get SD, while --quvi-format=best gives HD.
Use this, and pretend that an URL supported by libquvi 0.4 supports both
of these. "cycle quvi-format" will switch between these. If the user
specifies something else via --quvi-format, this is included in the list
of switchable formats additionally to "default" and "best".
2013-09-10 16:38:34 +02:00

54 lines
1.4 KiB
C

/*
* This file is part of MPlayer.
*
* MPlayer is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* MPlayer 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with MPlayer; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MP_RESOLVE_H
#define MP_RESOLVE_H
struct MPContext;
struct MPOpts;
struct mp_resolve_result {
char *url;
char *title;
struct mp_resolve_src **srcs;
int num_srcs;
double start_time;
struct mp_resolve_sub **subs;
int num_subs;
struct playlist *playlist;
};
struct mp_resolve_src {
char *url; // can be NULL; otherwise it's the exact video URL
char *encid; // indicates quality level, contents are libquvi specific
};
struct mp_resolve_sub {
char *url;
char *data;
char *lang;
};
struct mp_resolve_result *mp_resolve_quvi(const char *url, struct MPOpts *opts);
#endif