Merge branch 'mplayer1_changes'

This commit is contained in:
Uoti Urpala 2011-05-02 00:46:03 +03:00
commit 7e65428712
30 changed files with 518 additions and 199 deletions

View File

@ -2408,6 +2408,24 @@ Deaktiviert das automatische Laden von Untertiteln.
Setzt die Anzeigedauer der OSD-Meldungen in ms (Standard: 1000). Setzt die Anzeigedauer der OSD-Meldungen in ms (Standard: 1000).
. .
.TP .TP
.B \-osd\-fractions <0\-2>
Setzt die Art der Anzeige von Nachkommastellen des aktuellen Zeitstempels im
OSD:
.PD 0
.RSs
.IPs 0
Keine Anzeige der Nachkommastellen (Standard).
.IPs 1
Zeige die ersten beiden Nachkommastellen.
.IPs 2
Zeige genäherte Framezahl an.
Die angezeigte Framezahl ist nicht exakt, sondern nur genähert.
Für variable FPS ist die Näherung weit von der tatsächlichen Framezahl
entfernt.
.RE
.PD 1
.
.TP
.B \-osdlevel <0\-3> (nur bei MPlayer) .B \-osdlevel <0\-3> (nur bei MPlayer)
Gibt den Modus an, in dem das OSD startet: Gibt den Modus an, in dem das OSD startet:
.PD 0 .PD 0

View File

@ -1474,6 +1474,35 @@ Can be slow especially when seeking backwards since it has to rewind
to the beginning to find an exact frame position. to the beginning to find an exact frame position.
. .
.TP .TP
.B \-http-header-fields <field1,field2>
Set custom HTTP fields when accessing HTTP stream.
.sp 1
.I EXAMPLE:
.PD 0
.RSs
.IPs
mplayer \-http\-header\-fields 'Field1: value1','Field2: value2' http://localhost:1234
.br
Will generate HTTP request:
.RSss
.br
GET / HTTP/1.0
.br
Host: localhost:1234
.br
User-Agent: MPlayer
.br
Icy-MetaData: 1
.br
Field1: value1
.br
Field2: value2
.br
Connection: close
.REss
.RE
.
.TP
.B \-idx (also see \-forceidx) .B \-idx (also see \-forceidx)
Rebuilds index of files if no index was found, allowing seeking. Rebuilds index of files if no index was found, allowing seeking.
Useful with broken/\:incomplete downloads, or badly created files. Useful with broken/\:incomplete downloads, or badly created files.
@ -2324,6 +2353,23 @@ Turns off automatic subtitle file loading.
Set the duration of the OSD messages in ms (default: 1000). Set the duration of the OSD messages in ms (default: 1000).
. .
.TP .TP
.B \-osd\-fractions <0\-2>
Set how fractions of seconds of the current timestamp are printed on the OSD:
.PD 0
.RSs
.IPs 0
Do not display fractions (default).
.IPs 1
Show the first two decimals.
.IPs 2
Show approximate frame count within current second.
This frame count is not accurate but only an approximation.
For variable fps, the approximation is known to be far off the correct frame
count.
.RE
.PD 1
.
.TP
.B \-osdlevel <0\-3> .B \-osdlevel <0\-3>
Specifies which mode the OSD should start in. Specifies which mode the OSD should start in.
.PD 0 .PD 0
@ -3110,6 +3156,11 @@ Fixes fullscreen switching on OpenBox 1.x.
.PD 1 .PD 1
. .
.TP .TP
.B \-gamma <\-100\-100>
Adjust the gamma of the video signal (default: 0).
Not supported by all video output drivers.
.
.TP
.B \-geometry x[%][:y[%]] or [WxH][+-x+-y] .B \-geometry x[%][:y[%]] or [WxH][+-x+-y]
Adjust where the output is on the screen initially. Adjust where the output is on the screen initially.
The x and y specifications are in pixels measured from the top-left of the The x and y specifications are in pixels measured from the top-left of the

View File

@ -442,6 +442,7 @@ const m_option_t common_opts[] = {
{"user", &network_username, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"user", &network_username, CONF_TYPE_STRING, 0, 0, 0, NULL},
{"passwd", &network_password, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"passwd", &network_password, CONF_TYPE_STRING, 0, 0, 0, NULL},
{"bandwidth", &network_bandwidth, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL}, {"bandwidth", &network_bandwidth, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL},
{"http-header-fields", &network_http_header_fields, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
{"user-agent", &network_useragent, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"user-agent", &network_useragent, CONF_TYPE_STRING, 0, 0, 0, NULL},
{"referrer", &network_referrer, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"referrer", &network_referrer, CONF_TYPE_STRING, 0, 0, 0, NULL},
{"cookies", &network_cookies_enabled, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"cookies", &network_cookies_enabled, CONF_TYPE_FLAG, 0, 0, 1, NULL},
@ -868,6 +869,7 @@ const m_option_t mplayer_opts[]={
OPT_INTRANGE("saturation", vo_gamma_saturation, 0, -100, 100), OPT_INTRANGE("saturation", vo_gamma_saturation, 0, -100, 100),
OPT_INTRANGE("contrast", vo_gamma_contrast, 0, -100, 100), OPT_INTRANGE("contrast", vo_gamma_contrast, 0, -100, 100),
OPT_INTRANGE("hue", vo_gamma_hue, 0, -100, 100), OPT_INTRANGE("hue", vo_gamma_hue, 0, -100, 100),
OPT_INTRANGE("gamma", vo_gamma_gamma, 0, -100, 100),
{"keepaspect", &vo_keepaspect, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"keepaspect", &vo_keepaspect, CONF_TYPE_FLAG, 0, 0, 1, NULL},
{"nokeepaspect", &vo_keepaspect, CONF_TYPE_FLAG, 0, 1, 0, NULL}, {"nokeepaspect", &vo_keepaspect, CONF_TYPE_FLAG, 0, 1, 0, NULL},
@ -895,6 +897,7 @@ const m_option_t mplayer_opts[]={
#endif #endif
OPT_INTRANGE("osdlevel", osd_level, 0, 0, 3), OPT_INTRANGE("osdlevel", osd_level, 0, 0, 3),
OPT_INTRANGE("osd-duration", osd_duration, 0, 0, 3600000), OPT_INTRANGE("osd-duration", osd_duration, 0, 0, 3600000),
OPT_INTRANGE("osd-fractions", osd_fractions, 0, 0, 2),
#ifdef CONFIG_MENU #ifdef CONFIG_MENU
{"menu", &use_menu, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL}, {"menu", &use_menu, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
{"nomenu", &use_menu, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL}, {"nomenu", &use_menu, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
@ -955,7 +958,9 @@ const m_option_t mplayer_opts[]={
OPT_FLAG_CONSTANTS("noloop", loop_times, 0, 0, -1), OPT_FLAG_CONSTANTS("noloop", loop_times, 0, 0, -1),
OPT_INTRANGE("loop", loop_times, 0, -1, 10000), OPT_INTRANGE("loop", loop_times, 0, -1, 10000),
{"playlist", NULL, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"playlist", NULL, CONF_TYPE_STRING, CONF_NOCFG, 0, 0, NULL},
{"shuffle", NULL, CONF_TYPE_FLAG, CONF_NOCFG, 0, 0, NULL},
{"noshuffle", NULL, CONF_TYPE_FLAG, CONF_NOCFG, 0, 0, NULL},
OPT_MAKE_FLAGS("ordered-chapters", ordered_chapters, 0), OPT_MAKE_FLAGS("ordered-chapters", ordered_chapters, 0),
OPT_INTRANGE("chapter-merge-threshold", chapter_merge_threshold, 0, 0, 10000), OPT_INTRANGE("chapter-merge-threshold", chapter_merge_threshold, 0, 0, 10000),

View File

@ -605,6 +605,8 @@ static int mp_property_angle(m_option_t *prop, int action, void *arg,
angle += step; angle += step;
if (angle < 1) //cycle if (angle < 1) //cycle
angle = angles; angle = angles;
else if (angle > angles)
angle = 1;
break; break;
} }
default: default:

20
configure vendored
View File

@ -296,7 +296,6 @@ Installation directories:
Optional features: Optional features:
--disable-mplayer disable MPlayer compilation [enable] --disable-mplayer disable MPlayer compilation [enable]
--disable-largefiles disable support for files > 2GB [enable]
--enable-termcap use termcap database for key codes [autodetect] --enable-termcap use termcap database for key codes [autodetect]
--enable-termios use termios database for key codes [autodetect] --enable-termios use termios database for key codes [autodetect]
--disable-iconv disable iconv for encoding conversion [autodetect] --disable-iconv disable iconv for encoding conversion [autodetect]
@ -670,7 +669,6 @@ _xvr100=auto
_tga=yes _tga=yes
_directfb=auto _directfb=auto
_bl=no _bl=no
_largefiles=yes
#language=en #language=en
_shm=auto _shm=auto
_translation=no _translation=no
@ -1076,8 +1074,6 @@ for ac_option do
--disable-bl) _bl=no ;; --disable-bl) _bl=no ;;
--enable-mtrr) _mtrr=yes ;; --enable-mtrr) _mtrr=yes ;;
--disable-mtrr) _mtrr=no ;; --disable-mtrr) _mtrr=no ;;
--enable-largefiles) _largefiles=yes ;;
--disable-largefiles) _largefiles=no ;;
--enable-shm) _shm=yes ;; --enable-shm) _shm=yes ;;
--disable-shm) _shm=no ;; --disable-shm) _shm=no ;;
--enable-select) _select=yes ;; --enable-select) _select=yes ;;
@ -2615,7 +2611,7 @@ if arm ; then
_armv6t2=no _armv6t2=no
inline_asm_check '"movt r0, #0"' && _armv6t2=yes inline_asm_check '"movt r0, #0"' && _armv6t2=yes
fi fi
echores "$_armv6" echores "$_armv6t2"
echocheck "ARM VFP" echocheck "ARM VFP"
if test $_armvfp = "auto" ; then if test $_armvfp = "auto" ; then
@ -5284,11 +5280,9 @@ fi
if test "$_dvdread_internal" = yes; then if test "$_dvdread_internal" = yes; then
def_dvdread='#define CONFIG_DVDREAD 1' def_dvdread='#define CONFIG_DVDREAD 1'
inputmodules="dvdread(internal) $inputmodules" inputmodules="dvdread(internal) $inputmodules"
_largefiles=yes
res_comment="internal" res_comment="internal"
elif test "$_dvdread" = yes; then elif test "$_dvdread" = yes; then
def_dvdread='#define CONFIG_DVDREAD 1' def_dvdread='#define CONFIG_DVDREAD 1'
_largefiles=yes
extra_ldflags="$extra_ldflags -ldvdread" extra_ldflags="$extra_ldflags -ldvdread"
inputmodules="dvdread(external) $inputmodules" inputmodules="dvdread(external) $inputmodules"
res_comment="external" res_comment="external"
@ -5324,7 +5318,6 @@ if test "$_libdvdcss_internal" = yes ; then
cflags_libdvdcss_dvdread="-Ilibdvdcss" cflags_libdvdcss_dvdread="-Ilibdvdcss"
def_dvdcss="#define HAVE_DVDCSS_DVDCSS_H 1" def_dvdcss="#define HAVE_DVDCSS_DVDCSS_H 1"
inputmodules="libdvdcss(internal) $inputmodules" inputmodules="libdvdcss(internal) $inputmodules"
_largefiles=yes
else else
noinputmodules="libdvdcss(internal) $noinputmodules" noinputmodules="libdvdcss(internal) $noinputmodules"
fi fi
@ -6600,14 +6593,8 @@ if os2 ; then
fi fi
############################################################################# #############################################################################
# 64 bit file offsets?
if test "$_largefiles" = yes || freebsd ; then CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE"
CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
if test "$_dvdread" = yes || test "$_libdvdcss_internal" = yes ; then
# dvdread support requires this (for off64_t)
CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE"
fi
fi
CXXFLAGS=" $CFLAGS -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS" CXXFLAGS=" $CFLAGS -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS"
@ -6637,7 +6624,6 @@ if test "$_dvdnav" = auto ; then
statement_check_broken stdint.h dvdnav/dvdnav.h 'dvdnav_t *dvd = 0' $_dvdnavdir $_dvdnavlibs $_ld_dl $_ld_pthread && _dvdnav=yes statement_check_broken stdint.h dvdnav/dvdnav.h 'dvdnav_t *dvd = 0' $_dvdnavdir $_dvdnavlibs $_ld_dl $_ld_pthread && _dvdnav=yes
fi fi
if test "$_dvdnav" = yes ; then if test "$_dvdnav" = yes ; then
_largefiles=yes
def_dvdnav='#define CONFIG_DVDNAV 1' def_dvdnav='#define CONFIG_DVDNAV 1'
if test "$dvdnav_internal" = yes ; then if test "$dvdnav_internal" = yes ; then
cflags_libdvdnav="-Ilibdvdnav" cflags_libdvdnav="-Ilibdvdnav"

