Commit Graph

186 Commits

Author SHA1 Message Date
cboesch fe3c4810e1 cleanup: remove NULL checks before free() all over the code
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32624 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-14 13:11:20 +02:00
Uoti Urpala fdea095e34 demux_lavf: mark AVI timestamps non-pts to avoid messages
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.
2010-11-14 11:59:55 +02:00
Uoti Urpala 642ce15ef7 core: give pts as parameter to demuxer_get_current_chapter()
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.
2010-11-13 16:48:31 +02:00
Uoti Urpala 523a48d8a9 demux: change "%s file format detected" message
"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".
2010-11-10 15:38:36 +02:00
Uoti Urpala 3c2cfee488 demux: improve -alang / -slang track choosing logic
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.
2010-11-08 18:05:12 +02:00
Uoti Urpala 9a663ffec6 core: move video pos/length query functions from demux to core
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).
2010-11-08 18:05:12 +02:00
Anton Khirnov bc072fb7dc demux: use bstr arguments for demuxer_add_attachment() and demuxer_add_chapter() 2010-05-22 06:40:28 +03:00
Anton Khirnov 9f508dab97 demuxer.c: add demux_info_add_bstr(), use talloc for info field
demux_info_add() is now a wrapper around demux_info_add_bstr().
2010-05-21 00:06:26 +03:00
Uoti Urpala bc1d0ca37d Merge svn changes up to r30798 2010-03-10 02:35:02 +02:00
Uoti Urpala e74708f619 Merge svn changes up to r30748 2010-03-10 01:50:55 +02:00
Uoti Urpala c37f09693d Merge svn changes up to r30643 2010-03-10 00:00:06 +02:00
Uoti Urpala 42bf12c2d3 Merge svn changes up to r30595
Conflicts:
	mplayer.c
	vidix/nvidia_vid.c
2010-03-09 23:37:00 +02:00
Uoti Urpala 5fc54a6caa demuxer.h: increase input buffer padding to 64 to match FFmpeg
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.
2010-03-09 15:00:37 +02:00
cehoyos 3a43f13fce Fix compilation of C++ source files (partly reverts r30744).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30755 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-27 11:32:48 +00:00
diego b63759b175 Do not cast the results of malloc/calloc/realloc.
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
2010-02-26 15:01:37 +00:00
diego 5c85286eb5 Drop weird and unnecessary _s/_st suffixes from demuxer struct names.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30686 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-21 20:03:49 +00:00
diego e606c46526 Remove demux_ogg-related declarations that are no longer necessary.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30626 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-17 23:33:17 +00:00
reimar b2b8d0e1f2 Simplify and slightly speed up avi_stream_id function.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30583 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-14 15:09:21 +00:00
Uoti Urpala c710c5ee50 Merge branch 'matroska' 2010-01-28 00:56:26 +02:00
Uoti Urpala 6ece23f1b1 Merge svn changes up to r30437 2010-01-28 00:37:32 +02:00
Uoti Urpala 49b80fe6b4 demux: take chapter/attachment name strings without 0-termination
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.
2010-01-27 14:26:48 +02:00
reimar 632a899a22 Add forgotten declaration of ds_clear_parser.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30424 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-24 17:05:53 +00:00
Uoti Urpala d46b86bc7c Merge svn changes up to r30136
Ignore another broken correct-pts change in 30134.
2009-12-30 00:56:10 +02:00
reimar ca2af2d0e7 Add support for parsing audio streams (though should be easy to extend to video)
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
2009-12-27 15:28:01 +00:00
reimar 4ab63df7af Never include ass.h and ass_types.h directly, use ass_mp.h instead.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30067 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-12-19 15:32:17 +00:00
Uoti Urpala 287b62163e Merge svn changes up to r29912 2009-11-16 07:01:46 +02:00
cehoyos 423c415534 Separate teletext from tv support.
Path by Francesco Lavra, francescolavra interfree it


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29848 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-07 12:31:05 +00:00
reimar 1280614c9f Unbreak the demuxer-specific code in video.c with e.g.
-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
2009-11-01 09:48:34 +00:00
Uoti Urpala 4a36b51ea6 Merge svn changes up to r29455 2009-07-29 01:32:03 +03:00
diego e5751ced4f Replace WORDS_BIGENDIAN by HAVE_BIGENDIAN in all internal code.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29443 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-07-26 19:53:00 +00:00
Uoti Urpala 6d908205fb Merge svn changes up to r29304 2009-07-07 02:07:11 +03:00
diego 6e9cbdc104 whitespace cosmetics: Remove all trailing whitespace.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-05-13 02:58:57 +00:00
diego f077569dff Add standard license header to all files in libmpdemux.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29280 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-05-08 21:51:13 +00:00
Uoti Urpala 2d91b19956 Support chapter seeking with ordered chapters 2009-04-02 06:51:26 +03:00
Uoti Urpala f12c83b85b Change demuxer_seek_chapter() parameters
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.
2009-04-02 06:51:26 +03:00
Uoti Urpala 73fb23c1cf Add improved relative seek mode
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.
2009-03-24 04:05:04 +02:00
Uoti Urpala 3279403611 demux_mkv: Parse ordered chapter information
Parse the ordered chapter structure if present and place the
information in the public demuxer structure. Nothing uses the
information yet.
2009-03-22 04:42:25 +02:00
Uoti Urpala ae2faad666 Merge svn changes up to r28951 2009-03-14 23:52:45 +02:00
reimar 37e7934dce Get rid of DEMUXER_TYPE_NUV define, it is no longer used.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28915 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-09 15:01:53 +00:00
Uoti Urpala ccf4d9e96c Merge svn changes up to r28403 2009-01-31 04:52:15 +02:00
compn 3788789408 increase max subtitle stream limit
patch by henryk (irc)


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28381 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-01-28 00:44:48 +00:00
diego 0c3d542dc7 WORDS_BIGENDIAN is defined/undefined, not 0/1.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28374 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-01-26 09:56:27 +00:00
reimar 69132d6b4b Increase MAX_PACK_BYTES from 8 or 32 MB (with/without CONFIG_TV_BSDBT848) to 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
2008-12-24 16:05:20 +00:00
Uoti Urpala 8c144171bb Merge svn changes up to r28087
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
2008-12-04 01:55:52 +02:00
diego 0864f92e7a Get rid of pointless 'extern' keywords.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28085 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-12-03 23:01:03 +00:00
Uoti Urpala e62517ef6a Merge svn changes up to r28065 2008-12-02 18:02:05 +02:00
diego c612907d1c MNG demuxer by Stefan Schuermans, stefan blinkenarea org
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28052 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-11-30 13:22:34 +00:00
Uoti Urpala 0301309425 Merge svn changes up to 27824
Conflicts:
	cfg-common-opts.h
	libmpcodecs/dec_video.c
	libmpcodecs/vd.c
	libvo/x11_common.h
	mplayer.c
	stream/cache2.c
2008-10-25 05:12:34 +03:00
diego 7136bb0105 Move likely/unlikely macros to libmpdemux/demuxer.h where they are used.
config.h should only contain option definitions, no logic.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27786 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-10-16 18:26:01 +00:00
Uoti Urpala 562d86d95c demux: Increase max buffered packet bytes from 8 to 128 MiB
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.
2008-10-04 07:52:27 +03:00