Commit Graph

3261 Commits

Author SHA1 Message Date
Uoti Urpala 1b272e3b2d demux_lavf: Make absolute seek time 0-based instead of file start
demux_lavf interpreted absolute seeks as relative to the start of the
file, so if the file didn't start at timestamp 0 then seeking to
timestamp X went to a position MPlayer would display as start+X. Make
the seeks use the same timestamps as used in the original file. This
works better for most use cases as no part of MPlayer normally uses or
displays such "since start of file" timestamp values. There could be
some cases where the old semantics are useful, but I think they do not
justify making it the default behavior; a separate feature for that
could be added if it turns out to be needed.
2009-04-24 02:18:19 +03:00
Uoti Urpala 7180728cba stheader.h: Allow inclusion before demuxer.h
stheader.h used 'demuxer_t *' without including demuxer.h, causing
compilation to fail if demuxer.h had not been included first. Use
'struct demuxer *' instead so the type does not need to be defined.
2009-04-19 17:37:03 +03:00
Uoti Urpala 53eeb0e412 Merge branch 'ordered_chapters' 2009-04-08 02:43:44 +03:00
Uoti Urpala d136cf6882 Merge svn changes up to r29134 2009-04-02 23:55:13 +03:00
diego 2e903f7c75 Remove unnecessary malloc.h #includes and related #ifdeffery.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29126 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-04-02 09:20:48 +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 997f636599 demux_mkv: Remove first_tc and stop_timecode
The first_tc code was used to force timestamps in the file to start
from 0. There should be no need to do this, and it would likely break
ordered chapter support for any files it affected (since the chapter
timecodes would refer to the original times, not the modified ones).

stop_timecode was used to implement end of playback at a specified
chapter. There is now common code which implements that and
demuxer-specific implementations are not needed.
2009-04-02 06:51:26 +03:00
Uoti Urpala 901ea8880a demux_mkv: Adjust seeks a bit to catch inexact keyframe matches
Allow a seek to "time X or before" to match a keyframe at X plus 1 ms,
and correspondingly for seeks to "X or later". This allows seeks to a
known keyframe to succeed even if the time is not quite perfectly
exact.

