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

36677 Commits

Author SHA1 Message Date
wm4
f90e7ef7ea video: don't overwrite demuxer FPS value
If the --fps option was given (MPOpts->force_fps), the demuxer FPS value
was overwritten with the forced value. This was fine, since the demuxer
value wasn't needed anymore. But with the recent changes not to write to
the demuxer stream headers, we don't want to do this anymore. So
maintain the (forced/updated) FPS value in dec_video->fps.

The removed code in loadfile.c is probably redundant, and an artifact
from past refactorings.

Note that sub.c will now always use the demuxer FPS value, instead of
the user override value. I think this is fine, because it used the
demuxer's video size values too. (And it's rare that these values are
used at all.)
2013-11-23 21:41:40 +01:00
wm4
de68b8f23c video: move handling of container vs. stream AR out of vd_lavc.c
Now the actual decoder doesn't need to care about this anymore, and it's
handled in generic code instead. This simplifies vd_lavc.c, and in
particular we don't need to detect format changes in the old way
anymore.
2013-11-23 21:40:51 +01:00
wm4
215b3cedda ao_rsound: fix option types
These are option values, and the option code expects char*.

Not actually tested.
2013-11-23 21:40:33 +01:00
wm4
4c2fb8f3a2 dec_video: make vf_input and hwdec_info statically allocated
The only reason why these structs were dynamically allocated was to
avoid recursive includes in stheader.h, which is (or was) a very central
file included by almost all other files. (If a struct is referenced via
a pointer type only, it can be forward referenced, and the definition of
the struct is not needed.) Now that they're out of stheader.h, this
difference doesn't matter anymore, and the code can be simplified.

Also sneak in some sanity checks.
2013-11-23 21:39:07 +01:00
wm4
02f96efc50 dec_video: remove "initialized" field
It's redundant.
2013-11-23 21:38:39 +01:00
wm4
904c73d2d2 demux: remove gsh field from sh_audio/sh_video/sh_sub
This used to be needed to access the generic stream header from the
specific headers, which in turn was needed because the decoders had
access only to the specific headers. This is not the case anymore, so
this can finally be removed again.

Also move the "format" field from the specific headers to sh_stream.
2013-11-23 21:37:56 +01:00
wm4
639e672bd1 player: rearrange how subtitle context and stream headers are used
Use sh_stream over sh_sub. Use dec_sub (and mpctx->d_sub) instead of the
stream header. This aligns the subtitle code with the recent audio and
video refactoring.

sh_sub still has the decoder context, though. This is because we want to
avoid reinit when switching segments with ordered chapters. (Reinit is
fast, except for creating the ASS_Renderer, which in turn triggers
fontconfig.) Not sure how much this matters, though, because the initial
segment switch will lazily initialize the decoder anyway.
2013-11-23 21:37:15 +01:00
wm4
3486302514 video: move decoder context from sh_video into new struct
This is similar to the sh_audio commit.

This is mostly cosmetic in nature, except that it also adds automatical
freeing of the decoder driver's state struct (which was in
sh_video->context, now in dec_video->priv).

Also remove all the stheader.h fields that are not needed anymore.
2013-11-23 21:36:20 +01:00
wm4
057af4697c options: print lavfi filter list with --vf=lavfi=help 2013-11-23 21:35:52 +01:00
wm4
e99ae17a80 options: don't prefix sub-options with "--" in help output
Commit 0cb9227a added this to the option list help output, but it looks
strange with sub-options.
2013-11-23 21:35:03 +01:00
wm4
b5ed614839 options: implement --pphelp differently
Make it work via --vf=pp:help instead.
2013-11-23 21:34:24 +01:00
wm4
25855059af video: remove vf_pp auto-insertion
This drops the --pp option, which was probably broken for a while. The
option automatically inserted the "pp" filter. The value passed to it
was ignored (which is probably broken, it always selected maximal
quality).

