summaryrefslogtreecommitdiffstats
path: root/libmpdemux/demux_ty.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove some demuxers and decoderswm42012-07-301-899/+0
| | | | | | | | | | | | | | | | | | 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()).
* 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.
* demux, vd_ffmpeg: fix demux keyframe flag, set AV_PKT_FLAG_KEYUoti Urpala2012-07-251-1/+0
| | | | | | | | | | | | | | | | | | 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.
* build: switch to libavutil bswap.h and intreadwrite.hUoti Urpala2012-02-011-2/+3
| | | | | | | | | | | | Remove the private bswap and intreadwrite.h implementations and use libavutil headers instead. Originally these headers weren't publicly installed by libavutil at all. That already changed in 2010, but the pure C bswap version in installed headers was very inefficient. That was recently (2011-12) improved and now using the public bswap version probably shouldn't cause noticeable performance problems, at least if using a new enough compiler.
* 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).
* Merge branch 'sub'Uoti Urpala2011-01-261-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sub: sub/OSD: move some related files to sub/ subtitles: options: enable -ass by default subtitles: change default libass rendering style demux_mkv, chapters: change millisecond arithmetic to ns cleanup: rename ass_* functions to mp_ass_* subs: use correct font aspect ratio for libass + converted subs cleanup: some random minor code simplification and cleanup vf_vo: fix EOSD change detection bug sd_ass: remove subreader use, support plaintext markup subtitles: style support for common SubRip tags and MicroDVD core: ordered chapters: fix bad subtitle parameter subs/demux: don't try to enable sub track when creating it subtitles/demux: store duration instead of endpts in demux packets subtitles: add framework for subtitle decoders options: add special -leak-report option subtitles: remove code trying to handle text subs with libavcodec cleanup: move MP_NOPTS_VALUE definition to mpcommon.h subtitles: move global ass_track to struct osd_state core: move most mpcommon.c contents to mplayer.c core: move global "subdata" and "vo_sub_last" to mpctx subtitles: remove sub_last_pts hack options: move -noconfig to option struct, simplify
| * sub/OSD: move some related files to sub/Uoti Urpala2011-01-261-1/+1
| |
* | demux_ty: fix "seek to negative position" warningUoti Urpala2011-01-211-0/+1
|/ | | | | | | | | demux_ty relied on demuxer->filepos being initially set to 0, but demuxer.c has been changed to initialize it to -1. This caused a "Invalid seek to negative position!" error message when running the demux_ty file format check (so it occurred for any file which had not been recognized as another type before that). Fix by making demux_ty initialize filepos to 0.
* demux_[mpg|ts|ty]: #include dec_audio.h for skip_audio_frame()diego2010-11-021-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32431 b3059339-0415-0410-9bf9-f77b7e298cf2
* demux_ty: Cleanup some code, possibly fix vstream support (untested)reimar2010-11-021-7/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31423 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 r30643Uoti Urpala2010-03-101-1/+1
|\
| * Add header for ty_ClearOSD(), ty_processuserdata(); avoids forward declarations.diego2010-02-171-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30619 b3059339-0415-0410-9bf9-f77b7e298cf2
* | translations: tweak cases that relied on concatenating adjacent stringsUoti Urpala2010-03-071-1/+2
| | | | | | | | | | | | | | | | Tweak some code parts that used to rely on string literals from translation macros being concatenated with other adjacent string literals. Break up the resulting string into independently translated parts, so that the existing translations for those parts can still be used.
* | Merge svn changes up to r29962Uoti Urpala2009-11-231-1/+2
|\|
| * Move 128kB buffer from stack to demuxer context.reimar2009-11-201-1/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29940 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Replace libavutil internal header #includes with MPlayer copiesUoti Urpala2009-07-261-1/+1
| | | | | | | | | | | | Change #include lines for libavutil/intreadwrite.h, libavutil/bswap.h and libavutil/x86_cpu.h to use the MPlayer file under ffmpeg_files/ instead.
* | Translation system changes part 2: replace macros by stringsAmar Takhar2009-07-071-1/+1
| | | | | | | | | | Replace all MSGTR_ macros in the source by the corresponding English string.
* | Translation system changes part 1: wrap translated stringsAmar Takhar2009-07-071-1/+1
|/ | | | | Replace mp_msg() calls which have a translated string as the format argument with mp_tmsg and add _() around all other translated strings.
* Get rid of pointless 'extern' keywords.diego2008-12-031-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28085 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use standard license headers with standard formatting.diego2008-05-141-9/+9
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26774 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 all demuxer_desc_t const, thus moving them to .rodatareimar2008-01-131-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25735 b3059339-0415-0410-9bf9-f77b7e298cf2
* Avoid one more code duplicationreimar2007-09-151-17/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24527 b3059339-0415-0410-9bf9-f77b7e298cf2
* get rid of pointless size parameter for tmf_load_chunkreimar2007-09-151-8/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24526 b3059339-0415-0410-9bf9-f77b7e298cf2
* Avoid using demux->stream->end_pos, it rarely does any good.reimar2007-09-151-3/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24525 b3059339-0415-0410-9bf9-f77b7e298cf2
* Slightly simplify IsValidAudioPacketreimar2007-09-151-3/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24524 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify another two ifs into onereimar2007-09-151-7/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24523 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make one mp_msg call out of 3reimar2007-09-151-17/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24522 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simpler and more robust tar parsingreimar2007-09-151-26/+10
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24521 b3059339-0415-0410-9bf9-f77b7e298cf2
* Get rid of bloated ty_extension functionreimar2007-09-151-11/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24520 b3059339-0415-0410-9bf9-f77b7e298cf2
* Do not uselessly name structsreimar2007-09-151-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24519 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove another variable and reorder to avoid wasting space due to alignmentreimar2007-09-151-5/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24518 b3059339-0415-0410-9bf9-f77b7e298cf2
* PTS should be passed as int64_t to demux_ty_CopyToDemuxPacketreimar2007-09-151-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24517 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove now useless parameters from demux_ty_CopyToDemuxPacketreimar2007-09-151-6/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24516 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove more unused code and variablesreimar2007-09-151-10/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24515 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: Fix typo in function name.diego2007-09-151-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24514 b3059339-0415-0410-9bf9-f77b7e298cf2
* live recordings can contain 0-size type 0 chunks, ignore them insteadreimar2007-09-141-1/+1
| | | | | | | of erroring out. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24509 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move some more variable declarationsreimar2007-09-141-6/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24508 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove tabs and trailing whitespacereimar2007-09-141-124/+124
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24507 b3059339-0415-0410-9bf9-f77b7e298cf2
* A few more useless ()reimar2007-09-141-4/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24506 b3059339-0415-0410-9bf9-f77b7e298cf2
* Minor simplificationsreimar2007-09-141-4/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24505 b3059339-0415-0410-9bf9-f77b7e298cf2
* Further simplify demux_ty_FindESHeaderreimar2007-09-141-11/+11
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24504 b3059339-0415-0410-9bf9-f77b7e298cf2
* Optimize demux_ty_FindESHeaderreimar2007-09-141-8/+9
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24503 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove some commented-out debugging codereimar2007-09-141-29/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24502 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix demux_ty_FindESHeader so it won't overreadreimar2007-09-141-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24501 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify demux_ty_FindESPacket by reusing demux_ty_FindESHeaderreimar2007-09-141-32/+10
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24500 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove unused demux_ty_FindESPacket parameterreimar2007-09-141-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24499 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify demux_ty_FindESHeaderreimar2007-09-141-12/+7
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24498 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move variable declarations into the block where they are usedreimar2007-09-141-19/+10
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24497 b3059339-0415-0410-9bf9-f77b7e298cf2
* Another piece of duplicate codereimar2007-09-141-13/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24496 b3059339-0415-0410-9bf9-f77b7e298cf2
* Avoid a big piece of duplicated codereimar2007-09-141-52/+7
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24495 b3059339-0415-0410-9bf9-f77b7e298cf2
* Get rid of more code duplicationreimar2007-09-141-35/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24494 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify XDS handlingreimar2007-09-141-12/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24493 b3059339-0415-0410-9bf9-f77b7e298cf2
* Reduce code duplicationreimar2007-09-141-21/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24492 b3059339-0415-0410-9bf9-f77b7e298cf2
* Greatly simplify IsValidAudioPacket, though this might break somethingreimar2007-09-141-30/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24491 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify IsValidAudioPacketreimar2007-09-141-9/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24490 b3059339-0415-0410-9bf9-f77b7e298cf2
* Do not misuse a_streams for private info, demuxer->priv is for that!reimar2007-09-141-22/+7
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24489 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use AV_RB24reimar2007-09-141-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24488 b3059339-0415-0410-9bf9-f77b7e298cf2
* get rid of pointless pesFileId variablesreimar2007-09-141-19/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24487 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify AV_RB32 / 256 -> AV_RB24reimar2007-09-141-2/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24486 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use AV_RB32 instead of tivobuffer2hostlongreimar2007-09-141-12/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24485 b3059339-0415-0410-9bf9-f77b7e298cf2
* Yet more cosmeticsreimar2007-09-141-23/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24484 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move timestamps to int64_t and use MP_NOPTS_VALUEreimar2007-09-141-29/+15
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24483 b3059339-0415-0410-9bf9-f77b7e298cf2
* Demuxers are _not_ supposed to set ds->pts!reimar2007-09-141-1/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24482 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix completely broken get_ty_pts (it's an ordinary MPEG timestamp)reimar2007-09-141-15/+11
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24481 b3059339-0415-0410-9bf9-f77b7e298cf2
* Another ty simplificationreimar2007-09-141-8/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24480 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove unused variablereimar2007-09-141-1/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24479 b3059339-0415-0410-9bf9-f77b7e298cf2
* tmf_totalsize is not used either, remove itreimar2007-09-141-7/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24478