Commit Graph

33847 Commits

Author SHA1 Message Date
wm4 6f564fe82b mplayer: move things out of main()
The main() function used to be way too big, to the point that it was
unreadable (> 1000 lines).

Move random parts out of the main into new functions.
2012-08-03 07:56:32 +02:00
wm4 a78bb28ed6 sub: simplify code by always defining sub_cp 2012-08-03 06:53:10 +02:00
wm4 adde96a814 x11_common: remove some code duplication
This sin was committed in 2002.
2012-08-03 06:30:47 +02:00
wm4 b4d9647d18 mplayer: do not create X11 state in player frontend
This is about the vo_x11_init_state() call. It basically opens a X11
connection. It's called in the main() function once. It's not really
clear why this isn't done on VO creation instead. Maybe one reason was
that --no-fixed-vo used to be the default: when playing a new file, the
full VO state would be free'd and recreated. Keeping the X11 connection
possibly improved things, although the question is how. In summary,
there is no good reason to do this, and it only adds platform specific
details to the player frontend.

Do the X11 initialization in the respective VOs instead.
2012-08-03 05:55:02 +02:00
wm4 11648493db mplayer: move highly OS specific initialization code out of main()
The intention is to make the main() function smaller (which is at
about 1000 lines currently).

This commit also changes the order of some initializations, but that
should be safe.
2012-08-03 05:09:55 +02:00
wm4 4ced6d4e78 mplayer, stream_tv: move variable initialization
It's not clear why that was done in mplayer's main function.
2012-08-03 04:51:55 +02:00
mplayer-svn 548bae63e7 demux_audio: always enable parsing for audio streams
Generally enable parsing for audio streams.
The formats I know of that do not need it (e.g. raw audio) do
not have a parser anyway.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35050 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
2012-08-03 03:50:35 +02:00
mplayer-svn 2e125e7984 subassconvert: order colour names alphabetically / better match W3 list
Order colour names alphabetically / better match W3 list.

Patch by Federico Kereki, fkereki gmail

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

Add a few new CSS colors.

Patch by Federico Kereki, fkereki gmail

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

Author: cehoyos
2012-08-03 03:47:09 +02:00
mplayer-svn 1432aa4131 tv: reduce code duplication
Reduce some code duplication.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34995 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
2012-08-03 03:44:44 +02:00
mplayer-svn 0b8540657a vf_unsharp: direct rendering fixes
unsharp: actually process the frame we got.

Previously it would always process the last frame
allocated, but that might be a different one than the
one first returned.

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

Request a sufficiently large image for direct rendering.

Fixes broken video near the borders.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34979 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: ib
2012-08-03 03:38:45 +02:00
wm4 14b545eb2a vf_ass: use correct height when copying image
The target image can be larger than the image size the video filter was
configured for.

Based on mplayer-svn commit 34973.
2012-08-03 03:34:39 +02:00
mplayer-svn f0965d8356 vf_ass: request a sufficiently large image for direct rendering
Request a sufficiently large image for direct rendering.

Due to alignment and similar, we might need a buffer
larger than the output of the ASS filter.
Fixes out of bound writes and/or broken video near the
borders.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34970 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
2012-08-03 03:34:39 +02:00
wm4 719d126023 bstr.h: fix compilation with C++ 2012-08-03 03:34:38 +02:00
mplayer-svn 772d93c81a configure: fix directx check on Cygwin
build: Fix vo directx configure check on Cygwin

  Without windows.h included syntax errors will
arise inside (some versions of) the ddraw.h header.

  The wine-based ddraw.h header was reported to not
have this problems.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34953 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: al
2012-08-03 03:34:38 +02:00
mplayer-svn 063f368398 mp3_hdr: cleanups
Return a spf value even when srate is NULL.

Based on patch by Benoît Thébaudeau [benoit thebaudeau advansee com]

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

Make some tables const.

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

Use more appropriate types.

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

Some minor simplifications.

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

Cosmetics: fix up indentations, get rid of a few lost tabs.

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

Remove unused code from mp_get_mp3_header.

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

Author: reimar
2012-08-03 03:34:38 +02:00
mplayer-svn d0525a0f59 demux_audio: fix calculation of audio length
Take start offset into account when calculating amount of audio data.

Patch by Benoît Thébaudeau [benoit thebaudeau advansee com]

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34915 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
2012-08-03 03:34:38 +02:00
mplayer-svn ad8ef269cf demux_audio: avoid integer overflows
Add some additional checks to ensure subtractions do not overflow.

Patch by Benoît Thébaudeau [benoit thebaudeau advansee com].

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34914 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
2012-08-03 03:34:38 +02:00
mplayer-svn 2e2cb6c416 stream_pvr: fix buffer overflow
stream_pvr: Use sizeof() to get destination buffer size.
The code in lines 382/384 used the wrong constant.
Fixes bug #2066.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34895 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
2012-08-03 03:34:38 +02:00
mplayer-svn 254e291a66 configure: try linking in libmad test
Try linking when testing for libmad.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34880 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: cehoyos
2012-08-03 03:34:38 +02:00
mplayer-svn 882f538efb reorder_ch: support reordering 8 channels to AAC layout
This will allow us to encode 7.1 audio AAC.

