From 38fa9f6d361ac37eb90b04c69b36b8daa1f862b1 Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 28 Apr 2011 13:45:16 +0000 Subject: command.c: Add missing osdep/strsep.h #include The include is needed on systems without native strsep(). based on a patch by Stephen Sheldon, sfsheldo gmail com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33338 b3059339-0415-0410-9bf9-f77b7e298cf2 --- command.c | 1 + 1 file changed, 1 insertion(+) diff --git a/command.c b/command.c index de7f1fbca9..c5feb62e26 100644 --- a/command.c +++ b/command.c @@ -49,6 +49,7 @@ #include "libmpcodecs/dec_video.h" #include "libmpcodecs/dec_audio.h" #include "libmpcodecs/dec_teletext.h" +#include "osdep/strsep.h" #include "sub/vobsub.h" #include "sub/spudec.h" #include "path.h" -- cgit v1.2.3 From 6283d4d6bb65e75041da638cb5532af9581ec1a8 Mon Sep 17 00:00:00 2001 From: diego Date: Fri, 29 Apr 2011 13:05:49 +0000 Subject: Windows: ao_pcm: add io.h include for MinGW64 On MinGW64 io.h is needed for _get_osfhandle(). patch by Stephen Sheldon, sfsheldo gmail com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33341 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libao2/ao_pcm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libao2/ao_pcm.c b/libao2/ao_pcm.c index eefe6b9433..f9aef15fd1 100644 --- a/libao2/ao_pcm.c +++ b/libao2/ao_pcm.c @@ -37,6 +37,7 @@ #ifdef __MINGW32__ // for GetFileType to detect pipes #include +#include #endif struct priv { -- cgit v1.2.3 From 49b31c2b43b9853bc3a347be7d914e27839d1f61 Mon Sep 17 00:00:00 2001 From: iive Date: Sun, 1 May 2011 20:21:00 +0000 Subject: vd_ffmpeg.c: fix one case of "-lavdopts vstats" crashing Fix segfault with -lavdopts vstats and some codecs. The vstats option relies on avctx->coded_frame being filled. Unfortunately not all codecs do that (e.g. VP8) thus causing NULL dereference. FFmpeg code seems to always check if coded_frame != NULL, so we should do the same. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33347 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vd_ffmpeg.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index 5460d20fd1..c8463d5c34 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -389,7 +389,7 @@ static void uninit(sh_video_t *sh){ vd_ffmpeg_ctx *ctx = sh->context; AVCodecContext *avctx = ctx->avctx; - if(sh->opts->lavc_param.vstats){ + if (sh->opts->lavc_param.vstats && avctx->coded_frame) { int i; for(i=1; i<32; i++){ mp_msg(MSGT_DECVIDEO, MSGL_INFO, "QP: %d, count: %d\n", i, ctx->qp_stat[i]); @@ -784,6 +784,9 @@ static struct mp_image *decode(struct sh_video *sh, void *data, int len, AVFrame *pic= avctx->coded_frame; double quality=0.0; + if (!pic) + break; + if(!fvstats) { time_t today2; struct tm *today; -- cgit v1.2.3 From 74a85b860062fb339389a6dd262dcb45bad7785b Mon Sep 17 00:00:00 2001 From: cehoyos Date: Thu, 28 Apr 2011 15:58:42 +0000 Subject: configure: fix swab() check for Windows git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33339 b3059339-0415-0410-9bf9-f77b7e298cf2 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33349 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 20ebcd384b..f1f2876f7d 100755 --- a/configure +++ b/configure @@ -3437,7 +3437,8 @@ echores "$_vsscanf" echocheck "swab()" _swab=no -define_statement_check "_XOPEN_SOURCE 600" "unistd.h" 'int a, b; swab(&a, &b, 0)' && _swab=yes +define_statement_check "_XOPEN_SOURCE 600" "unistd.h" 'int a, b; swab(&a, &b, 0)' || + statement_check "string.h" 'int a, b; swab(&a, &b, 0)' && _swab=yes if test "$_swab" = yes ; then def_swab='#define HAVE_SWAB 1' need_swab=no -- cgit v1.2.3 From a71340bd40a11f0538dcc8130dfbfa5245dc3f08 Mon Sep 17 00:00:00 2001 From: reimar Date: Wed, 4 May 2011 20:27:38 +0000 Subject: playtree: free parameter values when entry is freed git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33364 b3059339-0415-0410-9bf9-f77b7e298cf2 --- playtree.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/playtree.c b/playtree.c index b7affc9538..c9a4cbc69a 100644 --- a/playtree.c +++ b/playtree.c @@ -68,7 +68,14 @@ play_tree_free(play_tree_t* pt, int children) { for(iter = pt->child ; iter != NULL ; iter = iter->next) iter->parent = NULL; - //free(pt->params); + if (pt->params) { + int i; + for(i = 0 ; pt->params[i].name != NULL ; i++) { + free(pt->params[i].name); + free(pt->params[i].value); + } + free(pt->params); + } if(pt->files) { int i; for(i = 0 ; pt->files[i] != NULL ; i++) -- cgit v1.2.3 From 30e8f03f2dfa7c94d1f8d9d2948d33f4bbba8820 Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 5 May 2011 10:25:17 +0000 Subject: configure: handle X11 dependencies at depending checks Make features depending on X check its availability at their individual checks rather than having the X11 check disable them if needed. This makes each individual feature check self-contained, which is desirable. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33371 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/configure b/configure index f1f2876f7d..28173a619c 100755 --- a/configure +++ b/configure @@ -3842,8 +3842,6 @@ else def_x11='#undef CONFIG_X11' novomodules="x11 $novomodules" res_comment="check if the dev(el) packages are installed" - # disable stuff that depends on X - _xv=no ; _xinerama=no ; _vm=no ; _xf86keysym=no ; _vdpau=no fi echores "$_x11" @@ -3891,7 +3889,7 @@ fi echocheck "Xv" -if test "$_xv" = auto ; then +if test "$_xv" = auto && test "$_x11" = yes ; then _xv=no statement_check_broken X11/Xlib.h X11/extensions/Xvlib.h 'XvGetPortAttribute(0, 0, 0, 0)' -lXv && _xv=yes fi @@ -3908,7 +3906,7 @@ echores "$_xv" echocheck "VDPAU" -if test "$_vdpau" = auto ; then +if test "$_vdpau" = auto && test "$_x11" = yes ; then _vdpau=no if test "$_dl" = yes ; then return_statement_check vdpau/vdpau_x11.h 'vdp_device_create_x11(0, 0, 0, 0)' VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1 -lvdpau && _vdpau=yes @@ -3926,7 +3924,7 @@ echores "$_vdpau" echocheck "Xinerama" -if test "$_xinerama" = auto ; then +if test "$_xinerama" = auto && test "$_x11" = yes ; then _xinerama=no statement_check X11/extensions/Xinerama.h 'XineramaIsActive(0)' -lXinerama && _xinerama=yes fi @@ -3946,7 +3944,7 @@ echores "$_xinerama" # This check may be useful for future mplayer versions (to change resolution) # If you run into problems, remove '-lXxf86vm'. echocheck "Xxf86vm" -if test "$_vm" = auto ; then +if test "$_vm" = auto && test "$_x11" = yes ; then _vm=no statement_check_broken X11/Xlib.h X11/extensions/xf86vmode.h 'XF86VidModeQueryExtension(0, 0, 0)' -lXxf86vm && _vm=yes fi @@ -3963,7 +3961,7 @@ echores "$_vm" # has nothing to do with xf86vm and XFree 3.x has xf86vm but does NOT # have these new keycodes. echocheck "XF86keysym" -if test "$_xf86keysym" = auto; then +if test "$_xf86keysym" = auto && test "$_x11" = yes ; then _xf86keysym=no return_check X11/XF86keysym.h XF86XK_AudioPause && _xf86keysym=yes fi -- cgit v1.2.3 From fec08a5e85c711d7d1b697f1ac61358dbdff5147 Mon Sep 17 00:00:00 2001 From: reimar Date: Thu, 5 May 2011 16:50:38 +0000 Subject: core: move m_config_free() last before exit Move the call to m_config_free() to be the last thing done before exiting, otherwise mp_msg() might stop working if options it uses are freed/reset. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33380 b3059339-0415-0410-9bf9-f77b7e298cf2 --- mplayer.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/mplayer.c b/mplayer.c index 406148aa46..e65afe5b0f 100644 --- a/mplayer.c +++ b/mplayer.c @@ -747,11 +747,6 @@ void exit_player_with_rc(struct MPContext *mpctx, enum exit_reason how, int rc) current_module="exit_player"; -// free mplayer config - if(mpctx->mconfig) - m_config_free(mpctx->mconfig); - mpctx->mconfig = NULL; - if(mpctx->playtree_iter) play_tree_iter_free(mpctx->playtree_iter); mpctx->playtree_iter = NULL; @@ -781,6 +776,12 @@ void exit_player_with_rc(struct MPContext *mpctx, enum exit_reason how, int rc) } mp_msg(MSGT_CPLAYER,MSGL_DBG2,"max framesize was %d bytes\n",max_framesize); + // must be last since e.g. mp_msg uses option values + // that will be freed by this. + if (mpctx->mconfig) + m_config_free(mpctx->mconfig); + mpctx->mconfig = NULL; + exit(rc); } -- cgit v1.2.3 From f30a83863e0f97bc75faeb7ebaf84e0654d6d956 Mon Sep 17 00:00:00 2001 From: ib Date: Fri, 6 May 2011 08:14:31 +0000 Subject: manpage: use upper case names for some keys Change some key names to upper case and to match the names used in input.conf bindings. Most of them already were in this form. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33382 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/man/en/mplayer.1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1 index dc9a936632..afb12a8027 100644 --- a/DOCS/man/en/mplayer.1 +++ b/DOCS/man/en/mplayer.1 @@ -178,21 +178,21 @@ See the \-input option for ways to customize it. .B keyboard control .PD 0 .RS -.IPs "<\- and \->" +.IPs "LEFT and RIGHT" Seek backward/\:forward 10 seconds. Shift+arrow does a 1 second exact seek (see \-hr\-seek; currently modifier keys like shift only work if used in an X output window). -.IPs "up and down" +.IPs "UP and DOWN" Seek forward/\:backward 1 minute. Shift+arrow does a 5 second exact seek (see \-hr\-seek; currently modifier keys like shift only work if used in an X output window). -.IPs "pgup and pgdown" +.IPs "PGUP and PGDWN" Seek forward/\:backward 10 minutes. .IPs "[ and ]" Decrease/increase current playback speed by 10%. .IPs "{ and }" Halve/double current playback speed. -.IPs "backspace" +.IPs "BACKSPACE" Reset playback speed to normal. .IPs "< and >" Go backward/\:forward in the playlist. -- cgit v1.2.3 From 9737ae2196718235a17a8f9759c2baa015d4ddf0 Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 7 May 2011 10:44:57 +0000 Subject: input: support up to 20 mouse buttons Increase the number of supported mouse buttons from 10 to 20. There really seem to be input devices with at least 12. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33391 b3059339-0415-0410-9bf9-f77b7e298cf2 --- input/input.c | 20 ++++++++++++++++++++ input/keycodes.h | 24 ++++++++++++++++++++++-- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/input/input.c b/input/input.c index 7cb498921e..de776ad3ff 100644 --- a/input/input.c +++ b/input/input.c @@ -277,6 +277,16 @@ static const mp_key_name_t key_names[] = { { MOUSE_BTN7, "MOUSE_BTN7" }, { MOUSE_BTN8, "MOUSE_BTN8" }, { MOUSE_BTN9, "MOUSE_BTN9" }, + { MOUSE_BTN10, "MOUSE_BTN10" }, + { MOUSE_BTN11, "MOUSE_BTN11" }, + { MOUSE_BTN12, "MOUSE_BTN12" }, + { MOUSE_BTN13, "MOUSE_BTN13" }, + { MOUSE_BTN14, "MOUSE_BTN14" }, + { MOUSE_BTN15, "MOUSE_BTN15" }, + { MOUSE_BTN16, "MOUSE_BTN16" }, + { MOUSE_BTN17, "MOUSE_BTN17" }, + { MOUSE_BTN18, "MOUSE_BTN18" }, + { MOUSE_BTN19, "MOUSE_BTN19" }, { MOUSE_BTN0_DBL, "MOUSE_BTN0_DBL" }, { MOUSE_BTN1_DBL, "MOUSE_BTN1_DBL" }, { MOUSE_BTN2_DBL, "MOUSE_BTN2_DBL" }, @@ -287,6 +297,16 @@ static const mp_key_name_t key_names[] = { { MOUSE_BTN7_DBL, "MOUSE_BTN7_DBL" }, { MOUSE_BTN8_DBL, "MOUSE_BTN8_DBL" }, { MOUSE_BTN9_DBL, "MOUSE_BTN9_DBL" }, + { MOUSE_BTN10_DBL, "MOUSE_BTN10_DBL" }, + { MOUSE_BTN11_DBL, "MOUSE_BTN11_DBL" }, + { MOUSE_BTN12_DBL, "MOUSE_BTN12_DBL" }, + { MOUSE_BTN13_DBL, "MOUSE_BTN13_DBL" }, + { MOUSE_BTN14_DBL, "MOUSE_BTN14_DBL" }, + { MOUSE_BTN15_DBL, "MOUSE_BTN15_DBL" }, + { MOUSE_BTN16_DBL, "MOUSE_BTN16_DBL" }, + { MOUSE_BTN17_DBL, "MOUSE_BTN17_DBL" }, + { MOUSE_BTN18_DBL, "MOUSE_BTN18_DBL" }, + { MOUSE_BTN19_DBL, "MOUSE_BTN19_DBL" }, { JOY_AXIS1_MINUS, "JOY_UP" }, { JOY_AXIS1_PLUS, "JOY_DOWN" }, { JOY_AXIS0_MINUS, "JOY_LEFT" }, diff --git a/input/keycodes.h b/input/keycodes.h index 31a9161826..45e7ec7d4b 100644 --- a/input/keycodes.h +++ b/input/keycodes.h @@ -140,7 +140,17 @@ #define MOUSE_BTN7 (MOUSE_BASE+7) #define MOUSE_BTN8 (MOUSE_BASE+8) #define MOUSE_BTN9 (MOUSE_BASE+9) -#define MOUSE_BTN_END (MOUSE_BASE+10) +#define MOUSE_BTN10 (MOUSE_BASE+10) +#define MOUSE_BTN11 (MOUSE_BASE+11) +#define MOUSE_BTN12 (MOUSE_BASE+12) +#define MOUSE_BTN13 (MOUSE_BASE+13) +#define MOUSE_BTN14 (MOUSE_BASE+14) +#define MOUSE_BTN15 (MOUSE_BASE+15) +#define MOUSE_BTN16 (MOUSE_BASE+16) +#define MOUSE_BTN17 (MOUSE_BASE+17) +#define MOUSE_BTN18 (MOUSE_BASE+18) +#define MOUSE_BTN19 (MOUSE_BASE+19) +#define MOUSE_BTN_END (MOUSE_BASE+20) #define MOUSE_BASE_DBL (0x300|MP_NO_REPEAT_KEY) #define MOUSE_BTN0_DBL (MOUSE_BASE_DBL+0) @@ -153,7 +163,17 @@ #define MOUSE_BTN7_DBL (MOUSE_BASE_DBL+7) #define MOUSE_BTN8_DBL (MOUSE_BASE_DBL+8) #define MOUSE_BTN9_DBL (MOUSE_BASE_DBL+9) -#define MOUSE_BTN_DBL_END (MOUSE_BASE_DBL+10) +#define MOUSE_BTN10_DBL (MOUSE_BASE_DBL+10) +#define MOUSE_BTN11_DBL (MOUSE_BASE_DBL+11) +#define MOUSE_BTN12_DBL (MOUSE_BASE_DBL+12) +#define MOUSE_BTN13_DBL (MOUSE_BASE_DBL+13) +#define MOUSE_BTN14_DBL (MOUSE_BASE_DBL+14) +#define MOUSE_BTN15_DBL (MOUSE_BASE_DBL+15) +#define MOUSE_BTN16_DBL (MOUSE_BASE_DBL+16) +#define MOUSE_BTN17_DBL (MOUSE_BASE_DBL+17) +#define MOUSE_BTN18_DBL (MOUSE_BASE_DBL+18) +#define MOUSE_BTN19_DBL (MOUSE_BASE_DBL+19) +#define MOUSE_BTN_DBL_END (MOUSE_BASE_DBL+20) #endif // AR_DEFINES_ONLY -- cgit v1.2.3 From 00ffdc0da63877680c71722c75519be978fadf8b Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 7 May 2011 18:44:29 +0000 Subject: cleanup: some warning fixes and minor cleanups git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33399 b3059339-0415-0410-9bf9-f77b7e298cf2 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33400 b3059339-0415-0410-9bf9-f77b7e298cf2 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33421 b3059339-0415-0410-9bf9-f77b7e298cf2 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33425 b3059339-0415-0410-9bf9-f77b7e298cf2 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33426 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/aviheader.c | 2 +- libmpdemux/demux_ts.c | 3 +-- libmpdemux/mpeg_hdr.c | 9 +++------ libvo/vo_dfbmga.c | 4 ++-- libvo/vo_directfb2.c | 4 ++-- 5 files changed, 9 insertions(+), 13 deletions(-) diff --git a/libmpdemux/aviheader.c b/libmpdemux/aviheader.c index cd2db91726..3f18af28f8 100644 --- a/libmpdemux/aviheader.c +++ b/libmpdemux/aviheader.c @@ -258,7 +258,7 @@ while(1){ s->aIndex[i].dwSize = stream_read_dword_le(demuxer->stream); s->aIndex[i].dwDuration = stream_read_dword_le(demuxer->stream); mp_msg (MSGT_HEADER, MSGL_V, "ODML (%.4s): [%d] 0x%016"PRIx64" 0x%04x %u\n", - (s->dwChunkId), i, + s->dwChunkId, i, (uint64_t)s->aIndex[i].qwOffset, s->aIndex[i].dwSize, s->aIndex[i].dwDuration); } diff --git a/libmpdemux/demux_ts.c b/libmpdemux/demux_ts.c index ebb1709f5a..d809ac6c3b 100644 --- a/libmpdemux/demux_ts.c +++ b/libmpdemux/demux_ts.c @@ -661,7 +661,7 @@ static int a52_check(char *buf, int len) static off_t ts_detect_streams(demuxer_t *demuxer, tsdemux_init_t *param) { - int video_found = 0, audio_found = 0, sub_found av_unused = 0, i, num_packets = 0, req_apid, req_vpid, req_spid; + int video_found = 0, audio_found = 0, i, num_packets = 0, req_apid, req_vpid, req_spid; int is_audio, is_video, is_sub, has_tables; int32_t p, chosen_pid = 0; off_t pos=0, ret = 0, init_pos, end_pos; @@ -828,7 +828,6 @@ static off_t ts_detect_streams(demuxer_t *demuxer, tsdemux_init_t *param) { param->stype = es.type; param->spid = es.pid; - sub_found = 1; } } diff --git a/libmpdemux/mpeg_hdr.c b/libmpdemux/mpeg_hdr.c index 2a00727e3a..0c368aa7a2 100644 --- a/libmpdemux/mpeg_hdr.c +++ b/libmpdemux/mpeg_hdr.c @@ -45,7 +45,7 @@ static float frameratecode2framerate[16] = { int mp_header_process_sequence_header (mp_mpeg_header_t * picture, const unsigned char * buffer) { - int width av_unused, height; + int height; if ((buffer[6] & 0x20) != 0x20){ fprintf(stderr, "missing marker bit!\n"); @@ -54,11 +54,8 @@ int mp_header_process_sequence_header (mp_mpeg_header_t * picture, const unsigne height = (buffer[0] << 16) | (buffer[1] << 8) | buffer[2]; - picture->display_picture_width = (height >> 12); - picture->display_picture_height = (height & 0xfff); - - width = ((height >> 12) + 15) & ~15; - height = ((height & 0xfff) + 15) & ~15; + picture->display_picture_width = height >> 12; + picture->display_picture_height = height & 0xfff; picture->aspect_ratio_information = buffer[3] >> 4; picture->frame_rate_code = buffer[3] & 15; diff --git a/libvo/vo_dfbmga.c b/libvo/vo_dfbmga.c index 76ae4a46f9..57b798040e 100644 --- a/libvo/vo_dfbmga.c +++ b/libvo/vo_dfbmga.c @@ -1335,7 +1335,7 @@ draw_image( mp_image_t *mpi ) } static int -set_equalizer( char *data, int value ) +set_equalizer( const char *data, int value ) { DFBResult res; DFBColorAdjustment ca; @@ -1375,7 +1375,7 @@ set_equalizer( char *data, int value ) } static int -get_equalizer( char *data, int *value ) +get_equalizer( const char *data, int *value ) { DFBResult res; DFBColorAdjustment ca; diff --git a/libvo/vo_directfb2.c b/libvo/vo_directfb2.c index de44b2ea51..ae15918b53 100644 --- a/libvo/vo_directfb2.c +++ b/libvo/vo_directfb2.c @@ -980,7 +980,7 @@ static void uninit(void) } -static uint32_t directfb_set_video_eq(char *data, int value) //data==name +static uint32_t directfb_set_video_eq(const char *data, int value) //data==name { DFBColorAdjustment ca; @@ -1038,7 +1038,7 @@ if (layer) { } -static uint32_t directfb_get_video_eq(char *data, int *value) // data==name +static uint32_t directfb_get_video_eq(const char *data, int *value) // data==name { DFBColorAdjustment ca; -- cgit v1.2.3 From 9149ec5d89d5ee2f89027691ce0f627fe91fa287 Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 7 May 2011 21:28:56 +0000 Subject: cache2.c: Avoid warnings about discarding volatile In practice this should not really make a difference, but the code is not significantly worse and it is more correct. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33435 b3059339-0415-0410-9bf9-f77b7e298cf2 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33447 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/cache2.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/stream/cache2.c b/stream/cache2.c index e930d72255..ee1cf47245 100644 --- a/stream/cache2.c +++ b/stream/cache2.c @@ -254,6 +254,8 @@ static int cache_fill(cache_vars_t *s) } static int cache_execute_control(cache_vars_t *s) { + double double_res; + unsigned uint_res; static unsigned last; int quit = s->control == -2; if (quit || !s->stream->control) { @@ -273,18 +275,22 @@ static int cache_execute_control(cache_vars_t *s) { } if (s->control == -1) return 1; switch (s->control) { - case STREAM_CTRL_GET_CURRENT_TIME: case STREAM_CTRL_SEEK_TO_TIME: + double_res = s->control_double_arg; + case STREAM_CTRL_GET_CURRENT_TIME: case STREAM_CTRL_GET_ASPECT_RATIO: - s->control_res = s->stream->control(s->stream, s->control, &s->control_double_arg); + s->control_res = s->stream->control(s->stream, s->control, &double_res); + s->control_double_arg = double_res; break; case STREAM_CTRL_SEEK_TO_CHAPTER: + case STREAM_CTRL_SET_ANGLE: + uint_res = s->control_uint_arg; case STREAM_CTRL_GET_NUM_CHAPTERS: case STREAM_CTRL_GET_CURRENT_CHAPTER: case STREAM_CTRL_GET_NUM_ANGLES: case STREAM_CTRL_GET_ANGLE: - case STREAM_CTRL_SET_ANGLE: - s->control_res = s->stream->control(s->stream, s->control, &s->control_uint_arg); + s->control_res = s->stream->control(s->stream, s->control, &uint_res); + s->control_uint_arg = uint_res; break; default: s->control_res = STREAM_UNSUPPORTED; -- cgit v1.2.3 From 8278977c0de65322a6c59c13a1f50f61ddd43e2c Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 7 May 2011 21:32:50 +0000 Subject: cleanup: Make vcd_seek_to_track() static in more files git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33436 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/vcd_read_darwin.h | 2 +- stream/vcd_read_fbsd.h | 2 +- stream/vcd_read_os2.h | 2 +- stream/vcd_read_win32.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/stream/vcd_read_darwin.h b/stream/vcd_read_darwin.h index 927b659871..71fc093984 100644 --- a/stream/vcd_read_darwin.h +++ b/stream/vcd_read_darwin.h @@ -67,7 +67,7 @@ static inline unsigned int vcd_get_msf(mp_vcd_priv_t* vcd) return CDConvertMSFToLBA(vcd->msf); } -int vcd_seek_to_track(mp_vcd_priv_t* vcd, int track) +static int vcd_seek_to_track(mp_vcd_priv_t* vcd, int track) { struct CDTrackInfo entry; diff --git a/stream/vcd_read_fbsd.h b/stream/vcd_read_fbsd.h index 6e50ac9ac9..8a59a2a8ee 100644 --- a/stream/vcd_read_fbsd.h +++ b/stream/vcd_read_fbsd.h @@ -136,7 +136,7 @@ read_toc_entry(mp_vcd_priv_t *vcd, int nr) return 1; } -int +static int vcd_seek_to_track(mp_vcd_priv_t* vcd, int track) { if (!read_toc_entry(vcd, track)) diff --git a/stream/vcd_read_os2.h b/stream/vcd_read_os2.h index 0585d1d7d0..1df2abec89 100644 --- a/stream/vcd_read_os2.h +++ b/stream/vcd_read_os2.h @@ -57,7 +57,7 @@ static inline unsigned vcd_get_msf(mp_vcd_priv_t *vcd) (vcd->msfCurrent.bSecond + vcd->msfCurrent.bMinute * 60) * 75 - 150; } -int vcd_seek_to_track(mp_vcd_priv_t *vcd, int track) +static int vcd_seek_to_track(mp_vcd_priv_t *vcd, int track) { struct { UCHAR auchSign[4]; diff --git a/stream/vcd_read_win32.h b/stream/vcd_read_win32.h index f4ac384d1d..2e13232606 100644 --- a/stream/vcd_read_win32.h +++ b/stream/vcd_read_win32.h @@ -53,7 +53,7 @@ static inline unsigned vcd_get_msf(mp_vcd_priv_t* vcd, int track){ vcd->toc.TrackData[index].Address[1] * 60) * 75 - 150; } -int vcd_seek_to_track(mp_vcd_priv_t* vcd, int track) +static int vcd_seek_to_track(mp_vcd_priv_t* vcd, int track) { unsigned sect; if (track < vcd->toc.FirstTrack || track > vcd->toc.LastTrack) -- cgit v1.2.3 From f293935d39cc3bf5141e3b12c980e6918e78886a Mon Sep 17 00:00:00 2001 From: vayne Date: Mon, 9 May 2011 17:36:38 +0000 Subject: Windows: stream_cddb.c: include for MinGW git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33449 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/stream_cddb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/stream/stream_cddb.c b/stream/stream_cddb.c index 5a4b3c1cee..afc512e5b7 100644 --- a/stream/stream_cddb.c +++ b/stream/stream_cddb.c @@ -38,6 +38,7 @@ #include #if defined(__MINGW32__) || defined(__CYGWIN__) #ifdef __MINGW32__ +#include #define mkdir(a,b) mkdir(a) #endif #include -- cgit v1.2.3 From 57f48fc1bf96504d169d82d2a27c1f1ad82ca2d1 Mon Sep 17 00:00:00 2001 From: reimar Date: Tue, 10 May 2011 17:51:39 +0000 Subject: vo_gl: don't accept 9/10-bit formats as input Make mp_get_chroma_shift() simpler/more generic and add an argument to get the per-component bit depth. Use this to check more properly for supported formats in gl and gl2 vos (only 8 and 16 bit are supported, 9 and 10 are not). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33452 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/img_format.c | 89 ++++++++++++++++++++++++++-------------------- libmpcodecs/img_format.h | 3 +- libmpcodecs/mp_image.c | 4 +-- libmpcodecs/vf_sab.c | 2 +- libmpcodecs/vf_smartblur.c | 2 +- libvo/gl_common.c | 2 +- libvo/vo_gl.c | 18 +++++----- libvo/vo_gl2.c | 12 ++++--- 8 files changed, 74 insertions(+), 58 deletions(-) diff --git a/libmpcodecs/img_format.c b/libmpcodecs/img_format.c index 09711e5270..c4884f3eca 100644 --- a/libmpcodecs/img_format.c +++ b/libmpcodecs/img_format.c @@ -19,6 +19,7 @@ #include "config.h" #include "img_format.h" #include "stdio.h" +#include "mpbswap.h" const char *vo_format_name(int format) { @@ -117,20 +118,57 @@ const char *vo_format_name(int format) return unknown_format; } -int mp_get_chroma_shift(int format, int *x_shift, int *y_shift) +int mp_get_chroma_shift(int format, int *x_shift, int *y_shift, int *component_bits) { int xs = 0, ys = 0; int bpp; - int bpp_factor = 1; int err = 0; - switch (format) { - case IMGFMT_420P16_LE: - case IMGFMT_420P16_BE: - case IMGFMT_420P10_LE: - case IMGFMT_420P10_BE: - case IMGFMT_420P9_LE: - case IMGFMT_420P9_BE: - bpp_factor = 2; + int bits = 8; + if ((format & 0xff0000f0) == 0x34000050) + format = bswap_32(format); + if ((format & 0xf00000ff) == 0x50000034) { + switch (format >> 24) { + case 0x50: + break; + case 0x51: + bits = 16; + break; + case 0x52: + bits = 10; + break; + case 0x53: + bits = 9; + break; + default: + err = 1; + break; + } + switch (format & 0x00ffffff) { + case 0x00343434: // 444 + xs = 0; + ys = 0; + break; + case 0x00323234: // 422 + xs = 1; + ys = 0; + break; + case 0x00303234: // 420 + xs = 1; + ys = 1; + break; + case 0x00313134: // 411 + xs = 2; + ys = 0; + break; + case 0x00303434: // 440 + xs = 0; + ys = 1; + break; + default: + err = 1; + break; + } + } else switch (format) { case IMGFMT_420A: case IMGFMT_I420: case IMGFMT_IYUV: @@ -143,34 +181,6 @@ int mp_get_chroma_shift(int format, int *x_shift, int *y_shift) xs = 2; ys = 2; break; - case IMGFMT_444P16_LE: - case IMGFMT_444P16_BE: - case IMGFMT_444P10_LE: - case IMGFMT_444P10_BE: - case IMGFMT_444P9_LE: - case IMGFMT_444P9_BE: - bpp_factor = 2; - case IMGFMT_444P: - xs = 0; - ys = 0; - break; - case IMGFMT_422P16_LE: - case IMGFMT_422P16_BE: - case IMGFMT_422P10_LE: - case IMGFMT_422P10_BE: - bpp_factor = 2; - case IMGFMT_422P: - xs = 1; - ys = 0; - break; - case IMGFMT_411P: - xs = 2; - ys = 0; - break; - case IMGFMT_440P: - xs = 0; - ys = 1; - break; case IMGFMT_Y8: case IMGFMT_Y800: xs = 31; @@ -182,9 +192,10 @@ int mp_get_chroma_shift(int format, int *x_shift, int *y_shift) } if (x_shift) *x_shift = xs; if (y_shift) *y_shift = ys; + if (component_bits) *component_bits = bits; bpp = 8 + ((16 >> xs) >> ys); if (format == IMGFMT_420A) bpp += 8; - bpp *= bpp_factor; + bpp *= (bits + 7) >> 3; return err ? 0 : bpp; } diff --git a/libmpcodecs/img_format.h b/libmpcodecs/img_format.h index 52a5ffbe25..2fc9775ee1 100644 --- a/libmpcodecs/img_format.h +++ b/libmpcodecs/img_format.h @@ -227,8 +227,9 @@ const char *vo_format_name(int format); /** * Calculates the scale shifts for the chroma planes for planar YUV * + * \param component_bits bits per component * \return bits-per-pixel for format if successful (i.e. format is 3 or 4-planes planar YUV), 0 otherwise */ -int mp_get_chroma_shift(int format, int *x_shift, int *y_shift); +int mp_get_chroma_shift(int format, int *x_shift, int *y_shift, int *component_bits); #endif /* MPLAYER_IMG_FORMAT_H */ diff --git a/libmpcodecs/mp_image.c b/libmpcodecs/mp_image.c index 4d2892cf81..88702dde60 100644 --- a/libmpcodecs/mp_image.c +++ b/libmpcodecs/mp_image.c @@ -123,9 +123,9 @@ void mp_image_setfmt(mp_image_t* mpi,unsigned int out_fmt){ } mpi->flags|=MP_IMGFLAG_YUV; mpi->num_planes=3; - if (mp_get_chroma_shift(out_fmt, NULL, NULL)) { + if (mp_get_chroma_shift(out_fmt, NULL, NULL, NULL)) { mpi->flags|=MP_IMGFLAG_PLANAR; - mpi->bpp = mp_get_chroma_shift(out_fmt, &mpi->chroma_x_shift, &mpi->chroma_y_shift); + mpi->bpp = mp_get_chroma_shift(out_fmt, &mpi->chroma_x_shift, &mpi->chroma_y_shift, NULL); mpi->chroma_width = mpi->width >> mpi->chroma_x_shift; mpi->chroma_height = mpi->height >> mpi->chroma_y_shift; } diff --git a/libmpcodecs/vf_sab.c b/libmpcodecs/vf_sab.c index 7f05af9249..2773ed3109 100644 --- a/libmpcodecs/vf_sab.c +++ b/libmpcodecs/vf_sab.c @@ -116,7 +116,7 @@ static int config(struct vf_instance *vf, //__asm__ volatile("emms\n\t"); allocStuff(&vf->priv->luma, width, height); - mp_get_chroma_shift(outfmt, &sw, &sh); + mp_get_chroma_shift(outfmt, &sw, &sh, NULL); allocStuff(&vf->priv->chroma, width>>sw, height>>sh); return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt); diff --git a/libmpcodecs/vf_smartblur.c b/libmpcodecs/vf_smartblur.c index 6599c967de..7c54231e40 100644 --- a/libmpcodecs/vf_smartblur.c +++ b/libmpcodecs/vf_smartblur.c @@ -76,7 +76,7 @@ static int config(struct vf_instance *vf, allocStuff(&vf->priv->luma, width, height); - mp_get_chroma_shift(outfmt, &sw, &sh); + mp_get_chroma_shift(outfmt, &sw, &sh, NULL); allocStuff(&vf->priv->chroma, width>>sw, height>>sh); return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt); diff --git a/libvo/gl_common.c b/libvo/gl_common.c index ad6fc99a64..f98e6afa4c 100644 --- a/libvo/gl_common.c +++ b/libvo/gl_common.c @@ -254,7 +254,7 @@ int glFindFormat(uint32_t fmt, int *bpp, GLint *gl_texfmt, if (!gl_format) gl_format = &dummy2; if (!gl_type) gl_type = &dummy2; - if (mp_get_chroma_shift(fmt, NULL, NULL)) { + if (mp_get_chroma_shift(fmt, NULL, NULL, NULL)) { // reduce the possible cases a bit if (IMGFMT_IS_YUVP16_LE(fmt)) fmt = IMGFMT_420P16_LE; diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index e663057beb..bc50e245b3 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -258,7 +258,7 @@ static void update_yuvconv(void) { gl_conversion_params_t params = {gl_target, yuvconvtype, {colorspace, levelconv, bri, cont, hue, sat, rgamma, ggamma, bgamma}, texture_width, texture_height, 0, 0, filter_strength}; - mp_get_chroma_shift(image_format, &xs, &ys); + mp_get_chroma_shift(image_format, &xs, &ys, NULL); params.chrom_texw = params.texw >> xs; params.chrom_texh = params.texh >> ys; glSetupYUVConversion(¶ms); @@ -568,7 +568,7 @@ static int initGl(uint32_t d_width, uint32_t d_height) { int i; int xs, ys; scale_type = get_scale_type(1); - mp_get_chroma_shift(image_format, &xs, &ys); + mp_get_chroma_shift(image_format, &xs, &ys, NULL); mpglGenTextures(21, default_texs); default_texs[21] = 0; for (i = 0; i < 7; i++) { @@ -670,7 +670,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin image_height = height; image_width = width; image_format = format; - is_yuv = mp_get_chroma_shift(image_format, &xs, &ys) > 0; + is_yuv = mp_get_chroma_shift(image_format, &xs, &ys, NULL) > 0; is_yuv |= (xs << 8) | (ys << 16); glFindFormat(format, NULL, &gl_texfmt, &gl_format, &gl_type); @@ -884,7 +884,7 @@ static int draw_slice(uint8_t *src[], int stride[], int w,int h,int x,int y) x, y, w, h, slice_height); if (is_yuv) { int xs, ys; - mp_get_chroma_shift(image_format, &xs, &ys); + mp_get_chroma_shift(image_format, &xs, &ys, NULL); mpglActiveTexture(GL_TEXTURE1); glUploadTex(gl_target, gl_format, gl_type, src[1], stride[1], x >> xs, y >> ys, w >> xs, h >> ys, slice_height); @@ -951,7 +951,7 @@ static uint32_t get_image(mp_image_t *mpi) { if (is_yuv) { // planar YUV int xs, ys; - mp_get_chroma_shift(image_format, &xs, &ys); + mp_get_chroma_shift(image_format, &xs, &ys, NULL); mpi->flags |= MP_IMGFLAG_COMMON_STRIDE | MP_IMGFLAG_COMMON_PLANE; mpi->stride[0] = mpi->width; mpi->planes[1] = mpi->planes[0] + mpi->stride[0] * mpi->height; @@ -1009,7 +1009,7 @@ static uint32_t draw_image(mp_image_t *mpi) { if (force_pbo && !(mpi->flags & MP_IMGFLAG_DIRECT) && !gl_bufferptr && get_image(&mpi2) == VO_TRUE) { int bpp = is_yuv ? 8 : mpi->bpp; int xs, ys; - mp_get_chroma_shift(image_format, &xs, &ys); + mp_get_chroma_shift(image_format, &xs, &ys, NULL); memcpy_pic(mpi2.planes[0], mpi->planes[0], mpi->w * bpp / 8, mpi->h, mpi2.stride[0], mpi->stride[0]); if (is_yuv) { memcpy_pic(mpi2.planes[1], mpi->planes[1], mpi->w >> xs, mpi->h >> ys, mpi2.stride[1], mpi->stride[1]); @@ -1051,7 +1051,7 @@ static uint32_t draw_image(mp_image_t *mpi) { mpi->x, mpi->y, w, h, slice); if (is_yuv) { int xs, ys; - mp_get_chroma_shift(image_format, &xs, &ys); + mp_get_chroma_shift(image_format, &xs, &ys, NULL); if ((mpi->flags & MP_IMGFLAG_DIRECT) && !(mpi->flags & MP_IMGFLAG_COMMON_PLANE)) { mpglBindBuffer(GL_PIXEL_UNPACK_BUFFER, gl_buffer_uv[0]); mpglUnmapBuffer(GL_PIXEL_UNPACK_BUFFER); @@ -1088,6 +1088,7 @@ draw_frame(uint8_t *src[]) static int query_format(uint32_t format) { + int depth; int caps = VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW | VFCAP_FLIP | VFCAP_HWSCALE_UP | VFCAP_HWSCALE_DOWN | VFCAP_ACCEPT_STRIDE; @@ -1095,7 +1096,8 @@ query_format(uint32_t format) caps |= VFCAP_OSD | VFCAP_EOSD | (scaled_osd ? 0 : VFCAP_EOSD_UNSCALED); if (format == IMGFMT_RGB24 || format == IMGFMT_RGBA) return caps; - if (use_yuv && mp_get_chroma_shift(format, NULL, NULL) && + if (use_yuv && mp_get_chroma_shift(format, NULL, NULL, &depth) && + (depth == 8 || depth == 16) && (IMGFMT_IS_YUVP16_NE(format) || !IMGFMT_IS_YUVP16(format))) return caps; // HACK, otherwise we get only b&w with some filters (e.g. -vf eq) diff --git a/libvo/vo_gl2.c b/libvo/vo_gl2.c index 957125069b..21f779866c 100644 --- a/libvo/vo_gl2.c +++ b/libvo/vo_gl2.c @@ -274,7 +274,7 @@ static int initTextures(void) glTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); if (is_yuv) { int xs, ys; - mp_get_chroma_shift(image_format, &xs, &ys); + mp_get_chroma_shift(image_format, &xs, &ys, NULL); mpglActiveTexture(GL_TEXTURE1); glCreateClearTex(GL_TEXTURE_2D, gl_internal_format, gl_bitmap_format, gl_bitmap_type, GL_LINEAR, texture_width >> xs, texture_height >> ys, 128); @@ -580,7 +580,7 @@ static int initGl(uint32_t d_width, uint32_t d_height) mpglBindProgram(GL_FRAGMENT_PROGRAM, fragprog); break; } - mp_get_chroma_shift(image_format, &xs, &ys); + mp_get_chroma_shift(image_format, &xs, &ys, NULL); params.chrom_texw = params.texw >> xs; params.chrom_texh = params.texh >> ys; glSetupYUVConversion(¶ms); @@ -616,7 +616,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin image_height = height; image_width = width; image_format = format; - is_yuv = mp_get_chroma_shift(image_format, &xs, &ys) > 0; + is_yuv = mp_get_chroma_shift(image_format, &xs, &ys, NULL) > 0; is_yuv |= (xs << 8) | (ys << 16); #ifdef CONFIG_GL_WIN32 @@ -741,7 +741,7 @@ static int draw_slice(uint8_t *src[], int stride[], int w,int h,int x,int y) struct TexSquare *texline = &texgrid[y / texture_height * texnumx]; int subtex_y = y % texture_width; int xs, ys; - mp_get_chroma_shift(image_format, &xs, &ys); + mp_get_chroma_shift(image_format, &xs, &ys, NULL); while (rem_h > 0) { int rem_w = w; struct TexSquare *tsq = &texline[x / texture_width]; @@ -802,7 +802,9 @@ draw_frame(uint8_t *src[]) static int query_format(uint32_t format) { - if (use_yuv && mp_get_chroma_shift(format, NULL, NULL) && + int depth; + if (use_yuv && mp_get_chroma_shift(format, NULL, NULL, &depth) && + (depth == 8 || depth == 16) && (IMGFMT_IS_YUVP16_NE(format) || !IMGFMT_IS_YUVP16(format))) return VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW | VFCAP_OSD | VFCAP_HWSCALE_UP | VFCAP_HWSCALE_DOWN | VFCAP_ACCEPT_STRIDE; -- cgit v1.2.3 From 2c7488fe913a19254c2a92e20032a6181f62e1cf Mon Sep 17 00:00:00 2001 From: reimar Date: Wed, 11 May 2011 06:59:51 +0000 Subject: vo_gl: Request GL_LUMINANCE16 for 16-bit YUV input Request GL_LUMINANCE16 as internal format for > 8 bit YUV formats. Have yet to find a system that actually provides that though. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33453 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/gl_common.c | 4 ++-- libvo/gl_common.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libvo/gl_common.c b/libvo/gl_common.c index f98e6afa4c..cee413d3b3 100644 --- a/libvo/gl_common.c +++ b/libvo/gl_common.c @@ -183,7 +183,7 @@ static const struct gl_name_map_struct gl_name_map[] = { MAP(GL_R3_G3_B2), MAP(GL_RGB4), MAP(GL_RGB5), MAP(GL_RGB8), MAP(GL_RGB10), MAP(GL_RGB12), MAP(GL_RGB16), MAP(GL_RGBA2), MAP(GL_RGBA4), MAP(GL_RGB5_A1), MAP(GL_RGBA8), MAP(GL_RGB10_A2), - MAP(GL_RGBA12), MAP(GL_RGBA16), MAP(GL_LUMINANCE8), + MAP(GL_RGBA12), MAP(GL_RGBA16), MAP(GL_LUMINANCE8), MAP(GL_LUMINANCE16), // format MAP(GL_RGB), MAP(GL_RGBA), MAP(GL_RED), MAP(GL_GREEN), MAP(GL_BLUE), @@ -282,7 +282,7 @@ int glFindFormat(uint32_t fmt, int *bpp, GLint *gl_texfmt, break; case IMGFMT_420P16: supported = 0; // no native YUV support - *gl_texfmt = 1; + *gl_texfmt = GL_LUMINANCE16; *bpp = 16; *gl_format = GL_LUMINANCE; *gl_type = GL_UNSIGNED_SHORT; diff --git a/libvo/gl_common.h b/libvo/gl_common.h index ddf0856956..fa0cffaf74 100644 --- a/libvo/gl_common.h +++ b/libvo/gl_common.h @@ -266,6 +266,9 @@ #ifndef GL_FLOAT_RGB32_NV #define GL_FLOAT_RGB32_NV 0x8889 #endif +#ifndef GL_LUMINANCE16 +#define GL_LUMINANCE16 0x8042 +#endif #ifndef GL_UNPACK_CLIENT_STORAGE_APPLE #define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2 #endif -- cgit v1.2.3 From 96c992de47abffd66dda6e94e4093552f7528472 Mon Sep 17 00:00:00 2001 From: ib Date: Wed, 11 May 2011 11:35:38 +0000 Subject: stream.c: make some stream messages translatable git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33454 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/stream.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/stream/stream.c b/stream/stream.c index fde102759c..4b55072561 100644 --- a/stream/stream.c +++ b/stream/stream.c @@ -167,7 +167,7 @@ static stream_t *open_stream_plugin(const stream_info_t *sinfo, m_option_t url_opt = { "stream url", arg , CONF_TYPE_CUSTOM_URL, 0, 0 ,0, (void *)sinfo->opts }; if(m_option_parse(&url_opt,"stream url",filename,arg,M_CONFIG_FILE) < 0) { - mp_msg(MSGT_OPEN,MSGL_ERR, "URL parsing failed on url %s\n",filename); + mp_tmsg(MSGT_OPEN,MSGL_ERR, "URL parsing failed on url %s\n",filename); m_struct_free(desc,arg); return NULL; } @@ -251,7 +251,7 @@ stream_t *open_stream_full(const char *filename, int mode, } } - mp_msg(MSGT_OPEN,MSGL_ERR, "No stream found to handle url %s\n",filename); + mp_tmsg(MSGT_OPEN,MSGL_ERR, "No stream found to handle url %s\n", filename); return NULL; } @@ -365,7 +365,7 @@ if(newpos==0 || newpos!=s->pos){ #ifdef CONFIG_NETWORKING if(s->seek) { // new stream seek is much cleaner than streaming_ctrl one if(!s->seek(s,newpos)) { - mp_msg(MSGT_STREAM,MSGL_ERR, "Seek failed\n"); + mp_tmsg(MSGT_STREAM,MSGL_ERR, "Seek failed\n"); return 0; } break; @@ -373,14 +373,15 @@ if(newpos==0 || newpos!=s->pos){ if( s->streaming_ctrl!=NULL && s->streaming_ctrl->streaming_seek ) { if( s->streaming_ctrl->streaming_seek( s->fd, newpos, s->streaming_ctrl )<0 ) { - mp_msg(MSGT_STREAM,MSGL_INFO,"Stream not seekable!\n"); + mp_tmsg(MSGT_STREAM,MSGL_INFO,"Stream not seekable!\n"); return 1; } break; } #endif if(newpospos){ - mp_msg(MSGT_STREAM,MSGL_INFO,"Cannot seek backward in linear streams!\n"); + mp_tmsg(MSGT_STREAM, MSGL_INFO, + "Cannot seek backward in linear streams!\n"); return 1; } break; @@ -390,7 +391,7 @@ if(newpos==0 || newpos!=s->pos){ return 0; // Now seek if(!s->seek(s,newpos)) { - mp_msg(MSGT_STREAM,MSGL_ERR, "Seek failed\n"); + mp_tmsg(MSGT_STREAM,MSGL_ERR, "Seek failed\n"); return 0; } } -- cgit v1.2.3 From bd3ed7cf1f6d7d758c81d59b81ce7c8a7190b12b Mon Sep 17 00:00:00 2001 From: cehoyos Date: Thu, 12 May 2011 18:20:38 +0000 Subject: codecs.conf: add S302M audio codec from libavcodec git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33460 b3059339-0415-0410-9bf9-f77b7e298cf2 --- etc/codecs.conf | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/etc/codecs.conf b/etc/codecs.conf index d5d3d3b9ac..dfa3be829c 100644 --- a/etc/codecs.conf +++ b/etc/codecs.conf @@ -4379,6 +4379,13 @@ audiocodec ffpcmlxf driver ffmpeg dll pcm_lxf +audiocodec ffs302m + info "SMPTE 302M" + status working + fourcc BSSD + driver ffmpeg + dll s302m + ; add every new fourcc also to allocate_parser() ; in libmpdemux/demuxer.c audiocodec ffac3 -- cgit v1.2.3 From ede0eed089221f35717755d3a50c938df3a344b5 Mon Sep 17 00:00:00 2001 From: cehoyos Date: Thu, 12 May 2011 21:37:24 +0000 Subject: demux_ts: Support S302M audio git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33461 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demux_ts.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libmpdemux/demux_ts.c b/libmpdemux/demux_ts.c index d809ac6c3b..6658e3b796 100644 --- a/libmpdemux/demux_ts.c +++ b/libmpdemux/demux_ts.c @@ -80,6 +80,7 @@ typedef enum AUDIO_AAC = mmioFOURCC('M', 'P', '4', 'A'), AUDIO_AAC_LATM = mmioFOURCC('M', 'P', '4', 'L'), AUDIO_TRUEHD = mmioFOURCC('T', 'R', 'H', 'D'), + AUDIO_S302M = mmioFOURCC('B', 'S', 'S', 'D'), SPU_DVD = 0x3000000, SPU_DVB = 0x3000001, SPU_TELETEXT = 0x3000002, @@ -260,6 +261,7 @@ static int IS_AUDIO(es_stream_type_t type) case AUDIO_AAC_LATM: case AUDIO_DTS: case AUDIO_TRUEHD: + case AUDIO_S302M: return 1; } return 0; @@ -895,6 +897,8 @@ static off_t ts_detect_streams(demuxer_t *demuxer, tsdemux_init_t *param) mp_msg(MSGT_DEMUXER, MSGL_INFO, "AUDIO AAC LATM(pid=%d)", param->apid); else if(param->atype == AUDIO_TRUEHD) mp_msg(MSGT_DEMUXER, MSGL_INFO, "AUDIO TRUEHD(pid=%d)", param->apid); + else if(param->atype == AUDIO_S302M) + mp_msg(MSGT_DEMUXER, MSGL_INFO, "AUDIO S302M(pid=%d)", param->apid); else { audio_found = 0; @@ -2356,6 +2360,10 @@ static int parse_descriptors(struct pmt_es_t *es, uint8_t *ptr) { es->type = VIDEO_DIRAC; } + else if(d[0] == 'B' && d[1] == 'S' && d[2] == 'S' && d[3] == 'D') + { + es->type = AUDIO_S302M; + } else es->type = UNKNOWN; mp_msg(MSGT_DEMUX, MSGL_DBG2, "FORMAT %s\n", es->format_descriptor); -- cgit v1.2.3 From 97dfc4f219d294756850bb2112ffbb400af31463 Mon Sep 17 00:00:00 2001 From: cehoyos Date: Thu, 12 May 2011 23:15:39 +0000 Subject: codecs.conf: add libavcodec r10k decoder git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33462 b3059339-0415-0410-9bf9-f77b7e298cf2 --- etc/codecs.conf | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/etc/codecs.conf b/etc/codecs.conf index dfa3be829c..f7168b9f02 100644 --- a/etc/codecs.conf +++ b/etc/codecs.conf @@ -150,6 +150,13 @@ videocodec ffr210 driver ffmpeg dll "r210" +videocodec ffr10k + info "FFmpeg R10k - 10-bit RGB" + status working + fourcc R10k,R10g + driver ffmpeg + dll "r10k" + videocodec blackmagic info "Blackmagic 10-bit" status working -- cgit v1.2.3 From dc6fe9692b30015c543f2ba2dbec8c8bc95a97b3 Mon Sep 17 00:00:00 2001 From: cehoyos Date: Thu, 12 May 2011 23:20:52 +0000 Subject: codecs.conf: add fourcc DVOO to rawyuy2 Digital Voodoo SD 8 Bit. --- etc/codecs.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/etc/codecs.conf b/etc/codecs.conf index f7168b9f02..528950723f 100644 --- a/etc/codecs.conf +++ b/etc/codecs.conf @@ -3243,6 +3243,7 @@ videocodec rawyuy2 fourcc YUNV YUY2 fourcc VYUY YUY2 fourcc yuvs YUY2 + fourcc DVOO YUY2 out YUY2 videocodec rawyuv2 @@ -3366,6 +3367,7 @@ videocodec ffrawyuy2 fourcc YUNV,yunv fourcc VYUY,vyuy fourcc yuvs,YUVS + fourcc DVOO driver ffmpeg dll rawvideo -- cgit v1.2.3 From 27b88a09c5319deb62221b8cd0ecc14cd1136e4a Mon Sep 17 00:00:00 2001 From: reimar Date: Thu, 19 May 2011 09:11:56 +0000 Subject: subreader: SAMI subs: wrap line if needed Start a new line if there's no space left to append to the previous one. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33471 b3059339-0415-0410-9bf9-f77b7e298cf2 --- sub/subreader.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sub/subreader.c b/sub/subreader.c index 6acecb5c54..a1d2974af4 100644 --- a/sub/subreader.c +++ b/sub/subreader.c @@ -177,6 +177,8 @@ static subtitle *sub_read_line_sami(stream_t* st, subtitle *current, break; case 3: /* get all text until '<' appears */ + if (p - text >= LINE_LEN) + sami_add_line(current, text, &p); if (*s == '\0') break; else if (!strncasecmp (s, "
", 4)) { sami_add_line(current, text, &p); -- cgit v1.2.3