summaryrefslogtreecommitdiffstats
path: root/libmpdemux/demuxer.h
Commit message (Collapse)AuthorAgeFilesLines
* cleanup: remove NULL checks before free() all over the codecboesch2010-11-141-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32624 b3059339-0415-0410-9bf9-f77b7e298cf2
* demux_lavf: mark AVI timestamps non-pts to avoid messagesUoti Urpala2010-11-141-0/+6
| | | | | | | | Playing AVI files containing B-frames with demux_lavf printed two "decreasing pts" info messages at the start of the file. We know the timestamps from AVI won't be valid pts, so add a demuxer field to convey that information to the timing code and make that not even try to use the timestamps as valid pts.
* core: give pts as parameter to demuxer_get_current_chapter()Uoti Urpala2010-11-131-1/+1
| | | | | | | | | demuxer_get_current_chapter() accessed sh_video/sh_audio pts fields to determine playback position. demux layer shouldn't access those and the values used weren't quite correct anyway. Give the playback position as a parameter to the demux layer function instead. Also change the top-level get_current_chapter() to use get_current_time() in the timeline case where it didn't refer to demux layer.
* demux: change "%s file format detected" messageUoti Urpala2010-11-101-0/+1
| | | | | | | | | "libavformat file format detected" wasn't a very useful message due to the many file formats supported to libavformat. Change the message so that for demux_lavf it says something like "Detected file format: QuickTime/MPEG-4/Motion JPEG 2000 format (libavformat)" (using long name from FFmpeg), and for non-lavf something like "Detected file format: Matroska".
* demux: improve -alang / -slang track choosing logicUoti Urpala2010-11-081-10/+13
| | | | | | | | | | | | When -alang / -slang was specified the numerically first matching track (if any) was always chosen. This meant that specifying "-alang eng" could change the track choice even if all tracks were in English, because now the default flag of tracks was ignored. Change the logic to take the default flag into account as a secondary sorting key. The code also accepted prefix matches, so that "-slang g" would match track language "ger". I think that was not intentional. Change it to require exact matches.
* core: move video pos/length query functions from demux to coreUoti Urpala2010-11-081-3/+0
| | | | | | | | | Move functions to query current playback position, percentage position and total video length from from the demuxer layer to top level. The functions need access to playback state that doesn't belong on the demuxing level. Make the new functions more capable and simplify some code that can now rely on them. This fixes some errors in displayed in OSD and slave mode information when using timeline (ordered chapters).
* demux: use bstr arguments for demuxer_add_attachment() and demuxer_add_chapter()Anton Khirnov2010-05-221-4/+3
|
* demuxer.c: add demux_info_add_bstr(), use talloc for info fieldAnton Khirnov2010-05-211-0/+2
| | | | demux_info_add() is now a wrapper around demux_info_add_bstr().
* Merge svn changes up to r30798Uoti Urpala2010-03-101-4/+4
|\
| * Fix compilation of C++ source files (partly reverts r30744).cehoyos2010-02-271-4/+4
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30755 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30748Uoti Urpala2010-03-101-4/+4
|\|
| * Do not cast the results of malloc/calloc/realloc.diego2010-02-261-4/+4
| | | | | | | | | | | | | | | | 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
| * Drop weird and unnecessary _s/_st suffixes from demuxer struct names.diego2010-02-211-17/+17
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30686 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30643Uoti Urpala2010-03-101-6/+0
|\|
| * Remove demux_ogg-related declarations that are no longer necessary.diego2010-02-171-6/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30626 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30595Uoti Urpala2010-03-091-6/+2
|\| | | | | | | | | | | Conflicts: mplayer.c vidix/nvidia_vid.c
| * Simplify and slightly speed up avi_stream_id function.reimar2010-02-141-6/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30583 b3059339-0415-0410-9bf9-f77b7e298cf2
* | demuxer.h: increase input buffer padding to 64 to match FFmpegUoti Urpala2010-03-091-1/+1
| | | | | | | | | | | | FFmpeg increased the amount of padding that must be readable beyond input buffers without SIGSEGV from 8 to 64, and the MPlayer value must be changed accordingly.
* | Merge branch 'matroska'Uoti Urpala2010-01-281-4/+5
|\ \
| * | demux: take chapter/attachment name strings without 0-terminationUoti Urpala2010-01-271-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Change the demuxer_add_attachment() and demuxer_add_chapter() functions to take a length argument for various name strings, so those strings do not need to be 0-terminated. This will make it easier to directly pass demuxed data without first making a copy just to add 0-termination. Also allocate the struct demuxer data structures for attachments and chapters with talloc.
* | | Merge svn changes up to r30437Uoti Urpala2010-01-281-0/+1
|\ \ \ | |/ / |/| / | |/
| * Add forgotten declaration of ds_clear_parser.reimar2010-01-241-0/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30424 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30136Uoti Urpala2009-12-301-0/+1
|\| | | | | | | Ignore another broken correct-pts change in 30134.
| * Add support for parsing audio streams (though should be easy to extend to video)reimar2009-12-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | via libavcodec. Parsing can be done at the demuxer stage (currently disabled) or at the decoder (ad_ffmpeg, enabled). Should allow using the libavcodec AAC, DTS, ... decoders independent of container format. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30130 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Never include ass.h and ass_types.h directly, use ass_mp.h instead.reimar2009-12-191-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30067 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r29912Uoti Urpala2009-11-161-0/+5
|\|
| * Separate teletext from tv support.cehoyos2009-11-071-0/+3
| | | | | | | | | | | | | | Path by Francesco Lavra, francescolavra interfree it git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29848 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Unbreak the demuxer-specific code in video.c with e.g.reimar2009-11-011-0/+2
| | | | | | | | | | | | | | | | | | | | -audiofile by moving the code to manually interleave subtitles to mp_common.c. video.c should still be changed to not be demuxer-specific anymore, it is bad practice but fully fixing it is non-trivial. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29810 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r29455Uoti Urpala2009-07-291-1/+1
|\|
| * Replace WORDS_BIGENDIAN by HAVE_BIGENDIAN in all internal code.diego2009-07-261-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29443 b3059339-0415-0410-9bf9-f77b7e298cf2
| * whitespace cosmetics: Remove all trailing whitespace.diego2009-05-131-2/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r29304Uoti Urpala2009-07-071-0/+18
|\|
| * Add standard license header to all files in libmpdemux.diego2009-05-081-0/+18
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29280 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Support chapter seeking with ordered chaptersUoti Urpala2009-04-021-0/+1
| |
* | Change demuxer_seek_chapter() parametersUoti Urpala2009-04-021-1/+2
| | | | | | | | | | | | Remove the "num_chapters" and "mode" parameters that aren't needed by any callers. Change "float *seek_pts" to "double *". Allocate the string returned via "chapter_name" with talloc.
* | Add improved relative seek modeUoti Urpala2009-03-241-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the new mode is active relative seeks are converted to absolute ones (current video pts + relative seek amount) and forward/backward flag before being sent to the demuxer. This mode is used if the demuxer has set the accurate_seek field in the demuxer struct and there is a video stream. At the moment the mkv and lavf demuxers enable the flag. This change is useful for later Matroska ordered chapter support (and for more general timelime editing), but also fixes problems in existing functionality. The main problem with the old mode, where relative seeks are passed directly to the demuxer, is that the user wants to seek relative to the currently displayed position but the demuxer does not know what that position is. There can be an arbitrary amount of buffering between the demuxer read position and what is displayed on the screen. In some situations this makes small seeks fail to move backward at all (especially visible at high playback speed, when audio needs to be demuxed and decoded further ahead to fill the output buffers after resampling). Some container formats that can be used with the lavf demuxer do not always have reliable timestamps that could be used for unambiguous absolute seeking. However I made the demuxer always enable the new mode because it already converted all seeks to absolute ones before sending them to libavformat, so cases without reliable absolute seeks were failing already and this should only improve the working cases.
* | demux_mkv: Parse ordered chapter informationUoti Urpala2009-03-221-1/+16
| | | | | | | | | | | | Parse the ordered chapter structure if present and place the information in the public demuxer structure. Nothing uses the information yet.
* | Merge svn changes up to r28951Uoti Urpala2009-03-141-1/+0
|\|
| * Get rid of DEMUXER_TYPE_NUV define, it is no longer used.reimar2009-03-091-1/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28915 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28403Uoti Urpala2009-01-311-2/+2
|\|
| * increase max subtitle stream limitcompn2009-01-281-1/+1
| | | | | | | | | | | | | | patch by henryk (irc) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28381 b3059339-0415-0410-9bf9-f77b7e298cf2
| * WORDS_BIGENDIAN is defined/undefined, not 0/1.diego2009-01-261-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28374 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Increase MAX_PACK_BYTES from 8 or 32 MB (with/without CONFIG_TV_BSDBT848) to ↵reimar2008-12-241-4/+0
| | | | | | | | | | | | | | | | | | | | | | always 32 MB. Firstly 32 MB is not that much with HD video and the different values depending on whether CONFIG_TV_BSDBT848 is set or not makes debugging harder. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28190 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28087Uoti Urpala2008-12-041-8/+8
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: command.c libao2/ao_ivtv.c libao2/ao_v4l2.c libmpcodecs/dec_video.h libvo/aspect.h libvo/sub.c libvo/sub.h libvo/vo_directx.c libvo/vo_macosx.m libvo/vo_quartz.c mp_core.h mplayer.c mplayer.h osdep/getch2.h osdep/timer.h
| * Get rid of pointless 'extern' keywords.diego2008-12-031-8/+8
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28085 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28065Uoti Urpala2008-12-021-1/+2
|\|
| * MNG demuxer by Stefan Schuermans, stefan blinkenarea orgdiego2008-11-301-1/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28052 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to 27824Uoti Urpala2008-10-251-0/+8
|\| | | | | | | | | | | | | | | | | | | Conflicts: cfg-common-opts.h libmpcodecs/dec_video.c libmpcodecs/vd.c libvo/x11_common.h mplayer.c stream/cache2.c
| * Move likely/unlikely macros to libmpdemux/demuxer.h where they are used.diego2008-10-161-0/+8
| | | | | | | | | | | | | | config.h should only contain option definitions, no logic. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27786 b3059339-0415-0410-9bf9-f77b7e298cf2
* | demux: Increase max buffered packet bytes from 8 to 128 MiBUoti Urpala2008-10-041-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hard limit on the amount of buffered bytes per demuxer stream had not been increased since 2001. Since then there have been significant increases in both video bitrates (so it's easier to hit the limit) and typical memory available on a computer (so there's less reason to limit the memory used for buffering). The 8 MiB limit was too easy to hit in the case of high-bitrate video lagging behind audio, when the file is demuxed ahead to get audio packets but video has to be buffered until the decoder catches up to that point. Increase the limit to 128 MiB and remove the #ifdef for CONFIG_TV_BSDBT848 because the normal limit is now higher than the increased value under the #ifdef.
* | Merge svn changes up to r27441Uoti Urpala2008-08-081-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: cfg-common-opts.h command.c configure input/input.c libmpcodecs/dec_video.c libmpcodecs/vd.c libmpdemux/stheader.h libvo/sub.c libvo/video_out.c libvo/vo_xv.c libvo/vosub_vidix.c libvo/x11_common.c libvo/x11_common.h mp_core.h mplayer.c stream/stream.h
| * Change a bunch of video/audio-output-specific preprocessor directives fromdiego2008-08-031-1/+1
| | | | | | | | | | | | | | a HAVE_ prefix to a CONFIG_ prefix. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27402 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r27399Uoti Urpala2008-08-021-1/+1
|\| | | | | | | | | | | | | | | | | | | Conflicts: libmpcodecs/vd.c libmpcodecs/ve_raw.c libvo/video_out.c libvo/x11_common.c mplayer.c
| * Change a bunch of codec-specific preprocessor directives from a HAVE_diego2008-08-021-1/+1
| | | | | | | | | | | | | | prefix to a CONFIG_ prefix. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27395 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Start unifying names of internal preprocessor directives.diego2008-07-301-1/+1
| | | | | | | | | | | | | | | | Replace all USE_ prefixes by CONFIG_ prefixes to indicate options which are configurable. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27373 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r27332Uoti Urpala2008-07-211-1/+3
|\|
| * Avoid including avcodec.h in demuxer.h (and thus many other files) just to getreimar2008-07-171-6/+2
| |