Commit Graph

31981 Commits

Author SHA1 Message Date
Uoti Urpala 9b94b3fb30 demux_mkv: support switching to/from -nosound
Allow audio stream switching to turn off sound or enable it, and also
include nosound as one of the values cycled through when stepping to
the next audio stream.
2010-05-22 10:38:55 +03:00
Uoti Urpala fc39d48465 demux_mkv: store streams sequentially in demuxer->[avs]_streams
demux_mkv used the Matroska TrackNumber as the array offset in demuxer
stream lists. The TrackNumber entry stored in the file can be an
arbitrary 64-bit value, and some of the code could try reading from
the arrays with that offset, causing a crash if the file had insane
values. Fill the arrays sequentially instead. Also add some checks to
make the handling of too high stream counts more robust.
2010-05-22 10:26:45 +03:00
Uoti Urpala 90bedd0b87 Make audio stream index handling saner in stream switching
The handling of audio stream numbering was handled in the stream
selection property was a total mess. The most important issue was
confusion between values used as index for demuxer->audio_streams[]
array (consistently stored in demuxer->audio->id) and values stored
in sh_audio->aid and used as "-aid N" option values. Now demuxer audio
switch control functions and demuxer_switch_audio() are supposed to
return the new value for the "-aid" option (internal MPEG demuxers
still don't; the demuxer requirement could perhaps be dropped as it
can be easily calculated afterwards). That is also the value
returned for the "switch_audio" property. The main changes are:

 - Make command.c mp_property_audio() consistently use and return the
   "-aid" values. Before it used that as input but the array index as
   output, with extra mess related to demuxer_switch_audio() return
   value. Don't modify the audio_id option field any more.

 - Make demuxer_switch_audio() always return "-aid" values (like it
   takes as input). There are two changes for this: picking this
   return value in case the demuxer doesn't support switching, and
   overriding demuxer return value (for internal MPEG demuxers).

 - Make demux_lavf return "-aid" values from DEMUXER_CTRL_SWITCH_AUDIO
   code. This isn't actually necessary because of the override part
   above.

Here's some history of the relevant behavior that I looked up:
* For most demuxers array index and "-aid" values are the same. At
  least demux_mkv, (some of?) the internal MPEG demuxers and demux_ogg
  have differed for a long time. demux_ogg doesn't matter because it
  doesn't support stream switching.
* Old code seemed to assume that demuxer_switch_audio() return value was
  array index, but this wasn't true at least for demux_mkv.
* In svn r19951 reimar mostly removed use of the return value.
* In r20162 ptt added mp_property_audio(). This set the global
  audio_id variable (-aid option value) to the return value of
  demuxer_switch_audio() and treated the global as the persistent
  value of the property, apparently assuming that it would be set to
  the "-aid" value, not array index. This was false for internal
  MPEG.
