summaryrefslogtreecommitdiffstats
path: root/libmpdemux/demuxer.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove _s/_st suffix from some struct namesUoti Urpala2008-04-251-1/+1
| | | | | Since the names are always used after the keyword "struct" having a suffix as in "struct demuxer_st" is almost completely pointless.
* Move dvdsub_id to options structUoti Urpala2008-04-231-2/+0
| | | | | | | Name the field "sub_id" as it's not specific to DVD subs. Remove some other unused extern declarations together with dvdsub_id from demux_mkv.c and demux_lavf.c.
* Move correct_pts to options structUoti Urpala2008-04-231-6/+3
|
* Add option pointer to demuxers and stheader.h structsUoti Urpala2008-04-231-25/+38
|
* Reformat demuxer.cuau2008-04-121-812/+963
| | | | | | | | Indent with "indent -kr -l79 -nut" and fix various suboptimal results by hand. Also remove some commented-out cruft and one unnecessary case of parentheses as in "return (r)". git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26411 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove global demuxer_typeuau2008-04-121-1/+1
| | | | | | | It was only used inside one function. Change it to a local variable. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26410 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove unused function demux_read_data_packuau2008-04-111-17/+0
| | | | | | | | According to VCS history this function has never been used since it was added in 2001... git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26401 b3059339-0415-0410-9bf9-f77b7e298cf2
* Support 'default' attribute for audio and subtitle tracks.eugeni2008-03-301-0/+28
| | | | | | | | | The first default track is chosen for playback if language-based selection failes. Additionally, for audio tracks, the first one is chosen if there are no default tracks at all. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26301 b3059339-0415-0410-9bf9-f77b7e298cf2
* Set audio->sh correctly when switching audio tracks. The same for video tracks.eugeni2008-02-291-0/+8
| | | | | | | | | Demuxers almost never update audio->sh or sub->sh when swithing tracks. It is especially bad when switching to no sound, and results in "too many audio packets" error. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26121 b3059339-0415-0410-9bf9-f77b7e298cf2
* Don't select subtitle track in lavf and mkv demuxers.eugeni2008-02-291-4/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26120 b3059339-0415-0410-9bf9-f77b7e298cf2
* Demuxer-independent functions for selecting tracks based on language.eugeni2008-02-291-0/+32
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26118 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove stupid checks of free() argument.eugeni2008-02-291-8/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26117 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add language info to sh_sub_t and sh_audio_t.eugeni2008-02-291-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26114 b3059339-0415-0410-9bf9-f77b7e298cf2
* in ds_fill_buffer() disabled the code that demuxes until the arrival of the ↵nicodvb2008-02-251-0/+2
| | | | | | right reference_clock git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26103 b3059339-0415-0410-9bf9-f77b7e298cf2
* New member in demuxer_t: reference_clock.nicodvb2008-02-231-0/+9
| | | | | | | | | | | | | If it's != MP_NOPTS_VALUE ds_fill_buffer() will keep on demuxing until the pts of the next_pts is <= reference_clock. It guarantees the compliance with the buffering model indicated by the transmitter of the multiplex and a long-time stability of playback (at least for me). In any case up to a maximum of 64 packets are accumulated to prevent memory hogging and leaks. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26069 b3059339-0415-0410-9bf9-f77b7e298cf2
* Change to always use MP_NOPTS_VALUE (instead of sometimes 0) for unknown pts.reimar2008-02-121-3/+2
| | | | | | | | I did not see anything obvious that would break, it if it does it should be fixed properly once and for all. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25988 b3059339-0415-0410-9bf9-f77b7e298cf2
* Allow demuxers to choose a default value for correct_ptsreimar2008-02-031-4/+11
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25951 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use defines to give names to the different seek flags.reimar2008-01-291-2/+2
| | | | | | | | A better solution should be considered later, esp. for the many broken demuxers that do not treat these flags correctly. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25911 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make mov subtitles work with -assreimar2008-01-291-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25909 b3059339-0415-0410-9bf9-f77b7e298cf2
* clarify comments/docs about lav* being the preferred place to implement newivo2008-01-281-2/+4
| | | | | | | | codecs and (de)muxers, except for wrappers around external libraries and codecs and (de)muxers requiring binary support. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25908 b3059339-0415-0410-9bf9-f77b7e298cf2
* copy note on new demuxers and codecs to the top of the array as well to beivo2008-01-281-0/+3
| | | | | | | extra clear git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25904 b3059339-0415-0410-9bf9-f77b7e298cf2
* note on new demuxers and codecs, add them to lav* instead of libmp*ivo2008-01-281-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25900 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make all demuxer_desc_t const, thus moving them to .rodatareimar2008-01-131-42/+42
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25735 b3059339-0415-0410-9bf9-f77b7e298cf2
* First step towards making all demuxer_desc_t constreimar2008-01-131-3/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25734 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove a useless assignment (there is an if just a few lines abovereimar2008-01-131-1/+1
| | | | | | | that ensures those two are already equal). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25733 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add a forgotten #ifdef USE_ASS around ass_free_trackreimar2008-01-131-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25730 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add demuxer interface for attachments.eugeni2008-01-121-0/+22
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25685 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove global_ass_track. Instead create an ass_track for each 't' track.eugeni2008-01-111-1/+2
| | | | | | | | Global_ass_track obviously can not work when there is more than one 't tracks, their lines will be mixed up. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25684 b3059339-0415-0410-9bf9-f77b7e298cf2
* Init and destroy ass_tracks in demuxer.c based on sh_sub->type value.eugeni2008-01-111-0/+18
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25682 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add extradata to sh_sub_t.eugeni2008-01-111-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25680 b3059339-0415-0410-9bf9-f77b7e298cf2
* Deallocate audio track codecdata.eugeni2008-01-071-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25642 b3059339-0415-0410-9bf9-f77b7e298cf2
* wrapper functions to get/set angle: the wrapping is needed to RESYNC the ↵nicodvb2008-01-051-0/+49
| | | | | | demuxer; patch by oattila chello hu git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25603 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move ds->current=NULL; further up to the free_demux_packet.reimar2007-12-201-1/+1
| | | | | | | | This does not change behaviour in the normal case but avoids a double-free if the function is aborted via a signal handler. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25472 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add demuxer functions for chapter feature.ulion2007-12-131-0/+71
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25386 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix memory leak that tmp allocated but maybe not used.ulion2007-12-101-4/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25342 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make libnemesi use specific struct and DEMUXER_TYPElu_zero2007-12-041-1/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25294 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix typos in comments to stop them hurting my eyesreimar2007-12-011-5/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25225 b3059339-0415-0410-9bf9-f77b7e298cf2
* demuxer.c: Remove useless codeuau2007-10-251-21/+17
| | | | | | | | Remove "while(1) { }" around two instances of code that always do "return" in the loop body. No functionality changes. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24854 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix missing subtitles after seeking backuau2007-10-041-0/+1
| | | | | | | | | | | | | | Subtitle packets that had been demuxed but whose start time had not yet been reached were left in the demuxer stream after seeking. When using the default (non-libass) subtitle rendering this could block subtitles from appearing as long as the playback position stayed below the original one before seek. External subtitle files were not affected. Fixed by making seek code free all packets from the subtitle stream. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24698 b3059339-0415-0410-9bf9-f77b7e298cf2
* libnemesi support, yet another rtsp/rtp library...lu_zero2007-09-191-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24584 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: typo fix UNSUPORTED --> UNSUPPORTEDdiego2007-08-281-6/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24277 b3059339-0415-0410-9bf9-f77b7e298cf2
* When a new subtitle stream becomes available check if it is the one thatreimar2007-08-091-0/+6
| | | | | | | | | was requested by the user and set up sub->id and sub->sh accordingly. Fixes -slang and -sid with DVD subtitles (basically only 'j' during playback could make them show). This was broken by r23786. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24042 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make sure fformat is set before usereimar2007-07-271-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23885 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove some unneeded extern variable declarationsreimar2007-07-271-8/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23884 b3059339-0415-0410-9bf9-f77b7e298cf2
* make opt argument of demux_info_get const.reimar2007-06-241-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23631 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix memleak due to not freeing demuxer->s_streamsreimar2007-06-231-0/+7
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23612 b3059339-0415-0410-9bf9-f77b7e298cf2
* More accurate seeking for demuxers lacking DEMUXER_CTRL_GET_TIME_LENGTH controlzuxy2007-06-171-1/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23572 b3059339-0415-0410-9bf9-f77b7e298cf2
* Replace implicit use of fast_memcpy via macro by explicit use to allowreimar2007-06-051-2/+2
| | | | | | | for future optimization. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23475 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify preprocessor directives: There is a general variable fordiego2007-04-261-2/+2
| | | | | | | static/shared FFmpeg libraries now. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23139 b3059339-0415-0410-9bf9-f77b7e298cf2
* Cosmetics: remove duplicate space in ifdefreimar2007-04-221-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23090 b3059339-0415-0410-9bf9-f77b7e298cf2
* demuxer_desc_lavf_preferred depends on USE_LIBAVFORMAT or USE_LIBAVFORMAT_SOnicodvb2007-04-221-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23087 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add lavf_preferred demuxer for lavf formats we want to be probedreimar2007-04-141-0/+2
| | | | | | | | before our native demuxers and remove some now unneeded file-extension hacks. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22989 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
* Move the sh_audio->delay field to mpctx->delay.uau2007-03-111-1/+0
| | | | | | | | The value is related to overall a/v sync and is not used by audio demuxers or decoders. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22506 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix a few gcc warnings, approved by Diego and Reimar.rathann2007-02-051-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22160 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make ds_get_next_pts return MP_NOPTS_VALUE instead of -1 on error,reimar2007-01-051-3/+3
| | | | | | | -1 could be a perfectly valid pts. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21827 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed unused variablenicodvb2006-12-311-1/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21803 b3059339-0415-0410-9bf9-f77b7e298cf2
* use demuxer->stream_pts rather than stream_control(STREAM_CTRL_GET_CURRENT_TIME)nicodvb2006-12-311-3/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21798 b3059339-0415-0410-9bf9-f77b7e298cf2
* added stream_pts to demuxer_t and demux_packet_t to hold the time value ↵nicodvb2006-12-311-2/+4
| | | | | | reported by the stream layer git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21796 b3059339-0415-0410-9bf9-f77b7e298cf2
* don't compile demux_mpc.c when libmpcdec is disabledaurel2006-12-281-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21783 b3059339-0415-0410-9bf9-f77b7e298cf2
* added code to switch video streamnicodvb2006-11-161-0/+7
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20964 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make subtitle stream handling more similar to audio and video streams.reimar2006-11-131-0/+17
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20888 b3059339-0415-0410-9bf9-f77b7e298cf2
* consistency fix: STREAM_CTRL_GET_TIME_LENGTH and ↵nicodvb2006-11-121-5/+5
| | | | | | STREAM_CTRL_GET_CURRENT_TIME now return time in (double) seconds git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20867 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed duplicated check in demuxer_seek_chapternicodvb2006-11-111-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20857 b3059339-0415-0410-9bf9-f77b7e298cf2
* in demux_seek() if STREAM_CTRL_SEEK_TO_CHAPTER suceeds call ↵nicodvb2006-11-111-0/+2
| | | | | | DEMUXER_CTRL_RESYNC to notify the demuxer of the change git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20855 b3059339-0415-0410-9bf9-f77b7e298cf2
* added demuxer_get_current_time() to get the current playtime (possibly aided ↵nicodvb2006-11-071-0/+17
| | | | | | by the stream layer) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20765 b3059339-0415-0410-9bf9-f77b7e298cf2
* now demux_seek() tries to seek aided by the stream layer, if possiblenicodvb2006-11-071-0/+23
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20764 b3059339-0415-0410-9bf9-f77b7e298cf2
* Cosmetics: indentation fix indentation broken by last two demuxer.c commitsreimar2006-10-201-25/+25
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20325 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix opening of demuxers without check_file function, broken by r20309.reimar2006-10-201-3/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20324 b3059339-0415-0410-9bf9-f77b7e298cf2
* Try other demuxers if open() fails.reimar2006-10-191-22/+18
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20309 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify: replace malloc + memset 0 by callocreimar2006-10-051-4/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20078 b3059339-0415-0410-9bf9-f77b7e298cf2
* conditional declerations are unnecessaryods152006-09-171-2/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19868 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add demux_nut to MPlayer repoods152006-09-171-0/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19867 b3059339-0415-0410-9bf9-f77b7e298cf2
* Get rid of demux_aid_vid_mismatch mess.reimar2006-08-261-12/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19546 b3059339-0415-0410-9bf9-f77b7e298cf2
* 100l: *chapter_name was copied from the pointer rather than strupd()-ed (and ↵nicodvb2006-08-211-2/+5
| | |<