1
mirror of https://github.com/mpv-player/mpv synced 2024-07-31 16:29:58 +02:00
Commit Graph

86 Commits

Author SHA1 Message Date
wm4
74df1d8e05 Remove compile time/runtime CPU detection, and drop some platforms
mplayer had three ways of enabling CPU specific assembler routines:
a) Enable them at compile time; crash if the CPU can't handle it.
b) Enable them at compile time, but let the configure script detect
   your CPU. Your binary will only crash if you try to run it on a
   different system that has less features than yours.
   This was the default, I think.
c) Runtime detection.

The implementation of b) and c) suck. a) is not really feasible (it
sucks for users). Remove all code related to this, and use libav's CPU
detection instead. Now the configure script will always enable CPU
specific features, and disable them at runtime if libav reports them
not as available.

One implication is that now the compiler is always expected to handle
SSE (etc.) inline assembly at runtime, unless it's explicitly disabled.

Only checks for x86 CPU specific features are kept, the rest is either
unused or barely used.

Get rid of all the dump -mpcu, -march etc. flags. Trust the compiler
to select decent settings.

Get rid of support for the following operating systems:
- BSD/OS (some ancient BSD fork)
- QNX (don't care)
- BeOS (dead, Haiku support is still welcome)
- AIX (don't care)
- HP-UX (don't care)
- OS/2 (dead, actual support has been removed a while ago)

Remove the configure code for detecting the endianness. Instead, use
the standard header <endian.h>, which can be used if _GNU_SOURCE or
_BSD_SOURCE is defined. (Maybe these changes should have been in a
separate commit.)

Since this is a quite violent code removal orgy, and I'm testing only
on x86 32 bit Linux, expect regressions.
2012-07-30 01:37:28 +02:00
Uoti Urpala
3a01606dc0 libao2: change control() types to enum, remove unused ones
Change the audio driver control() command argument from "int" to "enum
aocontrol". Remove unused control types (SET_DEVICE, GET_DEVICE,
QUERY_FORMAT, SET_PLUGIN_DRIVER, SET_PLUGIN_LIST). The QUERY_FORMAT
one looks like there's a possibility such functionality could be
useful in the future, but as ao_oss was the only driver to have an
actual implementation of it, the current code wasn't worth keeping.
2012-04-08 16:35:09 +03: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
5234c72e28 Restore collapsed whitespace in output messages
For some reason commit e306174952, which
replaced translation macro names with the corresponding English
strings, also collapsed multiple consecutive space characters into
one. Change most of these back. In a couple of cases the amount of
whitespace is important for alignment, and for the rest it at least
keeps the strings closer to the existing translations.
2010-03-07 21:34:54 +02:00
Uoti Urpala
69fe2522f8 Merge svn changes up to r30301 2010-01-25 15:07:30 +02:00
reimar
33bc71f10d Add support for distinguishing between little- and big-endian SPDIF AC3
and converting between both.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30283 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-11 20:27:52 +00:00
reimar
d4b1ff0d03 Use AF_FORMAT_IS_AC3 in ao_oss.c
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30281 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-11 19:55:07 +00:00
Uoti Urpala
57ce95b96a audio: Remove fixed decode_audio() return size limit (MAX_OUTBURST)
A couple of months ago MPlayer's ALSA driver started rounding the
amount of input data it was willing to accept in one call down to an
integer multiple of the value it set in ao_data.outburst. In some
configurations it was possible for this value to exceed the 64 KiB
limit on the amount MPlayer was willing to write in a single call to
the AO. As a result ao_alsa accepted 0 bytes in each play() call and
audio playback failed. Fix this by removing the fixed 64 KiB limit on
the amount of audio sent to AO at once; the limit was mostly a remnant
of older code anyway.
2009-12-29 15:51:59 +02:00
Uoti Urpala
7fd3eb0f74 Merge svn changes up to r29752
As part of merging subtitle-in-terminal changes make
update_subtitles() only clear existing subtitles if called with the
reset argument, and not try to set new ones. Later calls should set
the needed new subtitles, and this change avoids some problems with
trying to set subtitles when mp_property_sub() in command.c gets
called from initialization code before full initialization.
2009-10-06 04:48:00 +03:00
cladisch
59b6e1393d fix calculation of ao_data.bps for sample formats with more than 16 bits
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29750 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-10-05 07:42:02 +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
cladisch
de3d544c43 Use the correct OSS format, where possible, for mplayer's packed 24-bit
format (AFMT_x24_xE would be 32-bit aligned).

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29438 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-07-24 10:35:22 +00:00
Uoti Urpala
0eb321bf2c Remove trailing whitespace from most files 2009-07-07 02:34:35 +03:00
Amar Takhar
e306174952 Translation system changes part 2: replace macros by strings
Replace all MSGTR_ macros in the source by the corresponding English
string.
2009-07-07 01:38:20 +03:00
Amar Takhar
b5972d6f14 Translation system changes part 1: wrap translated strings
Replace mp_msg() calls which have a translated string as the format
argument with mp_tmsg and add _() around all other translated strings.
2009-07-07 01:28:07 +03:00
Grigori Goronzy
91d0d3a082 Add OSS4 vmix volume control to ao_oss
Support for per-application volume control, introduced by OSS4.
This adds a check in configure to add the proper include path
to the CFLAGS, if needed. The path is taken from /etc/oss.conf.
2009-06-24 20:49:21 +02: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
reimar
d6bf2e318e Make ao_info_t structs const.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28858 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-06 19:43:12 +00:00
reimar
0c6b3b8742 Set samplerate in reset also for AC3, and set it before the format in that
case (no idea why, but it is done this way in init, so it is consistent).


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28640 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-02-17 21:08:22 +00:00
reimar
8e90297698 100l, do 0-filling on resume (to avoid desync after pause) in ao_oss only when
the we output a PCM format, not for e.g. AC3.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28614 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-02-16 18:38:54 +00:00
diego
c1cd81818a Add standard license headers.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28378 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-01-26 15:06:44 +00:00
ranma
4445a58fd3 Fix 'cast from pointer to integer of different size' on 64bit architectures. Casting to long should work for 32bit and 64bit and not make a difference to the boolean operation (since 'format' is always 32bit (int) the upper 32bit of 'arg' won't matter, but the compiler should be happy now. Casting both to unsigned makes sure the compiler isn't messing things up by sign-extending 'format' to 64bit before masking)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27482 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-08-24 13:52:54 +00:00
reimar
7be3e8694b Somewhat hackish fix for A-V desync with ao_oss and frame stepping:
send 0-samples according to the amount of data lost during pause.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23829 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-07-19 19:15:59 +00:00
reimar
2a2d39f0ed Remove a disabled and completely outdated sample rate mismatch warning.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21563 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-12-10 00:21:35 +00:00
reynaldo
03485211a9 two variables are made static, one of them additionaly modified to const char*. Patch by Stefan Huehner, stefan AT huehner-org
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18971 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-07-09 03:50:47 +00:00
pacman
b483d64bc0 Respect AOPLAY_FINAL_CHUNK
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18846 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-06-28 19:22:27 +00:00
reynaldo
bf25812a43 Part1 of several printf2mp_msg changes in patch from Otvos Attila oattila AT chello DOT hu
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17995 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-03-30 06:40:58 +00:00
rathann
e7db4ccf1a Patch by Stefan Huehner / stefan % huehner ! org \
patch replaces '()' for the correct '(void)' in function
declarations/prototypes which have no parameters. The '()' syntax tell
thats there is a variable list of arguments, so that the compiler cannot
check this. The extra CFLAG '-Wstrict-declarations' shows those cases.

Comments about a similar patch applied to ffmpeg:

That in C++ these mean the same, but in ANSI C the semantics are
different; function() is an (obsolete) K&R C style forward declaration,
it basically means that the function can have any number and any types
of parameters, effectively completely preventing the compiler from doing
any sort of type checking. -- Erik Slagter

Defining functions with unspecified arguments is allowed but bad.
With arguments unspecified the compiler can't report an error/warning
if the function is called with incorrect arguments. -- Måns Rullgård


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17567 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-02-09 14:08:03 +00:00
diego
491ff4b705 -aop is long obsolete.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17059 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-11-28 23:43:24 +00:00
diego
56770b6eef Unify include paths, -I.. is in CFLAGS.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17021 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-11-19 14:35:45 +00:00
albeu
1f1fc11b84 Allow setting the mixer per instance so one can fallback between
several oos device and still have correct mixer settings all the
time.
The sytax is now: oss[:dsp_device[:mixer_device[:mixer_channel]]]


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16960 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-11-10 09:02:56 +00:00
alex
a1af27beb4 QUERY_FORMAT support
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15899 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-07-03 11:38:35 +00:00
ivo
01191a8392 Have OSS audio out fall back to s16ne instead of u8 if it can't open the
soundcard for 3+ channels and do it for all audio streams (not only AC3).


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14835 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-02-26 23:03:53 +00:00
reimar
9aeba3298a print "Unknown/not supported internal format" message only with -v as it
is not an error.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14610 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-01-29 12:58:16 +00:00
reimar
0ec7a2ca21 Use AF_FORMAT_S16_NE instead of #ifdef WORDS_BIGENDIAN ...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14405 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-01-06 17:35:43 +00:00
reimar
92f7267851 Check for every 24 and 32 bit AFMT_ separately if it is defined.
Patch by Walter Haidinger walter dot haidinger at gmx dot at


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14398 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-01-06 13:15:53 +00:00
alex
3fe168658a more verbose messages
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14274 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-12-29 19:26:01 +00:00
alex
14a29762f2 af_fmt2str_short
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14265 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-12-28 19:11:14 +00:00
rtognimp
3fda49a8cb 100l set default format for AF_FORMATs not supported by sound card
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14261 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-12-28 01:59:12 +00:00
alex
507121f7fe removing AFMT_ dependancy
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14246 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-12-27 17:30:15 +00:00
diego
67a1fd4053 Make include paths consistent.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14124 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-12-07 02:24:15 +00:00
ivo
0f9f4caba4 mp_msg transition of unmaintained audio output drivers.
Patch by Reynaldo H. Verdejo Pinochet <reynaldo at opendot dot cl>


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13384 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-09-18 20:31:28 +00:00
rfelker
c4282b3cfe ok this one is beyond stupid. the code didn't even do what was intended
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12384 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-05-01 19:43:59 +00:00
alex
504270e549 uninit immed flag
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12146 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-04-06 17:55:36 +00:00
attila
a4ac1dc9a4 add option to select mixer channel
patch by Catalin Muresan <catalin.muresan@astral.ro>


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11838 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-01-24 11:53:52 +00:00
alex
c0298b66cd Set close-on-exec after newer open (in reset func). Patch by Andriy Gapon <agapon@cv-nj.com>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10601 b3059339-0415-0410-9bf9-f77b7e298cf2
2003-08-13 21:04:15 +00:00
alex
d65c8518de 64bit libao2 fix by Jens Axboe <mplayer-dev@kernel.dk>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9634 b3059339-0415-0410-9bf9-f77b7e298cf2
2003-03-21 16:42:50 +00:00
arpi
23015ad574 nice 10l bug, found by Balatoni Denes <pnis@coder.hu>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9142 b3059339-0415-0410-9bf9-f77b7e298cf2
2003-01-28 17:25:53 +00:00
arpi
a83c899996 10l
noticed by Joe Barnett <sanchezthecactus@yahoo.com>


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8849 b3059339-0415-0410-9bf9-f77b7e298cf2
2003-01-09 09:27:51 +00:00