Commit Graph

1516 Commits

Author SHA1 Message Date
reimar 5ed772b9cd audio: support parameter changes (e.g. channel count) during playback
Add support for parameter changes (e.g. channel count) during playback.
This makes decoding AC3 files that switch between 2 and 6 channels
work reasonably well even with -channels 6 and ffac3 decoder.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31737 b3059339-0415-0410-9bf9-f77b7e298cf2

Fix typo in error message: ACC -> AAC

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32473 b3059339-0415-0410-9bf9-f77b7e298cf2

Avoid printing AAC with SBR warning on every decode call, instead print
it only after every decoder reconfiguration.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32476 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:14:44 +02:00
reimar 6be6ba4094 commands: Allow fullscreen switching during -idle.
Useful in combination with -fixed-vo and a vo that can do rescaling
during "pause" like gl.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31736 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:14:44 +02:00
reimar 1663d97a11 subs: Change global subtitle numbering scheme
Change numbering so that demuxers can "asynchronously" add subtitles
during playback.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31678 b3059339-0415-0410-9bf9-f77b7e298cf2

Fix calculation of global_sub_size.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31711 b3059339-0415-0410-9bf9-f77b7e298cf2

Update global_sub_pos if we auto-selected a subtitle.
This avoid strange behaviour with subtitle selection in that
case, because the subtitle selection code thinks no subtitle
was displayed while we actually did display one.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31863 b3059339-0415-0410-9bf9-f77b7e298cf2

Move function to avoid a forward declaration.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31864 b3059339-0415-0410-9bf9-f77b7e298cf2

Fix subtitle selection: make selecting -sid 0 work again by replacing the
M_PROPERTY_STEP_UP hack by M_PROPERTY_SET and set the global sub pos also
when we do not yet have a subtitle stream but do know the number of subs
from out-of-band as e.g. for DVD.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31882 b3059339-0415-0410-9bf9-f77b7e298cf2