The main motivation for this improvement was chapter seeking. Some
time ago things worked in practice because chapter times were slightly
below the exact target and demux_mkv seeked forward of the specified
position by default. Some commits ago demux_mkv started seeking
backward by default, which is generally a more desirable behavior, but
worked worse for the chapter times which happened to be slightly
behind a keyframe rather than ahead. After this commit chapter seeks
go to the desired keyframe again.
2009-04-02 06:51:26 +03:00
bcoudurier b578fedf77 override codec tag for pcm s32le and s32be, used in mov
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29124 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-04-02 02:31:17 +00:00
diego df53cdd57d Add config.h #include, necessary for HAVE_MALLOC_H check.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29123 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-04-01 16:28:25 +00:00
reimar b5fcf45f11 Increase probe buffer size to 32kB, this makes ac3 auto-detection far more reliable.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29121 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-04-01 09:24:46 +00:00
Uoti Urpala cf9edda1d3 Merge svn changes up to r29117 2009-04-01 02:43:47 +03:00
bcoudurier 9ae48213f8 override lavf tag for pcm s24le, mov uses the same for s24be
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29110 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-30 22:49:28 +00:00
reimar 20a4844e80 Update demuxer->sub->id and demuxer->sub->sh if a new subtitle stream is
created that matches the user-requested one.
Fixes -slang and -sid with DVDs (anything that uses demux_mpg actually).


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29095 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-29 11:21:18 +00:00
reimar eee30602c5 Check for _WINGDI_ instead of _WINGDI_H before defining BITMAPINFOHEADER
since former works on both 32 and 64 bit MinGW

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29071 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-27 18:55:21 +00: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
compn f8a56efb5c map jls (jpeg-ls), thm and db (thumbnails) files to jpg
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29025 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-21 19:46:13 +00:00
Uoti Urpala 4b33422c7b Allocate struct demuxer with talloc
Makes it possible to add data to it without explicit freeing code.
2009-03-21 05:42:41 +02:00
Uoti Urpala e177fc3e8b demux_mkv: Some cleanup, fix duration printed at verbose level
Clean up demux_mkv_read_info() and demux_mkv_read_chapters() somewhat.
(Why do the names of static functions have a stupid prefix like that?
Didn't remove it now however).

Demux_mkv_read_info() now delays printing duration information until
the end of the function where we hopefully have the correct timescale
for converting it to seconds. The code to calculate the duration had
been fixed for that earlier but the message had not.
2009-03-21 05:37:43 +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
reimar 8c5b570b50 Get rid of nuppelvideo.h and its ugly packed struct and instead write the
frame header directly in nuv encoder.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28914 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-09 15:01:12 +00:00
reimar 3a0ffa5bf4 Remove now unused parts of nuppelvideo.h
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28908 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-09 13:23:27 +00:00
reimar 601d694829 Remove native nuv demuxer, it only needs more code to achieve the same thing
as the libavformat demuxer.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28907 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-09 13:11:37 +00:00
reimar 29c8d70242 Remove unused variable from demux_mov.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28879 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-08 09:28:01 +00:00
Uoti Urpala e0172b96e3 Merge svn changes up to r28862 2009-03-07 01:04:41 +02:00
reimar f31339b75b Fix mp_msg call with too few arguments.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28805 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-04 08:11:42 +00:00
Uoti Urpala ebb541c655 Merge svn changes up to r28690 2009-02-21 17:39:30 +02:00
zuxy 757e575aeb Be more robust against corrupted RM files that contain invalid packet length
by seeking to a known good place when index table is available.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28665 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-02-19 11:42:05 +00:00
Uoti Urpala 186e5a998c Merge svn changes up to r28641
Convert vo_x11_border (used in vo_gl/gl2 though the vo_gl_border
macro) to use a wrapper macro in old-style VOs which do not provide a
VO object argument. Before this function had an explicit global_vo
argument in vo_gl/gl2. New vo_vdpau uses it too so use the same
mechanism as most other functions.
2009-02-18 01:45:36 +02:00
diego be8c67909b Convert HAVE_MALLOC_H into a 0/1 definition, fixes the warning:
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
2009-02-17 11:16:19 +00:00
diego 1b915e419e Replace double semicolon by single semicolon.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28611 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-02-16 02:00:29 +00:00
Uoti Urpala 0bf2bd91ec Merge svn changes up to r28610 2009-02-16 02:39:58 +02:00
zuxy c39bb23833 Fix a regression caused by r17933; RealMedia index tables could never be printed.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28585 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-02-15 11:01:26 +00:00
zuxy ce07cc3b5e Support seek in multirate RealMedia files.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28584 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-02-15 10:50:26 +00:00
Uoti Urpala 1e86963828 Merge svn changes up to r28537 2009-02-12 04:17:55 +02:00
aurel de03d58545 change internal real video packetizing format to the more straight forward one
see [MPlayer-dev-eng] [PATCH] cleanup/uniformize real video packetizing
patch blessed by Roberto


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28503 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-02-09 22:00:57 +00:00
diego 19e71dbc54 Fix a couple of unused variable warnings through the av_unused attribute.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28476 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-02-07 15:29:22 +00:00
diego 2817da6233 Convert CONFIG_ZLIB into a 0/1 option.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28475 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-02-07 15:23:55 +00:00
Uoti Urpala 9790f4e6e7 Merge svn changes up to r28461 2009-02-04 00:28:17 +02:00
reimar 75243478ce Adapt to lzo changes in libavutil
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28448 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-02-02 20:22:36 +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
Uoti Urpala 0406d95120 Merge svn changes up to r28348 2009-01-23 20:56:50 +02:00
nicodvb 39b7c1576d in parse_pat() IDENTIFY program number and pmt_pid
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28348 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-01-22 21:50:13 +00:00
Uoti Urpala 79e1aa7cc7 Merge svn changes up to r28341
Conflicts:
	configure
	libmpcodecs/native/rtjpegn.c
2009-01-19 00:04:43 +02:00
cehoyos 83c523f9ea Fix compilation: s/ff_gcd/av_gcd.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28338 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-01-17 11:29:36 +00:00