7.1 audio not being really popular, instead of creating a new re_order
function, I'm using 2 functions for the re_ordering from

L R Ls Rs C LFE Rls Rrs   -->  C L R Ls Rs Rls Rrs LFE

Patch by Thierry Foucu [tfoucu gmail]

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

http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2012-April/070252.html
2012-08-03 03:34:38 +02:00
mplayer-svn 97f0ed25ed spudec: use more precise alpha handling for -spuaa 4
Use more precise alpha handling for -spuaa 4.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34874 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
2012-08-03 03:34:38 +02:00
mplayer-svn 3790146982 stream: detect prematurely closed connection
Detect prematurely closed connection.

Then we get a streaming_stopped status but we have
a end_pos and have not reached it yet, do not accept
it as EOF but instead try reconnection.
For example a forced restart of a webserver will usually
result in the connection being closed before EOF.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34873 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
2012-08-03 03:34:38 +02:00
mplayer-svn 0dc290269d av_sub, spudec: support multiple rectangles
av_sub: support multiple rectangles.

The "packet_t" structure is renamed with a prefix,
because it is used a public header.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34872 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: cigaes
2012-08-03 03:34:38 +02:00
mplayer-svn 7e87c0e76a stream: retry reconnecting several times
Retry reconnecting several times.

Also add a delay, otherwise a server closing any incoming
connection immediately would make MPlayer stop even if it happens
only for 1 second or so.
With this change, no server/network outage of any kind shorter
than 5 seconds should cause MPlayer to give up anymore.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34871 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
2012-08-03 03:34:38 +02:00
mplayer-svn 2d513fac33 vo_yuv4mpeg: support writing to stdout
yuv4mpeg: support writing to stdout instead of file.

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

Allow using -vo yuv4mpeg for files with resolution changes.

Not all programs can read such files.

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

vo_yuv4mpeg: flush userspace FILE buffers after each frame.

Potentially reduces delay when piping to stdout/fifo.

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

Author: reimar
2012-08-03 02:53:21 +02:00
mplayer-svn 62df332dd5 demux_real: set aspect ratio
RM demuxer: set aspect from container video dimensions.

Fixes the sample from FFmpeg trac issue #785.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34850 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
2012-08-03 02:21:17 +02:00
mplayer-svn 12bab01104 ao_alsa: cleanup use of vsnprintf
vsnprintf always 0-terminates the string, so remove
extra code to do this explicitly.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34841 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
2012-08-03 02:18:29 +02:00
mplayer-svn ca2be52db5 ad_mad: cleanups
Remove unnecessary casts.

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

Replace malloc+memset by calloc.

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

libmad: set i_bps only if it is not already set.

Since that value is only based on the very first MP3 frame,
it is very likely to be much less accurate than any existing
value from a demuxer.

Patch by Benoît Thébaudeau.

Signed-off-by: "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>

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

Author: reimar
2012-08-03 02:18:22 +02:00
mplayer-svn a428aaf3af vf_spp, vf_fspp: replace use of deprecated libav function
Replace use of deprecated dsputil_init() by ff_dsputil_init().

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34816 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: diego
2012-08-03 02:12:37 +02:00
wm4 4a02c57135 AF: remove af_stats
This was not very useful.
2012-08-03 02:05:23 +02:00
mplayer-svn 804bf91570 commands, dvd, dvdnav, bluray: cleanup sub/audio track language display
Code cleanup: Use a stream_control instead of global functions to
get the language associate with a audio or subtitle stream from
the streaming layer.

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

Support showing the stream language with br:// playback.

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

Fix DVDs showing the subtitle language as "unknown"
for a long time.

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

Author: reimar

Note: heavily modified by wm4 for this fork of mplayer.
2012-08-03 01:59:15 +02:00
mplayer-svn 14a67dd301 vf_uspp: fix possible crash when the output format is Y8
Fix possible crash when using -vf uspp,format=y8
i.e. the destination format is Y8.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34805 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
2012-08-03 01:54:10 +02:00
mplayer-svn 08a71392be demux_rtp: fix compilation with new LIVE555 libraries
Patch by Marty Jack, martyj19 comcast net

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34800 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: cehoyos
2012-08-03 01:53:45 +02:00
mplayer-svn bbc9fccd46 cache2: allow cache sizes up to 4 TB
Remove variable that is only assigned but never used.

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

Allow using a cache size of up to 4 TB.
Obviously anything close to 4 GB will always fail
on 32 bit systems.

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

Replace off_t by int64_t in cache code.

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

Remove casts that are no longer necessary.

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

Fix header file after r34793.

Patch by Stephen Sheldon, sfsheldo gmail com.

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

Put #include <inttypes.h> into the header file where it should be.

Reported by Stephen Sheldon, sfsheldo gmail com.

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