Inserting this filter can be done simply with --vf=pp, so this is not
needed anymore.
2013-11-23 21:30:56 +01:00
wm4
8260590346 options: provide a way for --vf to print custom help
Useful in rather special situations. See following commits.
2013-11-23 21:29:05 +01:00
wm4
acfeb869a3 video: merge vd.c into dec_video.c
I don't feel like the separation ever made sense, and it was hard to
tell which file a function you were looking for was in.
2013-11-23 21:28:28 +01:00
wm4
4fa2babacc video: move struct mp_hwdec_info into its own header file
This means most code accessing this struct must now include hwdec.h
instead of dec_video.h. I just put it into dec_video.h at first because
I thought a separate file would be a waste, but it's more proper to do
it this way, as there are too many files which include dec_video.h only
to get the mp_hwdec_info definition.
2013-11-23 21:26:31 +01:00
wm4
9f4820f6ec audio: remove ad_driver.preinit
This never had any real use. Get rid of dec_audio.initialized too, as
it's redundant.
2013-11-23 21:26:04 +01:00
wm4
0e84dafdf0 player: remove printing of barely correct slave mode stream info
This was printed before something was decoded, and thus was not really
correct. Also, this code is hilariously broken:

        /* Assume FOURCC if all bytes >= 0x20 (' ') */
        if (sh_audio->format >= 0x20202020)
            mp_msg(MSGT_IDENTIFY, MSGL_INFO,
                   "ID_AUDIO_FORMAT=%.4s\n", (char *)&sh_audio->format);

Time to kill it.

This information can be accessed through properties instead.
2013-11-23 21:25:32 +01:00
wm4
e174d31fdd audio: don't write decoded audio format to sh_audio
sh_audio is supposed to contain file headers, not whatever was decoded.
Fix this, and write the decoded format to separate fields in the decoder
context, the dec_audio.decoded field. (Note that this field is really
only needed to communicate the audio format from decoder driver to the
generic code, so no other code accesses it.)
2013-11-23 21:25:05 +01:00
wm4
0f5ec05d8f audio: move decoder context from sh_audio into new struct
Move all state that basically changes during decoding or is needed in
order to manage decoding itself into a new struct (dec_audio).

sh_audio (defined in stheader.h) is supposed to be the audio stream
header. This should reflect the file headers for the stream. Putting the
decoder context there is strange design, to say the least.
2013-11-23 21:22:17 +01:00
Stefano Pigozzi
705a7310e6 build: remove unused mng fragment 2013-11-23 16:17:53 +01:00
Stefano Pigozzi
55ce26e454 build: also run the test binary during the lua checks 2013-11-23 16:17:53 +01:00
Stefano Pigozzi
f315c93302 build: fix lua check to actually test for libquvi 2013-11-23 16:17:52 +01:00
Stefano Pigozzi
26f8887422 build: fix missing prototypes in lua check fragment 2013-11-23 16:17:52 +01:00
Stefano Pigozzi
22d8cdfe90 build: use static instead of prototype in libavfilter fragment 2013-11-23 16:17:52 +01:00
Stefano Pigozzi
3a0ce6acb9 build: fix libavfilter check to include function prototype
Apparently the check error'ed on some compilers for missing prototype and
simply adding one fixes it.
2013-11-23 14:55:55 +01:00
Stefano Pigozzi
60521783c3 build: fix install path for manual
Appending man1 to the MANDIR was forgotten, so the manual was installed in the
wrong path.
2013-11-23 11:35:16 +01:00
Stefano Pigozzi
add439b06b README: mention build result being located at build/mpv 2013-11-23 11:14:22 +01:00
Stefano Pigozzi
bc38a2736d build: make sure cwd is in Python's sys.path
Apparently some packaging systems (homebrew does this for example) change
`sys.path` before they run any Python script to ensure that only the correct
Python modules can be loadable.

We need to make sure cwd is in `sys.path` since we need to load
`wscript_build.py` from there.
2013-11-23 10:58:19 +01:00
Stefano Pigozzi
1748928e45 mp_ring: fix comment typo 2013-11-22 19:12:43 +01:00
Stefano Pigozzi
a8976464ca build: remove abusive comment
The check seems to be working anyway, even without sys/video.h. So ./configure
was maybe wrong.
2013-11-22 19:12:43 +01:00
Stefano Pigozzi
7475f7d957 build: remove spam generated by link task
Simply override the cprogram Task's __str__ method with our own implementation.
This is way easier on the eyes when compiling mpv during development, since
warnings are not pushed outside of your average screenful of content.
2013-11-22 19:12:43 +01:00
wm4
20d354cc0c vo_opengl: fix compilation
Never do a trivial change while drunk and without actually testing it.
2013-11-22 19:08:14 +01:00
wm4
de22d2b1ba vf_vavpp: make it work with vo_opengl and software decoding
vo_opengl always loads the hwdec backend lazily, so hwdec_request_api()
has to be called to possibly load it. This makes vf_vavpp work with
software decoding. (Hardware decoding loads the backend before the
filter is initialized, so this case is different.)

