From ce4d38385c17c13078f987783a6f8e936797d807 Mon Sep 17 00:00:00 2001 From: reimar Date: Fri, 30 Apr 2010 17:12:52 +0000 Subject: 100l, open the customtex also in binary mode, not just the program. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31106 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_gl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index c44e21a3e8..3b9b4eb513 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -264,7 +264,7 @@ static void update_yuvconv(void) { texture_width, texture_height); } if (custom_tex) { - FILE *f = fopen(custom_tex, "r"); + FILE *f = fopen(custom_tex, "rb"); if (!f) mp_msg(MSGT_VO, MSGL_WARN, "[gl] Could not read customtex %s\n", custom_tex); -- cgit v1.2.3 From 9d3c0960458902ada9a2077f33ec504e7a22397b Mon Sep 17 00:00:00 2001 From: reimar Date: Fri, 30 Apr 2010 19:03:13 +0000 Subject: Avoid duplicating the GL/gl.h include. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31107 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/gl_common.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libvo/gl_common.h b/libvo/gl_common.h index d09f3492fb..9152f06d0b 100644 --- a/libvo/gl_common.h +++ b/libvo/gl_common.h @@ -30,18 +30,14 @@ #ifdef CONFIG_GL_WIN32 #include -#include #include "w32_common.h" #endif #ifdef CONFIG_GL_X11 -#include #include #include #include "x11_common.h" #endif -#ifdef CONFIG_GL_SDL #include -#endif // workaround for some gl.h headers #ifndef GLAPIENTRY -- cgit v1.2.3 From 39fbfa0321cf72d7ec08b3b0c2c61232606788a3 Mon Sep 17 00:00:00 2001 From: reimar Date: Fri, 30 Apr 2010 19:04:13 +0000 Subject: Add configure detection for SDL backend for -vo gl. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31108 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 189 ++++++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 111 insertions(+), 78 deletions(-) diff --git a/configure b/configure index 05be2b712a..0597c9ef50 100755 --- a/configure +++ b/configure @@ -2496,7 +2496,7 @@ elif test -z "$CFLAGS" ; then elif test "$cc_vendor" != "gnu" ; then CFLAGS="-O2 $_march $_mcpu $_pipe" else - CFLAGS="-Wall -Wno-switch -Wpointer-arith -Wredundant-decls -O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer" + CFLAGS="-g3 -Wall -Wno-switch -Wpointer-arith -Wredundant-decls -O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer" extra_ldflags="$extra_ldflags -ffast-math" fi else @@ -5053,83 +5053,6 @@ echores "$_corevideo" fi #if darwin -# make sure this stays below CoreVideo to avoid issues due to namespace -# conflicts between -lGL and -framework OpenGL -echocheck "OpenGL" -#Note: this test is run even with --enable-gl since we autodetect linker flags -if (test "$_x11" = yes || win32) && test "$_gl" != no ; then - cat > $TMPC << EOF -#ifdef GL_WIN32 -#include -#include -#else -#include -#include -#include -#endif -int main(void) { -#ifdef GL_WIN32 - HDC dc; - wglCreateContext(dc); -#else - glXCreateContext(NULL, NULL, NULL, True); -#endif - glFinish(); - return 0; -} -EOF - _gl=no - for _ld_tmp in -lGL "-lGL -lXdamage" "-lGL $_ld_pthread" ; do - if cc_check $_ld_tmp $_ld_lm ; then - _gl=yes - _gl_x11=yes - libs_mplayer="$libs_mplayer $_ld_tmp $_ld_dl" - break - fi - done - if cc_check -DGL_WIN32 -lopengl32 ; then - _gl=yes - _gl_win32=yes - libs_mplayer="$libs_mplayer -lopengl32 -lgdi32" - fi -else - _gl=no -fi -if test "$_gl" = yes ; then - def_gl='#define CONFIG_GL 1' - _res_comment="backends:" - if test "$_gl_win32" = yes ; then - def_gl_win32='#define CONFIG_GL_WIN32 1' - _res_comment="$_res_comment win32" - fi - if test "$_gl_x11" = yes ; then - def_gl_x11='#define CONFIG_GL_X11 1' - _res_comment="$_res_comment x11" - fi - _vomodules="opengl $_vomodules" -else - def_gl='#undef CONFIG_GL' - def_gl_win32='#undef CONFIG_GL_WIN32' - def_gl_x11='#undef CONFIG_GL_X11' - _novomodules="opengl $_novomodules" -fi -echores "$_gl" - - -echocheck "MatrixView" -if test "$_gl" = no ; then - matrixview=no -fi -if test "$matrixview" = yes ; then - _vomodules="matrixview $_vomodules" - def_matrixview='#define CONFIG_MATRIXVIEW 1' -else - _novomodules="matrixview $_novomodules" - def_matrixview='#undef CONFIG_MATRIXVIEW' -fi -echores "$matrixview" - - echocheck "PNG support" if test "$_png" = auto ; then _png=no @@ -5420,6 +5343,114 @@ fi echores "$_sdl" +# make sure this stays below CoreVideo to avoid issues due to namespace +# conflicts between -lGL and -framework OpenGL +echocheck "OpenGL" +#Note: this test is run even with --enable-gl since we autodetect linker flags +if (test "$_x11" = yes || test "$_sdl" = yes || win32) && test "$_gl" != no ; then + cat > $TMPC << EOF +#ifdef GL_WIN32 +#include +#include +#elif defined(GL_SDL) +#include +#ifdef CONFIG_SDL_SDL_H +#include +#else +#include +#endif +#ifndef __APPLE__ +// we allow SDL hacking our main() only on OSX +#undef main +#endif +#else +#include +#include +#include +#endif +int main(void) { +#ifdef GL_WIN32 + HDC dc; + wglCreateContext(dc); +#elif defined(GL_SDL) + SDL_GL_SwapBuffers(); +#else + glXCreateContext(NULL, NULL, NULL, True); +#endif + glFinish(); + return 0; +} +EOF + _gl=no + for _ld_tmp in "" -lGL "-lGL -lXdamage" "-lGL $_ld_pthread" ; do + if cc_check $_ld_tmp $_ld_lm ; then + _gl=yes + _gl_x11=yes + libs_mplayer="$libs_mplayer $_ld_tmp $_ld_dl" + break + fi + done + if cc_check -DGL_WIN32 -lopengl32 ; then + _gl=yes + _gl_win32=yes + libs_mplayer="$libs_mplayer -lopengl32 -lgdi32" + fi + # last so it can reuse any linker etc. flags detected before + if test "$_sdl" = yes ; then + if cc_check -DGL_SDL || + cc_check -DCONFIG_SDL_SDL_H -DGL_SDL ; then + _gl=yes + _gl_sdl=yes + elif cc_check -DGL_SDL -lGL || + cc_check -DCONFIG_SDL_SDL_H -DGL_SDL -lGL ; then + _gl=yes + _gl_sdl=yes + libs_mplayer="$libs_mplayer -lGL" + fi + fi +else + _gl=no +fi +if test "$_gl" = yes ; then + def_gl='#define CONFIG_GL 1' + _res_comment="backends:" + if test "$_gl_win32" = yes ; then + def_gl_win32='#define CONFIG_GL_WIN32 1' + _res_comment="$_res_comment win32" + fi + if test "$_gl_x11" = yes ; then + def_gl_x11='#define CONFIG_GL_X11 1' + _res_comment="$_res_comment x11" + fi + if test "$_gl_sdl" = yes ; then + def_gl_sdl='#define CONFIG_GL_SDL 1' + _res_comment="$_res_comment sdl" + fi + _vomodules="opengl $_vomodules" +else + def_gl='#undef CONFIG_GL' + def_gl_win32='#undef CONFIG_GL_WIN32' + def_gl_x11='#undef CONFIG_GL_X11' + def_gl_sdl='#undef CONFIG_GL_SDL' + _novomodules="opengl $_novomodules" +fi +echores "$_gl" + + +echocheck "MatrixView" +if test "$_gl" = no ; then + matrixview=no +fi +if test "$matrixview" = yes ; then + _vomodules="matrixview $_vomodules" + def_matrixview='#define CONFIG_MATRIXVIEW 1' +else + _novomodules="matrixview $_novomodules" + def_matrixview='#undef CONFIG_MATRIXVIEW' +fi +echores "$matrixview" + + if os2 ; then echocheck "KVA (SNAP/WarpOverlay!/DIVE)" if test "$_kva" = auto; then @@ -8536,6 +8567,7 @@ GGI = $_ggi GL = $_gl GL_WIN32 = $_gl_win32 GL_X11 = $_gl_x11 +GL_SDL = $_gl_sdl MATRIXVIEW = $matrixview GUI = $_gui GUI_GTK = $_gui_gtk @@ -9081,6 +9113,7 @@ $def_gif_tvt_hack $def_gl $def_gl_win32 $def_gl_x11 +$def_gl_sdl $def_matrixview $def_ivtv $def_jpeg -- cgit v1.2.3 From aca523bf78ad83399c819f7bd3687143243b8e33 Mon Sep 17 00:00:00 2001 From: reimar Date: Fri, 30 Apr 2010 21:18:17 +0000 Subject: Revert accidental change to default CFLAGS. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31109 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 0597c9ef50..4c41f5d7fb 100755 --- a/configure +++ b/configure @@ -2496,7 +2496,7 @@ elif test -z "$CFLAGS" ; then elif test "$cc_vendor" != "gnu" ; then CFLAGS="-O2 $_march $_mcpu $_pipe" else - CFLAGS="-g3 -Wall -Wno-switch -Wpointer-arith -Wredundant-decls -O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer" + CFLAGS="-Wall -Wno-switch -Wpointer-arith -Wredundant-decls -O4 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer" extra_ldflags="$extra_ldflags -ffast-math" fi else -- cgit v1.2.3 From dd8db7f6205d27e6aac02addb4edc74efbd9be5b Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 1 May 2010 13:50:49 +0000 Subject: Use av_probe_input_format2 and avoid accepting detection while the score is still low. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31110 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demux_lavf.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c index 8bf64ff31a..f553ae7ea3 100644 --- a/libmpdemux/demux_lavf.c +++ b/libmpdemux/demux_lavf.c @@ -135,6 +135,7 @@ static int lavf_check_file(demuxer_t *demuxer){ lavf_priv_t *priv; int probe_data_size = 0; int read_size = INITIAL_PROBE_SIZE; + int score; if(!demuxer->priv) demuxer->priv=calloc(sizeof(lavf_priv_t),1); @@ -170,11 +171,13 @@ static int lavf_check_file(demuxer_t *demuxer){ avpd.filename += 9; avpd.buf_size= probe_data_size; - priv->avif= av_probe_input_format(&avpd, probe_data_size > 0); + score = 0; + priv->avif= av_probe_input_format2(&avpd, probe_data_size > 0, &score); read_size = FFMIN(2*read_size, PROBE_BUF_SIZE - probe_data_size); } while ((demuxer->desc->type != DEMUXER_TYPE_LAVF_PREFERRED || probe_data_size < SMALL_MAX_PROBE_SIZE) && - !priv->avif && read_size > 0 && probe_data_size < PROBE_BUF_SIZE); + score < AVPROBE_SCORE_MAX / 4 && + read_size > 0 && probe_data_size < PROBE_BUF_SIZE); av_free(avpd.buf); if(!priv->avif){ -- cgit v1.2.3 From 11b178be9a9eb788fad0ec66f537bfe306b2b2f3 Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 1 May 2010 15:38:37 +0000 Subject: Continue probing even for score == AVPROBE_SCORE_MAX / 4 to match FFmpeg's behaviour. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31111 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demux_lavf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c index f553ae7ea3..31cb2417e1 100644 --- a/libmpdemux/demux_lavf.c +++ b/libmpdemux/demux_lavf.c @@ -176,7 +176,7 @@ static int lavf_check_file(demuxer_t *demuxer){ read_size = FFMIN(2*read_size, PROBE_BUF_SIZE - probe_data_size); } while ((demuxer->desc->type != DEMUXER_TYPE_LAVF_PREFERRED || probe_data_size < SMALL_MAX_PROBE_SIZE) && - score < AVPROBE_SCORE_MAX / 4 && + score <= AVPROBE_SCORE_MAX / 4 && read_size > 0 && probe_data_size < PROBE_BUF_SIZE); av_free(avpd.buf); -- cgit v1.2.3 From fa6239aea034da3fdc4be76007a8bc06daa1093b Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 1 May 2010 22:49:05 +0000 Subject: Also print OpenGL renderer string with vendor and version with -v git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31127 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_gl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index 3b9b4eb513..e4b7158f3f 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -477,9 +477,10 @@ static void autodetectGlExtensions(void) { const char *extensions = mpglGetString(GL_EXTENSIONS); const char *vendor = mpglGetString(GL_VENDOR); const char *version = mpglGetString(GL_VERSION); + const char *renderer = mpglGetString(GL_RENDERER); int is_ati = vendor && strstr(vendor, "ATI") != NULL; int ati_broken_pbo = 0; - mp_msg(MSGT_VO, MSGL_V, "[gl] Running on OpenGL by '%s', versions '%s'\n", vendor, version); + mp_msg(MSGT_VO, MSGL_V, "[gl] Running on OpenGL '%s' by '%s', version '%s'\n", renderer, vendor, version); if (is_ati && strncmp(version, "2.1.", 4) == 0) { int ver = atoi(version + 4); mp_msg(MSGT_VO, MSGL_V, "[gl] Detected ATI driver version: %i\n", ver); -- cgit v1.2.3 From 0fd8d985f0c0481b1ebf14cb735cec485bc66d0c Mon Sep 17 00:00:00 2001 From: cehoyos Date: Sun, 2 May 2010 10:47:40 +0000 Subject: Silence permanent warning messages when decoding H264 over rtsp with live555. Patch by Gil Pedersen, gil A cmi D aau D dk git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31128 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demux_rtp_codec.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libmpdemux/demux_rtp_codec.cpp b/libmpdemux/demux_rtp_codec.cpp index 36d770fd0d..7d168c541f 100644 --- a/libmpdemux/demux_rtp_codec.cpp +++ b/libmpdemux/demux_rtp_codec.cpp @@ -134,12 +134,17 @@ void rtpCodecInitialize_video(demuxer_t* demuxer, unsigned char* configData = parseH264ConfigStr(subsession->fmtp_spropparametersets(), configLen); sh_video->bih = bih = insertVideoExtradata(bih, configData, configLen); - delete[] configData; #ifdef CONFIG_LIBAVCODEC + int fooLen; + const uint8_t* fooData; avcodec_register_all(); h264parserctx = av_parser_init(CODEC_ID_H264); avcctx = avcodec_alloc_context(); + // Pass the config to the parser + h264parserctx->parser->parser_parse(h264parserctx, avcctx, + &fooData, &fooLen, configData, configLen); #endif + delete[] configData; needVideoFrameRate(demuxer, subsession); } else if (strcmp(subsession->codecName(), "H261") == 0) { bih->biCompression = sh_video->format -- cgit v1.2.3 From 59058b54a73809866476b243d8bee82174fb4de8 Mon Sep 17 00:00:00 2001 From: aurel Date: Mon, 3 May 2010 22:19:52 +0000 Subject: uniformize handling of aid and vid with lavf so that it matches handling of sid aid and vid are now 0-based, instead of being a globally unique id. This matches the way sid is handled and the way other demuxers manage aid. As a side effect, it slightly simplifies demux_lavf. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31129 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demux_lavf.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c index 31cb2417e1..de08b08a6d 100644 --- a/libmpdemux/demux_lavf.c +++ b/libmpdemux/demux_lavf.c @@ -251,12 +251,11 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) { case CODEC_TYPE_AUDIO:{ WAVEFORMATEX *wf; sh_audio_t* sh_audio; - sh_audio=new_sh_audio(demuxer, i); - mp_msg(MSGT_DEMUX, MSGL_INFO, MSGTR_AudioID, "lavf", i); + sh_audio = new_sh_audio_aid(demuxer, i, priv->audio_streams); + mp_msg(MSGT_DEMUX, MSGL_INFO, MSGTR_AudioID, "lavf", priv->audio_streams); if(!sh_audio) break; priv->astreams[priv->audio_streams] = i; - priv->audio_streams++; wf= calloc(sizeof(WAVEFORMATEX) + codec->extradata_size, 1); // mp4a tag is used for all mp4 files no matter what they actually contain if(codec->codec_tag == MKTAG('m', 'p', '4', 'a')) @@ -310,7 +309,7 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) { } if (lang && lang->value) { sh_audio->lang = strdup(lang->value); - mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_AID_%d_LANG=%s\n", i, sh_audio->lang); + mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_AID_%d_LANG=%s\n", priv->audio_streams, sh_audio->lang); } if (st->disposition & AV_DISPOSITION_DEFAULT) sh_audio->default_track = 1; @@ -321,16 +320,16 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) { demuxer->audio->sh= demuxer->a_streams[i]; } else st->discard= AVDISCARD_ALL; + priv->audio_streams++; break; } case CODEC_TYPE_VIDEO:{ sh_video_t* sh_video; BITMAPINFOHEADER *bih; - sh_video=new_sh_video(demuxer, i); - mp_msg(MSGT_DEMUX, MSGL_INFO, MSGTR_VideoID, "lavf", i); + sh_video=new_sh_video_vid(demuxer, i, priv->audio_streams); + mp_msg(MSGT_DEMUX, MSGL_INFO, MSGTR_VideoID, "lavf", priv->audio_streams); if(!sh_video) break; priv->vstreams[priv->video_streams] = i; - priv->video_streams++; bih=calloc(sizeof(BITMAPINFOHEADER) + codec->extradata_size,1); if(codec->codec_id == CODEC_ID_RAWVIDEO) { @@ -388,6 +387,7 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) { demuxer->video->id = i; demuxer->video->sh= demuxer->v_streams[i]; } + priv->video_streams++; break; } case CODEC_TYPE_SUBTITLE:{ @@ -690,13 +690,9 @@ static int demux_lavf_control(demuxer_t *demuxer, int cmd, void *arg) } else // select track by id { - for(i = 0; i < nstreams; i++) - { - if(pstreams[i] == id) - { - newid = id; - break; - } + if (id >= 0 && id < nstreams) { + i = id; + newid = pstreams[i]; } } if(i == curridx) -- cgit v1.2.3 From 8be7c74c64b66dde42246e867a33d62579afc913 Mon Sep 17 00:00:00 2001 From: aurel Date: Mon, 3 May 2010 22:30:06 +0000 Subject: add ID_..._NAME to -identify for each lavf stream which has a title git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31130 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demux_lavf.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c index de08b08a6d..186822a9ea 100644 --- a/libmpdemux/demux_lavf.c +++ b/libmpdemux/demux_lavf.c @@ -241,6 +241,7 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) { AVStream *st= avfc->streams[i]; AVCodecContext *codec= st->codec; AVMetadataTag *lang = av_metadata_get(st->metadata, "language", NULL, 0); + AVMetadataTag *title= av_metadata_get(st->metadata, "title", NULL, 0); int g, override_tag = av_codec_get_tag(mp_codecid_override_taglists, codec->codec_id); // For some formats (like PCM) always trust CODEC_ID_* more than codec_tag @@ -307,6 +308,8 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) { sh_audio->format = 0x7; break; } + if (title && title->value) + mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_AID_%d_NAME=%s\n", priv->audio_streams, title->value); if (lang && lang->value) { sh_audio->lang = strdup(lang->value); mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_AID_%d_LANG=%s\n", priv->audio_streams, sh_audio->lang); @@ -366,6 +369,8 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) { sh_video->aspect=codec->width * codec->sample_aspect_ratio.num / (float)(codec->height * codec->sample_aspect_ratio.den); sh_video->i_bps=codec->bit_rate/8; + if (title && title->value) + mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_VID_%d_NAME=%s\n", priv->video_streams, title->value); mp_msg(MSGT_DEMUX,MSGL_DBG2,"aspect= %d*%d/(%d*%d)\n", codec->width, codec->sample_aspect_ratio.num, codec->height, codec->sample_aspect_ratio.den); @@ -416,6 +421,8 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) { memcpy(sh_sub->extradata, codec->extradata, codec->extradata_size); sh_sub->extradata_len = codec->extradata_size; } + if (title && title->value) + mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_SID_%d_NAME=%s\n", priv->sub_streams, title->value); if (lang && lang->value) { sh_sub->lang = strdup(lang->value); mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_SID_%d_LANG=%s\n", priv->sub_streams, sh_sub->lang); -- cgit v1.2.3 From c58a1d4acb47c7c43a284471c0fa797a45f73cf5 Mon Sep 17 00:00:00 2001 From: aurel Date: Mon, 3 May 2010 22:40:00 +0000 Subject: 10l: correctly use video_stream instead of audio_stream in the video section ( copy&paste error :( ) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31131 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demux_lavf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c index 186822a9ea..1b7e27a073 100644 --- a/libmpdemux/demux_lavf.c +++ b/libmpdemux/demux_lavf.c @@ -329,8 +329,8 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) { case CODEC_TYPE_VIDEO:{ sh_video_t* sh_video; BITMAPINFOHEADER *bih; - sh_video=new_sh_video_vid(demuxer, i, priv->audio_streams); - mp_msg(MSGT_DEMUX, MSGL_INFO, MSGTR_VideoID, "lavf", priv->audio_streams); + sh_video=new_sh_video_vid(demuxer, i, priv->video_streams); + mp_msg(MSGT_DEMUX, MSGL_INFO, MSGTR_VideoID, "lavf", priv->video_streams); if(!sh_video) break; priv->vstreams[priv->video_streams] = i; bih=calloc(sizeof(BITMAPINFOHEADER) + codec->extradata_size,1); -- cgit v1.2.3 From eaff21c633fbb1c366890875c7bc5485fcd85459 Mon Sep 17 00:00:00 2001 From: aurel Date: Mon, 3 May 2010 22:45:00 +0000 Subject: print a more detailed and more useful description of each stream with lavf git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31132 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demux_lavf.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c index 1b7e27a073..880e1f7dcc 100644 --- a/libmpdemux/demux_lavf.c +++ b/libmpdemux/demux_lavf.c @@ -240,6 +240,8 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) { lavf_priv_t *priv= demuxer->priv; AVStream *st= avfc->streams[i]; AVCodecContext *codec= st->codec; + char *stream_type = NULL; + int stream_id; AVMetadataTag *lang = av_metadata_get(st->metadata, "language", NULL, 0); AVMetadataTag *title= av_metadata_get(st->metadata, "title", NULL, 0); int g, override_tag = av_codec_get_tag(mp_codecid_override_taglists, @@ -253,9 +255,9 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) { WAVEFORMATEX *wf; sh_audio_t* sh_audio; sh_audio = new_sh_audio_aid(demuxer, i, priv->audio_streams); - mp_msg(MSGT_DEMUX, MSGL_INFO, MSGTR_AudioID, "lavf", priv->audio_streams); if(!sh_audio) break; + stream_type = "audio"; priv->astreams[priv->audio_streams] = i; wf= calloc(sizeof(WAVEFORMATEX) + codec->extradata_size, 1); // mp4a tag is used for all mp4 files no matter what they actually contain @@ -323,15 +325,15 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) { demuxer->audio->sh= demuxer->a_streams[i]; } else st->discard= AVDISCARD_ALL; - priv->audio_streams++; + stream_id = priv->audio_streams++; break; } case CODEC_TYPE_VIDEO:{ sh_video_t* sh_video; BITMAPINFOHEADER *bih; sh_video=new_sh_video_vid(demuxer, i, priv->video_streams); - mp_msg(MSGT_DEMUX, MSGL_INFO, MSGTR_VideoID, "lavf", priv->video_streams); if(!sh_video) break; + stream_type = "video"; priv->vstreams[priv->video_streams] = i; bih=calloc(sizeof(BITMAPINFOHEADER) + codec->extradata_size,1); @@ -392,7 +394,7 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) { demuxer->video->id = i; demuxer->video->sh= demuxer->v_streams[i]; } - priv->video_streams++; + stream_id = priv->video_streams++; break; } case CODEC_TYPE_SUBTITLE:{ @@ -412,8 +414,8 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) { else break; sh_sub = new_sh_sub_sid(demuxer, i, priv->sub_streams); - mp_msg(MSGT_DEMUX, MSGL_INFO, MSGTR_SubtitleID, "lavf", priv->sub_streams); if(!sh_sub) break; + stream_type = "subtitles"; priv->sstreams[priv->sub_streams] = i; sh_sub->type = type; if (codec->extradata_size) { @@ -429,7 +431,7 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) { } if (st->disposition & AV_DISPOSITION_DEFAULT) sh_sub->default_track = 1; - priv->sub_streams++; + stream_id = priv->sub_streams++; break; } case CODEC_TYPE_ATTACHMENT:{ @@ -442,6 +444,15 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) { default: st->discard= AVDISCARD_ALL; } + if (stream_type) { + AVCodec *avc = avcodec_find_decoder(codec->codec_id); + mp_msg(MSGT_DEMUX, MSGL_INFO, "[lavf] stream %d: %s (%s), -%cid %d", i, stream_type, avc ? avc->name : "unknown", *stream_type, stream_id); + if (lang && lang->value && *stream_type != 'v') + mp_msg(MSGT_DEMUX, MSGL_INFO, ", -%clang %s", *stream_type, lang->value); + if (title && title->value) + mp_msg(MSGT_DEMUX, MSGL_INFO, ", %s", title->value); + mp_msg(MSGT_DEMUX, MSGL_INFO, "\n"); + } } static demuxer_t* demux_open_lavf(demuxer_t *demuxer){ -- cgit v1.2.3 From bcdf7c0b3dc61a09e0cd83d553bd21dc0f266d04 Mon Sep 17 00:00:00 2001 From: diego Date: Mon, 3 May 2010 23:00:58 +0000 Subject: Put symlinks under revision control instead of generating them during make. This simplifies the build system and should have no practical disadvantage. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31133 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/xml/Makefile | 1 - DOCS/xml/Makefile.inc | 11 +++-------- DOCS/xml/es/encoding-guide.xml | 1 + DOCS/xml/es/radio.xml | 1 + DOCS/xml/it/ports.xml | 1 + DOCS/xml/it/skin.xml | 1 + DOCS/xml/zh_CN/encoding-guide.xml | 1 + DOCS/xml/zh_CN/faq.xml | 1 + DOCS/xml/zh_CN/install.xml | 1 + DOCS/xml/zh_CN/ports.xml | 1 + DOCS/xml/zh_CN/skin.xml | 1 + DOCS/xml/zh_CN/tvinput.xml | 1 + DOCS/xml/zh_CN/usage.xml | 1 + DOCS/xml/zh_CN/video.xml | 1 + 14 files changed, 15 insertions(+), 9 deletions(-) create mode 120000 DOCS/xml/es/encoding-guide.xml create mode 120000 DOCS/xml/es/radio.xml create mode 120000 DOCS/xml/it/ports.xml create mode 120000 DOCS/xml/it/skin.xml create mode 120000 DOCS/xml/zh_CN/encoding-guide.xml create mode 120000 DOCS/xml/zh_CN/faq.xml create mode 120000 DOCS/xml/zh_CN/install.xml create mode 120000 DOCS/xml/zh_CN/ports.xml create mode 120000 DOCS/xml/zh_CN/skin.xml create mode 120000 DOCS/xml/zh_CN/tvinput.xml create mode 120000 DOCS/xml/zh_CN/usage.xml create mode 120000 DOCS/xml/zh_CN/video.xml diff --git a/DOCS/xml/Makefile b/DOCS/xml/Makefile index ed0ec64ed6..c68c1b9570 100644 --- a/DOCS/xml/Makefile +++ b/DOCS/xml/Makefile @@ -57,7 +57,6 @@ clean: releaseclean: -rm -f $(CONFIGURE_GENERATED) -rm -f $(MAIN_XML_ALL) - -rm -f $$(find . -name *.xml -type l) distclean: clean releaseclean diff --git a/DOCS/xml/Makefile.inc b/DOCS/xml/Makefile.inc index 33639bed7e..44e022d56c 100644 --- a/DOCS/xml/Makefile.inc +++ b/DOCS/xml/Makefile.inc @@ -13,24 +13,19 @@ all: html-chunked html-single html-chunked: $(HTMLDIR)/index.html html-single: $(HTMLDIR)/MPlayer.html -SYMLINKS_DEPS := $(filter-out $(wildcard *.xml),$(notdir $(wildcard ../en/*.xml))) - -xmllint: main.xml $(SYMLINKS_DEPS) +xmllint: main.xml ../xmllint.sh $< $(HTMLDIR)/default.css: cp -f ../default.css $(@D) -$(HTMLDIR)/index.html: main.xml $(CHUNK_XSL_DEPS) $(SYMLINKS_DEPS) xmllint $(HTMLDIR)/default.css +$(HTMLDIR)/index.html: main.xml $(CHUNK_XSL_DEPS) xmllint $(HTMLDIR)/default.css ../xsltproc.sh $(HTMLDIR)/ $(HTML_CHUNK_XSL) $< -$(HTMLDIR)/MPlayer.html: main.xml $(SINGLE_XSL_DEPS) $(SYMLINKS_DEPS) xmllint $(HTMLDIR)/default.css +$(HTMLDIR)/MPlayer.html: main.xml $(SINGLE_XSL_DEPS) xmllint $(HTMLDIR)/default.css ../xsltproc.sh $@ $(HTML_SINGLE_XSL) $< ../html-chunk.xsl ../html-single.xsl main.xml: cd .. && sh configure -$(SYMLINKS_DEPS): - ln -s ../en/$@ $@ - .PHONY: all html-chunked html-single xmllint diff --git a/DOCS/xml/es/encoding-guide.xml b/DOCS/xml/es/encoding-guide.xml new file mode 120000 index 0000000000..9c2c8fab3c --- /dev/null +++ b/DOCS/xml/es/encoding-guide.xml @@ -0,0 +1 @@ +../en/encoding-guide.xml \ No newline at end of file diff --git a/DOCS/xml/es/radio.xml b/DOCS/xml/es/radio.xml new file mode 120000 index 0000000000..8fd21a7d6b --- /dev/null +++ b/DOCS/xml/es/radio.xml @@ -0,0 +1 @@ +../en/radio.xml \ No newline at end of file diff --git a/DOCS/xml/it/ports.xml b/DOCS/xml/it/ports.xml new file mode 120000 index 0000000000..59b479c2ac --- /dev/null +++ b/DOCS/xml/it/ports.xml @@ -0,0 +1 @@ +../en/ports.xml \ No newline at end of file diff --git a/DOCS/xml/it/skin.xml b/DOCS/xml/it/skin.xml new file mode 120000 index 0000000000..3895b649ac --- /dev/null +++ b/DOCS/xml/it/skin.xml @@ -0,0 +1 @@ +../en/skin.xml \ No newline at end of file diff --git a/DOCS/xml/zh_CN/encoding-guide.xml b/DOCS/xml/zh_CN/encoding-guide.xml new file mode 120000 index 0000000000..9c2c8fab3c --- /dev/null +++ b/DOCS/xml/zh_CN/encoding-guide.xml @@ -0,0 +1 @@ +../en/encoding-guide.xml \ No newline at end of file diff --git a/DOCS/xml/zh_CN/faq.xml b/DOCS/xml/zh_CN/faq.xml new file mode 120000 index 0000000000..db2ee411a0 --- /dev/null +++ b/DOCS/xml/zh_CN/faq.xml @@ -0,0 +1 @@ +../en/faq.xml \ No newline at end of file diff --git a/DOCS/xml/zh_CN/install.xml b/DOCS/xml/zh_CN/install.xml new file mode 120000 index 0000000000..64490ec871 --- /dev/null +++ b/DOCS/xml/zh_CN/install.xml @@ -0,0 +1 @@ +../en/install.xml \ No newline at end of file diff --git a/DOCS/xml/zh_CN/ports.xml b/DOCS/xml/zh_CN/ports.xml new file mode 120000 index 0000000000..59b479c2ac --- /dev/null +++ b/DOCS/xml/zh_CN/ports.xml @@ -0,0 +1 @@ +../en/ports.xml \ No newline at end of file diff --git a/DOCS/xml/zh_CN/skin.xml b/DOCS/xml/zh_CN/skin.xml new file mode 120000 index 0000000000..3895b649ac --- /dev/null +++ b/DOCS/xml/zh_CN/skin.xml @@ -0,0 +1 @@ +../en/skin.xml \ No newline at end of file diff --git a/DOCS/xml/zh_CN/tvinput.xml b/DOCS/xml/zh_CN/tvinput.xml new file mode 120000 index 0000000000..3daed4bafe --- /dev/null +++ b/DOCS/xml/zh_CN/tvinput.xml @@ -0,0 +1 @@ +../en/tvinput.xml \ No newline at end of file diff --git a/DOCS/xml/zh_CN/usage.xml b/DOCS/xml/zh_CN/usage.xml new file mode 120000 index 0000000000..5ba779b62a --- /dev/null +++ b/DOCS/xml/zh_CN/usage.xml @@ -0,0 +1 @@ +../en/usage.xml \ No newline at end of file diff --git a/DOCS/xml/zh_CN/video.xml b/DOCS/xml/zh_CN/video.xml new file mode 120000 index 0000000000..307779ea44 --- /dev/null +++ b/DOCS/xml/zh_CN/video.xml @@ -0,0 +1 @@ +../en/video.xml \ No newline at end of file -- cgit v1.2.3