diff options
59 files changed, 362 insertions, 251 deletions
@@ -5,12 +5,22 @@ MPlayer (1.0) * YUY2 Lossless Codec (YLC0) via binary DLL * Truemotion RT codec (TR20) via binary DLL * Nogantech Codec (NTN1 and NTN2) via binary DLL - * add new FourCCs (m1v1,HDMV), TwoCCs (0xA106,0x6c75), and formats (0x11005354) - to existing codecs. + * add new FourCCs (m1v1) + TwoCCs (0xA106,0x6c75,0xAAC0) + to existing decoders. * AMR now handled via opencore decoder + * updated Windoes Media Screen Codec (MSS1,MSS2) via binary DLL + * h264 decoder (CoreAVC) on Windows only via binary DLL + * Kega Game video codec (KGV1) via binary DLL Demuxers: * support for TrueHD in BluRay streams in libmpdemux + * more BluRay codec support with lavf + + Other: + * -nosub option for disabling auto-selected subtitles + * support for displaying subs in the term (FIXME) + * support for subtitles with audio only files rc3: "BikeshedCounter" March 27, 2009 Decoders: diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1 index 749c15e922..30043fb11b 100644 --- a/DOCS/man/en/mplayer.1 +++ b/DOCS/man/en/mplayer.1 @@ -2291,6 +2291,10 @@ MPlayer prints the available subtitle IDs when run in verbose (\-v) mode. If you cannot select one of the subtitles on a DVD, also try \-vobsubid. . .TP +.B \-nosub +Disables any otherwise auto-selected subtitles (as e.g. the Matroska/mkv demuxer supports). +. +.TP .B \-slang <language code[,language code,...]> (also see \-sid) Specify a priority list of subtitle languages to use. Different container formats employ different language codes. @@ -7263,6 +7267,10 @@ Files named 'shotNNNN.png' will be saved in the working directory, using the first available number \- no files will be overwritten. The filter has no overhead when not used and accepts an arbitrary colorspace, so it is safe to add it to the configuration file. +Make sure that screenshot is added after all other filters that +you want to have applied to it. +E.g. it should be the last filter if you want to have an exact +screenshot of what you see on the monitor. .RE . .TP diff --git a/DOCS/man/zh_CN/mplayer.1 b/DOCS/man/zh_CN/mplayer.1 index 6d30e6a112..0bd744ceaa 100644 --- a/DOCS/man/zh_CN/mplayer.1 +++ b/DOCS/man/zh_CN/mplayer.1 @@ -1,4 +1,4 @@ -.\" sync with en/mplayer.1 r29661 +.\" sync with en/mplayer.1 r29731 .\" Encoding: UTF-8 .\" Reminder of hard terms which need better/final solution later: .\" /capture; playtree in parent list; colorkey; retrace; desync; downmix; @@ -2182,6 +2182,10 @@ MPlayer 运行在 verbose (\-v) 模式时, 打印可用的字幕标识。 如果你不能选择 DVD 中其中之一的字幕, 也请试试 \-vobsubid。 . .TP +.B \-nosub +禁止所有默认情况下自动选择的字幕(就像比如 Matroska/mkv 流分离器所支持的那样)。 +. +.TP .B \-slang <语言代号[,语言代号,...]> (也请参见 \-sid) 指定使用字幕语言的优先级列表。 不同的容器格式使用不同的语言代号。DVDs 使用 ISO 639\-1 的 diff --git a/cfg-common-opts.h b/cfg-common-opts.h index 053a24b372..df034ac446 100644 --- a/cfg-common-opts.h +++ b/cfg-common-opts.h @@ -120,10 +120,11 @@ {"loadidx", &index_file_load, CONF_TYPE_STRING, 0, 0, 0, NULL}, // select audio/video/subtitle stream - OPT_INTRANGE("aid", audio_id, 0, 0, 8190), + OPT_INTRANGE("aid", audio_id, 0, -2, 8190), {"ausid", &audio_substream_id, CONF_TYPE_INT, 0, 0, 0, NULL}, - OPT_INTRANGE("vid", video_id, 0, 0, 8190), - OPT_INTRANGE("sid", sub_id, 0, 0, 8190), + OPT_INTRANGE("vid", video_id, 0, -2, 8190), + OPT_INTRANGE("sid", sub_id, 0, -2, 8190), + OPT_FLAG_CONSTANTS("nosub", sub_id, 0, -1, -2), OPT_FLAG_CONSTANTS("novideo", video_id, 0, -1, -2), { "hr-mp3-seek", &hr_mp3_seek, CONF_TYPE_FLAG, 0, 0, 1, NULL }, @@ -1345,7 +1345,7 @@ static int mp_property_sub(m_option_t *prop, int action, void *arg, int source = -1, reset_spu = 0; char *sub_name; - if (!mpctx->sh_video || global_sub_size <= 0) + if (global_sub_size <= 0) return M_PROPERTY_UNAVAILABLE; switch (action) { @@ -1529,7 +1529,8 @@ static int mp_property_sub(m_option_t *prop, int action, void *arg, d_sub->id = opts->sub_id; } #endif - update_subtitles(mpctx->sh_video, d_sub, 0, 1); + + update_subtitles(mpctx, &mpctx->opts, mpctx->sh_video, 0, 0, d_sub, 1); return M_PROPERTY_OK; } @@ -440,6 +440,7 @@ Advanced options: --enable-armv6 enable ARMv6 (ARM) [autodetect] --enable-armv6t2 enable ARMv6t2 (ARM) [autodetect] --enable-armvfp enable ARM VFP (ARM) [autodetect] + --enable-neon enable NEON (ARM) [autodetect] --enable-iwmmxt enable iWMMXt (ARM) [autodetect] --disable-fastmemcpy disable 3DNow!/SSE/MMX optimized memcpy [enable] --enable-big-endian force byte order to big-endian [autodetect] @@ -464,7 +465,7 @@ Use these options if autodetection fails: --with-gtk-config=PATH path to gtk*-config --with-sdl-config=PATH path to sdl*-config --with-dvdnav-config=PATH path to dvdnav-config - --with-dvdread-config=PATH path to dvdread-config + --with-dvdread-config=PATH path to dvdread-config This configure script is NOT autoconf-based, even though its output is similar. It will try to autodetect all configuration options. If you --enable an option @@ -490,6 +491,7 @@ _armv5te=auto _armv6=auto _armv6t2=auto _armvfp=auto +neon=auto _iwmmxt=auto _mtrr=auto _altivec=auto @@ -1233,6 +1235,8 @@ for ac_option do --disable-armv6t2) _armv6t2=no ;; --enable-armvfp) _armvfp=yes ;; --disable-armvfp) _armvfp=no ;; + --enable-neon) neon=yes ;; + --disable-neon) neon=no ;; --enable-iwmmxt) _iwmmxt=yes ;; --disable-iwmmxt) _iwmmxt=no ;; --enable-mmx) _mmx=yes ;; @@ -1266,6 +1270,9 @@ if test -z "$_target" ; then case "$system_name" in Linux|FreeBSD|NetBSD|OpenBSD|DragonFly|BSD/OS|Darwin|SunOS|QNX|GNU|BeOS|MorphOS|AIX|AmigaOS) ;; + Haiku) + system_name=BeOS + ;; IRIX*) system_name=IRIX ;; @@ -1306,16 +1313,8 @@ if test -z "$_target" ; then # x86/x86pc is used by QNX case "$(uname -m 2>&1)" in - i[3-9]86*|x86|x86pc|k5|k6|k6_2|k6_3|k6-2|k6-3|pentium*|athlon*|i586_i686|i586-i686|BePC) host_arch=i386 ;; + x86_64|amd64|i[3-9]86*|x86|x86pc|k5|k6|k6_2|k6_3|k6-2|k6-3|pentium*|athlon*|i586_i686|i586-i686|BePC) host_arch=i386 ;; ia64) host_arch=ia64 ;; - x86_64|amd64) - if [ -n "$($_cc -dumpmachine | sed -n '/^x86_64-/p;/^amd64-/p')" -a \ - -z "$(echo $CFLAGS $_cc | grep -- -m32)" ]; then - host_arch=x86_64 - else - host_arch=i386 - fi - ;; macppc|ppc) host_arch=ppc ;; ppc64) host_arch=ppc64 ;; alpha) host_arch=alpha ;; @@ -1356,14 +1355,6 @@ else # if test -z "$_target" fi fi -echo "Detected operating system: $system_name" -echo "Detected host architecture: $host_arch" - -if test "$_runtime_cpudetection" = yes && ! x86 && ! ppc; then - die "Runtime CPU detection only works for x86, x86-64 and PPC!" -fi - - extra_cflags="-I. $extra_cflags" _timer=timer-linux.c _getch=getch2.c @@ -1446,6 +1437,24 @@ echo configuration: $_configuration > "$TMPLOG" echo >> "$TMPLOG" +if test -z "$_target" && x86 ; then + cat > $TMPC << EOF +int main(void) { + int test[sizeof(char *)-7]; + return 0; +} +EOF + cc_check && host_arch=x86_64 || host_arch=i386 +fi + +echo "Detected operating system: $system_name" +echo "Detected host architecture: $host_arch" + +if test "$_runtime_cpudetection" = yes && ! x86 && ! ppc; then + die "Runtime CPU detection only works for x86, x86-64 and PPC!" +fi + + # Checking CC version... # Intel C++ Compilers (no autoselect, use CC=/some/binary ./configure) if test "$(basename $_cc)" = "icc" || test "$(basename $_cc)" = "ecc"; then @@ -2297,6 +2306,7 @@ EOF cc_check -c || die "Symbol mangling check failed." sym=$($_nm -P -g $TMPEXE) extern_prefix=${sym%%ff_extern*} +def_extern_asm="#define EXTERN_ASM $extern_prefix" def_extern_prefix="#define EXTERN_PREFIX \"$extern_prefix\"" echores $extern_prefix @@ -2467,6 +2477,26 @@ EOF cc_check && ten_operands=yes && def_ten_operands='#define HAVE_TEN_OPERANDS 1' echores $ten_operands +echocheck "ebx availability" +ebx_available=no +def_ebx_available='#define HAVE_EBX_AVAILABLE 0' +cat > $TMPC << EOF +int main(void) { + int x; + __asm__ volatile( + "xor %0, %0" + :"=b"(x) + // just adding ebx to clobber list seems unreliable with some + // compilers, e.g. Haiku's gcc 2.95 + ); + // and the above check does not work for OSX 64 bit... + __asm__ volatile("":::"%ebx"); + return 0; +} +EOF +cc_check && ebx_available=yes && def_ebx_available='#define HAVE_EBX_AVAILABLE 1' +echores $ebx_available + echocheck "yasm" if test -z "$YASMFLAGS" ; then if darwin ; then @@ -2623,6 +2653,16 @@ EOF fi echores "$_armvfp" + echocheck "ARM NEON" + if test $neon = "auto" ; then + cat > $TMPC << EOF +int main(void) { __asm__ volatile ("vadd.i16 q0, q0, q0"); return 0; } +EOF + neon=no + cc_check && neon=yes + fi + echores "$neon" + echocheck "iWMMXt (Intel XScale SIMD instructions)" if test $_iwmmxt = "auto" ; then cat > $TMPC << EOF @@ -2634,7 +2674,7 @@ EOF echores "$_iwmmxt" fi -_cpuexts_all='ALTIVEC MMX MMX2 AMD3DNOW AMD3DNOWEXT SSE SSE2 SSSE3 FAST_CMOV CMOV PLD ARMV5TE ARMV6 ARMV6T2 ARMVFP IWMMXT MMI VIS MVI' +_cpuexts_all='ALTIVEC MMX MMX2 AMD3DNOW AMD3DNOWEXT SSE SSE2 SSSE3 FAST_CMOV CMOV PLD ARMV5TE ARMV6 ARMV6T2 ARMVFP NEON IWMMXT MMI VIS MVI' test "$_altivec" = yes && _cpuexts="ALTIVEC $_cpuexts" test "$_mmx" = yes && _cpuexts="MMX $_cpuexts" test "$_mmxext" = yes && _cpuexts="MMX2 $_cpuexts" @@ -2650,6 +2690,7 @@ test "$_armv5te" = yes && _cpuexts="ARMV5TE $_cpuexts" test "$_armv6" = yes && _cpuexts="ARMV6 $_cpuexts" test "$_armv6t2" = yes && _cpuexts="ARMV6T2 $_cpuexts" test "$_armvfp" = yes && _cpuexts="ARMVFP $_cpuexts" +test "$neon" = yes && _cpuexts="NEON $_cpuexts" test "$_iwmmxt" = yes && _cpuexts="IWMMXT $_cpuexts" test "$_vis" = yes && _cpuexts="VIS $_cpuexts" test "$_mvi" = yes && _cpuexts="MVI $_cpuexts" @@ -6347,7 +6388,7 @@ echores "$_theora" echocheck "internal mp3lib support" if test "$_mp3lib" = auto ; then - test "$cc_vendor" = intel && _mp3lib=no || _mp3lib=yes + test "$cc_vendor" = intel && test "$_cc_major" -le 10 -o "$_cc_major" -eq 11 -a "$_cc_minor" -eq 0 && _mp3lib=no || _mp3lib=yes fi if test "$_mp3lib" = yes ; then def_mp3lib='#define CONFIG_MP3LIB 1' @@ -6360,7 +6401,7 @@ echores "$_mp3lib" echocheck "liba52 support" if test "$_liba52_internal" = auto ; then - test "$cc_vendor" = intel && _liba52_internal=no || _liba52_internal=yes + test "$cc_vendor" = intel && test "$_cc_major" -le 10 -o "$_cc_major" -eq 11 -a "$_cc_minor" -eq 0 && _liba52_internal=no || _liba52_internal=yes fi def_liba52='#undef CONFIG_LIBA52' def_liba52_internal="#undef CONFIG_LIBA52_INTERNAL" @@ -6945,8 +6986,8 @@ if test "$_x264" = auto ; then cat > $TMPC << EOF #include <inttypes.h> #include <x264.h> -#if X264_BUILD < 65 -#error We do not support old versions of x264. Get the latest from SVN. +#if X264_BUILD < 76 +#error We do not support old versions of x264. Get the latest from git. #endif int main(void) { x264_encoder_open((void*)0); return 0; } EOF @@ -8097,6 +8138,7 @@ $def_vsscanf $def_asmalign_pot $def_builtin_expect $def_dl +$def_extern_asm $def_extern_prefix $def_iconv $def_kstat @@ -8404,7 +8446,7 @@ $def_yasm #define CONFIG_RDFT 1 /* Use these registers in FFmpeg x86 inline asm. No proper detection yet. */ -#define HAVE_EBX_AVAILABLE 1 +$def_ebx_available #ifndef MP_DEBUG #define HAVE_EBP_AVAILABLE 1 #else diff --git a/defaultopts.c b/defaultopts.c index d908eda347..2bd6f7e3e3 100644 --- a/defaultopts.c +++ b/defaultopts.c @@ -26,7 +26,7 @@ void set_default_mplayer_options(struct MPOpts *opts) .doubleclick_time = 300, .audio_id = -1, .video_id = -1, - .sub_id = -2, + .sub_id = -1, .playback_speed = 1., .movie_aspect = -1., .flip = -1, diff --git a/etc/codecs.conf b/etc/codecs.conf index 782ff61809..84660fc82f 100644 --- a/etc/codecs.conf +++ b/etc/codecs.conf @@ -899,6 +899,22 @@ videocodec ffh264vdpau dll h264_vdpau out VDPAU_H264 +videocodec coreavcwindows + info "CoreAVC H.264 for x86 - http://corecodec.org/" + comment "this codec will only work after purchasing it" + status working + fourcc H264,h264 + fourcc X264,x264 + fourcc avc1 AVC1,AVC1 + fourcc davc,DAVC + fourcc VSSH + format 0x10000005 + driver dshow + dll "CoreAVCDecoder.ax" + guid 0x09571a4b, 0xf1fe, 0x4c60, 0x97, 0x60, 0xde, 0x6d, 0x31, 0x0c, 0x7c, 0x31 + out YV12,IYUV,I420,YUY2 + + videocodec ffsvq3 info "FFmpeg Sorenson Video v3 (SVQ3)" status working @@ -1148,6 +1164,16 @@ videocodec wmsdmod guid 0x7bafb3b1, 0xd8f4, 0x4279, 0x92, 0x53, 0x27, 0xda, 0x42, 0x31, 0x08, 0xde out BGR32,BGR24,BGR16 +videocodec wms10dmod + info "Windows Media Screen Codec 2 from WMP10" + status working + fourcc MSS1 + fourcc MSS2 + driver dmo + dll "wms10dmod.dll" + guid 0x7bafb3b1, 0xd8f4, 0x4279, 0x92, 0x53, 0x27, 0xda, 0x42, 0x31, 0x08, 0xde + out BGR32,BGR24,BGR16 + videocodec gotomeeting info "GoToMeeting codec" status working @@ -3499,10 +3525,12 @@ audiocodec faad fourcc "VLB " ; Used in NSV, not really working fourcc "AAC " ; Used in NSV fourcc "AACP" ; Used in NSV for AACPlus + fourcc raac,racp format 0xff format 0x706D format 0x4143 ; aac in asf format 0xA106 ; aac in avi + format 0xAAC0 ; Borgtech nonsense tag driver faad dll libfaad2 @@ -3518,6 +3546,7 @@ audiocodec ffaac format 0x706D format 0x4143 ; aac in asf format 0xA106 ; aac in avi not yet working + format 0xAAC0 ; Borgtech nonsense tag driver ffmpeg dll aac diff --git a/find_sub.c b/find_sub.c index 07d91d7e55..dcd4c4cd77 100644 --- a/find_sub.c +++ b/find_sub.c @@ -12,6 +12,7 @@ #include "mp_msg.h" #include "help_mp.h" +#include "mpcommon.h" static int current_sub=0; @@ -52,8 +53,9 @@ void step_sub(sub_data *subd, float pts, int movement) { sub_delay = subs[current_sub].start / (subd->sub_uses_time ? 100 : sub_fps) - pts; } -void find_sub(sub_data* subd,int key){ +void find_sub(struct MPContext *mpctx, sub_data* subd,int key){ subtitle *subs; + subtitle *new_sub = NULL; int i,j; if ( !subd || subd->sub_num == 0) return; @@ -77,8 +79,8 @@ void find_sub(sub_data* subd,int key){ vo_osd_changed(OSDTYPE_SUBTITLE); if(key<=0){ - vo_sub=NULL; // no sub here - return; + // no sub here + goto update; } // printf("\r---- sub changed ----\n"); @@ -89,13 +91,12 @@ void find_sub(sub_data* subd,int key){ // no sub nosub_range_start=subs[current_sub].end; nosub_range_end=subs[current_sub+1].start; - vo_sub=NULL; - return; + goto update; } // next sub? ++current_sub; - vo_sub=&subs[current_sub]; - if(key>=vo_sub->start && key<=vo_sub->end) return; // OK! + new_sub=&subs[current_sub]; + if(key>=new_sub->start && key<=new_sub->end) goto update; // OK! } // printf("\r---- sub log search... ----\n"); @@ -106,22 +107,22 @@ void find_sub(sub_data* subd,int key){ // printf("Searching %d in %d..%d\n",key,subs[i].start,subs[j].end); while(j>=i){ current_sub=(i+j+1)/2; - vo_sub=&subs[current_sub]; - if(key<vo_sub->start) j=current_sub-1; - else if(key>vo_sub->end) i=current_sub+1; - else return; // found! + new_sub=&subs[current_sub]; + if(key<new_sub->start) j=current_sub-1; + else if(key>new_sub->end) i=current_sub+1; + else goto update; // found! } -// if(key>=vo_sub->start && key<=vo_sub->end) return; // OK! +// if(key>=new_sub->start && key<=new_sub->end) return; // OK! // check where are we... - if(key<vo_sub->start){ + if(key<new_sub->start){ if(current_sub<=0){ // before the first sub nosub_range_start=key-1; // tricky - nosub_range_end=vo_sub->start; -// printf("FIRST... key=%d end=%d \n",key,vo_sub->start); - vo_sub=NULL; - return; + nosub_range_end=new_sub->start; +// printf("FIRST... key=%d end=%d \n",key,new_sub->start); + new_sub=NULL; + goto update; } --current_sub; if(key>subs[current_sub].end && key<subs[current_sub+1].start){ @@ -129,31 +130,33 @@ void find_sub(sub_data* subd,int key){ nosub_range_start=subs[current_sub].end; nosub_range_end=subs[current_sub+1].start; // printf("No sub... 1 \n"); - vo_sub=NULL; - return; + new_sub=NULL; + goto update; } printf("HEH???? "); } else { - if(key<=vo_sub->end) printf("JAJJ! "); else + if(key<=new_sub->end) printf("JAJJ! "); else if(current_sub+1 >= subd->sub_num){ // at the end? - nosub_range_start=vo_sub->end; + nosub_range_start=new_sub->end; nosub_range_end=0x7FFFFFFF; // MAXINT // printf("END!?\n"); - vo_sub=NULL; - return; + new_sub=NULL; + goto update; } else if(key>subs[current_sub].end && key<subs[current_sub+1].start){ // no sub nosub_range_start=subs[current_sub].end; nosub_range_end=subs[current_sub+1].start; // printf("No sub... 2 \n"); - vo_sub=NULL; - return; + new_sub=NULL; + goto update; } } - mp_msg(MSGT_FIXME,MSGL_FIXME,"SUB ERROR: %d ? %d --- %d [%d] \n",key,(int)vo_sub->start,(int)vo_sub->end,current_sub); + mp_msg(MSGT_FIXME,MSGL_FIXME,"SUB ERROR: %d ? %d --- %d [%d] \n",key,(int)new_sub->start,(int)new_sub->end,current_sub); - vo_sub=NULL; // no sub here + new_sub=NULL; // no sub here |