1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-27 01:22:30 +00:00
Commit Graph

34168 Commits

Author SHA1 Message Date
Stefano Pigozzi
bec630c347 clang: fix all warnings except deprecations 2012-11-13 22:19:18 +01:00
Rudolf Polzer
9203f06cf3 vf_dlopen: fix a typo in zeroing memory (thanks, pigoz)
Accidentally had put the & inside the sizeof call too. Typing too fast.
2012-11-13 09:52:53 +01:00
Johannes Nixdorf
88ac5c5d42 Makefile: fix install targets
INSTALL_TARGETS-yes is a leftover from INSTALL_TARGETS-$(MPLAYER), which
was removed in 4873b32c59.
2012-11-13 09:40:55 +01:00
wm4
90784dfc9d win32: remove pointless get/release DC wrappers 2012-11-12 20:10:42 +01:00
wm4
5afacef0e4 Add MP_NORETURN and replace av_noreturn uses
av_noreturn is a rather recent addition to libavutil, and defining it
ourselves is trivial and makes playing compatibility games easier.
2012-11-12 20:10:23 +01:00
wm4
a6c4f2646f mp_common.h: split parts into mp_talloc.h and compiler.h
Put MP_EXPAND_ARGS() in compiler.h, even though it's not compiler
dependent. Both mp_talloc.h and mp_common.h need it, while mp_common.h
includes mp_talloc.h. This is the least annoying solution.
2012-11-12 20:08:57 +01:00
wm4
20e9d06a2f libav.h: increase compatibility by not including libavutil/version.h
libavutil/version.h was only recently split off from
libavutil/avutil.h, and that file includes version.h anyway.
2012-11-12 20:08:24 +01:00
wm4
46cf722d80 Add missing compat/libav.h includes
For avcodec_free_frame().
2012-11-12 20:08:24 +01:00
wm4
4873b32c59 Rename directories, move files (step 2 of 2)
Finish renaming directories and moving files. Adjust all include
statements to make the previous commit compile.

The two commits are separate, because git is bad at tracking renames
and content changes at the same time.

Also take this as an opportunity to remove the separation between
"common" and "mplayer" sources in the Makefile. ("common" used to be
shared between mplayer and mencoder.)
2012-11-12 20:08:18 +01:00
wm4
d4bdd0473d Rename directories, move files (step 1 of 2) (does not compile)
Tis drops the silly lib prefixes, and attempts to organize the tree in
a more logical way. Make the top-level directory less cluttered as
well.

Renames the following directories:
    libaf -> audio/filter
    libao2 -> audio/out
    libvo -> video/out
    libmpdemux -> demux

Split libmpcodecs:
    vf* -> video/filter
    vd*, dec_video.* -> video/decode
    mp_image*, img_format*, ... -> video/
    ad*, dec_audio.* -> audio/decode

libaf/format.* is moved to audio/ - this is similar to how mp_image.*
is located in video/.

Move most top-level .c/.h files to core. (talloc.c/.h is left on top-
level, because it's external.) Park some of the more annoying files
in compat/. Some of these are relicts from the time mplayer used
ffmpeg internals.

sub/ is not split, because it's too much of a mess (subtitle code is
mixed with OSD display and rendering).

Maybe the organization of core is not ideal: it mixes playback core
(like mplayer.c) and utility helpers (like bstr.c/h). Should the need
arise, the playback core will be moved somewhere else, while core
contains all helper and common code.
2012-11-12 20:06:14 +01:00
Rudolf Polzer
bd48deba77 mpv_identify: stop using \n; fix property name handling
Dashes are not valid in shell variable names. This changes them to
underscores.
2012-11-12 17:54:45 +01:00
wm4
0165ab5402 vo_opengl: fix compatibility with OpenGL 2.1
The srgb_compand() function passes bvec to mix(), which is apparently
not available on GL 2.1 / GLSL 1.20:

0:0(0): error: no matching function for call to `mix(vec3, vec3, bvec3)'
0:0(0): error: candidates are: float mix(float, float, float)
0:0(0): error:                 vec2 mix(vec2, vec2, vec2)
0:0(0): error:                 vec3 mix(vec3, vec3, vec3)
0:0(0): error:                 vec4 mix(vec4, vec4, vec4)
0:0(0): error:                 vec2 mix(vec2, vec2, float)
0:0(0): error:                 vec3 mix(vec3, vec3, float)
0:0(0): error:                 vec4 mix(vec4, vec4, float)

Also add back disabling color management on older GL, as the
srgb_compand() function is needed for that.
2012-11-12 00:27:26 +01:00
nand
a558117909 vo_opengl: fix srgb for subtitles
Based on a patch by nand. This is needed, because sRGB mode changes the
video over-all gamma. This has to be done for subtitles as well.
The final srgb_compand() call in the OSD shader compensates for the fact
that in ed8fad729d framebuffer use was replaced with doing sRGB
conversion manually by srgb_compand().

This only affects subtitles rendered with libass. Nothing is changed for
RGB subs.

Also change the USE_ flags for OSD shaders to USE_OSD_ to make the
difference between video and OSD rendering more apparent.
2012-11-11 21:34:58 +01:00
wm4
a400c8ff84 vo_xv: don't call vo_xv_get_eq() on every frame
This was done to query the colorspace for sub/OSD rendering. A
single vo_xv_get_eq() call probably requires a dozens of round-trips
(depending what xlib actually does). This likely wasn't a real problem,
but it might be better to be paranoid about this.
2012-11-11 18:40:43 +01:00
wm4
c12f408c47 example.conf: remove some useless options, add some useful ones 2012-11-11 18:10:14 +01:00
wm4
e2eaedcb0a vo_opengl: disable extended downscaling by default
To simplify implementation, the same filter kernel was used for both
directions, even when the scaling factors were different. It turns
out that people actually did this, and that the resulting rendering
errors were rather visible. Disable this feature by default, as
fixing it would require structural changes, and it's a useless anyway.
2012-11-11 18:02:07 +01:00
wm4
eb6688724c Replace fast_memcpy() uses
fast_memcpy, defined in fastmemcpy.h, used to be mplayer's "optimized"
memcpy. It has been removed from this fork, and fast_memcpy has been
reduced to an alias for memcpy. Replace all remaining uses of the
fast_memcpy macro alias.
2012-11-11 17:56:42 +01:00
wm4
34649dbd1d manpage: vo_opengl: document that srgb subopt changes gamma 2012-11-11 17:56:42 +01:00
nand
ed8fad729d vo_opengl: add manual sRGB companding to not artifact when dithering
Patch by nand. Modified not to use macros in the GLSL, and also remove
the checks for framebuffer presence. (Disabling ICC if no sRGB
framebuffer is available was probably a bug.)
2012-11-11 17:56:42 +01:00
Stefano Pigozzi
c78243c03e cocoa_common: honor the --geometry option 2012-11-10 22:37:19 +01:00
Stefano Pigozzi
05650110f3 ao_coreaudio: signal per-application mixer support
The CoreAudio AO's AOCONTROL_GET_VOLUME/AOCONTROL_SET_VOLUME operate on the
AUHAL's volume, and every application has it's AUHAL with a separate volume.

Additionally CoreAudios's mixer seems to be better. As much as I tried to, I
couldn't get it to clip sounds.
2012-11-08 23:52:35 +01:00
Kovensky
d53d75e080 demux_mkv: TTA support
Code from libavformat's demuxer.

Merged by wm4. It looks like the byte stream writer API is private in
newer ffmpeg, so use the macros from <libavutil/intreadwrite.h>
instead.

It's not really known how to correctly set the field that is used by
the decoder to calculate the length of the last frame. The original
patch used:

    put_le32(&b, (demuxer->movi_end - demuxer->movi_start) * sh_a->samplerate);

This doesn't seem to be correct. Write 0 instead. This is also
incorrect, but better than writing an essentially random value.
2012-11-08 01:39:32 +01:00
wm4
ed2c54cea9 demux_mkv: don't crash on tracks with unknown audio codecs
Demuxers can't remove streams anymore after adding them, so the
free_sh_audio() call caused a crash.
2012-11-08 00:32:49 +01:00
Kovensky
fae7307931 Port several python scripts to Perl
file2string.pl and vdpau_functions.pl are direct ports.
matroska.py was reimplemented as the Parse::Matroska module in CPAN,
and matroska.pl was made a client of Parse::Matroska.
A copy of Parse::Matroska is included in TOOLS/lib, and matroska.pl
looks there first when trying to load the module.

osxbundle.py was not ported since I have no means to verify it.
Python is always available on OSX though, so there is no harm in
removing the check for it on configure.
2012-11-08 00:28:59 +01:00
wm4
58f821e096 vd_ffmpeg: disable codec direct rendering and slices by default
This caused failures when doing single threaded decoding in some cases.
It's unknown what exactly the reasons are for these failures, but
direct rendering is probably worthless anyway.

Disable slices by default as well, just to be sure not to invoke broken
code paths. Multithreading disables these too.

The old behavior can be restored by passing the -dr1 -slices command
line options. (-dr1 is left undocumented intentionally.)

Multithreaded decoding worked fine, because vd_ffmpeg.c automatically
disables direct rendering in this case.
2012-11-07 23:29:55 +01:00
Stefano Pigozzi
a20c9576be osxbundle: run install_name_tool -id only on direct dependencies
It looks like that only `install_name_tool -change` must be applied
recursively. This allows to bundle up all our stuff without thinkering with
the Mach-O headerpad size (which could even be impossible for libraries we
don't compile and link ourselves).
2012-11-06 00:06:16 +01:00
Stefano Pigozzi
3043690756 cocoa_common: save vo struct earlier in the startup process
This prevents a crash with -fs option.
2012-11-05 22:03:15 +01:00
Stefano Pigozzi
e6a6a60276 libav_compat: fix mmx2 define, provide fallback for avcodec_free_frame 2012-11-03 18:22:56 +01:00
Stefano Pigozzi
6e6fc03828 libav_compat: add missing includes 2012-11-03 15:50:15 +01:00
Stefano Pigozzi
f79b08bf57 make compile with recent libav 2012-11-03 12:17:13 +01:00
Stefano Pigozzi
11173115bb uncrustify af.h
used `uncrustify -l C -c TOOLS/uncrustify.cfg --no-backup --replace libaf/af.h`
2012-11-02 19:20:03 +01:00
Stefano Pigozzi
593e433cc8 audio: untypedef af_stream 2012-11-02 19:20:03 +01:00
Stefano Pigozzi
30f3b537b2 audio: untypedef af_cfg 2012-11-02 19:20:03 +01:00
Stefano Pigozzi
c9b5954851 audio: untypedef af_instance 2012-11-02 19:20:03 +01:00
Stefano Pigozzi
596e12fcb2 audio: untypedef af_info 2012-11-02 19:20:03 +01:00
Stefano Pigozzi
0374ddb79d audio: untypedef af_data and rename it to mp_audio
this is to have something specular to mp_image
2012-11-02 19:19:28 +01:00
Stefano Pigozzi
e0aef8cf12 configure: detect rst2man binary name 2012-11-02 14:37:02 +01:00
Rudolf Polzer
538baaef6e encode: bail out on missing A or V stream
In mplayer2, it was valid to try to start encoding before all streams
were initialized. mpv avoids this situation and thus allows us to
properly bail out on some kinds of failures.

Also, this commit fixes a missing check in ao uninit which could cause
heap corruption when ao initialization did not complete.
2012-11-01 12:29:55 +01:00
wm4
84829a4ea1 Merge branch 'osd_changes' into master
Conflicts:
	DOCS/man/en/options.rst
2012-11-01 02:12:47 +01:00
wm4
e45dd051c3 ao_alsa: make code less confusing
The call snd_pcm_hw_params_alloca(&alsa_hwparams) expands to a macro,
which actually uses alloca(), and stores its result to alsa_hwparams.
At the same time, alsa_hwparams was a global variable for no good
reason. Make it less confusing and move the variables into the init()
function, where they are needed.
2012-11-01 02:12:18 +01:00
wm4
741ab39510 stream: open_stream_plugin() should set error code on failure
clang analyzer complained about *ret (&r) containing garbage in
open_stream_full(). This should fix it.
2012-11-01 02:12:18 +01:00
wm4
e57802a39f gl_common: add dummy initialization
The uninitialized values are passed through some functions, but will be
eventually unused. Initialize them anyway to avoid potential undefined
behavior and for clarity.
2012-11-01 02:12:18 +01:00
wm4
fc656c6bcc ad_spdif: don't print uninitialized value in debug message 2012-11-01 02:12:18 +01:00
wm4
c6ce1d4b99 gl_common: make glFmt2bpp() abort on unknown formats
None of its callers actually checked the return value, and it's a given
that they call it only if it can't fail. Replace the non-sense return
value (0) by a call to abort().
2012-11-01 02:12:18 +01:00
wm4
c59a80b77c vf: fix NULL pointer issue
"mpi" was accessed right after the if block, that checked that mpi is
not NULL. Either the check is uneeded, or the access to "mpi" always
crashes. Just move the access inside the checked block.
2012-11-01 02:12:18 +01:00
wm4
1809cbcc90 input: minor simplification 2012-11-01 02:12:18 +01:00
wm4
cb77400006 vd: minor simplification 2012-11-01 02:12:18 +01:00
wm4
9643590889 m_option: minor simplification
Relict of mplayer's C89 compatibility?
2012-11-01 02:12:18 +01:00
wm4
bba1edfca5 vo_x11: remove dead assignment 2012-11-01 02:12:18 +01:00
wm4
29cc099297 mplayer: remove useless timer calls
GetTimer() has no side-effects. Probably left over from --benchmark
removal.
2012-11-01 02:12:18 +01:00