100l, re-add vobsub_get_id_by_index call accidentally removed in
r31678.
Patch by ubitux [ubitux gmail com].

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31985 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:14:43 +02:00
diego 53bb25e2e7 cfg-common*: Replace common options template by a common options array
This solution works just as well, but avoids a separate template file
that needs to be #included from multiple places. The end result is
simpler since common options and those of MPlayer and MEncoder are now
in only one file each.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31434 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:10:47 +02:00
reimar 8a1194889b core: Try to exit cleanly on SIGPIPE
SIGPIPE is not really a crash, try to exit cleanly in case we receive one.
Particularly in the network code it would be better to ignore it, but
some window managers use it to indicate a close request.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31432 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:10:42 +02:00
reimar ae85c8c2ce -identify output: print media start time
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31344 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:06:33 +02:00
reimar 7f0f621884 mplayer.c: move some --identify code to a separate function
Move the code that prints main per-file -identify info to a separate
function.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31343 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:06:31 +02:00
Uoti Urpala dde8b753e4 Merge svn changes r31318 to r31328
r31328 is a somewhat questionable (changing the option at that point
isn't quite safe), but it was a failure case already...
2010-06-05 23:35:42 +03:00
reimar 09bca6575f If we have no FPS value, try enabling -correct-pts mode, it does
not require any FPS value.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31328 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-06-05 16:46:25 +00:00
reimar 5bd98b116a Do not use libass functions if it is disabled.
Fixes compilation if freetype is not available.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31317 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-06-04 18:46:22 +00:00
reimar 9343d1cb2d If an invalid pts value is detected, try to to make up some if it seems
reasonable.
This avoids completely losing A-V sync e.g. when pts was not reordered correctly.
This was tested with http://samples.mplayerhq.hu/V-codecs/h264/PAFF/tv_cut.mkv
for this sample proper pts reordering is the correct solution, but more resilient
handling of the error case is still useful.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31311 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-06-03 20:39:41 +00:00
cehoyos de6a0324d8 Simplify libass version check.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31309 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-06-03 08:17:51 +00:00
cehoyos 0cded5de1c Fix compilation with external libass.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31305 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-06-02 20:21:29 +00:00
Grigori Goronzy b784346e78 libass: match font attachments based on extension
Instead of only relying on the MIME type, use the file extension as a
fallback for deciding which attachments are fonts and should be fed to
libass.
This also refactors the check into a separate function in mpcommon.
2010-06-01 23:15:41 +02:00
aurel e123aecb48 backport ass_flush_events() from upstream libass and make use of it
This fixes subtitles duplication when seeking back in ass stream formated
with the "standard" format FFmpeg uses.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31293 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-31 19:10:57 +00:00
Uoti Urpala 2f1a518d45 Merge svn changes up to r31211
The merged cache2.c changes are known to have problems. Will merge
further fixes to them before merging this to the master branch.
2010-05-30 16:14:55 +03:00
diego bce7550929 misc cosmetics: K&R style nits, #include placement, indentation
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31263 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-29 10:13:39 +00:00
reimar 4ad8b9e0cc Use MP_NOPTS_VALUE as "default" pts for delayed frames instead of some
insanely large value.
Avoids hang if a decoder handles the data/size == 0 condition incorrectly.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31205 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-23 23:22:25 +00:00
Uoti Urpala e2f894852c core: apply audio track options to all ordered chapter files
Options selecting audio track to play (-nosound, -alang, -aid) only
affected the first source file. When you moved to a timeline part that
came from another file the default audio track for that file was used.
Add code to apply the options to all files.
2010-05-22 10:11:25 +03:00
Uoti Urpala b3a688d45f options: move -alang and -slang to option struct
The option field corresponding to -slang is now called "sub_lang"
instead of the old misleading global name "dvdsub_lang". The code
handling -slang in subreader.c looks rather broken; disable it instead
of converting it to use the option field.
2010-05-22 10:11:15 +03:00
Uoti Urpala 9e02b2db40 vo_vdpau: support queuing an arbitrary number of frames ahead
Make the number of output surfaces allocated by vo_vdpau configurable
and allow queuing multiple future frames with the VDPAU frame timing
functionality. There are two known issues that could be polished in
the future for particularly long queue time cases. First, toplevel
code should possibly wait for the queued changes to finish displaying
in some situations like switching files. Second, the VO can block
waiting for a surface to become available, and in the worst case this
wait can be almost as long as the maximum queuing time (potentially
causing audio underruns). However those issues are not high priority.
2010-05-14 05:55:09 +03:00
Uoti Urpala dc1a1b8d9f mplayer.c: remove an unnecessary #include 2010-05-08 02:35:46 +03:00
Uoti Urpala f38efd166e Merge svn changes up to r31097 2010-04-26 19:23:32 +03:00
Uoti Urpala 4785c2617e Merge svn changes up to r30967 2010-04-26 17:42:20 +03:00
Uoti Urpala 95fba94860 Merge svn changes up to r30917 2010-04-26 17:11:04 +03:00
Uoti Urpala ff559b8e90 Merge svn changes up to r30907 2010-04-26 16:57:25 +03:00
Uoti Urpala d2e25a90c4 core: track current chapter for relative chapter seeks
Due to inexact seeks, chapter seek commands may result in a playback
position that's inside the previous chapter. This causes problems when
the user does repeated next-chapter/previous-chapter seeks, because
the code will use the wrong base for calculating 'next' or
'previous'. Improve the behavior by adding a heuristic that keeps
track of what chapter the user last wanted to seek to and adjusts the
"current chapter" value based on that.
2010-04-25 23:29:46 +03:00
Uoti Urpala 823b989f0f mplayer.c: silence some compiler warnings
No semantic changes.
2010-04-25 23:05:01 +03:00
Uoti Urpala 0b6e3647a5 commands: finish seeks before processing other commands
The code processing seek commands only sets/alters variables
specifying the current seek target. Before all queued commands were
processed first, and any needed seeks were executed after that. This
was somewhat unreliable, as commands queued later were not guaranteed
to see all the effects of earlier seek commands if they happened to be
processed in the same batch. Change the behavior so that processing
commands is interrupted and the real seek executed if the next command
is anything other than a basic seek. This guarantees that other
commands see a consistent state, while still allowing the combining of
consecutive seeks (which is useful for example when the user keeps the
seek-forward key pressed down, and key repeat is faster than seeks can
be executed).
2010-04-25 22:48:40 +03:00
Uoti Urpala 4cb23ad350 input: remove unused "paused" arguments from some functions 2010-04-25 22:48:18 +03:00
Uoti Urpala 05ae9dbd0d Fix chapter handling with first chapter not at beginning of file
Before "-chapter 1" did nothing even if the first chapter didn't start
at the beginning of file. Fix it.
Before all chapter property commands (including chapter seek keys)
failed if the current playback position was before the start of the
first chapter. Now they'll work. Relative chapter seeks will go to the
first chapter (even if that's in the wrong direction for backward
seeks).
2010-04-25 22:48:10 +03:00
Uoti Urpala 859e956523 Fix -chapter with ordered chapters
Move the code doing an initial seek specified by -chapter to a
position where it works if ordered chapters are used.
2010-04-25 22:48:10 +03:00
Uoti Urpala a2133d7684 options: move -chapter values to option struct
-chapter can optionally take a range with a start and an end. Add a
new option type which supports such values and use that instead of a
custom per-option function.

This commit also fixes a build configuration bug: before the
availability of the -chapter option depended on DVD functionality
being enabled in the binary, even though the option works with other
sources too.
2010-04-25 22:48:10 +03:00
Uoti Urpala 9c63c084ff mplayer.c: share seek-reset code with chapter seeks
Move code resetting various things after a seek into a separate
function and use that for chapter seeks too. In most cases this won't
change behavior because chapter seeks were already falling back to the
same time-based seek code.
2010-04-25 22:47:32 +03:00
reimar 38505822c7 Fix crash if a DVD is played with dvdnav:// and without video
(e.g. because vo initialization failed).


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31090 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-04-25 16:09:56 +00:00
Uoti Urpala e3bd668ebd Move seek-reset functionality out of demuxer.c
Move code for resetting decoders after seeks, chapter seeks and angle
changes out of demuxer.c. This functionality belongs on a higher
level; the demux layer can't always know what kind of reinitialization
is required.
2010-04-23 20:14:59 +03:00
diego d84999d480 Rename SetCodecPath() --> set_codec_path().
This keeps the naming of all path-related functions consistent.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30944 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-03-21 08:34:09 +00:00
diego 70c66c0476 Rename get_path.[ch] --> path.[ch].
These files now contain different functions related to path handling.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30943 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-03-20 23:38:27 +00:00
diego a06a3d476d Move SetCodecPath() from loader to get_path.c and make it unconditional.
This fixes compilation with the Win32 loader disabled but other binary
codec loaders enabled.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30942 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-03-20 23:27:07 +00:00
diego 77b8678bec Remove unnecessary #ifdefs around harmless loader/codecpath.h #include.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30931 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-03-18 20:57:49 +00:00
reimar a743c0a738 Split codec path related code into a separate file to fix Windows build.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30930 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-03-18 20:44:01 +00:00
komh 11eeaf5005 Follow a more proper way to support -codecpath.
1. Include loader/drv.h for SetCodecPath() instead of a declaration of it.

    2. Move codec_path from get_path.h to mpcommon.h and mpcommon.c.



git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30914 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-03-17 09:12:51 +00:00
komh 8686b281f8 Add -codecpath option.
It allows to search binary codecs in non-standard directories.



git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30897 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-03-15 08:30:06 +00:00
Uoti Urpala 00323c06e2 Delete things related to old translation system
Remove the help/ subdirectory, configure code to create toplevel
help_mp.h, and all the '#include "help_mp.h"' lines from .c files.
2010-03-10 03:47:14 +02:00
Uoti Urpala 0269d22d32 Merge svn changes up to r30876 2010-03-10 03:18:42 +02:00
Uoti Urpala 13221a7165 Merge svn changes up to r30663
Conflicts:
	gui/cfg.c
	libmpcodecs/vd_dmo.c
	mplayer.c
2010-03-10 00:13:11 +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 c31aa7b953 Merge svn change r30560 2010-03-09 23:18:19 +02:00
Uoti Urpala 36e7a20e69 Merge svn changes up to r30550 2010-03-09 23:03:14 +02:00
Uoti Urpala 9786d38667 subs: support loading external ASS subtitles via stream layer
Previously the argument of the "-sub" option was always interpreted as
a local filename when trying to read it as a libass file. Use the
stream layer to read it instead, so that protocols like 'http://' are
also supported like they are for the main video/audio file.

Based on patch by Yuriy Kaminskiy <yumkam@mail.ru>
2010-03-09 22:35:53 +02:00