From 2ba8b91a97e7e873a522f365e41a293af980c91a Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Mon, 2 Jul 2012 02:35:57 +0300 Subject: build, codec-cfg.c: simplify builtin codecs.conf handling The player can read codec mapping (codecs.conf) from an external file or use embedded defaults. Before, the defaults were stored in the player binary in the form of final already-parsed data structures. Simplify things by storing the text of the codecs.conf file instead, and parse that at runtime the same way an external file would be parsed. To create the previous parsed form, the build system first compiled a separate binary named "codec-cfg", which parsed etc/codecs.conf and then wrote the results as a C data structure that could be compiled into the program. The new simple conversion of codecs.conf into a C string is handled by the new script TOOLS/file2string.py. After removing the codec-cfg binary, HOST_CC is no longer used for anything. Remove the --host-cc configure option and associated logic. Also remove the codec2html and codec-cfg-test functionality. Building those was already broken and nobody cared. There was a broken 3-character-long "fourcc" entry in etc/codecs.conf. This happened to be accepted before but triggered a parse error after the changes. Remove the broken entry and make the parsing functions explicitly test for this error. --- etc/codecs.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'etc') diff --git a/etc/codecs.conf b/etc/codecs.conf index edec66ecce..2767c7ac3c 100644 --- a/etc/codecs.conf +++ b/etc/codecs.conf @@ -3,7 +3,7 @@ ; Before editing this file, please read DOCS/tech/codecs.conf.txt ! ;============================================================================= -release 20110311 +release 20120702 ;============================================================================= ; VIDEO CODECS @@ -777,7 +777,7 @@ videocodec ffindeo2 videocodec ffflv info "FFmpeg Flash video" status working - fourcc FLV1,flv + fourcc FLV1 driver ffmpeg dll flv -- cgit v1.2.3 From 5f3c3f8c32d20405a2caf7de66aa1ea7f513d4d2 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Tue, 24 Jul 2012 09:01:47 +0300 Subject: video, audio: use lavc decoders without codecs.conf entries Add support for using libavcodec decoders that do not have entries in codecs.conf. This is currently only used with demux_lavf, and the codec selection is based on codec_id returned by libavformat. Also modify codec-related terminal output somewhat to make it use information from libavcodec and avoid excessively long default output. The new any-lavc-codec support is implemented with codecs.conf entries that invoke vd_ffmpeg/ad_ffmpeg without directly specifying any libavcodec codec name. In this mode, the decoders now instead select the libavcodec codec based on codec_id previously set by demux_lavf (if any). These new "generic" codecs.conf entries specify "status buggy", so that they're tried after any specific entries with higher-priority status. Add new directive "anyinput" to codecs.conf syntax. This means the entry will always match regardless of fourcc. This is used for the above new codecs.conf entries (so the driver always gets to decide whether to accept the input, and will fail init() if it can't find a suitable codec in libavcodec). Remove parsing support for the obsolete codecs.conf directive "cpuflags". This directive has not had any effect and has not been used in default codecs.conf since many years ago. Shorten codec-related terminal output. When using libavcodec decoders, show the libavcodec long_name field rather than codecs.conf "info" field as the name of the codec. Stop showing the codecs.conf entry name and "vfm/afm" name by default, as these are rarely needed; they're now in verbose output only. Show "VIDEO:" line at VO initialization rather than at demuxer open. This didn't really belong in demuxer code; the new location may show more accurate values (known after decoder has been opened) and works right if video track is changed after initial demuxer open. The vd.c changes (primarily done for terminal output changes) remove round-to-even behavior from code setting dimensions based on aspect ratio. I hope nothing depended on this; at least the even values were not consistently guaranteed anyway, as the rounding code did not run if the video file did not specify a nonzero aspect value. --- etc/codecs.conf | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/codecs.conf b/etc/codecs.conf index 2767c7ac3c..8f0220fece 100644 --- a/etc/codecs.conf +++ b/etc/codecs.conf @@ -3,12 +3,18 @@ ; Before editing this file, please read DOCS/tech/codecs.conf.txt ! ;============================================================================= -release 20120702 +release 20120717 ;============================================================================= ; VIDEO CODECS ;============================================================================= +videocodec lavc + info "Generic libavcodec decoder" + status buggy + driver ffmpeg + anyinput + videocodec ffanm info "FFmpeg Deluxe Paint Animation" status working @@ -3485,6 +3491,7 @@ videocodec null status crashing comment "for unknown/unsupported codecs or testing" driver null + anyinput out YV12 out I420 out YUY2 @@ -3496,6 +3503,12 @@ videocodec null ; AUDIO CODECS ;============================================================================= +audiocodec lavc + info "Generic libavcodec decoder" + status buggy + driver ffmpeg + anyinput + audiocodec wma9dmo info "Windows Media Audio 9 DMO" status working -- cgit v1.2.3