diff options
author | root <root@rshg054.dnsready.net> | 2013-02-10 01:12:52 -0800 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2013-02-10 01:12:52 -0800 |
commit | 1bb2648cde916ac27d3dd75d7b64a4ddc89787b7 (patch) | |
tree | 016bfa1969323404c37dbef29cfc7242a5a8e9f3 /community/mplayer2 | |
parent | e9c244cac8e5dc1c59c7e8b7bc885fef04224b70 (diff) |
Sun Feb 10 01:12:35 PST 2013
Diffstat (limited to 'community/mplayer2')
-rw-r--r-- | community/mplayer2/mplayer2-20120729-fix-vf_lavc-compilation.patch | 31 | ||||
-rw-r--r-- | community/mplayer2/mplayer2-20120729-libquvi-support.patch | 277 |
2 files changed, 0 insertions, 308 deletions
diff --git a/community/mplayer2/mplayer2-20120729-fix-vf_lavc-compilation.patch b/community/mplayer2/mplayer2-20120729-fix-vf_lavc-compilation.patch deleted file mode 100644 index a50161305..000000000 --- a/community/mplayer2/mplayer2-20120729-fix-vf_lavc-compilation.patch +++ /dev/null @@ -1,31 +0,0 @@ -From f5e0365c8e76e2ef797027134f1819e613764d7e Mon Sep 17 00:00:00 2001 -From: Anton Khirnov <anton@khirnov.net> -Date: Wed, 19 Sep 2012 12:00:01 +0000 -Subject: vf_lavc: fix compilation with latest libav - -Remove a pointless and broken check for avctx->codec->encode. - -1) The check does not test for anything useful. -2) AVCodecContext.encode is a private field and is not supposed to be - accessed from outside of lavc. -2a) AVCodecContext.encode does not exist anymore in latest libavcodec, - so this block fails to build. ---- -diff --git a/libmpcodecs/vf_lavc.c b/libmpcodecs/vf_lavc.c -index b2c1dd7..65e93a1 100644 ---- a/libmpcodecs/vf_lavc.c -+++ b/libmpcodecs/vf_lavc.c -@@ -76,11 +76,6 @@ static int config(struct vf_instance *vf, - return 0; - } - -- if (lavc_venc_context.codec->encode == NULL) { -- mp_msg(MSGT_VFILTER,MSGL_ERR,"avcodec init failed (ctx->codec->encode == NULL)!\n"); -- return 0; -- } -- - return vf_next_config(vf,width,height,d_width,d_height,flags,IMGFMT_MPEGPES); - } - --- -cgit v0.9 diff --git a/community/mplayer2/mplayer2-20120729-libquvi-support.patch b/community/mplayer2/mplayer2-20120729-libquvi-support.patch deleted file mode 100644 index f27fa690d..000000000 --- a/community/mplayer2/mplayer2-20120729-libquvi-support.patch +++ /dev/null @@ -1,277 +0,0 @@ -From 37c124805c00ae0f2570c95f9543e39ce69793a6 Mon Sep 17 00:00:00 2001 -From: wm4 <wm4@mplayer2.org> -Date: Fri, 02 Mar 2012 19:24:34 +0000 -Subject: quvi: Add support for streaming sites using libquvi - -This enables playing URLs from libquvi supported streaming sites -directly, e.g. "mplayer http://www.youtube.com/watch?v=...." - -Anything opened with mplayer is checked with libquvi. If it looks like -a URL of a supported streaming site, libquvi is used to extract the -media URL, which is then passed to the lower level mplayer code -instead of the HTML URL. Hopefully the libquvi URL checker works well -enough that it doesn't cause any problems with normal URLs, files, or -whatever else mplayer's stream layer accepts. - -Add the --quvi-format option. The option value is directly passed -to libquvi as requested format. The only values that seem to work for -any streaming site seem to be "best" (best quality) and "default" -(lowest quality). The mplayer option defaults to "best" (overriding -libquvi's default). - -Outstanding issues: -- Does libquvi checking every opened file really not cause problems? - Should there be a runtime option to disable libquvi use? - (Probably not an issue.) -- Should we check/set the supported protocol? By default libquvi has - support for all protocols enabled. In the worst case, it might - return an URL using a protocol not supported by mplayer, even though - it could extract URLs with other protocols too. - (Probably not an issue.) -- Somehow export metadata (like media title) to the mplayer frontend? ---- -diff --git a/cfg-mplayer.h b/cfg-mplayer.h -index 5440de9..d8d556a 100644 ---- a/cfg-mplayer.h -+++ b/cfg-mplayer.h -@@ -517,6 +517,8 @@ const m_option_t common_opts[] = { - - OPT_MAKE_FLAGS("hr-mp3-seek", hr_mp3_seek, 0), - -+ OPT_STRING("quvi-format", quvi_format, 0), -+ - { "rawaudio", (void *)&demux_rawaudio_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL}, - { "rawvideo", (void *)&demux_rawvideo_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL}, - -diff --git a/configure b/configure -index 5c1e288..18bc404 100755 ---- a/configure -+++ b/configure -@@ -335,6 +335,7 @@ Optional features: - --enable-winsock2_h enable winsock2_h [autodetect] - --enable-smb enable Samba (SMB) input [autodetect] - --enable-live enable LIVE555 Streaming Media [disable] -+ --enable-libquvi enable libquvi [autodetect] - --enable-nemesi enable Nemesi Streaming Media [autodetect] - --disable-vcd disable VCD support [autodetect] - --disable-bluray disable Blu-ray support [autodetect] -@@ -650,6 +651,7 @@ _pvr=auto - networking=yes - _winsock2_h=auto - _smb=auto -+_libquvi=auto - _joystick=no - _xvid=auto - _libnut=auto -@@ -1009,6 +1011,8 @@ for ac_option do - --disable-winsock2_h) _winsock2_h=no ;; - --enable-smb) _smb=yes ;; - --disable-smb) _smb=no ;; -+ --enable-libquvi) _libquvi=yes ;; -+ --disable-libquvi) _libquvi=no ;; - --enable-joystick) _joystick=yes ;; - --disable-joystick) _joystick=no ;; - --enable-xvid) _xvid=yes ;; -@@ -3610,6 +3614,19 @@ else - fi - echores "$_smb" - -+echocheck "libquvi support" -+if test "$_libquvi" = auto ; then -+ _libquvi=no -+ if pkg_config_add libquvi ; then -+ _libquvi=yes -+ fi -+fi -+if test "$_libquvi" = yes; then -+ def_libquvi="#define CONFIG_LIBQUVI 1" -+else -+ def_libquvi="#undef CONFIG_LIBQUVI" -+fi -+echores "$_libquvi" - - ######### - # VIDEO # -@@ -6325,6 +6342,7 @@ LIBNEMESI = $_nemesi - LIBNUT = $_libnut - LIBPOSTPROC = $libpostproc - LIBSMBCLIENT = $_smb -+LIBQUVI = $_libquvi - LIBTHEORA = $_theora - LIRC = $_lirc - LIVE555 = $_live -@@ -6668,6 +6686,7 @@ $def_live - $def_nemesi - $def_networking - $def_smb -+$def_libquvi - $def_socklen_t - $def_vstream - -diff --git a/options.h b/options.h -index 48f5c53..89324bd 100644 ---- a/options.h -+++ b/options.h -@@ -78,6 +78,7 @@ typedef struct MPOpts { - char **audio_lang; - char **sub_lang; - int hr_mp3_seek; -+ char *quvi_format; - - char *audio_stream; - int audio_stream_cache; -diff --git a/stream/open.c b/stream/open.c -index ce0a415..91e9ae2 100644 ---- a/stream/open.c -+++ b/stream/open.c -@@ -26,12 +26,14 @@ - - #include "config.h" - #include "mp_msg.h" -+#include "talloc.h" - - #ifdef __FreeBSD__ - #include <sys/cdrio.h> - #endif - - #include "m_option.h" -+#include "options.h" - #include "stream.h" - #include "libmpdemux/demuxer.h" - -@@ -42,6 +44,62 @@ char* cdrom_device=NULL; - char* dvd_device=NULL; - int dvd_title=0; - -+#ifdef CONFIG_LIBQUVI -+ -+#include <quvi/quvi.h> -+ -+static const char *resolve_quvi(const char *url, struct MPOpts *opts) -+{ -+ char *media_title, *media_url; -+ quvi_media_t m; -+ QUVIcode rc; -+ quvi_t q; -+ -+ rc = quvi_init(&q); -+ if (rc != QUVI_OK) -+ return NULL; -+ -+ // Don't try to use quvi on an URL that's not directly supported, since -+ // quvi will do a network access anyway in order to check for HTTP -+ // redirections etc. -+ // The documentation says this will fail on "shortened" URLs. -+ if (quvi_supported(q, (char *)url) != QUVI_OK) { -+ quvi_close(&q); -+ return NULL; -+ } -+ -+ mp_msg(MSGT_OPEN, MSGL_INFO, "[quvi] Checking URL...\n"); -+ -+ // Can use quvi_query_formats() to get a list of formats like this: -+ // "fmt05_240p|fmt18_360p|fmt34_360p|fmt35_480p|fmt43_360p|fmt44_480p" -+ // (This example is youtube specific.) -+ // That call requires an extra net access. quvi_next_media_url() doesn't -+ // seem to do anything useful. So we can't really do anything useful -+ // except pass through the user's format setting. -+ quvi_setopt(q, QUVIOPT_FORMAT, opts->quvi_format -+ ? opts->quvi_format : "best"); -+ -+ rc = quvi_parse(q, (char *)url, &m); -+ if (rc != QUVI_OK) { -+ mp_msg(MSGT_OPEN, MSGL_ERR, "[quvi] %s\n", quvi_strerror(q, rc)); -+ quvi_close(&q); -+ return NULL; -+ } -+ -+ quvi_getprop(m, QUVIPROP_PAGETITLE, &media_title); -+ quvi_getprop(m, QUVIPROP_MEDIAURL, &media_url); -+ -+ mp_msg(MSGT_OPEN, MSGL_INFO, "[quvi] Site media title: '%s'\n", -+ media_title); -+ media_url = talloc_strdup(NULL, media_url); -+ -+ quvi_parse_close(&m); -+ quvi_close(&q); -+ -+ return media_url; -+} -+#endif -+ - // Open a new stream (stdin/file/vcd/url) - - stream_t* open_stream(const char *filename, struct MPOpts *options, -@@ -59,7 +117,16 @@ if(!filename) { - return NULL; - } - --//============ Open STDIN or plain FILE ============ -+ const char *resolved = NULL; -+ -+#ifdef CONFIG_LIBQUVI -+ resolved = resolve_quvi(filename, options); -+#endif -+ -+ if (resolved) -+ filename = resolved; - -- return open_stream_full(filename,STREAM_READ,options,file_format); -+ stream_t *res = open_stream_full(filename,STREAM_READ,options,file_format); -+ talloc_free((void *)resolved); -+ return res; - } --- -cgit v0.9 -From 86f7fe1ba61a465fb25bc30deaaa4fcf12600a43 Mon Sep 17 00:00:00 2001 -From: wm4 <wm4@nowhere> -Date: Sun, 02 Sep 2012 18:45:11 +0000 -Subject: configure: add version check for libquvi - -I do not know what exactly is the minimum working version. Require the -latest version currently released, which is about half a year old. ---- -diff --git a/configure b/configure -index 2cf7aff..6a3298f 100755 ---- a/configure -+++ b/configure -@@ -3445,7 +3445,7 @@ echores "$_smb" - echocheck "libquvi support" - if test "$_libquvi" = auto ; then - _libquvi=no -- if pkg_config_add libquvi ; then -+ if pkg_config_add 'libquvi >= 0.4.1' ; then - _libquvi=yes - fi - fi --- -cgit v0.9 -diff --git a/cfg-mplayer.h b/cfg-mplayer.h -index b889661..8b07091 100644 ---- a/cfg-mplayer.h -+++ b/cfg-mplayer.h -@@ -485,7 +485,7 @@ const m_option_t common_opts[] = { - - OPT_MAKE_FLAGS("hr-mp3-seek", hr_mp3_seek, 0), - -- OPT_STRING("quvi-format", quvi_format, 0), -+ OPT_STRING("quvi-format", quvi_format, 0, OPTDEF_STR("best")), - - { "rawaudio", (void *)&demux_rawaudio_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL}, - { "rawvideo", (void *)&demux_rawvideo_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL}, -diff --git a/stream/open.c b/stream/open.c -index 91e9ae2..16d0dc3 100644 ---- a/stream/open.c -+++ b/stream/open.c -@@ -76,8 +76,7 @@ static const char *resolve_quvi(const char *url, struct MPOpts *opts) - // That call requires an extra net access. quvi_next_media_url() doesn't - // seem to do anything useful. So we can't really do anything useful - // except pass through the user's format setting. -- quvi_setopt(q, QUVIOPT_FORMAT, opts->quvi_format -- ? opts->quvi_format : "best"); -+ quvi_setopt(q, QUVIOPT_FORMAT, opts->quvi_format); - - rc = quvi_parse(q, (char *)url, &m); - if (rc != QUVI_OK) { --- -cgit v0.9 |