View File

@ -3,12 +3,20 @@
; Before editing this file, please read DOCS/tech/codecs.conf.txt ! ; Before editing this file, please read DOCS/tech/codecs.conf.txt !
;============================================================================= ;=============================================================================
release 20101127 release 20110311
;============================================================================= ;=============================================================================
; VIDEO CODECS ; VIDEO CODECS
;============================================================================= ;=============================================================================
videocodec ffanm
info "FFmpeg Deluxe Paint Animation"
status working
fourcc "ANM " ; internal MPlayer FourCC
driver ffmpeg
dll anm
out BGR8
videocodec ffbinkvideo videocodec ffbinkvideo
info "FFmpeg Bink Video" info "FFmpeg Bink Video"
status working status working
@ -184,15 +192,13 @@ videocodec ffmpeg2
format 0x10000002 ; MPEG-2 format 0x10000002 ; MPEG-2
fourcc mpg2,MPG2 fourcc mpg2,MPG2
fourcc "DVR " fourcc "DVR "
fourcc hdv1
fourcc hdv2
fourcc MPEG fourcc MPEG
fourcc hdv3 ; HDV 1080i50
fourcc hdv5 ; HDV 720p25
fourcc mx5p ; MPEG IMX 625/50 (50 Mb/s) fourcc mx5p ; MPEG IMX 625/50 (50 Mb/s)
fourcc MMES,mmes ; matrox mpeg2 in avi fourcc MMES,mmes ; matrox mpeg2 in avi
fourcc M701 ; matrox mpeg2 intra-only fourcc M701 ; matrox mpeg2 intra-only
fourcc hdv6,hdv7,hdv8 fourcc hdv1,hdv2,hdv3
fourcc hdv4,hdv5,hdv6
fourcc hdv7,hdv8,hdv9
fourcc xdv1,xdv2,xdv3 fourcc xdv1,xdv2,xdv3
fourcc xdv4,xdv5,xdv6 fourcc xdv4,xdv5,xdv6
fourcc xdv7,xdv8,xdv9 fourcc xdv7,xdv8,xdv9
@ -200,7 +206,7 @@ videocodec ffmpeg2
fourcc xdvd,xdve,xdvf fourcc xdvd,xdve,xdvf
fourcc xd5a,xd5b,xd5c fourcc xd5a,xd5b,xd5c
fourcc xd5d,xd5e,xd5f fourcc xd5d,xd5e,xd5f
fourcc xd59,xd54 fourcc xd59,xd54,xd55
fourcc mx5n,mx4n,mx4p fourcc mx5n,mx4n,mx4p
fourcc mx3n,mx3p fourcc mx3n,mx3p
fourcc AVmp fourcc AVmp
@ -226,15 +232,13 @@ videocodec ffmpeg12
fourcc PIM2 ; Pinnacle hardware-MPEG-2 fourcc PIM2 ; Pinnacle hardware-MPEG-2
fourcc VCR2 fourcc VCR2
fourcc "DVR " fourcc "DVR "
fourcc hdv2
fourcc MPEG fourcc MPEG
fourcc hdv1
fourcc hdv3 ; HDV 1080i50
fourcc hdv5 ; HDV 720p25
fourcc mx5p ; MPEG IMX 625/50 (50 Mb/s) fourcc mx5p ; MPEG IMX 625/50 (50 Mb/s)
fourcc MMES,mmes ; matrox mpeg2 in avi fourcc MMES,mmes ; matrox mpeg2 in avi
fourcc M701 ; matrox mpeg2 intra-only fourcc M701 ; matrox mpeg2 intra-only
fourcc hdv6,hdv7,hdv8 fourcc hdv1,hdv2,hdv3
fourcc hdv4,hdv5,hdv6
fourcc hdv7,hdv8,hdv9
fourcc xdv1,xdv2,xdv3 fourcc xdv1,xdv2,xdv3
fourcc xdv4,xdv5,xdv6 fourcc xdv4,xdv5,xdv6
fourcc xdv7,xdv8,xdv9 fourcc xdv7,xdv8,xdv9
@ -242,7 +246,7 @@ videocodec ffmpeg12
fourcc xdvd,xdve,xdvf fourcc xdvd,xdve,xdvf
fourcc xd5a,xd5b,xd5c fourcc xd5a,xd5b,xd5c
fourcc xd5d,xd5e,xd5f fourcc xd5d,xd5e,xd5f
fourcc xd59,xd54 fourcc xd59,xd54,xd55
fourcc mx5n,mx4n,mx4p fourcc mx5n,mx4n,mx4p
fourcc mx3n,mx3p fourcc mx3n,mx3p
fourcc AVmp fourcc AVmp
@ -250,6 +254,7 @@ videocodec ffmpeg12
fourcc m2v1,m1v1 fourcc m2v1,m1v1
fourcc LMP2 ; Lead mpeg2 in avi fourcc LMP2 ; Lead mpeg2 in avi
fourcc slif ; SoftLab MPEG-2 I-frames Codec fourcc slif ; SoftLab MPEG-2 I-frames Codec
fourcc EM2V ; Etymonix MPEG-2 I-frame Video Codec
driver ffmpeg driver ffmpeg
dll "mpegvideo" dll "mpegvideo"
out YV12,I420,IYUV out YV12,I420,IYUV
@ -262,17 +267,15 @@ videocodec ffmpeg12mc
format 0x10000002 ; MPEG-2 format 0x10000002 ; MPEG-2
fourcc mpg1,mpg2,MPG2 fourcc mpg1,mpg2,MPG2
fourcc "DVR " fourcc "DVR "
fourcc hdv1
fourcc hdv2
fourcc PIM1 ; Pinnacle hardware-MPEG-1 fourcc PIM1 ; Pinnacle hardware-MPEG-1
fourcc PIM2 ; Pinnacle hardware-MPEG-2 fourcc PIM2 ; Pinnacle hardware-MPEG-2
fourcc VCR2 fourcc VCR2
fourcc MPEG fourcc MPEG
fourcc hdv3 ; HDV 1080i50
fourcc hdv5 ; HDV 720p25
fourcc mx5p ; MPEG IMX 625/50 (50 Mb/s) fourcc mx5p ; MPEG IMX 625/50 (50 Mb/s)
fourcc MMES,mmes ; matrox mpeg2 in avi fourcc MMES,mmes ; matrox mpeg2 in avi
fourcc hdv6,hdv7,hdv8 fourcc hdv1,hdv2,hdv3
fourcc hdv4,hdv5,hdv6
fourcc hdv7,hdv8,hdv9
fourcc xdv1,xdv2,xdv3 fourcc xdv1,xdv2,xdv3
fourcc xdv4,xdv5,xdv6 fourcc xdv4,xdv5,xdv6
fourcc xdv7,xdv8,xdv9 fourcc xdv7,xdv8,xdv9
@ -280,7 +283,7 @@ videocodec ffmpeg12mc
fourcc xdvd,xdve,xdvf fourcc xdvd,xdve,xdvf
fourcc xd5a,xd5b,xd5c fourcc xd5a,xd5b,xd5c
fourcc xd5d,xd5e,xd5f fourcc xd5d,xd5e,xd5f
fourcc xd59,xd54 fourcc xd59,xd54,xd55
fourcc mx5n,mx4n,mx4p fourcc mx5n,mx4n,mx4p
fourcc mx3n,mx3p fourcc mx3n,mx3p
fourcc AVmp fourcc AVmp
@ -313,9 +316,6 @@ videocodec ffmpeg12vdpau
fourcc xdv7,xdv8,xdv9 fourcc xdv7,xdv8,xdv9
fourcc xdva,xdvb,xdvc fourcc xdva,xdvb,xdvc
fourcc xdvd,xdve,xdvf fourcc xdvd,xdve,xdvf
fourcc xd5a,xd5b,xd5c
fourcc xd5d,xd5e,xd5f
fourcc xd59,xd54
fourcc mx5n,mx4n,mx4p fourcc mx5n,mx4n,mx4p
fourcc mx3n,mx3p fourcc mx3n,mx3p
fourcc AVmp fourcc AVmp
@ -327,6 +327,40 @@ videocodec ffmpeg12vdpau
out VDPAU_MPEG1 out VDPAU_MPEG1
out VDPAU_MPEG2 out VDPAU_MPEG2
videocodec ffmpeg2crystalhd
info "FFmpeg MPEG-2 (CrystalHD)"
status working
format 0x10000002 ; MPEG-2
fourcc mpg2,MPG2
fourcc "DVR "
fourcc MPEG
fourcc mx5p ; MPEG IMX 625/50 (50 Mb/s)
fourcc MMES,mmes ; matrox mpeg2 in avi
fourcc M701 ; matrox mpeg2 intra-only
fourcc hdv1,hdv2,hdv3
fourcc hdv4,hdv5,hdv6
fourcc hdv7,hdv8,hdv9
fourcc xdv1,xdv2,xdv3
fourcc xdv4,xdv5,xdv6
fourcc xdv7,xdv8,xdv9
fourcc xdva,xdvb,xdvc
fourcc xdvd,xdve,xdvf
fourcc xd5a,xd5b,xd5c
fourcc xd5d,xd5e,xd5f
fourcc xd59,xd54
fourcc mx5n,mx4n,mx4p
fourcc mx3n,mx3p
fourcc AVmp
fourcc VCR2
fourcc mp2v,mpgv
fourcc m2v1
fourcc PIM2
fourcc LMP2 ; Lead mpeg2 in avi
fourcc slif ; SoftLab MPEG-2 I-frames Codec
driver ffmpeg
dll mpeg2_crystalhd
out YUY2
videocodec mpegpes videocodec mpegpes
info "MPEG-PES output (.mpg or DXR3/IVTV/DVB/V4L2 card)" info "MPEG-PES output (.mpg or DXR3/IVTV/DVB/V4L2 card)"
comment "for hardware decoding" comment "for hardware decoding"
@ -336,8 +370,8 @@ videocodec mpegpes
fourcc mpg1,MPG1,mpg2,MPG2 fourcc mpg1,MPG1,mpg2,MPG2
fourcc MPEG fourcc MPEG
fourcc hdv1,hdv2,hdv3 fourcc hdv1,hdv2,hdv3
fourcc hdv5 fourcc hdv4,hdv5,hdv6
fourcc hdv6,hdv7,hdv8 fourcc hdv7,hdv8,hdv9
fourcc xdv1,xdv2,xdv3 fourcc xdv1,xdv2,xdv3
fourcc xdv4,xdv5,xdv6 fourcc xdv4,xdv5,xdv6
fourcc xdv7,xdv8,xdv9 fourcc xdv7,xdv8,xdv9
@ -345,7 +379,7 @@ videocodec mpegpes
fourcc xdvd,xdve,xdvf fourcc xdvd,xdve,xdvf
fourcc xd5a,xd5b,xd5c fourcc xd5a,xd5b,xd5c
fourcc xd5d,xd5e,xd5f fourcc xd5d,xd5e,xd5f
fourcc xd59,xd54 fourcc xd59,xd54,xd55
fourcc mx5n,mx4n,mx4p fourcc mx5n,mx4n,mx4p
fourcc mx3n,mx3p fourcc mx3n,mx3p
fourcc AVmp fourcc AVmp
@ -861,6 +895,23 @@ videocodec ffdivx
dll msmpeg4 dll msmpeg4
out YV12,I420,IYUV out YV12,I420,IYUV
videocodec ffdivxcrystalhd
info "FFmpeg DivX ;-) (MSMPEG-4 v3) (CrystalHD)"
status buggy
fourcc MPG3,mpg3 div3
fourcc MP43,mp43 div3 ; MSMPEG-4 v3 (fourcc mapping to div3)
fourcc DIV5,div5 div3 ; DivX 3.20
fourcc DIV6,div6 div4 ; -||-
fourcc DIV3,div3,DIV4,div4
fourcc DIVF,divf ; divx4.12
fourcc AP41 div3 ; AngelPotion stuff
fourcc COL1,col1,COL0,col0 ; Cool codec (based on mpg4ds32.ax)
fourcc 3IVD,3ivd ; divxdoctored files (3ivx.com)
fourcc DVX3
driver ffmpeg
dll msmpeg4_crystalhd
out YUY2
videocodec ffmp42 videocodec ffmp42
info "FFmpeg MSMPEG-4 v2" info "FFmpeg MSMPEG-4 v2"
status working status working
@ -921,6 +972,14 @@ videocodec ffwmv3vdpau
dll wmv3_vdpau dll wmv3_vdpau
out VDPAU_WMV3 out VDPAU_WMV3
videocodec ffwmv3crystalhd
info "FFmpeg WMV3/WMV9 (CrystalHD)"
status buggy
fourcc WMV3,wmv3
driver ffmpeg
dll wmv3_crystalhd
out YUY2
videocodec ffvc1 videocodec ffvc1
info "FFmpeg WVC1" info "FFmpeg WVC1"
status buggy status buggy
@ -939,6 +998,15 @@ videocodec ffvc1vdpau
dll vc1_vdpau dll vc1_vdpau
out VDPAU_VC1 out VDPAU_VC1
videocodec ffvc1crystalhd
info "FFmpeg WVC1 (CrystalHD)"
status buggy
fourcc WVC1,wvc1,WMVA
fourcc vc-1,VC-1
driver ffmpeg
dll vc1_crystalhd
out YUY2
videocodec ffh264 videocodec ffh264
info "FFmpeg H.264" info "FFmpeg H.264"
status working status working
@ -948,6 +1016,8 @@ videocodec ffh264
fourcc davc,DAVC fourcc davc,DAVC
fourcc vvvc ; only one sample using this fourcc fourcc vvvc ; only one sample using this fourcc
fourcc ai55,ai15 ; flip4mac avc intra fourcc ai55,ai15 ; flip4mac avc intra
fourcc ai1q,ai5q ; flip4mac avc intra
fourcc ai12 ;AVC Intra 100 / 1080
format 0x10000005 format 0x10000005
driver ffmpeg driver ffmpeg
dll h264 dll h264
@ -961,11 +1031,27 @@ videocodec ffh264vdpau
fourcc avc1,AVC1 fourcc avc1,AVC1
fourcc davc,DAVC fourcc davc,DAVC
fourcc ai55,ai15 ; flip4mac avc intra fourcc ai55,ai15 ; flip4mac avc intra
fourcc ai1q,ai5q ; flip4mac avc intra
format 0x10000005 format 0x10000005
driver ffmpeg driver ffmpeg
dll h264_vdpau dll h264_vdpau
out VDPAU_H264 out VDPAU_H264
videocodec ffh264crystalhd
info "FFmpeg H.264 (CrystalHD)"
status working
fourcc H264,h264
fourcc X264,x264
fourcc avc1,AVC1
fourcc davc,DAVC
fourcc vvvc ; only one sample using this fourcc
fourcc ai55,ai15 ; flip4mac avc intra
fourcc ai1q,ai5q ; flip4mac avc intra
format 0x10000005
driver ffmpeg
dll h264_crystalhd
out YUY2
videocodec coreavcwindows videocodec coreavcwindows
info "CoreAVC H.264 for x86 - http://corecodec.org/" info "CoreAVC H.264 for x86 - http://corecodec.org/"
comment "this codec will only work after purchasing it" comment "this codec will only work after purchasing it"
@ -976,6 +1062,7 @@ videocodec coreavcwindows
fourcc davc,DAVC fourcc davc,DAVC
fourcc VSSH fourcc VSSH
fourcc ai55,ai15 ; flip4mac avc intra fourcc ai55,ai15 ; flip4mac avc intra
fourcc ai1q,ai5q ; flip4mac avc intra
format 0x10000005 format 0x10000005
driver dshow driver dshow
dll "CoreAVCDecoder.ax" dll "CoreAVCDecoder.ax"
@ -1057,6 +1144,39 @@ videocodec ffodivxvdpau
dll mpeg4_vdpau dll mpeg4_vdpau
out VDPAU_MPEG4 out VDPAU_MPEG4
videocodec ffodivxcrystalhd
info "FFmpeg MPEG-4,DIVX-4/5 (CrystalHD)"
status working
fourcc FMP4,fmp4
fourcc DIVX,divx
fourcc DIV1,div1 divx
fourcc MP4S,mp4s ; ISO MPEG-4 Video V1
fourcc M4S2,m4s2
fourcc xvid,XVID,XviD,XVIX
fourcc DX50,dx50,BLZ0 DX50
fourcc mp4v,MP4V
format 0x4
fourcc UMP4
fourcc RMP4
fourcc 3IV2,3iv2 ; 3ivx Delta 4
fourcc DXGM
fourcc SEDG ; diskless camcorder Samsung Miniket VP-M110
fourcc SMP4,smp4 ; Samsung SMP4 video codec
fourcc VIDM ; vidm 4.01 codec
format 0x10000004 ; mpeg 4 es
fourcc m4cc,M4CC
fourcc hdx4,HDX4
fourcc FVFW,fvfw
fourcc FFDS
fourcc DCOD,MVXM,EM4A,PM4V
fourcc M4T3,DMK2,DIGI,INMC
fourcc EPHV,SN40,WAWV
fourcc uldx,ULDX,VSPX
fourcc SIPP ; Samsung SHR-6040
driver ffmpeg
dll mpeg4_crystalhd
out YUY2
videocodec ffwv1f videocodec ffwv1f
info "WV1F MPEG-4" info "WV1F MPEG-4"
status working status working
@ -1742,6 +1862,7 @@ videocodec ffdv
status working status working
fourcc CDVC,cdvc fourcc CDVC,cdvc
fourcc CDVH,cdvh ; Canopus DVCPRO HD fourcc CDVH,cdvh ; Canopus DVCPRO HD
fourcc CDV5 ; Canopus SD50
fourcc DVSD,dvsd ; PAL fourcc DVSD,dvsd ; PAL
fourcc DVCS,dvcs ; NTSC ? fourcc DVCS,dvcs ; NTSC ?
fourcc "dvcp" ; PAL DV in .mov fourcc "dvcp" ; PAL DV in .mov
@ -2494,6 +2615,14 @@ videocodec webtrain
dll "wtvc.dll" dll "wtvc.dll"
out BGR16 flip out BGR16 flip
videocodec ffkega
info "FFmpeg Kega Video"
status working
fourcc KGV1
driver ffmpeg
dll kgv1
out BGR15
videocodec kegavideo videocodec kegavideo
info "Kega Video" info "Kega Video"
comment "requires MSVCR80.DLL on windows" comment "requires MSVCR80.DLL on windows"
@ -3008,6 +3137,14 @@ videocodec fffraps
dll "fraps" dll "fraps"
out BGR24,YV12,I420 out BGR24,YV12,I420
videocodec ffjv
info "FFmpeg Bitmap Brothers JV"
status working
fourcc FFJV ; internal MPlayer FourCC
driver ffmpeg
dll "jv"
out BGR8
videocodec fftiertexseq videocodec fftiertexseq
info "FFmpeg Tiertex SEQ" info "FFmpeg Tiertex SEQ"
status working status working
@ -3554,45 +3691,45 @@ audiocodec wma9spdshow
audiocodec ffqdm2 audiocodec ffqdm2
info "FFmpeg QDM2 audio" info "FFmpeg QDM2 audio"
status working status working
format 0x324D4451 ; "QDM2" fourcc QDM2
driver ffmpeg driver ffmpeg
dll "qdm2" dll "qdm2"
audiocodec qdmc audiocodec qdmc
info "QuickTime QDMC/QDM2 audio" info "QuickTime QDMC/QDM2 audio"
status working status working
format 0x324D4451 ; "QDM2" fourcc QDM2
format 0x434D4451 ; "QDMC" fourcc QDMC
driver qtaudio driver qtaudio
dll "QuickTime.qts" dll "QuickTime.qts"
audiocodec ffqclp audiocodec ffqclp
info "FFmpeg QCLP audio" info "FFmpeg QCLP audio"
status working status working
format 0x706C6351 ; "Qclp" fourcc Qclp
format 0x70637173 ; "sqcp" fourcc sqcp
format 0x716C6351 ; "Qclq" fourcc Qclq
driver ffmpeg driver ffmpeg
dll "qcelp" dll "qcelp"
audiocodec qclp audiocodec qclp
info "QuickTime QCLP audio" info "QuickTime QCLP audio"
status working status working
format 0x706C6351 ; "Qclp" fourcc Qclp
driver qtaudio driver qtaudio
dll "QuickTime.qts" dll "QuickTime.qts"
audiocodec qtmace3 audiocodec qtmace3
info "QuickTime MACE3 audio" info "QuickTime MACE3 audio"
status working status working
format 0x3343414D ; "MAC3" fourcc MAC3
driver qtaudio driver qtaudio
dll "QuickTime.qts" dll "QuickTime.qts"
audiocodec qtmace6 audiocodec qtmace6
info "QuickTime MACE6 audio" info "QuickTime MACE6 audio"
status working status working
format 0x3643414D ; "MAC6" fourcc MAC6
driver qtaudio driver qtaudio
dll "QuickTime.qts" dll "QuickTime.qts"
@ -3606,29 +3743,29 @@ audiocodec zygoaudio
audiocodec ffra144 audiocodec ffra144
info "FFmpeg RealAudio 1.0" info "FFmpeg RealAudio 1.0"
status working status working
format 0x345F3431 ; "14_4" fourcc 14_4
format 0x4A63706C ; "lpcJ" fourcc lpcJ
driver ffmpeg driver ffmpeg
dll "real_144" dll "real_144"
audiocodec ffra288 audiocodec ffra288
info "FFmpeg RealAudio 2.0" info "FFmpeg RealAudio 2.0"
status working status working
format 0x385F3832 ; "28_8" fourcc 28_8
driver ffmpeg driver ffmpeg
dll "real_288" dll "real_288"
audiocodec ffcook audiocodec ffcook
info "FFmpeg COOK audio" info "FFmpeg COOK audio"
status working status working
format 0x6B6F6F63 ; "cook" fourcc cook
driver ffmpeg driver ffmpeg
dll "cook" dll "cook"
audiocodec ffatrc audiocodec ffatrc
info "FFmpeg Atrac 3 audio" info "FFmpeg Atrac 3 audio"
status working status working
format 0x63727461 ; "atrc" fourcc atrc
format 0x270 ; atrac3 in wav format 0x270 ; atrac3 in wav
driver ffmpeg driver ffmpeg
dll "atrac3" dll "atrac3"
@ -3636,7 +3773,7 @@ audiocodec ffatrc
audiocodec ffsipr audiocodec ffsipr
info "FFmpeg Sipr/Acelp.net audio" info "FFmpeg Sipr/Acelp.net audio"
status working status working
format 0x72706973 ; "sipr" fourcc sipr
format 0x130 ; acelp.net format 0x130 ; acelp.net
driver ffmpeg driver ffmpeg
dll "sipr" dll "sipr"
@ -3644,42 +3781,42 @@ audiocodec ffsipr
audiocodec ra144 audiocodec ra144
info "RealAudio 1.0" info "RealAudio 1.0"
status working status working
format 0x345F3431 ; "14_4" fourcc 14_4
driver realaud driver realaud
dll "14_4.so.6.0" dll "14_4.so.6.0"
audiocodec ra144win audiocodec ra144win
info "Win32 RealAudio 1.0" info "Win32 RealAudio 1.0"
status working status working
format 0x345F3431 ; "14_4" fourcc 14_4
driver realaud driver realaud
dll "14_43260.dll" dll "14_43260.dll"
audiocodec ra144mac audiocodec ra144mac
info "Mac OS X RealAudio 1.0" info "Mac OS X RealAudio 1.0"
status working status working
format 0x345F3431 ; "14_4" fourcc 14_4
driver realaud driver realaud
dll "14_4.shlb" dll "14_4.shlb"
audiocodec ra288 audiocodec ra288
info "RealAudio 2.0" info "RealAudio 2.0"
status working status working
format 0x385F3832 ; "28_8" fourcc 28_8
driver realaud driver realaud
dll "28_8.so.6.0" dll "28_8.so.6.0"
audiocodec ra288win audiocodec ra288win
info "Win32 RealAudio 2.0" info "Win32 RealAudio 2.0"
status working status working
format 0x385F3832 ; "28_8" fourcc 28_8
driver realaud driver realaud
dll "28_83260.dll" dll "28_83260.dll"
audiocodec ra288mac audiocodec ra288mac
info "Mac OS X RealAudio 2.0" info "Mac OS X RealAudio 2.0"
status working status working
format 0x385F3832 ; "28_8" fourcc 28_8
driver realaud driver realaud
dll "28_8.shlb" dll "28_8.shlb"
@ -3687,14 +3824,14 @@ audiocodec ra10cook
info "RealPlayer 10 COOK audio" info "RealPlayer 10 COOK audio"
comment "supports cook 5.1" comment "supports cook 5.1"
status working status working
format 0x6B6F6F63 ; "cook" fourcc cook
driver realaud driver realaud
dll "cook.so" dll "cook.so"
audiocodec racook audiocodec racook
info "RealAudio COOK" info "RealAudio COOK"
status working status working
format 0x6B6F6F63 ; "cook" fourcc cook
driver realaud driver realaud
dll "cook.so.6.0" dll "cook.so.6.0"
@ -3702,91 +3839,91 @@ audiocodec ra10cookwin
info "Win32 RealAudio 10 COOK" info "Win32 RealAudio 10 COOK"
comment "supports cook 5.1" comment "supports cook 5.1"
status working status working
format 0x6B6F6F63 ; "cook" fourcc cook
driver realaud driver realaud
dll "cook.dll" dll "cook.dll"
audiocodec racookwin audiocodec racookwin
info "Win32 RealAudio COOK" info "Win32 RealAudio COOK"
status working status working
format 0x6B6F6F63 ; "cook" fourcc cook
driver realaud driver realaud
dll "cook3260.dll" dll "cook3260.dll"
audiocodec racookmac audiocodec racookmac
info "Mac OS X RealAudio COOK" info "Mac OS X RealAudio COOK"
status working status working
format 0x6B6F6F63 ; "cook" fourcc cook
driver realaud driver realaud
dll "cook.bundle/Contents/MacOS/cook" dll "cook.bundle/Contents/MacOS/cook"
audiocodec rasipr audiocodec rasipr
info "RealAudio Sipro" info "RealAudio Sipro"
status working status working
format 0x72706973 ; "sipr" fourcc sipr
driver realaud driver realaud
dll "sipr.so.6.0" dll "sipr.so.6.0"
audiocodec ra10sipr audiocodec ra10sipr
info "RealPlayer 10 RealAudio Sipro" info "RealPlayer 10 RealAudio Sipro"
status working status working
format 0x72706973 ; "sipr" fourcc sipr
driver realaud driver realaud
dll "sipr.so" dll "sipr.so"
audiocodec ra10siprwin audiocodec ra10siprwin
info "Win32 RealAudio 10 Sipro" info "Win32 RealAudio 10 Sipro"
status working status working
format 0x72706973 ; "sipr" fourcc sipr
driver realaud driver realaud
dll "sipr.dll" dll "sipr.dll"
audiocodec rasiprwin audiocodec rasiprwin
info "Win32 RealAudio Sipro" info "Win32 RealAudio Sipro"
status working status working
format 0x72706973 ; "sipr" fourcc sipr
driver realaud driver realaud
dll "sipr3260.dll" dll "sipr3260.dll"
audiocodec rasiprmac audiocodec rasiprmac
info "Mac OS X RealAudio Sipro" info "Mac OS X RealAudio Sipro"
status working status working
format 0x72706973 ; "sipr" fourcc sipr
driver realaud driver realaud
dll "sipr.bundle/Contents/MacOS/sipr" dll "sipr.bundle/Contents/MacOS/sipr"
audiocodec raatrc audiocodec raatrc
info "RealAudio ATRAC3" info "RealAudio ATRAC3"
status working status working
format 0x63727461 ; "atrc" fourcc atrc
driver realaud driver realaud
dll "atrc.so.6.0" dll "atrc.so.6.0"
audiocodec ra10atrc audiocodec ra10atrc
info "RealPlayer 10 RealAudio ATRAC3" info "RealPlayer 10 RealAudio ATRAC3"
status working status working
format 0x63727461 ; "atrc" fourcc atrc
driver realaud driver realaud
dll "atrc.so" dll "atrc.so"
audiocodec ra10atrcwin audiocodec ra10atrcwin
info "Win32 RealAudio 10 ATRAC3" info "Win32 RealAudio 10 ATRAC3"
status working status working
format 0x63727461 ; "atrc" fourcc atrc
driver realaud driver realaud
dll "atrc.dll" dll "atrc.dll"
audiocodec raatrcwin audiocodec raatrcwin
info "Win32 RealAudio ATRAC3" info "Win32 RealAudio ATRAC3"
status working status working
format 0x63727461 ; "atrc" fourcc atrc
driver realaud driver realaud
dll "atrc3260.dll" dll "atrc3260.dll"
audiocodec raatrcmac audiocodec raatrcmac
info "Mac OS X RealAudio ATRAC3" info "Mac OS X RealAudio ATRAC3"
status working status working
format 0x63727461 ; "atrc" fourcc atrc
driver realaud driver realaud
dll "atrc.bundle/Contents/MacOS/atrc" dll "atrc.bundle/Contents/MacOS/atrc"
@ -3807,7 +3944,7 @@ audiocodec ffadpcmimaamv
audiocodec ffadpcmimaqt audiocodec ffadpcmimaqt
info "FFmpeg QT IMA ADPCM audio" info "FFmpeg QT IMA ADPCM audio"
status working status working
format 0x34616d69 ; "ima4" (MOV files) fourcc ima4 ; (MOV files)
driver ffmpeg driver ffmpeg
dll adpcm_ima_qt dll adpcm_ima_qt
@ -3824,7 +3961,7 @@ audiocodec imaadpcm
info "IMA ADPCM" info "IMA ADPCM"
status working status working
format 0x11 format 0x11
format 0x34616d69 ; "ima4" (MOV files) fourcc ima4 ; (MOV files)
format 0x1100736d ; "ms\x00\x11" (MOV files) format 0x1100736d ; "ms\x00\x11" (MOV files)
driver imaadpcm driver imaadpcm
@ -3959,9 +4096,10 @@ audiocodec ffadpcmxa
audiocodec ffxandpcm audiocodec ffxandpcm
info "FFmpeg XAN DPCM audio" info "FFmpeg XAN DPCM audio"
comment "only works with libavformat demuxer" comment "Wing Commander 4 files only work with libavformat demuxer"
status working status working
fourcc Axan fourcc Axan
format 0x594A
driver ffmpeg driver ffmpeg
dll xan_dpcm dll xan_dpcm
@ -4119,18 +4257,20 @@ audiocodec pcm
format 0x1 format 0x1
format 0x3 ; IEEE float format 0x3 ; IEEE float
format 0xfffe ; Extended format 0xfffe ; Extended
format 0x20776172 ; "raw " (MOV files) fourcc "raw " ; (MOV files)
format 0x736f7774 ; "twos" (MOV files) fourcc twos ; (MOV files)
format 0x74776f73 ; "sowt" (MOV files) fourcc sowt ; (MOV files)
format 0x32336c66 ; "fl32" (MOV files) fourcc fl32 ; (MOV files)
format 0x666c3332 ; "23lf" (MOV files) fourcc 23lf ; (MOV files)
; format 0x34366c66 ; "fl64" (MOV files) ; fourcc fl64 ; (MOV files)
; format 0x666c3634 ; "46lf" (MOV files) ; fourcc 46lf ; (MOV files)
format 0x454e4f4e ; "NONE" (MOV files from Kodak CX6320) fourcc NONE ; (MOV files from Kodak CX6320)
format 0x34326e69 ; "in24" (MOV files) fourcc in24 ; (MOV files)
format 0x696e3234 ; "42ni" (MOV files) fourcc 42ni ; (MOV files)
format 0x32336e69 ; "in32" (MOV files) fourcc in32 ; (MOV files)
format 0x696e3332 ; "23ni" (MOV files) fourcc 23ni ; (MOV files)
fourcc lpcm ; (MOV files)
fourcc FL32 ; (aiff files)
;;;; these are for hardware support only: (alaw,ulaw,ima-adpcm,mpeg,ac3) ;;;; these are for hardware support only: (alaw,ulaw,ima-adpcm,mpeg,ac3)
; format 0x6 ; format 0x6
; format 0x7 ; format 0x7
@ -4347,7 +4487,7 @@ audiocodec imaadpcmacm
audiocodec ffgsm audiocodec ffgsm
info "FFmpeg GSM 06.10" info "FFmpeg GSM 06.10"
status working status working
format 0x204D5347 fourcc "GSM "
format 0x1500 format 0x1500
fourcc agsm fourcc agsm
driver ffmpeg driver ffmpeg
@ -4364,7 +4504,7 @@ audiocodec ffgsmms
audiocodec libgsm audiocodec libgsm
info "libgsm GSM 06.10" info "libgsm GSM 06.10"
status working status working
format 0x204D5347 fourcc "GSM "
format 0x1500 format 0x1500
driver ffmpeg driver ffmpeg
dll "libgsm" dll "libgsm"
@ -4397,14 +4537,14 @@ audiocodec alaw
info "aLaw" info "aLaw"
status working status working
format 0x6 format 0x6
format 0x77616C61 ; 'alaw', .mov files fourcc alaw ; (MOV files)
driver alaw driver alaw
audiocodec ulaw audiocodec ulaw
info "uLaw" info "uLaw"
status working status working
format 0x7 format 0x7
format 0x77616c75 ; "ulaw" (MOV files) fourcc ulaw ; (MOV files)
format 0x6c75 format 0x6c75
driver alaw driver alaw
@ -4421,14 +4561,21 @@ audiocodec fflpcm
driver ffmpeg driver ffmpeg
dll pcm_bluray dll pcm_bluray
audiocodec ffpcmlxf
info "Leitch/Harris PCM"
status working
fourcc PLXF ; internal MPlayer FourCC
driver ffmpeg
dll pcm_lxf
; add every new fourcc also to allocate_parser() ; add every new fourcc also to allocate_parser()
; in libmpdemux/demuxer.c ; in libmpdemux/demuxer.c
audiocodec ffac3 audiocodec ffac3
info "FFmpeg AC-3" info "FFmpeg AC-3"
status working status working
format 0x2000 format 0x2000
format 0x332D6361 ; ac-3 in mp4 fourcc ac-3 ; ac-3 in mp4
format 0x332D4341 fourcc AC-3
format 0x20736D ; "ms\20" older ac3 fcc (MOV files) format 0x20736D ; "ms\20" older ac3 fcc (MOV files)
fourcc dnet fourcc dnet
fourcc sac3 fourcc sac3
@ -4448,8 +4595,11 @@ audiocodec a52
info "AC3-liba52" info "AC3-liba52"
status working status working
format 0x2000 format 0x2000
; format 0x332D6361 ; ac-3 in mp4 -- not working fourcc ac-3 ; ac-3 in mp4
fourcc AC-3
format 0x20736D ; "ms\20" older ac3 fcc (MOV files)
fourcc dnet fourcc dnet
fourcc sac3
driver liba52 driver liba52
dll "liba52" dll "liba52"

