summaryrefslogtreecommitdiffstats
path: root/libmpdemux
Commit message (Collapse)AuthorAgeFilesLines
* video: honor the video's colormatrix and color range flagscantabile2012-08-211-0/+2
| | | | | | If either of them is not defined, the old behavior is used: - the colormatrix is guessed based on resolution. - the color range is assumed to be tv aka limited range.
* demux_gif: change format of packets to make it work againwm42012-08-201-9/+23
| | | | | | | | | | | | | | The only decoder which could handle demux_gif's output was vd_raw, which has been removed recently. Instead of re-adding vd_raw, make it work with vd_ffmpeg. By coincidence, the FourCC "raw " fits our needs and it understood by the ffmpeg raw decoder (apparently used in mov files going by libavcodec/rawdec.c). Since there doesn't seem to be any good way to transport the palette in mplayer dmuxer packets, create an AVPacket for this purpose. (struct sh_video provides a "global" palette. Rather than hacking vd_ffmpeg to use it, it seems cleaner to make demux_gif use AVPacket, which supports a per-frame palette.)
* vd_ffmpeg, demux_mng: allow general raw formats, fix MNG demuxerwm42012-08-201-2/+3
| | | | | | | | | | | | | | | Change vd_ffmpeg such that if sh_video->format is a mplayer pixel format, and there's no other codec information, try to play it as raw video. (The case of no codec information happens if the "generic" ffmpeg decoder is instantiated, which is tried last. This means clashes with actual existing formats are less likely.) demux_mng did not initialize all fields of the bih, which made vd_ffmpeg do invalid memory accesses when trying to copy the extradata. Also, use IMGFMT_RGB32 instead of creating the FourCC directly. (They should be the same, but what if mplayer changes the IMGFMT_* values.) This also fixes demux_rawvideo.
* libmpcodecs: remove redundant audio and video decoderswm42012-08-203-747/+0
| | | | | | | | Probably all of these are supported by libavcodec. Missing things can be added back. Also remove qtpalette.h. It was used by demux_mov.c, and should have been deleted with commit 1fde09db6f4ce.
* Remove support for libdvwm42012-08-203-281/+0
| | | | | This removes the libdv demuxer and audio/video decoders. FFmpeg has support for it, and it's even preferred over the internal decoders.
* Remove support for libnemesi RTSP streamingwm42012-08-203-505/+0
| | | | | Removed due to being a maintainance burden. Support for FFmpeg is available.
* Remove support for LIVE555 RTSP streamingwm42012-08-207-1265/+0
| | | | | | | | | | | | The main excuse for removing this is that LIVE555 deprecated the API the mplayer implementation was using. The old API still seems to be somewhat supported, but must be explicitly enabled at LIVE555 compilation, so mplayer won't always work on any user installation. The implementation was also very messy, in C++, and FFmpeg support is available as alternative. Remove it completely.
* libmpdemux: remove demux_real, demux_viv, demux_audiowm42012-08-2011-4245/+56
| | | | | | libavformat replaces demux_audio completely. I don't know/care what vivo (demux_viv) is. libavformat has a Real demuxer; it seems it works slightly better, with a different set of bugs.
* Remove dvdnav support (DVD menus)wm42012-08-161-1/+1
| | | | | | | | | | | | | | | | When the internal mplayer MPEG demuxer was removed (commit 1fde09db), the default demuxer when using dvdnav was set to libavformat. Now it turns out that this doesn't work with libavformat. It will terminate playback right after the audio runs out (instead of looping it like the video, or whatever it's supposed to do). I'm not sure what exactly the problem is, but since 1. even mplayer-svn can't handle DVD menus directly (missing highlights), 2. DVD menus are essentially worthless, and 3. I don't directly watch DVDs, don't bother with it and remove it. For basic playback, there's still libdvdread support. Also, use pkg-config for libdvdread, and drop support for in-tree libdvdread. Remove support for in-tree libdvdcss as well.
* Remove win32/qt/xanim/real binary codecs loadingwm42012-08-163-681/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the win32 loader - the win32 emulation layer, as well as the code for using DirectShow/DMO/VFW codecs. Remove loading of xanim, QuickTime, and RealMedia codecs. The win32 emulation layer is based on a very old version of wine. Apparently, wine code was copied and hacked until it was somehow able to load a limited collection of binary codecs. It poked around in the code segment of some known binary codecs to disable unsupported win32 API calls to make them work. Example from module.c: for (i=0;i<5;i++) RVA(0x19e842)[i]=0x90; // make_new_region ? for (i=0;i<28;i++) RVA(0x19e86d)[i]=0x90; // call__call_CreateCompatibleDC ? for (i=0;i<5;i++) RVA(0x19e898)[i]=0x90; // jmp_to_call_loadbitmap ? for (i=0;i<9;i++) RVA(0x19e8ac)[i]=0x90; // call__calls_OLE_shit ? for (i=0;i<106;i++) RVA(0x261b10)[i]=0x90; // disable threads Just to show how utterly insane this code is. You wouldn't want even your worst enemy to have to maintain this. In fact, it seems nobody made major changes to this code ever since it was committed. Most formats can be decoded by libavcodecs these days, and the loader couldn't be used on 64 bit platforms anyway. The same is (probably) true for the other binary codecs. General note about how support for win32 codecs could be added back: It's not possible to replace the win32 loader code by using wine as library, because modern wine can not be linked with native Linux programs for certain reasons. It would be possible to to move DirectShow video decoding into a separate process linked with wine, like the CoreAVC-for-Linux patches do. There is also the mplayer-ww fork, which uses the dshownative library to use DirectShow codecs on Windows.
* demux_lavf: assume audio codec_tag 0 means unsetUoti Urpala2012-08-161-0/+2
| | | | | | | | | | | Libavformat does not distinguish between "no codec_tag given" and "codec_tag given, value is 0". 0 can be a valid value. Change demux_lavf to assume that 0 always means unset for audio. This prevents incorrect selection of the PCM decoder, which includes "format 0x0" in its codecs.conf entry. The video case accepts 0 iff codec_id is RAWVIDEO, but there's no obvious similar check possible for audio. Thus this could possibly cause issues if a file really uses 0 to mean uncompressed audio.
* command: fix subtitle selection displaywm42012-08-081-1/+1
| | | | | | | | | Commit 9c02ae7e9510897 set the sh variable (see diff) to the struct of type sh_sub instead the one of sh_stream. Unfortunately this didn't crash, and merely made the OSD show "unknown" for the language. Commit 804bf91570a24b9 accidentally removed the display of the track title. Add it back.
* Remove V4L2 decoder support (vo_v4l2 and ao_v4l2)wm42012-08-072-184/+0
| | | | | | | | | | | The removed VO and AO took MPEG data and decoded it with V4L2. I'm not exactly sure what's the use of this today, but get rid of it. As far as feeding video data to V4L2 is concerned, there are other ways. For example, there is this script, that feeds yuv4mpeg formatted raw video data to V4L2: https://raw.github.com/umlaeute/v4l2loopback/master/examples/yuv4mpeg_to_v4l2.c
* demuxer: introduce a general stream structwm42012-08-035-67/+123
| | | | | | | | | | | | | | | | There are different C types for each stream type: sh_video for video, sh_audio for audio, sh_sub for sub. There is no type that handles all stream types in a generic way. Instead, there's a macro SH_COMMON, that is used to define common fields for all 3 stream structs. Accessing the common fields is hard if you want to be independent from the stream type. Introduce an actual generic stream struct (struct sh_stream), which is supposed to unify all 3 stream types one day. Once all fields defined by SH_COMMON have been moved into sh_stream, the transition is complete. Move some fields into sh_stream, and rewrite osd_show_tracks to use them.
* demux_audio: always enable parsing for audio streamsmplayer-svn2012-08-031-1/+2
| | | | | | | | | Generally enable parsing for audio streams. The formats I know of that do not need it (e.g. raw audio) do not have a parser anyway. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35050 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* mp3_hdr: cleanupsmplayer-svn2012-08-031-59/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Return a spf value even when srate is NULL. Based on patch by Benoît Thébaudeau [benoit thebaudeau advansee com] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34916 b3059339-0415-0410-9bf9-f77b7e298cf2 Make some tables const. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34917 b3059339-0415-0410-9bf9-f77b7e298cf2 Use more appropriate types. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34918 b3059339-0415-0410-9bf9-f77b7e298cf2 Some minor simplifications. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34919 b3059339-0415-0410-9bf9-f77b7e298cf2 Cosmetics: fix up indentations, get rid of a few lost tabs. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34920 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove unused code from mp_get_mp3_header. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34923 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* demux_audio: fix calculation of audio lengthmplayer-svn2012-08-031-1/+2
| | | | | | | | | Take start offset into account when calculating amount of audio data. Patch by Benoît Thébaudeau [benoit thebaudeau advansee com] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34915 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* demux_audio: avoid integer overflowsmplayer-svn2012-08-031-3/+7
| | | | | | | | | Add some additional checks to ensure subtractions do not overflow. Patch by Benoît Thébaudeau [benoit thebaudeau advansee com]. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34914 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* demux_real: set aspect ratiomplayer-svn2012-08-031-0/+2
| | | | | | | | | RM demuxer: set aspect from container video dimensions. Fixes the sample from FFmpeg trac issue #785. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34850 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* commands, dvd, dvdnav, bluray: cleanup sub/audio track language displaymplayer-svn2012-08-032-0/+39
| | | | | | | | | | | | | | | | | | | | | Code cleanup: Use a stream_control instead of global functions to get the language associate with a audio or subtitle stream from the streaming layer. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34736 b3059339-0415-0410-9bf9-f77b7e298cf2 Support showing the stream language with br:// playback. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34737 b3059339-0415-0410-9bf9-f77b7e298cf2 Fix DVDs showing the subtitle language as "unknown" for a long time. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34777 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar Note: heavily modified by wm4 for this fork of mplayer.
* demux_rtp: fix compilation with new LIVE555 librariesmplayer-svn2012-08-031-0/+2
| | | | | | | Patch by Marty Jack, martyj19 comcast net git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34800 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: cehoyos
* demux_audio: do not decode ID3v2 tag data as audio datamplayer-svn2012-08-031-10/+53
| | | | | | | | | | | | | | | | | Minor simplification. Part of patch by Benoît Thébaudeau [benoit thebaudeau () advansee com]. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34718 b3059339-0415-0410-9bf9-f77b7e298cf2 Detect ID3v2 tag at the end of the file and stop demuxing before its start. Avoids trying to decode its data as MP3. Patch by Benoît Thébaudeau [benoit thebaudeau {} advansee com]. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34719 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* demux_mf: add j2c and jpc as jpeg2k, add tiff extension as tif imagemplayer-svn2012-08-031-0/+5
| | | | | | | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34587 b3059339-0415-0410-9bf9-f77b7e298cf2 demux_mf: add JPS/PNS image formats add jps / pns image formats, sync'd from ffmpeg samples: http://i2.i-2000.com/~siragusa/jpsvpns/data/ git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34642 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: compn
* stream: add new stream control command STREAM_CTRL_GET_NUM_TITLESmplayer-svn2012-08-031-0/+2
| | | | | | | | | This provides the total number of titles (aka tracks) of CDs / VCDs / DVDs. Additionally, add a titles property to the get_property slave command. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34474 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: ib
* demux_audio: improve WAV format detectionmplayer-svn2012-08-031-1/+3
| | | | | | | | Make WAV format detection more restrictive so it does not incorrectly grab qcp files. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34343 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* demux_audo: fix wrong runtime and average bitrate for VBR MP3mplayer-svn2012-08-031-1/+67
| | | | | | | | | Do so by determining the number of frames from the Xing/Info/VBRI headers and by calculation a correct duration which leads to an reasonable average bytes per seconds. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34273 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: ib
* demux_audio: ensure that demuxer->movi_end will be setmplayer-svn2012-08-031-3/+2
| | | | | | | This also simplifies the code that checks for TAG. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34272 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: ib
* Replace 'q' printf length modifier by 'll'mplayer-svn2012-08-031-2/+2
| | | | | | | 'q' is just a deprecated synonym of 'll' that should no longer be used. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34224 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: diego
* Remove teletext supportwm42012-08-032-6/+0
| | | | | | | | Teletext requires special OSD support. Because I can't even test teletext, I can't restore support for it. Since teletext can be considered ancient and obscure, and since it doesn't make sense to keep the remaining teletext code without being able to use it, I'm removing it.
* Remove dead codewm42012-08-0110-1496/+0
| | | | | | | | | | | | | This was done with the help of callcatcher [1]. Only functions which are statically known to be unused are removed. Some unused functions are not removed yet, because they might be needed in the near future (such as open_output_stream for the encode branch). There is one user visible change: the --subcc option did nothing, and is removed with this commit. [1] http://www.skynet.ie/~caolan/Packages/callcatcher.html
* Change <endian.h> include to <sys/types.h>wm42012-07-313-3/+2
| | | | | This seems to be more portable. Should fix compilation on OSX and FreeBSD. Apparently also works on MinGW-w64.
* configure: remove checks for malloc.h and alloca()wm42012-07-301-3/+0
| | | | | | | | Including <malloc.h>, especially if all you want is malloc(), has no legitimate uses (on sane platforms at least). Remove the check for it, and remove all uses in the code. Remove unused check for alloca().
* Remove some demuxers and decoderswm42012-07-3035-16353/+32
| | | | | | | | | | | | | | | | | | Most of these demuxers and decoders are provided in better form by libav, while the mplayer builtin ones are essentially unmaintained. The only legimitate use case for not using the libav ones was working around libav bugs or bugs related to the way mplayer uses libav. Instead of trying to keep dead code alive, development effort should go into improving libav or the mplayer libav glue code. Note that the libav demuxer have been preferred over the mplayer builtin ones for a while in mplayer2. There were some exceptions: playing DVDs with dvdnav or playing network sources. (That's because some stream modules and network.c requested explicit file formats, such as DEMUXER_TYPE_MPEG_PS, which mapped to builtin demuxers.) With this commit, they are switched to use libav. One caveat is that the requested format is not passed to libavformat, instead we rely on the auto probing to select the correct libav demuxer (see code in demux_open_stream()).
* Remove XMMS plugin supportwm42012-07-303-575/+0
| | | | XMMS has been dead since 2007.
* mplayer: let frontend print stream info, instead of demuxerswm42012-07-305-9/+51
| | | | | | | | | | | | | | | | | | When playing a file, users (i.e. me) expect mplayer to print a list of video/audio/subtitle streams. Currently, this is done in each demuxer separately. This also means the output is formatted differently depending which demuxer is active. Add code to print an uniformly formatted streams list in the player front end. Extend the streams headers to export additional information about the streams. Change the lavf and mkv demuxers to follow this new scheme, and raise the log level for the "old" printing functions. The intention is to make every demuxer behave like this eventually. The stream list output attempts to provide codec information. It's a bit hacky and doesn't always provide useful output, and I'm not sure how to do it better.
* Remove compile time/runtime CPU detection, and drop some platformswm42012-07-303-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mplayer had three ways of enabling CPU specific assembler routines: a) Enable them at compile time; crash if the CPU can't handle it. b) Enable them at compile time, but let the configure script detect your CPU. Your binary will only crash if you try to run it on a different system that has less features than yours. This was the default, I think. c) Runtime detection. The implementation of b) and c) suck. a) is not really feasible (it sucks for users). Remove all code related to this, and use libav's CPU detection instead. Now the configure script will always enable CPU specific features, and disable them at runtime if libav reports them not as available. One implication is that now the compiler is always expected to handle SSE (etc.) inline assembly at runtime, unless it's explicitly disabled. Only checks for x86 CPU specific features are kept, the rest is either unused or barely used. Get rid of all the dump -mpcu, -march etc. flags. Trust the compiler to select decent settings. Get rid of support for the following operating systems: - BSD/OS (some ancient BSD fork) - QNX (don't care) - BeOS (dead, Haiku support is still welcome) - AIX (don't care) - HP-UX (don't care) - OS/2 (dead, actual support has been removed a while ago) Remove the configure code for detecting the endianness. Instead, use the standard header <endian.h>, which can be used if _GNU_SOURCE or _BSD_SOURCE is defined. (Maybe these changes should have been in a separate commit.) Since this is a quite violent code removal orgy, and I'm testing only on x86 32 bit Linux, expect regressions.
* bstr: rename bstr() function to bstr0(), and typedef bstr to struct bstrwm42012-07-283-9/+9
| | | | | Replace all uses of bstr() with bstr0(). Also remove the ridiculous C++ workaround.
* osd: use libass for OSD renderingwm42012-07-281-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The OSD will now be rendered with libass. The old rendering code, which used freetype/fontconfig and did text layout manually, is disabled. To re-enable the old code, use the --disable-libass-osd configure switch. Some switches do nothing with the new code enabled, such as -subalign, -sub-bg-alpha, -sub-bg-color, and many more. (The reason is mostly that the code for rendering unstyled subtitles with libass doesn't make any attempts to support them. Some of them could be supported in theory.) Teletext rendering is not implemented in the new OSD rendering code. I don't have any teletext sources for testing, and since teletext is being phased out world-wide, the need for this is questionable. Note that rendering is extremely inefficient, mostly because the libass output is blended with the extremely strange mplayer OSD format. This could be improved at a later point. Remove most OSD rendering from vo_aa.c, because that was extremely hacky, can't be made work with osd_libass, and didn't work anyway in my tests. Internally, some cleanup is done. Subtitle and OSD related variable declarations were literally all over the place. Move them to sub.h and sub.c, which were hoarding most of these declarations already. Make the player core in mplayer.c free of concerns like bitmap font loading. The old OSD rendering code has been moved to osd_ft.c. The font_load.c and font_load_ft.c are only needed and compiled if the old OSD rendering code is configured.
* Merge remote-tracking branch 'origin/master'wm42012-07-2821-1007/+77
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .gitignore bstr.c cfg-mplayer.h defaultopts.c libvo/video_out.c The conflict in bstr.c is due to uau adding a bstr_getline function in commit 2ba8b91a97e7e8. This function already existed in this branch. While uau's function is obviously derived from mine, it's incompatible. His function preserves line breaks, while mine strips them. Add a bstr_strip_linebreaks function, fix all other uses of bstr_getline, and pick uau's implementation. In .gitignore, change vo_gl3_shaders.h to use an absolute path additional to resolving the merge conflict.
| * demux_rawdv.c: fix change missing from recent 8079f4ff821Uoti Urpala2012-07-271-1/+0
| | | | | | | | | | | | | | | | | | | | | | Like vd_vfw.c fixed earlier, demux_rawdv.c was also missing a change needed for the "flags"->"keyframe" demux packet field rename. This broke compilation with libdv enabled. Hopefully there aren't more cases. It's hard to reliably check for references in files that aren't compiled in the local tree if they use different base variable names, as the "flags" name itself is used for many unrelated things.
| * demux_lavf: use lavf for RealMedia (.rm) files by defaultUoti Urpala2012-07-261-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | RealMedia was listed as a format for which the internal demuxer (demux_real) was preferred over lavf. The original reason for this (lavf failing to give any timing information for some video frames) has been fixed in libavformat since. Make demux_lavf the preferred demuxer for RealMedia. The libavformat demuxer does still have issues. COOK audio initially misbehaves after a seek (inconsistent timestamps, audio remaining from the before-seek position). However, the internal demuxer seemed to be _consistently_ out of sync with a test file. I haven't done thorough testing, but the internal demuxer does not seem less buggy.
| * demux, vd_ffmpeg: fix demux keyframe flag, set AV_PKT_FLAG_KEYUoti Urpala2012-07-2517-76/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was some confusion about the "flags" field in demuxer packets. Demuxers set it to either 1 or 0x10 to indicate a keyframe (and the field was not used to indicate anything else). This didn't cause visible problems because nothing read the value. Replace the "flags" field with a boolean "keyframe" field. Set AV_PKT_FLAG_KEY based on this field in packets fed to libavcodec video decoders (looks like PNG and ZeroCodec are the only ones which depend on values from demuxer; previously this was hardcoded to true for PNG). Make demux_mf set the keyframe field in every packet. This matters for PNG files now that the demuxer flag is forwarded to libavcodec. Fix logic setting the field in demux_mkv. It had probably not been updated when adding SimpleBlock support. This probably makes no difference for any current practical use.
| * video, audio: use lavc decoders without codecs.conf entriesUoti Urpala2012-07-243-27/+17
| | | | | | | | | | | | | | |