Correct r34798.

The header only needs stdint.h while the C file needs inttypes.h.

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

Author: reimar
2012-08-03 01:52:40 +02:00
mplayer-svn 0dce860f6c example.conf: add bandwidth example
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34782 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: compn
2012-08-03 01:49:35 +02:00
mplayer-svn 81048def58 vf.c: increase default alignment values
Adjust MPlayer default alignment values to match FFmpeg's.
Fixes "stride changed" errors when using e.g. MPEG-2 decoder
with -vf unsharp.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34753 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
2012-08-03 01:47:59 +02:00
mplayer-svn 3dc0cfc1fe dec_audio: add sanity check against 0 channels
Add a safeguard to avoid crash if the decoder e.g. claims 0 channels.
That would be a decoder bug, but an extra check can still help.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34738 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
2012-08-03 01:47:47 +02:00
mplayer-svn 3fa539c4e2 demux_audio: do not decode ID3v2 tag data as audio data
Minor simplification.

Part of patch by Benoît Thébaudeau [benoit thebaudeau () advansee com].

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

Detect ID3v2 tag at the end of the file and stop demuxing before
its start.
Avoids trying to decode its data as MP3.
Patch by Benoît Thébaudeau [benoit thebaudeau {} advansee com].

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

Author: reimar
2012-08-03 01:46:59 +02:00
mplayer-svn b615b66322 vf_yadif: fix green bottom line
Fix green bottom line on yadif with certain parity.

This implementation of the filter method needs a padding,
that mplayer allocates but never fills with data.
Do the padding properly and tweak the height alignment to
even number of lines, instead of rounding to 32.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34691 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: iive
2012-08-03 01:46:43 +02:00
mplayer-svn cb2f0e7c38 libmpcodecs: use 128 instead of 64 to define non-native RGB image formats
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34659 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: cehoyos
2012-08-03 01:46:25 +02:00
mplayer-svn 47a0e4fadd vo_x11: X11 non-native RGB/BGR "emulation" only works for 32bit
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34658 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: cehoyos
2012-08-03 01:44:11 +02:00
mplayer-svn f200c85906 demux_mf: add j2c and jpc as jpeg2k, add tiff extension as tif image
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34587 b3059339-0415-0410-9bf9-f77b7e298cf2

demux_mf: add JPS/PNS image formats

add jps / pns image formats, sync'd from ffmpeg
samples: http://i2.i-2000.com/~siragusa/jpsvpns/data/

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

Author: compn
2012-08-03 01:43:44 +02:00
mplayer-svn 0461f5e669 subreader: eliminate duplicate subtitle lines
Eliminate duplicate subtitle lines which will most likely
be artefacts from ASS effects.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34574 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
2012-08-03 01:43:03 +02:00
mplayer-svn d5b964852a subreader: SSA reader: do not strip commas in commands
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34573 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
2012-08-03 01:43:03 +02:00
mplayer-svn 2e12790324 libmpcodecs: add support for 422P9
For some reason only 9-bit 422 wasn't added before.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34524 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
2012-08-03 01:43:03 +02:00
mplayer-svn 98f15b645f stream: add new stream control command STREAM_CTRL_GET_NUM_TITLES
This provides the total number of titles (aka tracks) of CDs / VCDs / DVDs.

Additionally, add a titles property to the get_property slave command.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34474 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: ib
2012-08-03 01:43:03 +02:00
mplayer-svn e97d658bde cache2: flush cache and sync stream position/eof after seeking STREAM_CTRLs
This avoid some strange differences in behaviour between -cache and -nocache.

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

cache2: fix seeking with e.g. flv files

This is a regression that was introduced in r34461.

Found and bisected by Anssi Hannula [anssi.hannula iki fi].

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

cache2: print an error when streams behave in a way that the cache cannot handle

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

Author: reimar
2012-08-03 01:42:48 +02:00
mplayer-svn 4877e8468d stream/http: add a test file for ultravox in comment
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34431 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
2012-08-03 01:36:27 +02:00
mplayer-svn 01a207bef0 cache2: make cache process exit when main process dies
Make cache process detect when the main process disappeared and
make it exit on its own in that case.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34371 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
2012-08-03 01:35:39 +02:00
mplayer-svn 094acd6884 vo_caca: reformat and various fixes
Squashed commits by various authors.

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

vo_caca: Port to libcaca 1.x API, which is widespread enough nowadays.

patch by Paul B. Mahol, onemda gmail com

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

caca: support mouse events and more keys.

Patch by Paul B. Mahol [onemda gmail com].

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

caca: for ordinary keys, send key events on press instead of release.

This is consistent with how other vos behave.

Patch by Paul B. Mahol [onemda gmail com].

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

caca: process all pending events instead of exactly one per check_events.

Patch by Paul B. Mahol [onemda gmail com].

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

Reindent.

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

Use lookup_keymap_table instead of a large number of switch cases.

Patch by Paul B. Mahol [onemda gmail com].

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

Author: diego
2012-08-03 01:35:18 +02:00