Also, the VFCTRL_GET_HWDEC_INFO call doesn't need to be checked. If it
fails, the info will be left blank.
2013-11-22 18:06:34 +01:00
wm4
0619272767 vo_opengl: initialize all fields for VFCTRL_GET_HWDEC_INFO
This initialized only the load_api and load_api_ctx fields, and left the
other fields as they were. This failed with vf_vavpp, which assumed all
fields are initialized.
2013-11-22 18:06:14 +01:00
wm4
f5eed454d4 build: unbreak PVR configure test 2013-11-22 14:55:19 +01:00
enkore
87a7886005 manpage: document , mapping (frame_back_step)
See #356
2013-11-22 13:07:36 +01:00
wm4
f405a468ae input.conf: fix typo 2013-11-22 13:00:26 +01:00
Josh Driver
5e6d9998f5 Fixing list of vo's that vavpp works with, in man page. 2013-11-22 11:39:26 +01:00
Stefano Pigozzi
3f594c2e84 cocoa: use window-scale to support video scaling functionality
In the cocoa backend you can use cmd+0/1/2 to scale the window. This commit
makes it use the new window-scale functionality.
2013-11-22 08:43:02 +01:00
Stefano Pigozzi
ede608ed43 cocoa: implement window-scale 2013-11-22 08:41:34 +01:00
Stefano Pigozzi
7e2edad8ef switch the build system to waf
This commit adds a new build system based on waf. configure and Makefile
are deprecated effective immediately and someday in the future they will be
removed (they are still available by running ./old-configure).

You can find how the choice for waf came to be in `DOCS/waf-buildsystem.rst`.
TL;DR: we couldn't get the same level of abstraction and customization with
other build systems we tried (CMake and autotools).

For guidance on how to build the software now, take a look at README.md
and the cross compilation guide.

CREDITS:
This is a squash of ~250 commits. Some of them are not by me, so here is the
deserved attribution:

 - @wm4 contributed some Windows fixes, renamed configure to old-configure
   and contributed to the bootstrap script. Also, GNU/Linux testing.
 - @lachs0r contributed some Windows fixes and the bootstrap script.
 - @Nikoli contributed a lot of testing and discovered many bugs.
 - @CrimsonVoid contributed changes to the bootstrap script.
2013-11-21 21:22:36 +01:00
wm4
0cb9227a73 options: prefix options with "--" in help output
This is Better(tm).
2013-11-21 16:19:23 +01:00
wm4
5dca96c1a4 stream_lavf: fix a small memory leak
Also add an explanation why this special code path for rtsp is needed.
2013-11-21 16:16:08 +01:00
wm4
d585382f0e timeline: reject mplayer2 EDL files, change EDL header
This was forgotten when the parser for mplayer2 EDL files was removed.

Change the header of the mpv EDL format to include a '#', so a naive
parser could skip the header as comment. (Maybe this is questionable;
on the other hand, if it can be simpler, why not.)

Also, strip the header in demux_edl.c before passing on the data, so the
header check doesn't need to be duplicated in tl_mpv_edl.c.
2013-11-21 15:59:00 +01:00
wm4
287d2e0603 tech-overview.txt: minor update 2013-11-20 18:16:20 +01:00
wm4
801ff8319f ta: fix typo in comment 2013-11-20 18:13:05 +01:00
wm4
31fc48f0a8 osdep/io.c: include config.h
This possibly enables code that has never been tested before
(accidentally), so let's hope this works out ok.
2013-11-20 18:12:58 +01:00
wm4
702962878b mplayer: fix passing size_t as %d to printf() 2013-11-20 18:12:14 +01:00
wm4
52467b2ac9 timeline: remove support for the mplayer2 EDL format
It was a bit too complicated and inconvenient, and I doubt anyone
actively used it. The mpv EDL format should cover all use cases.
2013-11-19 22:44:08 +01:00
wm4
f197198ca3 player: add --merge-files option 2013-11-19 22:39:14 +01:00