summaryrefslogtreecommitdiffstats
path: root/libmpdemux/video.c
Commit message (Collapse)AuthorAgeFilesLines
* 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-301-518/+3
| | | | | | | | | | | | | | | | | | 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()).
* demux, vd_ffmpeg: fix demux keyframe flag, set AV_PKT_FLAG_KEYUoti Urpala2012-07-251-1/+1
| | | | | | | | | | | | | | | | | | 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.
* cleanup: remove more warningsClément Bœsch2011-05-021-1/+1
|
* demux_ty: disable -subcc functionality (demux_ty_osd)Uoti Urpala2011-03-241-0/+4
| | | | | | | | Disable compilation of demux_ty_osd.c because of its GPL v2-only license. This only affects TiVo files with -subcc. After this no v2-only code should get compiled (yuv4mpeg_intern.h has a v2-only license, but the contents of the header look like they're not copyrightable).
* cleanup: remove some casts of memalign() return valuediego2011-02-151-4/+4
| | | | | | | Do not pointlessly cast the return value of memalign(). memalign() returns void*, which is compatible with any pointer in C. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32850 b3059339-0415-0410-9bf9-f77b7e298cf2
* sub/OSD: move some related files to sub/Uoti Urpala2011-01-261-1/+1
|
* cosmetics: make some arguments const, "unsigned char"->uint8_treimar2010-12-161-1/+1
| | | | | | | | | | | | | | | | | | Mark input-only buffers as const. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32652 b3059339-0415-0410-9bf9-f77b7e298cf2 Use uint8_t type instead of unsigned char. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32653 b3059339-0415-0410-9bf9-f77b7e298cf2 Mark input buffer that is never modified as const. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32654 b3059339-0415-0410-9bf9-f77b7e298cf2 Mark input-only buffer as const. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32655 b3059339-0415-0410-9bf9-f77b7e298cf2
* cleanup: malloc+memset->calloc, sizeof(TYPE)->sizeof(*ptr)reimar2010-11-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace malloc+memset by calloc git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32181 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32182 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32183 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace some sizeof(type) by sizeof(*pointer) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32184 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32186 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32187 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32188 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace sizoef(type) by sizeof(*ptrvar). Besides being consistent with FFmpeg style, this reduces the size of a patch to rename these types to not conflict with the windows.h definitions. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32189 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32191 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32192 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace sizeof(type) by sizeof(*ptrvar) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32193 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove a useless cast. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32194 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace sizeof(type) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32195 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove a useless cast. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32196 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace several sizeof(WAVEFORMATEX) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32197 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace one more instance of sizeof(WAVEFORMATEX); fix compilation. patch by Clément Bœsch, ubitux gmail com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32199 b3059339-0415-0410-9bf9-f77b7e298cf2 Avoid some pointless uses of sizeof() and one related cast. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32200 b3059339-0415-0410-9bf9-f77b7e298cf2 Merge one malloc() + memset() invocation into calloc(). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32202 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32203 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace sizeof(WAVEFORMATEX) occurrences. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32205 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32206 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace sizeof(BITMAPINFOHEADER) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32207 b3059339-0415-0410-9bf9-f77b7e298cf2
* Merge svn changes up to r30967Uoti Urpala2010-04-261-1/+1
|\
| * 100l, fix frametime calculation for MPEG-2 files with frame rate extension.reimar2010-03-271-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30966 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30907Uoti Urpala2010-04-261-0/+2
|\|
| * Calculate width and height in mp4_header_process_vop().cehoyos2010-03-151-0/+2
| | | | | | | | | | | | | | Fixes elementary streams with -vc ffodivxvdpau and the native demuxer. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30904 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Delete things related to old translation systemUoti Urpala2010-03-101-1/+0
| | | | | | | | | | Remove the help/ subdirectory, configure code to create toplevel help_mp.h, and all the '#include "help_mp.h"' lines from .c files.
* | Merge svn changes up to r30748Uoti Urpala2010-03-101-1/+1
|\|
| * Do not cast the results of malloc/calloc/realloc.diego2010-02-261-1/+1
| | | | | | | | | | | | | | | | These functions return void*, which is compatible with any pointer, so there is no need for casts. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30744 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30683Uoti Urpala2010-03-101-5/+7
|\|
| * Fix fps output with -identify when frame rate extension is used for MPEG-2reimar2010-02-211-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30683 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Parse and use the information from the frame rate extension header for MPEG-2.reimar2010-02-211-4/+6
| | | | | | | | | | | | | | | | -identify still does not show the right values though. Fixes bug #1636. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30681 b3059339-0415-0410-9bf9-f77b7e298cf2
| * cosmetics: Remove pointless empty lines at EOF.diego2010-02-201-1/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30675 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30643Uoti Urpala2010-03-101-2/+1
|\|
| * Add header for ty_ClearOSD(), ty_processuserdata(); avoids forward declarations.diego2010-02-171-2/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30619 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r29962Uoti Urpala2009-11-231-0/+2
|\|
| * Set display size in sh_video when decoding H264.cehoyos2009-11-161-0/+2
| | | | | | | | | | | | | | This fixes H264 VDPAU decoding with some native demuxers. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29920 b3059339-0415-0410-9bf9-f77b7e298cf2
| * whitespace cosmetics: Remove all trailing whitespace.diego2009-05-131-10/+10
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Remove trailing whitespace from most filesUoti Urpala2009-07-071-11/+10
| |
* | Merge svn changes up to r29304Uoti Urpala2009-07-071-1/+19
|\|
| * Add standard license header to all files in libmpdemux.diego2009-05-081-1/+19
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29280 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Translation system changes part 2: replace macros by stringsAmar Takhar2009-07-071-11/+11
| | | | | | | | | | Replace all MSGTR_ macros in the source by the corresponding English string.
* | Translation system changes part 1: wrap translated stringsAmar Takhar2009-07-071-11/+11
|/ | | | | Replace mp_msg() calls which have a translated string as the format argument with mp_tmsg and add _() around all other translated strings.
* Convert HAVE_MALLOC_H into a 0/1 definition, fixes the warning:diego2009-02-171-1/+1
| | | | | | | mem.c:32:5: warning: "HAVE_MALLOC_H" is not defined git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28629 b3059339-0415-0410-9bf9-f77b7e298cf2
* MNG demuxer by Stefan Schuermans, stefan blinkenarea orgdiego2008-11-301-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28052 b3059339-0415-0410-9bf9-f77b7e298cf2
* handle the lavfpref demuxer in the same way as the lavf oneaurel2008-08-271-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27489 b3059339-0415-0410-9bf9-f77b7e298cf2
* Give a CONFIG_ prefix to preprocessor directives that lacked one anddiego2008-08-071-2/+2
| | | | | | | change arbitrary prefixes to CONFIG_. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27429 b3059339-0415-0410-9bf9-f77b7e298cf2
* Avoid including avcodec.h in demuxer.h (and thus many other files) just to getreimar2008-07-171-8/+8
| | | | | | | | | FF_INPUT_BUFFER_PADDING_SIZE. Instead use MP_INPUT_BUFFER_PADDING_SIZE and add a preprocessor check that it is big enough. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27314 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move duplicate FF_INPUT_BUFFER_PADDING_SIZE handling into demuxer.hreimar2008-07-161-6/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27301 b3059339-0415-0410-9bf9-f77b7e298cf2
* Do proper parsing for DVR-MS files, this fixes playback with ffmpeg decoderreimar2008-04-051-0/+6
| | | | | | | and also will create proper files when remuxing into e.g. AVI. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26328 b3059339-0415-0410-9bf9-f77b7e298cf2
* FFmpeg now uses different (unified) #include paths.diego2008-02-251-3/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26101 b3059339-0415-0410-9bf9-f77b7e298cf2
* in video_read_frame() set the keyframe flag in demuxer->video when dealing withnicodvb2007-11-021-0/+2
| | | | | | | VIDEO_MPEG12 and picture_coding_type==I_FRAME; fixes seeking in avi streams with MPEG1/2 video git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24940 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed silly #if 1nicodvb2007-10-271-2/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24878 b3059339-0415-0410-9bf9-f77b7e298cf2
* DEMUXER_TYPE_TV is always defined, thus removed corresponding #ifdef USE_TV.nicodvb2007-10-271-2/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24877 b3059339-0415-0410-9bf9-f77b7e298cf2
* in process_userdata() move debugging messages from stdout to stderrnicodvb2007-10-271-4/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24867 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed funny calls to fflush(stdout) after mp_msg()nicodvb2007-10-271-7/+7
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24866 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed more empty spaces and empty linesnicodvb2007-10-271-3/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24865 b3059339-0415-0410-9bf9-f77b7e298cf2
* replaced giant if() with if(pre-calculated variable) (there was even a bug: ↵nicodvb2007-10-271-5/+1
| | | | | | PS doesn't necessarily contain mpeg12) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24864 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: removed tabs/empty lines/trailing spaces and done a partial ↵nicodvb2007-10-271-82/+72
| | | | | | reformatting where desperately needed git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24862 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: moved to function find_video_codec() and reused in video_read_*() ↵nicodvb2007-10-271-45/+42
| | | | | | the code that identifies the various mpeg* formats git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24860 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix segfault if an 'strf' chunk couldn't be found in aviattila2007-07-131-0/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23772 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add explicit location for headers from the stream/ directory.diego2007-03-151-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22623 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed ages-old and insane #if0-ed and commented codenicodvb2007-02-101-77/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22191 b3059339-0415-0410-9bf9-f77b7e298cf2
* vc1 in mpegtsnicodvb2007-02-091-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22180 b3059339-0415-0410-9bf9-f77b7e298cf2
* vc1 probing code: if sh_video->bih can't be callocated exitnicodvb2007-01-201-0/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21970 b3059339-0415-0410-9bf9-f77b7e298cf2
* in vc1 probing code, all packets before the first sequence header must be ↵nicodvb2007-01-201-1/+1
| | | | | | skipped, not read git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21969 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed unused variables; replaced wrong call to realloc() with calloc() in ↵nicodvb2007-01-201-3/+1
| | | | | | vc1 probing code git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21968 b3059339-0415-0410-9bf9-f77b7e298cf2
* decode vc1 sequence header and frame it in video_read_frame();nicodvb2007-01-201-0/+73
| | | | | | | | it doesn't work yet, but it permits debugging and development to Kostya git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21967 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make ds_get_next_pts return MP_NOPTS_VALUE instead of -1 on error,reimar2007-01-051-5/+5
| | | | | | | -1 could be a perfectly valid pts. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21827 b3059339-0415-0410-9bf9-f77b7e298cf2
* Cleanup for uselessly complicated closed-caption subtitle handlingreimar2006-11-251-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21252 b3059339-0415-0410-9bf9-f77b7e298cf2
* Support for variable fps OGM files, blessed by Moritz.diego2006-09-121-0/+1
| | | | | | | patch by Sergey Khlutchin, Elphel, Inc git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19808 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use better resolution for pts computation.rtogni2006-09-051-1/+1
| | | | | | | Fixes desync in Real live streams with huge pts values git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19701 b3059339-0415-0410-9bf9-f77b7e298cf2
* Workaround for live Real streams starting with nonzero ptsrtogni2006-09-031-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19661 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove support for obsolete and non-free divx4/odivx libraries.diego2006-07-141-3/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19087 b3059339-0415-0410-9bf9-f77b7e298cf2
* Revert r18878, always sync rm files using only pts (ignore framerate)rtogni2006-07-081-1/+8
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18947 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix A-V sync for real files (also live streams)rtogni2006-07-011-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18878 b3059339-0415-0410-9bf9-f77b7e298cf2
* moved code to set aspect ratio for mpeg12 away from video.c and into decoder ↵nicodvb2006-05-101-1/+0