1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-27 17:42:17 +00:00
mpv/mplayer.h
wm4 a19f197cb1 core: show quvi page title in window title, clean up libquvi handling
Clean up handling of libquvi (which resolves URLs of streaming sites
into URLs to the actual media playable by mpv). Move the code out of
open.c to quvi.c, and invoke it explicitly from mplayer.c, instead of
trying to resolve every filename passed to open_stream().

This allows easily passing metadata from the quvi context to the
frontend. Expose QUVIPROP_PAGETITLE as "media-title" property, and use
that instead of "filename" for the mplayer window title. (For YouTube,
this is the video title.) It's cleaner too.

Handle a potential reliability issue: check quvi_getprop return values.

Since open.c contains barely anything but the open_stream() stub, move
that to stream.c and delete open.c.
2012-10-14 22:26:41 +02:00

50 lines
1.3 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 MPLAYER_MPLAYER_H
#define MPLAYER_MPLAYER_H
#include <stdlib.h>
#include "mp_msg.h"
extern char ** audio_fm_list;
extern char ** video_fm_list;
extern char ** video_driver_list;
extern char ** audio_driver_list;
extern float audio_delay;
extern double force_fps;
extern int vobsub_id;
struct MPContext;
struct MPOpts;
struct subtitle;
void set_osd_subtitle(struct MPContext *mpctx, struct subtitle *subs);
struct mp_resolve_result {
char *url;
char *title;
};
struct mp_resolve_result *mp_resolve_quvi(const char *url, struct MPOpts *opts);
#endif /* MPLAYER_MPLAYER_H */