summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* travis: disable e-mail notificationsStefano Pigozzi2013-11-231-0/+1
|
* vd_lavc: when falling back to software, revert filter error statuswm42013-11-231-0/+2
| | | | | | | | | | | | | | | | | | | When mpv is started with some video filters set (--vf is used), and hardware decoding is requested, and hardware decoding would be possible, but is prevented due to video filters that accept software formats only, the fallback didn't work properly sometimes. This fallback works rather violently: it tries to initialize the filter chain, and if it fails it throws away the frame decoded using the hardware, and retries with software. The case that didn't work was when decoding the current packet didn't immediately lead to a new frame. Then the filter chain wouldn't be reinitialized, and the playloop would stop playback as soon as it encounters the error flag. Fix this by resetting the filter error flag (back to "uninitialized"), which is a rather violent, but somewhat working solution. The fallback in general should perhaps be cleaned up later.
* Reduce stheader.h includes, move stream types to mp_common.hwm42013-11-2312-15/+12
|
* Attempt to fix build on older libavcodec versionswm42013-11-232-0/+2
|
* audio: respect --end/--length with spdif passthroughwm42013-11-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | In theory, we can't really do this, because we don't know when a spdif frame ends. Spdif transports compressed audio through audio setups that were originally designed for PCM only (which includes the audio filter chain, the AO API, most audio output APIs, etc.), and to reach this goal, spdif pretends to be PCM. Compressed data frames are padded with zeros, until a certain data rate is reached, which corresponds to a pseudo-PCM format with 2 bytes per sample and 2 channels at 48000 Hz. Of course an actual spdif frame is significantly larger than a frame of the PCM format it pretends to be, so cutting audio data on frame boundaries (as according to the pseudo-PCM format) merely yields an incomplete and broken frame, not audio that plays for the desired duration. However, sending an incomplete frame might still be much better than the current behavior, which simply ignores --end/--length (but still lets the video end at the exact end time). Should this result in trouble with real spdif receivers, this commit probably has to be reverted.
* video: don't overwrite demuxer FPS valuewm42013-11-234-26/+18
| | | | | | | | | | | | | | | | 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.)
* video: move handling of container vs. stream AR out of vd_lavc.cwm42013-11-234-39/+34
| | | | | | | 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.
* ao_rsound: fix option typeswm42013-11-231-2/+2
| | | | | | These are option values, and the option code expects char*. Not actually tested.
* dec_video: make vf_input and hwdec_info statically allocatedwm42013-11-236-18/+14
| | | | | | | | | | | 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.
* dec_video: remove "initialized" fieldwm42013-11-233-16/+9
| | | | It's redundant.
* demux: remove gsh field from sh_audio/sh_video/sh_subwm42013-11-2312-76/+71
| | | | | | | | | 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.
* player: rearrange how subtitle context and stream headers are usedwm42013-11-235-54/+57
| | | | | | | | | | | | 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.
* video: move decoder context from sh_video into new structwm42013-11-2318-411/+410
| | | | | | | | | | 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.
* options: print lavfi filter list with --vf=lavfi=helpwm42013-11-231-0/+40
|
* options: don't prefix sub-options with "--" in help outputwm42013-11-233-1/+4
| | | | | Commit 0cb9227a added this to the option list help output, but it looks strange with sub-options.
* options: implement --pphelp differentlywm42013-11-237-9/+10
| | | | Make it work via --vf=pp:help instead.
* video: remove vf_pp auto-insertionwm42013-11-238-40/+1
| | | | | | | | | | 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.
* options: provide a way for --vf to print custom helpwm42013-11-232-13/+18
| | | | Useful in rather special situations. See following commits.
* video: merge vd.c into dec_video.cwm42013-11-234-177/+138
| | | | | 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.
* video: move struct mp_hwdec_info into its own header filewm42013-11-2313-23/+31
| | | | | | | | 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.
* audio: remove ad_driver.preinitwm42013-11-236-34/+13
| | | | | This never had any real use. Get rid of dec_audio.initialized too, as it's redundant.
* player: remove printing of barely correct slave mode stream infowm42013-11-231-35/+0
| | | | | | | | | | | | | | 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.
* audio: don't write decoded audio format to sh_audiowm42013-11-237-56/+55
| | | | | | | | 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.)
* audio: move decoder context from sh_audio into new structwm42013-11-2315-291/+327
| | | | | | | | | 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.
* build: remove unused mng fragmentStefano Pigozzi2013-11-231-7/+0
|
* build: also run the test binary during the lua checksStefano Pigozzi2013-11-231-2/+3
|
* build: fix lua check to actually test for libquviStefano Pigozzi2013-11-231-5/+8
|
* build: fix missing prototypes in lua check fragmentStefano Pigozzi2013-11-231-2/+2
|
* build: use static instead of prototype in libavfilter fragmentStefano Pigozzi2013-11-231-2/+1
|
* build: fix libavfilter check to include function prototypeStefano Pigozzi2013-11-231-0/+1
| | | | | Apparently the check error'ed on some compilers for missing prototype and simply adding one fixes it.
* build: fix install path for manualStefano Pigozzi2013-11-231-1/+1
| | | | | Appending man1 to the MANDIR was forgotten, so the manual was installed in the wrong path.
* README: mention build result being located at build/mpvStefano Pigozzi2013-11-231-2/+3
|
* build: make sure cwd is in Python's sys.pathStefano Pigozzi2013-11-231-0/+1
| | | | | | | | | 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.
* mp_ring: fix comment typoStefano Pigozzi2013-11-221-1/+1
|
* build: remove abusive commentStefano Pigozzi2013-11-221-1/+0
| | | | | The check seems to be working anyway, even without sys/video.h. So ./configure was maybe wrong.
* build: remove spam generated by link taskStefano Pigozzi2013-11-221-0/+4
| | | | | | 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.
* vo_opengl: fix compilationwm42013-11-221-2/+2
| | | | Never do a trivial change while drunk and without actually testing it.
* vf_vavpp: make it work with vo_opengl and software decodingwm42013-11-223-5/+5
| | | | | | | | | | 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.
* vo_opengl: initialize all fields for VFCTRL_GET_HWDEC_INFOwm42013-11-221-4/+8
| | | | | | 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.
* build: unbreak PVR configure testwm42013-11-221-1/+1
|
* manpage: document , mapping (frame_back_step)enkore2013-11-221-0/+4
| | | | See #356
* input.conf: fix typowm42013-11-221-1/+1
|
* Fixing list of vo's that vavpp works with, in man page.Josh Driver2013-11-221-4/+4
|
* cocoa: use window-scale to support video scaling functionalityStefano Pigozzi2013-11-223-6/+10
| | | | | 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.
* cocoa: implement window-scaleStefano Pigozzi2013-11-221-0/+20
|
* switch the build system to wafStefano Pigozzi2013-11-2149-119/+2480
| | | | | | | | | | | | | | | | | | | | | | | 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.
* options: prefix options with "--" in help outputwm42013-11-211-1/+1
| | | | This is Better(tm).
* stream_lavf: fix a small memory leakwm42013-11-211-1/+5
| | | | Also add an explanation why this special code path for rtsp is needed.
* timeline: reject mplayer2 EDL files, change EDL headerwm42013-11-214-16/+10
| | | | | | | | | | | 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.
* tech-overview.txt: minor updatewm42013-11-201-2/+2
|
* ta: fix typo in commentwm42013-11-201-1/+1
|
* osdep/io.c: include config.hwm42013-11-201-0/+2
| | | | | This possibly enables code that has never been tested before (accidentally), so let's hope this works out ok.
* mplayer: fix passing size_t as %d to printf()wm42013-11-201-1/+1
|
* timeline: remove support for the mplayer2 EDL formatwm42013-11-194-540/+1
| | | | | It was a bit too complicated and inconvenient, and I doubt anyone actively used it. The mpv EDL format should cover all use cases.
* player: add --merge-files optionwm42013-11-196-0/+38
|
* timeline: add edl:// URIswm42013-11-199-3/+45
| | | | | Questionable change from user perspective, but internally needed to implement the next commit. Also useful for testing timeline stuff.
* timeline: add new EDL formatwm42013-11-196-8/+385
| | | | | | | | | | Edit Decision Lists (EDL) allow combining parts from multiple source files into one virtual file. MPlayer had an EDL format (which sucked), which mplayer2 tried to improve with its own format (which sucked). As logic demands, mpv introduces its very own format (which sucks). The new format should actually be much simpler and easier to use, and its implementation is simpler and smaller too.
* manpage: fix typo in --video-align-y descriptionwm42013-11-191-1/+1
|
* player: select fallback stream in timeline code for better EDL handlingwm42013-11-191-0/+23
| | | | | | | The intention of the existing code was trying to match demuxer-reported stream IDs, instead of using possibly arbitrary ordering of the frontend track list. But EDL files can consist of quite different files, for which trying to match the stream IDs doesn't always make sense.
* player: deselect video track if initialization failswm42013-11-191-0/+1
| | | | | | This didn't have any consequences, other than suddenly reinitializing video when it works again (such as with EDL timeline mixing video and audio-only files).
* vdpau_old: enable OpenGL interopwm42013-11-191-0/+1
| | | | | OpenGL interop was essentially disabled, because the decoder didn't request vdpau device creation from vo_opengl.
* ao_null: fix simulated buffer sizewm42013-11-191-1/+1
| | | | | The size accidentally defaulted to 200 seconds instead of 200 milliseconds, which had fatal consequences when trying to use it.
* audio/filter: rename af_tools.c to tools.cwm42013-11-182-1/+1
| | | | This always bothered me.
* demux: rename demux_packet.h to packet.hwm42013-11-186-6/+6
| | | | This always bothered me.
* audio: drop buffered filter data when seekingwm42013-11-185-0/+27
| | | | | This could lead to (barely) audible artifacts with --af=scaletempo and modified playback speed.
* audio/filter: remove unneeded AF_CONTROLs, convert to enumwm42013-11-1816-249/+74
| | | | | | | | The AF control commands used an elaborate and unnecessary organization for the command constants. Get rid of all that and convert the definitions to a simple enum. Also remove the control commands that were not really needed, because they were not used outside of the filters that implemented them.
* af: cleanup documentation commentswm42013-11-183-139/+22
| | | | | | And by "cleanup", I mean "remove". Actually, only remove the parts that are redundant and doxygen noise. Move useful parts to the comment above the function's implementation in the C source file.
* player: simplify audio reset when seekingwm42013-11-181-15/+10
| | | | | | | | | | Some decoders used to read packets and decode data when calling resync_audio_stream(). This required a special case in mp_seek() for audio. (A comment mentions liba52, which is long gone; but until recently ad_mpg123.c actually exposed this behavior.) No decoder does this anymore, and resync_audio_stream() works similar as resync_video_stream(). Remove the special case.
* stream_dvb: remove bogus free callswm42013-11-181-5/+0
| | | | | | The priv struct is now allocated by talloc in stream.c. It doesn't need to be manually freed, and using free() instead of talloc_free() probably crashes.
* vo_vdpau: don't calculate destination alpha when drawing OSDwm42013-11-181-2/+2
| | | | | | Same as MPlayer svn commit r36515 "Chose cheaper alpha blend equation." No idea if this is actually faster, but can't hurt.
* audio: use the decoder buffer's format, not sh_audiowm42013-11-182-8/+21
| | | | | | | | | | | | | | | | | | When the decoder detects a format change, it overwrites the values stored in sh_audio (this affects the members sample_format, samplerate, channels). In the case when the old audio data still needs to be played/filtered, the audio format as identified by sh_audio and the format used for the decoder buffer can mismatch. In particular, they will mismatch in the very unlikely but possible case the audio chain is reinitialized while old data is draining during a format change. Or in other words, sh_audio might contain the new format, while the audio chain is still configured to use the old format. Currently, the audio code (player/audio.c and init_audio_filters) access sh_audio to get the current format. This is in theory incorrect for the reasons mentioned above. Use the decoder buffer's format instead, which should be correct at any point.
* audio: fix mid-stream audio reconfigurationwm42013-11-183-1/+12