View File

@ -81,11 +81,11 @@ while(1){
if(c<0) return -1; /* EOF*/ if(c<0) return -1; /* EOF*/
sh_audio->a_in_buffer[sh_audio->a_in_buffer_len++]=c; sh_audio->a_in_buffer[sh_audio->a_in_buffer_len++]=c;
} }
if(sh_audio->format!=0x2000) swab(sh_audio->a_in_buffer,sh_audio->a_in_buffer,8); if(sh_audio->format==MKTAG('d','n','e','t')) swab(sh_audio->a_in_buffer,sh_audio->a_in_buffer,8);
length = a52_syncinfo (sh_audio->a_in_buffer, &flags, &sample_rate, &bit_rate); length = a52_syncinfo (sh_audio->a_in_buffer, &flags, &sample_rate, &bit_rate);
if(length>=7 && length<=3840) break; /* we're done.*/ if(length>=7 && length<=3840) break; /* we're done.*/
/* bad file => resync*/ /* bad file => resync*/
if(sh_audio->format!=0x2000) swab(sh_audio->a_in_buffer,sh_audio->a_in_buffer,8); if(sh_audio->format==MKTAG('d','n','e','t')) swab(sh_audio->a_in_buffer,sh_audio->a_in_buffer,8);
memmove(sh_audio->a_in_buffer,sh_audio->a_in_buffer+1,7); memmove(sh_audio->a_in_buffer,sh_audio->a_in_buffer+1,7);
--sh_audio->a_in_buffer_len; --sh_audio->a_in_buffer_len;
} }
@ -94,7 +94,7 @@ while(1){
sh_audio->i_bps=bit_rate/8; sh_audio->i_bps=bit_rate/8;
sh_audio->samplesize=sh_audio->sample_format==AF_FORMAT_FLOAT_NE ? 4 : 2; sh_audio->samplesize=sh_audio->sample_format==AF_FORMAT_FLOAT_NE ? 4 : 2;
demux_read_data(sh_audio->ds,sh_audio->a_in_buffer+8,length-8); demux_read_data(sh_audio->ds,sh_audio->a_in_buffer+8,length-8);
if(sh_audio->format!=0x2000) if(sh_audio->format==MKTAG('d','n','e','t'))
swab(sh_audio->a_in_buffer+8,sh_audio->a_in_buffer+8,length-8); swab(sh_audio->a_in_buffer+8,sh_audio->a_in_buffer+8,length-8);
#ifdef CONFIG_LIBA52_INTERNAL #ifdef CONFIG_LIBA52_INTERNAL

View File

@ -86,10 +86,12 @@ static int init(sh_audio_t * sh_audio)
sh_audio->sample_format = AF_FORMAT_S8; sh_audio->sample_format = AF_FORMAT_S8;
break; break;
case 0x32336c66: // 'fl32', bigendian float32 case 0x32336c66: // 'fl32', bigendian float32
case 0x32334C46: // 'FL32', bigendian float32 in aiff
sh_audio->sample_format = AF_FORMAT_FLOAT_BE; sh_audio->sample_format = AF_FORMAT_FLOAT_BE;
sh_audio->samplesize = 4; sh_audio->samplesize = 4;
break; break;
case 0x666c3332: // '23lf', little endian float32, MPlayer internal fourCC case 0x666c3332: // '23lf', little endian float32, MPlayer internal fourCC
case 0x6D63706C: // 'lpcm'
sh_audio->sample_format = AF_FORMAT_FLOAT_LE; sh_audio->sample_format = AF_FORMAT_FLOAT_LE;
sh_audio->samplesize = 4; sh_audio->samplesize = 4;
break; break;

View File

@ -279,7 +279,7 @@ static void uninit(sh_audio_t *sh){
unsigned long ConvertedFrames=0; unsigned long ConvertedFrames=0;
unsigned long ConvertedBytes=0; unsigned long ConvertedBytes=0;
#ifdef WIN32_LOADER #if defined(WIN32_LOADER) && !defined(CONFIG_QUICKTIME)
Setup_FS_Segment(); Setup_FS_Segment();
#endif #endif
@ -306,7 +306,7 @@ static int decode_audio(sh_audio_t *sh,unsigned char *buf,int minlen,int maxlen)
unsigned long ConvertedFrames=0; unsigned long ConvertedFrames=0;
unsigned long ConvertedBytes=0; unsigned long ConvertedBytes=0;
#ifdef WIN32_LOADER #if defined(WIN32_LOADER) && !defined(CONFIG_QUICKTIME)
Setup_FS_Segment(); Setup_FS_Segment();
#endif #endif

View File

@ -63,11 +63,8 @@ static int init(sh_audio_t *sh) {
const uint8_t *hdr = (const uint8_t *)(sh->wf + 1); const uint8_t *hdr = (const uint8_t *)(sh->wf + 1);
const SpeexMode *spx_mode; const SpeexMode *spx_mode;
const SpeexStereoState st_st = SPEEX_STEREO_STATE_INIT; // hack const SpeexStereoState st_st = SPEEX_STEREO_STATE_INIT; // hack
if (!sh->wf || sh->wf->cbSize < 80) { if (sh->wf && sh->wf->cbSize >= 80)
mp_msg(MSGT_DECAUDIO, MSGL_FATAL, "Missing extradata!\n"); ctx->hdr = speex_packet_to_header((char *)&sh->wf[1], sh->wf->cbSize);
goto err_out;
}
ctx->hdr = speex_packet_to_header((char *)&sh->wf[1], sh->wf->cbSize);
if (!ctx->hdr && sh->wf->cbSize == 0x72 && hdr[0] == 1 && hdr[1] == 0) { if (!ctx->hdr && sh->wf->cbSize == 0x72 && hdr[0] == 1 && hdr[1] == 0) {
// speex.acm format: raw SpeexHeader dump // speex.acm format: raw SpeexHeader dump
ctx->hdr = calloc(1, sizeof(*ctx->hdr)); ctx->hdr = calloc(1, sizeof(*ctx->hdr));
@ -86,8 +83,18 @@ static int init(sh_audio_t *sh) {
ctx->hdr->frames_per_packet = read_le32(&hdr); ctx->hdr->frames_per_packet = read_le32(&hdr);
} }
if (!ctx->hdr) { if (!ctx->hdr) {
mp_msg(MSGT_DECAUDIO, MSGL_FATAL, "Invalid extradata!\n"); mp_msg(MSGT_DECAUDIO, MSGL_ERR, "Invalid or missing extradata! Assuming defaults.\n");
goto err_out; ctx->hdr = calloc(1, sizeof(*ctx->hdr));
ctx->hdr->frames_per_packet = 1;
ctx->hdr->mode = 0;
if (sh->wf) {
ctx->hdr->nb_channels = sh->wf->nChannels;
ctx->hdr->rate = sh->wf->nSamplesPerSec;
if (ctx->hdr->rate > 16000)
ctx->hdr->mode = 2;
else if (ctx->hdr->rate > 8000)
ctx->hdr->mode = 1;
}
} }
if (ctx->hdr->nb_channels != 1 && ctx->hdr->nb_channels != 2) { if (ctx->hdr->nb_channels != 1 && ctx->hdr->nb_channels != 2) {
mp_msg(MSGT_DECAUDIO, MSGL_WARN, "Invalid number of channels (%i), " mp_msg(MSGT_DECAUDIO, MSGL_WARN, "Invalid number of channels (%i), "
@ -119,12 +126,6 @@ static int init(sh_audio_t *sh) {
sh->sample_format = AF_FORMAT_S16_NE; sh->sample_format = AF_FORMAT_S16_NE;
sh->context = ctx; sh->context = ctx;
return 1; return 1;
err_out:
if (ctx)
free(ctx->hdr);
free(ctx);
return 0;
} }
static void uninit(sh_audio_t *sh) { static void uninit(sh_audio_t *sh) {

View File

@ -521,10 +521,13 @@ static int get_buffer(AVCodecContext *avctx, AVFrame *pic){
sh_video_t *sh = avctx->opaque; sh_video_t *sh = avctx->opaque;
vd_ffmpeg_ctx *ctx = sh->context; vd_ffmpeg_ctx *ctx = sh->context;
mp_image_t *mpi=NULL; mp_image_t *mpi=NULL;
int flags= MP_IMGFLAG_ACCEPT_STRIDE | MP_IMGFLAG_PREFER_ALIGNED_STRIDE; int flags= MP_IMGFLAG_ACCEPT_ALIGNED_STRIDE | MP_IMGFLAG_PREFER_ALIGNED_STRIDE;
int type= MP_IMGTYPE_IPB; int type= MP_IMGTYPE_IPB;
int width= avctx->width; int width= avctx->width;
int height= avctx->height; int height= avctx->height;
// special case to handle reget_buffer without buffer hints
if (pic->opaque && pic->data[0] && !pic->buffer_hints)
return 0;
avcodec_align_dimensions(avctx, &width, &height); avcodec_align_dimensions(avctx, &width, &height);
//printf("get_buffer %d %d %d\n", pic->reference, ctx->ip_count, ctx->b_count); //printf("get_buffer %d %d %d\n", pic->reference, ctx->ip_count, ctx->b_count);
@ -557,6 +560,9 @@ static int get_buffer(AVCodecContext *avctx, AVFrame *pic){
if(init_vo(sh, avctx->pix_fmt) < 0){ if(init_vo(sh, avctx->pix_fmt) < 0){
avctx->release_buffer= avcodec_default_release_buffer; avctx->release_buffer= avcodec_default_release_buffer;
avctx->get_buffer= avcodec_default_get_buffer; avctx->get_buffer= avcodec_default_get_buffer;
avctx->reget_buffer= avcodec_default_reget_buffer;
if (pic->data[0])
release_buffer(avctx, pic);
return avctx->get_buffer(avctx, pic); return avctx->get_buffer(avctx, pic);
} }
@ -569,6 +575,9 @@ static int get_buffer(AVCodecContext *avctx, AVFrame *pic){
ctx->do_dr1=0; //FIXME ctx->do_dr1=0; //FIXME
avctx->get_buffer= avcodec_default_get_buffer; avctx->get_buffer= avcodec_default_get_buffer;
avctx->reget_buffer= avcodec_default_reget_buffer;
if (pic->data[0])
release_buffer(avctx, pic);
return avctx->get_buffer(avctx, pic); return avctx->get_buffer(avctx, pic);
} }

View File

@ -901,7 +901,7 @@ static off_t ts_detect_streams(demuxer_t *demuxer, tsdemux_init_t *param)
audio_found = 0; audio_found = 0;
param->atype = UNKNOWN; param->atype = UNKNOWN;
//WE DIDN'T MATCH ANY AUDIO STREAM, SO WE FORCE THE DEMUXER TO IGNORE AUDIO //WE DIDN'T MATCH ANY AUDIO STREAM, SO WE FORCE THE DEMUXER TO IGNORE AUDIO
mp_msg(MSGT_DEMUXER, MSGL_INFO, "NO AUDIO! "); mp_msg(MSGT_DEMUXER, MSGL_INFO, "NO AUDIO! (try increasing -tsprobe)");
} }
if(IS_SUB(param->stype)) if(IS_SUB(param->stype))

View File

@ -516,10 +516,13 @@ static void allocate_parser(AVCodecContext **avctx, AVCodecParserContext **parse
case 0x332D6361: case 0x332D6361:
case 0x332D4341: case 0x332D4341:
case 0x20736D: case 0x20736D:
case MKTAG('d', 'n', 'e', 't'):
case MKTAG('s', 'a', 'c', '3'): case MKTAG('s', 'a', 'c', '3'):
codec_id = CODEC_ID_AC3; codec_id = CODEC_ID_AC3;
break; break;
case MKTAG('d', 'n', 'e', 't'):
// DNET/byte-swapped AC-3 - there is no parser for that yet
//codec_id = CODEC_ID_DNET;
break;
case MKTAG('E', 'A', 'C', '3'): case MKTAG('E', 'A', 'C', '3'):
codec_id = CODEC_ID_EAC3; codec_id = CODEC_ID_EAC3;
break; break;

View File

@ -46,6 +46,9 @@ static const struct mp_AVCodecTag mp_wav_tags[] = {
{ CODEC_ID_MUSEPACK7, MKTAG('M', 'P', 'C', ' ')}, { CODEC_ID_MUSEPACK7, MKTAG('M', 'P', 'C', ' ')},
{ CODEC_ID_MUSEPACK8, MKTAG('M', 'P', 'C', '8')}, { CODEC_ID_MUSEPACK8, MKTAG('M', 'P', 'C', '8')},
{ CODEC_ID_NELLYMOSER, MKTAG('N', 'E', 'L', 'L')}, { CODEC_ID_NELLYMOSER, MKTAG('N', 'E', 'L', 'L')},
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52, 92, 0)
{ CODEC_ID_PCM_LXF, MKTAG('P', 'L', 'X', 'F')},
#endif
{ CODEC_ID_QCELP, MKTAG('Q', 'c', 'l', 'p')}, { CODEC_ID_QCELP, MKTAG('Q', 'c', 'l', 'p')},
{ CODEC_ID_QDM2, MKTAG('Q', 'D', 'M', '2')}, { CODEC_ID_QDM2, MKTAG('Q', 'D', 'M', '2')},
{ CODEC_ID_RA_144, MKTAG('1', '4', '_', '4')}, { CODEC_ID_RA_144, MKTAG('1', '4', '_', '4')},
@ -71,6 +74,7 @@ static const struct mp_AVCodecTag mp_codecid_override_tags[] = {
{ CODEC_ID_AC3, 0x2000}, { CODEC_ID_AC3, 0x2000},
{ CODEC_ID_ADPCM_IMA_AMV, MKTAG('A', 'M', 'V', 'A')}, { CODEC_ID_ADPCM_IMA_AMV, MKTAG('A', 'M', 'V', 'A')},
{ CODEC_ID_DTS, 0x2001}, { CODEC_ID_DTS, 0x2001},
{ CODEC_ID_DVVIDEO, MKTAG('d', 'v', 's', 'd')},
{ CODEC_ID_EAC3, MKTAG('E', 'A', 'C', '3')}, { CODEC_ID_EAC3, MKTAG('E', 'A', 'C', '3')},
{ CODEC_ID_H264, MKTAG('H', '2', '6', '4')}, { CODEC_ID_H264, MKTAG('H', '2', '6', '4')},
{ CODEC_ID_MPEG4, MKTAG('M', 'P', '4', 'V')}, { CODEC_ID_MPEG4, MKTAG('M', 'P', '4', 'V')},
@ -93,6 +97,8 @@ const struct mp_AVCodecTag * const mp_codecid_override_taglists[] = {mp_codecid_
static const struct mp_AVCodecTag mp_bmp_tags[] = { static const struct mp_AVCodecTag mp_bmp_tags[] = {
{ CODEC_ID_AMV, MKTAG('A', 'M', 'V', 'V')}, { CODEC_ID_AMV, MKTAG('A', 'M', 'V', 'V')},
{ CODEC_ID_ANM, MKTAG('A', 'N', 'M', ' ')},
{ CODEC_ID_AVS, MKTAG('A', 'V', 'S', ' ')},
{ CODEC_ID_BETHSOFTVID, MKTAG('B', 'E', 'T', 'H')}, { CODEC_ID_BETHSOFTVID, MKTAG('B', 'E', 'T', 'H')},
{ CODEC_ID_BFI, MKTAG('B', 'F', 'I', 'V')}, { CODEC_ID_BFI, MKTAG('B', 'F', 'I', 'V')},
{ CODEC_ID_C93, MKTAG('C', '9', '3', 'V')}, { CODEC_ID_C93, MKTAG('C', '9', '3', 'V')},
@ -103,6 +109,9 @@ static const struct mp_AVCodecTag mp_bmp_tags[] = {
{ CODEC_ID_FLIC, MKTAG('F', 'L', 'I', 'C')}, { CODEC_ID_FLIC, MKTAG('F', 'L', 'I', 'C')},
{ CODEC_ID_IDCIN, MKTAG('I', 'D', 'C', 'I')}, { CODEC_ID_IDCIN, MKTAG('I', 'D', 'C', 'I')},
{ CODEC_ID_INTERPLAY_VIDEO, MKTAG('I', 'N', 'P', 'V')}, { CODEC_ID_INTERPLAY_VIDEO, MKTAG('I', 'N', 'P', 'V')},
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52, 114, 0)
{ CODEC_ID_JV, MKTAG('F', 'F', 'J', 'V')},
#endif
{ CODEC_ID_MDEC, MKTAG('M', 'D', 'E', 'C')}, { CODEC_ID_MDEC, MKTAG('M', 'D', 'E', 'C')},
{ CODEC_ID_MOTIONPIXELS, MKTAG('M', 'V', 'I', '1')}, { CODEC_ID_MOTIONPIXELS, MKTAG('M', 'V', 'I', '1')},
{ CODEC_ID_NUV, MKTAG('N', 'U', 'V', '1')}, { CODEC_ID_NUV, MKTAG('N', 'U', 'V', '1')},

View File

@ -102,7 +102,7 @@ typedef struct sh_video {
double i_pts; // PTS for the _next_ I/P frame double i_pts; // PTS for the _next_ I/P frame
float next_frame_time; float next_frame_time;
double last_pts; double last_pts;
double buffered_pts[20]; double buffered_pts[32];
int num_buffered_pts; int num_buffered_pts;
double codec_reordered_pts; double codec_reordered_pts;
double prev_codec_reordered_pts; double prev_codec_reordered_pts;

View File

@ -34,6 +34,7 @@
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <sys/kd.h> #include <sys/kd.h>
#include <linux/fb.h> #include <linux/fb.h>
#include <libavutil/common.h>
#include "config.h" #include "config.h"
#include "video_out.h" #include "video_out.h"
@ -43,7 +44,6 @@
#include "geometry.h" #include "geometry.h"
#include "aspect.h" #include "aspect.h"
#include "mp_msg.h" #include "mp_msg.h"
#include "libavutil/common.h"
static const vo_info_t info = { static const vo_info_t info = {
"Framebuffer Device", "Framebuffer Device",
@ -480,7 +480,7 @@ static fb_mode_t *find_best_mode(int xres, int yres, range_t *hfreq,
return best; return best;
} }
static void set_bpp(struct fb_var_screeninfo *p, int bpp) static void set_bpp(struct fb_var_screeninfo *p, int bpp, int rgb)
{ {
p->bits_per_pixel = FFALIGN(bpp, 2); p->bits_per_pixel = FFALIGN(bpp, 2);
p->red.msb_right = p->green.msb_right = p->blue.msb_right = p->transp.msb_right = 0; p->red.msb_right = p->green.msb_right = p->blue.msb_right = p->transp.msb_right = 0;
@ -519,15 +519,19 @@ static void set_bpp(struct fb_var_screeninfo *p, int bpp)
p->blue.length = 4; p->blue.length = 4;
break; break;
} }
if (rgb) {
p->blue.offset = p->red.offset;
p->red.offset = 0;
}
} }
static void fb_mode2fb_vinfo(fb_mode_t *m, struct fb_var_screeninfo *v) static void fb_mode2fb_vinfo(fb_mode_t *m, struct fb_var_screeninfo *v, int rgb)
{ {
v->xres = m->xres; v->xres = m->xres;
v->yres = m->yres; v->yres = m->yres;
v->xres_virtual = m->vxres; v->xres_virtual = m->vxres;
v->yres_virtual = m->vyres; v->yres_virtual = m->vyres;
set_bpp(v, m->depth); set_bpp(v, m->depth, rgb);
v->pixclock = m->pixclock; v->pixclock = m->pixclock;
v->left_margin = m->left; v->left_margin = m->left;
v->right_margin = m->right; v->right_margin = m->right;
@ -563,6 +567,7 @@ static struct fb_var_screeninfo fb_vinfo;
static unsigned short fb_ored[256], fb_ogreen[256], fb_oblue[256]; static unsigned short fb_ored[256], fb_ogreen[256], fb_oblue[256];
static struct fb_cmap fb_oldcmap = { 0, 256, fb_ored, fb_ogreen, fb_oblue }; static struct fb_cmap fb_oldcmap = { 0, 256, fb_ored, fb_ogreen, fb_oblue };
static int fb_cmap_changed = 0; static int fb_cmap_changed = 0;
static int fb_rgb;
static int fb_pixel_size; // 32: 4 24: 3 16: 2 15: 2 static int fb_pixel_size; // 32: 4 24: 3 16: 2 15: 2
static int fb_bpp; // 32: 32 24: 24 16: 16 15: 15 static int fb_bpp; // 32: 32 24: 24 16: 16 15: 15
static int fb_bpp_we_want; // 32: 32 24: 24 16: 16 15: 15 static int fb_bpp_we_want; // 32: 32 24: 24 16: 16 15: 15
@ -687,6 +692,7 @@ static int fb_preinit(int reset)
mp_msg(MSGT_VO, MSGL_ERR, "notice: Can't open /dev/tty: %s\n", strerror(errno)); mp_msg(MSGT_VO, MSGL_ERR, "notice: Can't open /dev/tty: %s\n", strerror(errno));
} }
fb_rgb = !fb_vinfo.red.offset;
fb_bpp = fb_vinfo.bits_per_pixel; fb_bpp = fb_vinfo.bits_per_pixel;
if (fb_bpp == 16) if (fb_bpp == 16)
fb_bpp = fb_vinfo.red.length + fb_vinfo.green.length + fb_vinfo.blue.length; fb_bpp = fb_vinfo.red.length + fb_vinfo.green.length + fb_vinfo.blue.length;
@ -779,7 +785,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
mp_msg(MSGT_VO, MSGL_ERR, "can't find requested video mode\n"); mp_msg(MSGT_VO, MSGL_ERR, "can't find requested video mode\n");
return 1; return 1;
} }
fb_mode2fb_vinfo(fb_mode, &fb_vinfo); fb_mode2fb_vinfo(fb_mode, &fb_vinfo, fb_rgb);
} else if (vm) { } else if (vm) {
monitor_hfreq = str2range(monitor_hfreq_str); monitor_hfreq = str2range(monitor_hfreq_str);
monitor_vfreq = str2range(monitor_vfreq_str); monitor_vfreq = str2range(monitor_vfreq_str);
@ -796,10 +802,10 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
} }
mp_msg(MSGT_VO, MSGL_V, "using mode %dx%d @ %.1fHz\n", fb_mode->xres, mp_msg(MSGT_VO, MSGL_V, "using mode %dx%d @ %.1fHz\n", fb_mode->xres,
fb_mode->yres, vsf(fb_mode)); fb_mode->yres, vsf(fb_mode));
fb_mode2fb_vinfo(fb_mode, &fb_vinfo); fb_mode2fb_vinfo(fb_mode, &fb_vinfo, fb_rgb);
} }
fb_bpp_we_want = fb_bpp; fb_bpp_we_want = fb_bpp;
set_bpp(&fb_vinfo, fb_bpp); set_bpp(&fb_vinfo, fb_bpp, fb_rgb);
fb_vinfo.xres_virtual = fb_vinfo.xres; fb_vinfo.xres_virtual = fb_vinfo.xres;
fb_vinfo.yres_virtual = fb_vinfo.yres; fb_vinfo.yres_virtual = fb_vinfo.yres;
fb_page = 0; fb_page = 0;
@ -955,7 +961,7 @@ static int query_format(uint32_t format)
{ {
if (!fb_preinit(0)) if (!fb_preinit(0))
return 0; return 0;
if ((format & IMGFMT_BGR_MASK) == IMGFMT_BGR) { if ((format & IMGFMT_BGR_MASK) == (fb_rgb ? IMGFMT_RGB : IMGFMT_BGR)) {
int bpp = format & 0xff; int bpp = format & 0xff;
if (bpp == fb_bpp) if (bpp == fb_bpp)

View File

@ -36,6 +36,8 @@
#include "fastmemcpy.h" #include "fastmemcpy.h"
#include "sub/sub.h" #include "sub/sub.h"
#include "mp_msg.h" #include "mp_msg.h"
#include "aspect.h"
#include "libavutil/common.h"
static const vo_info_t info = { static const vo_info_t info = {
"Framebuffer Device", "Framebuffer Device",
@ -108,8 +110,6 @@ static void (*draw_alpha_p)(int w, int h, unsigned char *src,
static uint8_t *next_frame = NULL; // for double buffering static uint8_t *next_frame = NULL; // for double buffering
static int in_width; static int in_width;
static int in_height; static int in_height;
static int out_width;
static int out_height;
static struct fb_cmap *make_directcolor_cmap(struct fb_var_screeninfo *var) static struct fb_cmap *make_directcolor_cmap(struct fb_var_screeninfo *var)
{ {
@ -122,42 +122,25 @@ static struct fb_cmap *make_directcolor_cmap(struct fb_var_screeninfo *var)
bcols = 1 << var->blue.length; bcols = 1 << var->blue.length;
/* Make our palette the length of the deepest color */ /* Make our palette the length of the deepest color */
cols = (rcols > gcols ? rcols : gcols); cols = FFMAX3(rcols, gcols, bcols);
cols = (cols > bcols ? cols : bcols);
red = malloc(cols * sizeof(red[0])); red = malloc(3 * cols * sizeof(red[0]));
if(!red) { if(!red) {
mp_msg(MSGT_VO, MSGL_ERR, "[fbdev2] Can't allocate red palette with %d entries.\n", cols); mp_msg(MSGT_VO, MSGL_ERR, "[fbdev2] Can't allocate red palette with %d entries.\n", cols);
return NULL; return NULL;
} }
for(i=0; i< rcols; i++) green = red + cols;
red[i] = (65535/(rcols-1)) * i; blue = green + cols;
for (i = 0; i < cols; i++) {
green = malloc(cols * sizeof(green[0])); red[i] = (65535/(rcols-1)) * i;
if(!green) {
mp_msg(MSGT_VO, MSGL_ERR, "[fbdev2] Can't allocate green palette with %d entries.\n", cols);
free(red);
return NULL;
}
for(i=0; i< gcols; i++)
green[i] = (65535/(gcols-1)) * i; green[i] = (65535/(gcols-1)) * i;
blue[i] = (65535/(bcols-1)) * i;
blue = malloc(cols * sizeof(blue[0]));
if(!blue) {
mp_msg(MSGT_VO, MSGL_ERR, "[fbdev2] Can't allocate blue palette with %d entries.\n", cols);
free(red);
free(green);
return NULL;
} }
for(i=0; i< bcols; i++)
blue[i] = (65535/(bcols-1)) * i;
cmap = malloc(sizeof(struct fb_cmap)); cmap = malloc(sizeof(struct fb_cmap));
if(!cmap) { if(!cmap) {
mp_msg(MSGT_VO, MSGL_ERR, "[fbdev2] Can't allocate color map\n"); mp_msg(MSGT_VO, MSGL_ERR, "[fbdev2] Can't allocate color map\n");
free(red); free(red);
free(green);
free(blue);
return NULL; return NULL;
} }
cmap->start = 0; cmap->start = 0;
@ -232,20 +215,17 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
{ {
struct fb_cmap *cmap; struct fb_cmap *cmap;
int fs = flags & VOFLAG_FULLSCREEN; int fs = flags & VOFLAG_FULLSCREEN;
int x_offset = vo_dx + (d_width - width ) / 2;
int y_offset = vo_dy + (d_height - height) / 2;
x_offset = av_clip(x_offset, 0, fb_vinfo.xres - width);
y_offset = av_clip(y_offset, 0, fb_vinfo.yres - height);
out_width = width;
out_height = height;
in_width = width; in_width = width;
in_height = height; in_height = height;
if (fs) { if (fb_vinfo.xres < in_width || fb_vinfo.yres < in_height) {
out_width = fb_vinfo.xres;
out_height = fb_vinfo.yres;
}
if (out_width < in_width || out_height < in_height) {
mp_msg(MSGT_VO, MSGL_ERR, "[fbdev2] Screensize is smaller than video size (%dx%d < %dx%d)\n", mp_msg(MSGT_VO, MSGL_ERR, "[fbdev2] Screensize is smaller than video size (%dx%d < %dx%d)\n",
out_width, out_height, in_width, in_height); fb_vinfo.xres, fb_vinfo.yres, in_width, in_height);
return 1; return 1;
} }
@ -282,12 +262,12 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
return 1; return 1;
if (ioctl(fb_dev_fd, FBIOPUTCMAP, cmap)) { if (ioctl(fb_dev_fd, FBIOPUTCMAP, cmap)) {
mp_msg(MSGT_VO, MSGL_ERR, "[fbdev2] can't put cmap: %s\n", strerror(errno)); mp_msg(MSGT_VO, MSGL_ERR, "[fbdev2] can't put cmap: %s\n", strerror(errno));
free(cmap->red);
free(cmap);
return 1; return 1;
} }
fb_cmap_changed = 1; fb_cmap_changed = 1;
free(cmap->red); free(cmap->red);
free(cmap->green);
free(cmap->blue);
free(cmap); free(cmap);
break; break;
default: default:
@ -304,8 +284,8 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
} }
center = frame_buffer + center = frame_buffer +
( (out_width - in_width) / 2 ) * fb_pixel_size + x_offset * fb_pixel_size +
( (out_height - in_height) / 2 ) * fb_line_len; y_offset * fb_line_len;
#ifndef USE_CONVERT2FB #ifndef USE_CONVERT2FB
if (!(next_frame = realloc(next_frame, in_width * in_height * fb_pixel_size))) { if (!(next_frame = realloc(next_frame, in_width * in_height * fb_pixel_size))) {
@ -378,13 +358,8 @@ static int draw_slice(uint8_t *src[], int stride[], int w, int h, int x, int y)
uint8_t *dest = next_frame + (in_width * y + x) * fb_pixel_size; uint8_t *dest = next_frame + (in_width * y + x) * fb_pixel_size;
int next = in_width * fb_pixel_size; int next = in_width * fb_pixel_size;
#endif #endif
int i;
for (i = 0; i < h; i++) { memcpy_pic(dest, in, w * fb_pixel_size, h, next, stride[0]);
fast_memcpy(dest, in, w * fb_pixel_size);
dest += next;
in += stride[0];
}
return 0; return 0;
} }
@ -395,14 +370,11 @@ static void check_events(void)
static void flip_page(void) static void flip_page(void)
{ {
#ifndef USE_CONVERT2FB #ifndef USE_CONVERT2FB
int i, out_offset = 0, in_offset = 0; int out_offset = 0, in_offset = 0;
for (i = 0; i < in_height; i++) { memcpy_pic(center + out_offset, next_frame + in_offset,
fast_memcpy(center + out_offset, next_frame + in_offset, in_width * fb_pixel_size, in_height,
in_width * fb_pixel_size); fb_line_len, in_width * fb_pixel_size);
out_offset += fb_line_len;
in_offset += in_width * fb_pixel_size;
}
#endif #endif
} }
@ -430,6 +402,11 @@ static int control(uint32_t request, void *data)
switch (request) { switch (request) {
case VOCTRL_QUERY_FORMAT: case VOCTRL_QUERY_FORMAT:
return query_format(*((uint32_t*)data)); return query_format(*((uint32_t*)data));
case VOCTRL_UPDATE_SCREENINFO:
vo_screenwidth = fb_vinfo.xres;
vo_screenheight = fb_vinfo.yres;
aspect_save_screenres(vo_screenwidth, vo_screenheight);
return VO_TRUE;
} }
return VO_NOTIMPL; return VO_NOTIMPL;
} }

View File

@ -1393,6 +1393,8 @@ static int control(uint32_t request, void *data)
if (!(eq_map[i].supportmask & (1 << use_yuv))) if (!(eq_map[i].supportmask & (1 << use_yuv)))
break; break;
*eq_map[i].value = args->value; *eq_map[i].value = args->value;
if (strcmp(args->name, "gamma") == 0)
eq_rgamma = eq_ggamma = eq_bgamma = args->value;
update_yuvconv(); update_yuvconv();
return VO_TRUE; return VO_TRUE;
} }

View File

@ -1632,7 +1632,9 @@ static void update_osd_msg(struct MPContext *mpctx)
int len = get_time_length(mpctx); int len = get_time_length(mpctx);
int percentage = -1; int percentage = -1;
char percentage_text[10]; char percentage_text[10];
int pts = get_current_time(mpctx); char fractions_text[4];
double fpts = get_current_time(mpctx);
int pts = fpts;
if (mpctx->osd_show_percentage_until) if (mpctx->osd_show_percentage_until)
percentage = get_percent_pos(mpctx); percentage = get_percent_pos(mpctx);
@ -1642,15 +1644,41 @@ static void update_osd_msg(struct MPContext *mpctx)
else else
percentage_text[0] = 0; percentage_text[0] = 0;
if (opts->osd_fractions == 1) {
//print fractions as sub-second timestamp
snprintf(fractions_text, sizeof(fractions_text), ".%02d",
(int)((fpts - pts) * 100));
} else if (opts->osd_fractions == 2) {
/* Print fractions by estimating the frame count within the
* second.
*
* Rounding or cutting off numbers after the decimal point
* causes problems because of float's precision and movies
* whose first frame is not exactly at timestamp 0. Therefore,
* we add 0.2 and cut off at the decimal point, which proved
* to be good heuristic.
*/
double fps = mpctx->sh_video->fps;
if (fps <= 1 || fps > 99)
strcpy(fractions_text, ".??");
else
snprintf(fractions_text, sizeof(fractions_text), ".%02d",
(int) ( (fpts - pts) * fps + 0.2 ) );
} else {
//do not print fractions
fractions_text[0] = 0;
}
if (opts->osd_level == 3) if (opts->osd_level == 3)
snprintf(osd_text_timer, 63, snprintf(osd_text_timer, 63,
"%c %02d:%02d:%02d / %02d:%02d:%02d%s", "%c %02d:%02d:%02d%s / %02d:%02d:%02d%s",
mpctx->osd_function,pts/3600,(pts/60)%60,pts%60, mpctx->osd_function,pts/3600,(pts/60)%60,pts%60,
len/3600,(len/60)%60,len%60,percentage_text); fractions_text, len/3600, (len/60)%60, len%60,
percentage_text);
else else
snprintf(osd_text_timer, 63, "%c %02d:%02d:%02d%s", snprintf(osd_text_timer, 63, "%c %02d:%02d:%02d%s%s",
mpctx->osd_function,pts/3600,(pts/60)%60, mpctx->osd_function,pts/3600,(pts/60)%60,
pts%60,percentage_text); pts%60, fractions_text, percentage_text);
} else } else
osd_text_timer[0]=0; osd_text_timer[0]=0;

View File

@ -31,6 +31,7 @@ typedef struct MPOpts {
int osd_level; int osd_level;
int osd_duration; int osd_duration;
int osd_fractions;
char *vobsub_name; char *vobsub_name;
int auto_quality; int auto_quality;
int benchmark; int benchmark;

View File

@ -124,7 +124,6 @@ mv DOCS/man/zh DOCS/man/zh_CN
--codecsdir=%{codecsdir} \ --codecsdir=%{codecsdir} \
\ \
--enable-gui \ --enable-gui \
--enable-largefiles \
--disable-termcap \ --disable-termcap \
--disable-bitmap-font \ --disable-bitmap-font \
--enable-lirc \ --enable-lirc \
@ -167,7 +166,6 @@ mv -f mplayer gmplayer
--libdir=%{_libdir} \ --libdir=%{_libdir} \
--codecsdir=%{codecsdir} \ --codecsdir=%{codecsdir} \
\ \
--enable-largefiles \
--disable-termcap \ --disable-termcap \
--disable-bitmap-font \ --disable-bitmap-font \
--enable-lirc \ --enable-lirc \

View File

@ -167,6 +167,7 @@ static int cache_fill(cache_vars_t *s)
int back,back2,newb,space,len,pos; int back,back2,newb,space,len,pos;
off_t read=s->read_filepos; off_t read=s->read_filepos;
int read_chunk; int read_chunk;
int wraparound_copy = 0;
if(read<s->min_filepos || read>s->max_filepos){ if(read<s->min_filepos || read>s->max_filepos){
// seek... // seek...
@ -208,8 +209,16 @@ static int cache_fill(cache_vars_t *s)
// printf("### read=0x%X back=%d newb=%d space=%d pos=%d\n",read,back,newb,space,pos); // printf("### read=0x%X back=%d newb=%d space=%d pos=%d\n",read,back,newb,space,pos);
// reduce space if needed: // try to avoid wrap-around. If not possible due to sector size
if(space>s->buffer_size-pos) space=s->buffer_size-pos; // do an extra copy.
if(space>s->buffer_size-pos) {
if (s->buffer_size-pos >= s->sector_size) {
space=s->buffer_size-pos;
} else {
space = s->sector_size;
wraparound_copy = 1;
}
}
// limit one-time block size // limit one-time block size
read_chunk = s->stream->read_chunk; read_chunk = s->stream->read_chunk;
@ -224,6 +233,13 @@ static int cache_fill(cache_vars_t *s)
s->min_filepos=read-back; // avoid seeking-back to temp area... s->min_filepos=read-back; // avoid seeking-back to temp area...
#endif #endif
if (wraparound_copy) {
int to_copy;
len = stream_read_internal(s->stream, s->stream->buffer, space);
to_copy = FFMIN(len, s->buffer_size-pos);
memcpy(s->buffer + pos, s->stream->buffer, to_copy);
memcpy(s->buffer, s->stream->buffer + to_copy, len - to_copy);
} else
len = stream_read_internal(s->stream, &s->buffer[pos], space); len = stream_read_internal(s->stream, &s->buffer[pos], space);
s->eof= !len; s->eof= !len;

View File

@ -58,6 +58,7 @@ int network_bandwidth=0;
int network_cookies_enabled = 0; int network_cookies_enabled = 0;
char *network_useragent=NULL; char *network_useragent=NULL;
char *network_referrer=NULL; char *network_referrer=NULL;
char **network_http_header_fields=NULL;
/* IPv6 options */ /* IPv6 options */
int network_ipv4_only_proxy = 0; int network_ipv4_only_proxy = 0;
@ -250,6 +251,12 @@ http_send_request( URL_t *url, off_t pos ) {
if (network_cookies_enabled) cookies_set( http_hdr, server_url->hostname, server_url->url ); if (network_cookies_enabled) cookies_set( http_hdr, server_url->hostname, server_url->url );
if (network_http_header_fields) {
int i=0;
while (network_http_header_fields[i])
http_set_field(http_hdr, network_http_header_fields[i++]);
}
http_set_field( http_hdr, "Connection: close"); http_set_field( http_hdr, "Connection: close");
if (proxy) if (proxy)
http_add_basic_proxy_authentication(http_hdr, url->username, url->password); http_add_basic_proxy_authentication(http_hdr, url->username, url->password);

View File

@ -61,6 +61,8 @@ typedef struct {
extern const mime_struct_t mime_type_table[]; extern const mime_struct_t mime_type_table[];
extern char **network_http_header_fields;
streaming_ctrl_t *streaming_ctrl_new(void); streaming_ctrl_t *streaming_ctrl_new(void);
int streaming_bufferize( streaming_ctrl_t *streaming_ctrl, char *buffer, int size); int streaming_bufferize( streaming_ctrl_t *streaming_ctrl, char *buffer, int size);

View File

@ -28,6 +28,7 @@
#endif #endif
#include <fcntl.h> #include <fcntl.h>
#include <strings.h> #include <strings.h>
#include <assert.h>
#include "talloc.h" #include "talloc.h"
@ -279,6 +280,7 @@ void stream_capture_do(stream_t *s)
int stream_read_internal(stream_t *s, void *buf, int len) int stream_read_internal(stream_t *s, void *buf, int len)
{ {
int orig_len = len;
// we will retry even if we already reached EOF previously. // we will retry even if we already reached EOF previously.
switch(s->type){ switch(s->type){
case STREAMTYPE_STREAM: case STREAMTYPE_STREAM:
@ -300,7 +302,26 @@ int stream_read_internal(stream_t *s, void *buf, int len)
default: default:
len= s->fill_buffer ? s->fill_buffer(s, buf, len) : 0; len= s->fill_buffer ? s->fill_buffer(s, buf, len) : 0;
} }
if(len<=0){ s->eof=1; return 0; } if(len<=0){
// dvdnav has some horrible hacks to "suspend" reads,
// we need to skip this code or seeks will hang.
if (!s->eof && s->type != STREAMTYPE_DVDNAV) {
// just in case this is an error e.g. due to network
// timeout reset and retry
// Seeking is used as a hack to make network streams
// reopen the connection, ideally they would implement
// e.g. a STREAM_CTRL_RECONNECT to do this
off_t pos = s->pos;
s->eof=1;
stream_reset(s);
stream_seek_internal(s, pos);
// make sure EOF is set to ensure no endless loops
s->eof=1;
return stream_read_internal(s, buf, orig_len);
}
s->eof=1;
return 0;
}
// When reading succeeded we are obviously not at eof. // When reading succeeded we are obviously not at eof.
// This e.g. avoids issues with eof getting stuck when lavf seeks in MPEG-TS // This e.g. avoids issues with eof getting stuck when lavf seeks in MPEG-TS
s->eof=0; s->eof=0;
@ -328,6 +349,7 @@ int stream_write_buffer(stream_t *s, unsigned char *buf, int len) {
if(rd < 0) if(rd < 0)
return -1; return -1;
s->pos += rd; s->pos += rd;
assert(rd == len && "stream_write_buffer(): unexpected short write");
return rd; return rd;
} }

View File

@ -134,7 +134,7 @@ static dvdnav_priv_t * new_dvdnav_stream(char * filename) {
mp_msg(MSGT_OPEN,MSGL_ERR,"stream_dvdnav, failed to set PGC positioning\n"); mp_msg(MSGT_OPEN,MSGL_ERR,"stream_dvdnav, failed to set PGC positioning\n");
/* report the title?! */ /* report the title?! */
if (dvdnav_get_title_string(priv->dvdnav,&title_str)==DVDNAV_STATUS_OK) { if (dvdnav_get_title_string(priv->dvdnav,&title_str)==DVDNAV_STATUS_OK) {
mp_msg(MSGT_IDENTIFY, MSGL_INFO,"Title: '%s'\n",title_str); mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_DVD_VOLUME_ID=%s\n", title_str);
} }
//dvdnav_event_clear(priv); //dvdnav_event_clear(priv);
@ -509,7 +509,9 @@ static void identify_chapters(dvdnav_t *nav, uint32_t title)
if(parts) { if(parts) {
t = duration / 90; t = duration / 90;
mp_msg(MSGT_IDENTIFY, MSGL_V, "ID_DVD_TITLE_%d_LENGTH=%d.%03d\n", title, t / 1000, t % 1000); mp_msg(MSGT_IDENTIFY, MSGL_V, "ID_DVD_TITLE_%d_LENGTH=%d.%03d\n", title, t / 1000, t % 1000);
mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_DVD_TITLE_%d_CHAPTERS=%d\n", title, n);
mp_msg(MSGT_IDENTIFY, MSGL_INFO, "TITLE %u, CHAPTERS: ", title); mp_msg(MSGT_IDENTIFY, MSGL_INFO, "TITLE %u, CHAPTERS: ", title);
for(i=0; i<n; i++) { for(i=0; i<n; i++) {
t = parts[i] / 90000; t = parts[i] / 90000;
mp_msg(MSGT_IDENTIFY, MSGL_INFO, "%02d:%02d:%02d,", t/3600, (t/60)%60, t%60); mp_msg(MSGT_IDENTIFY, MSGL_INFO, "%02d:%02d:%02d,", t/3600, (t/60)%60, t%60);
@ -524,7 +526,7 @@ static void identify(dvdnav_priv_t *priv, struct stream_priv_s *p)
uint32_t titles=0, i; uint32_t titles=0, i;
if(p->track <= 0) { if(p->track <= 0) {
dvdnav_get_number_of_titles(priv->dvdnav, &titles); dvdnav_get_number_of_titles(priv->dvdnav, &titles);
for(i=0; i<titles; i++) for(i=1; i<=titles; i++)
identify_chapters(priv->dvdnav, i); identify_chapters(priv->dvdnav, i);
} }
else else
@ -600,6 +602,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
mp_msg(MSGT_OPEN,MSGL_FATAL,"dvdnav_stream, couldn't select title %d, error '%s'\n", p->track, dvdnav_err_to_string(priv->dvdnav)); mp_msg(MSGT_OPEN,MSGL_FATAL,"dvdnav_stream, couldn't select title %d, error '%s'\n", p->track, dvdnav_err_to_string(priv->dvdnav));
return STREAM_UNSUPPORTED; return STREAM_UNSUPPORTED;
} }
mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_DVD_CURRENT_TITLE=%d\n", p->track);
} else if (p->track == 0) { } else if (p->track == 0) {
if(dvdnav_menu_call(priv->dvdnav, DVD_MENU_Root) != DVDNAV_STATUS_OK) if(dvdnav_menu_call(priv->dvdnav, DVD_MENU_Root) != DVDNAV_STATUS_OK)
dvdnav_menu_call(priv->dvdnav, DVD_MENU_Title); dvdnav_menu_call(priv->dvdnav, DVD_MENU_Title);

View File

@ -34,6 +34,7 @@ static int fill_buffer(stream_t *s, char *buffer, int max_len)
static int write_buffer(stream_t *s, char *buffer, int len) static int write_buffer(stream_t *s, char *buffer, int len)
{ {
/* url_write retries internally on short writes and EAGAIN */
int r = url_write(s->priv, buffer, len); int r = url_write(s->priv, buffer, len);
return (r <= 0) ? -1 : r; return (r <= 0) ? -1 : r;
} }

View File

@ -56,8 +56,16 @@ static int fill_buffer(stream_t *s, char* buffer, int max_len){
} }
static int write_buffer(stream_t *s, char* buffer, int len) { static int write_buffer(stream_t *s, char* buffer, int len) {
int r = write(s->fd,buffer,len); int r;
return (r <= 0) ? -1 : r; int wr = 0;
while (wr < len) {
r = write(s->fd,buffer,len);
if (r <= 0)
return -1;
wr += r;
buffer += r;
}
return len;
} }
static int seek(stream_t *s,off_t newpos) { static int seek(stream_t *s,off_t newpos) {

View File

@ -100,8 +100,16 @@ static int fill_buffer(stream_t *s, char* buffer, int max_len){
} }
static int write_buffer(stream_t *s, char* buffer, int len) { static int write_buffer(stream_t *s, char* buffer, int len) {
int r = smbc_write(s->fd,buffer,len); int r;
return (r <= 0) ? -1 : r; int wr = 0;
while (wr < len) {
r = smbc_write(s->fd,buffer,len);
if (r <= 0)
return -1;
wr += r;
buffer += r;
}
return len;
} }
static void close_f(stream_t *s){ static void close_f(stream_t *s){

View File

@ -920,6 +920,10 @@ void spudec_draw_scaled(void *me, unsigned int dxs, unsigned int dys, void (*dra
} }
if (spu->scaled_image) { if (spu->scaled_image) {
unsigned int x, y; unsigned int x, y;
// needs to be 0-initialized because draw_alpha draws always a
// multiple of 8 pixels. TODO: optimize
if (spu->scaled_width & 7)
memset(spu->scaled_image, 0, 2 * spu->scaled_image_size);
if (spu->scaled_width <= 1 || spu->scaled_height <= 1) { if (spu->scaled_width <= 1 || spu->scaled_height <= 1) {
goto nothing_to_do; goto nothing_to_do;
} }