* In r30124 reimar changed the property code so that even though it
  still modified the option value it didn't use that as the value of
  the property any more; instead it incorrectly used the array index.
  This meant that for demux_mkv the return value didn't match -aid any
  more (though input still did, so setting the property and querying
  it didn't match as they used different value systems).
* In r31129 aurel made demux_lavf changes that resulted in its -aid
  and array index values no longer matching either. He didn't change
  the return value from audio switch when changing -aid, so it now
  matched array index only. The latter part didn't cause additional
  problems from r20162 though because either choice would have been
  broken anyway after r30124 as long as they weren't the same value.
2010-05-22 10:11:25 +03: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 de5566f0b5 stream.h: remove bad EOF check in stream_seek()
Also remove a redundant stream->eof = 0 in demuxer.c.
2010-05-22 06:40:34 +03:00
Anton Khirnov de42015a97 demux_mkv: read tags. 2010-05-22 06:40:34 +03:00
Anton Khirnov bc072fb7dc demux: use bstr arguments for demuxer_add_attachment() and demuxer_add_chapter() 2010-05-22 06:40:28 +03:00
cehoyos 4e2622ed33 Do not use correct-pts for mpeg-ps: It breaks PAFF samples.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31190 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-22 01:17:59 +00:00
reimar 0dd2ddd2bc Change WAV header updating in ao_pcm to allow to up to almost 4GB size.
Patch by Rob McMullen [robm users sourceforge net]


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31189 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-21 17:19:01 +00:00
jrash cb3496d251 sync with en/mplayer.1 rev. 31173
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31188 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-21 11:20:23 +00:00
iive 31bc24b1d8 Fix compilation broken by FFmpeg-r23201 that changed the api of error logging.
Also fix evaluation after FFmpeg-r23149 "change order of parameters".
Let the filters fail if evaluation can't be done.



git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31187 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-20 23:17:41 +00: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 d72541b75c bstr.[ch]: add new files for struct bstr related functionality
Move "struct bstr" definition from ebml.h to its own header and add
some utility functions/macros. Change length field type from int to
size_t and adjust using code accordingly.

Partially based on a patch from Anton Khirnov.
2010-05-20 23:50:18 +03:00
stefano 764539a98c Cosmetics: make more compact the code for handle_jpeg(), this also allows
vertical alignment. Improve readability.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31186 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-19 22:56:41 +00:00
stefano 3c88e5fdc3 Remove PI definition and use M_PI instead.
M_PI is defined by the included file libavutil/mathematics.h.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31185 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-19 22:49:04 +00:00
reimar 7be96c3792 Do not return pointer to on-stack memory.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31184 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-19 17:58:17 +00:00
reimar d08822aaac Fix return value (it was missing completely).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31183 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-19 17:55:39 +00:00
reimar f62044777b Handle -wid Window being closed for direct3d and gl vos on Windows.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31182 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-19 17:53:47 +00:00
lorenm f53f31894c 13% faster yuv420 to rgb15 mmx.
It is now faster than the old gpl version on conroe.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31181 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-19 13:31:11 +00:00
lorenm d919d834fe 40% faster yuv420 to rgb24 mmx.
It is now faster than the old gpl version on conroe.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31180 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-19 08:21:56 +00:00
Uoti Urpala c67d3dfcfc subreader.c: allow compilation with old FriBiDi 0.10
After fixing the type of the third parameter given to fribidi_log2vis
the code didn't compile with old FriBiDi 0.10 any more. Seems that the
parameter type has changed in FriBiDi and the type expected by current
versions didn't exist in older ones at all. Fix compilation with old
FriBiDi by adding an #if based on FRIBIDI_INTERFACE_VERSION.
2010-05-16 06:11:16 +03:00
Uoti Urpala a47ef5fed6 ad_pcm: don't rely on demux packets staying valid
Change ad_pcm to copy input packet data into an internal buffer
instead of relying on the packet still existing at the next decode()
call. The extra memcpy could be avoided by improving the demuxer API a
bit but I don't feel like implementing that now. Also add a
ADCTRL_RESYNC_STREAM handler to drop buffered data from previous
stream position.
2010-05-15 06:08:44 +03:00
Uoti Urpala c1c68a6914 ad_pcm: fix crash at EOF
Fix use of unsigned type where negative values were needed. When
playing a file with multichannel PCM audio the bug could result in the
channel reorder function scrambling memory at the end of playback,
causing a crash.
2010-05-15 05:52:00 +03:00
Uoti Urpala 584b43e9f8 cosmetics: reindent ad_pcm.c 2010-05-15 05:45:02 +03:00
reimar 5c74db3bf6 Quit MPlayer if we receive a DestroyNotify event.
This in particular avoids MPlayer continuing to play when
a frontend using -wid crashed.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31179 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-14 18:00:04 +00:00
diego e4fc48153e vf_zr requires the lavc MJPEG encoder even when MEncoder has been disabled.
This fixes compilation with vo_zr enabled and MEncoder disabled.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31178 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-14 16:56:43 +00:00
diego 0624a90c9a Remove duplicate and nonsense libavencoders #define for OpenCORE AMR-WB.
OpenCORE AMR-WB only has a decoder, no encoder.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31177 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-14 16:13:53 +00:00
diego 0a33fdb83a Check for termios.h before sys/termios.h.
The former location is the more current and standard variant.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31176 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-14 15:34:30 +00:00
cehoyos b6bcfb4f00 Enable libavcodecs new MPEG-1 Audio float decoder.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31175 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-14 14:24:16 +00:00
cehoyos 2b26048cca Fix compilation after r31173.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31174 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-14 14:20:19 +00:00
siretart e3f191fa3f remove vf_yuy2, functionality is replaced by -vf format=yuv2
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31173 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-14 13:49:05 +00: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 c5812d6056 af_lavcac3enc: make the filter work without FFmpeg internals
The only FFmpeg internal symbols required were some constants. Define
them in the file itself instead. Also add some checks and fixes to
make the code more robust and fix a potential memory corruption
problem.
2010-05-14 04:25:49 +03:00
cehoyos aaba0aea70 Silence a gcc warning about char trying to be packed.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31172 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-13 20:48:55 +00:00
compn 30ead7d5d3 move 'dvdsublang... moviename en,eng,' message to debug level.
change 'dvdsublang' to 'potential sub', subtitles werent always dvd related.
also change output to only output selected subtitle.
patch by ubitux at gmail.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31171 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-13 18:11:45 +00:00
ramiro 210601a953 Revert r31153. It failed to build on:
x86_64 / Mac OS X gcc 4.0.1
x86_64 / Linux icc (all)
x86_64 / Linux gcc 4.0.4
x86_64 / OpenBSD gcc 3.3.5
x86_64 / Linux suncc 5.10
and there are some reports of crashes.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31170 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-12 20:47:32 +00:00
diego 8c9cb24a48 Mention removal of internal liba52 copy in Changelog.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31169 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-12 08:29:55 +00:00
Uoti Urpala 67482de5a7 vo_vdpau: add option for studio level output
Add -vo vdpau suboption "studio" to produce output in RGB range
16-235. Man page description mostly taken from a patch by Lauri
Mylläri (but not code). Also slightly tweak the description of two
other suboptions on the man page.
2010-05-12 03:55:32 +03:00
diego 885d95c7c5 10l: Use the directory part of the stylesheet path to create a directory.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31168 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-11 22:31:47 +00:00
diego 3dd0551a26 cosmetics: Invoke all shell scripts during XML documentation build directly.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31167 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-11 21:33:15 +00:00
diego 997f8e8c10 Create output directory when copying stylesheet.
This eliminates one rule and simplifies dependencies.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31166 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-11 21:31:36 +00:00
diego 5082b8de29 Merge both XML documentation README files into one.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31165 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-11 21:25:12 +00:00
diego f7d7d2db33 Do not run xmllint prior to building the XML documentation.
xmllint is just a convenient way to check for syntax errors;
it is not a requirement to build the documentation.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31164 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-11 21:21:45 +00:00
diego eabca4e7b2 XML docs: Make xmllint-* targets a dependency of html-chunked-*/html-single-*.
Since the xmllint-* targets are phony, they should never be a dependency
of real targets, so make them a dependency of the phony html-chunked-* /
html-single-* targets instead. This is just as correct, but now the docs are
regenerated when dependencies change and not with every make invocation.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31163 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-11 14:27:26 +00:00
diego 0e9b9da3b2 Only mark targets whose names end in "clean" as phony.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31162 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-11 13:27:13 +00:00
diego 51ac751241 docs: Update documentation to account for recent build system changes.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31161 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-11 13:17:26 +00:00
diego 8de8a1c713 Make XML documentation build process nonrecursive.
This greatly simplifies the documentation build process and the Makefiles.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31160 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-11 13:13:32 +00:00
diego e3d4e1a3ce Get rid of pointless variable indirection for XSL stylesheets.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31159 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-11 11:52:41 +00:00
diego c8e40a8fba libdvdcss is now synced to a recent upstream Subversion snapshot.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31158 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-11 11:13:07 +00:00