summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* stream_bluray: check AACS and BD+ protectionsxylosper2014-03-301-5/+80
| | | | | | | There are two kind of encryption for Blu-ray disc, AACS and BD+, and both of them can be checked through BLURAY_DISC_INFO object. This commit makes the bluray and bdnav streams refuse playback if AACS/BD+ is detected and decryption is failed.
* audio: remove sample rate limit checkswm42014-03-301-7/+1
| | | | | | | | | | | This played the file at a wrong sample rate if the rate was out of certain bounds. A comment says this was for the sake of libaf/af_resample.c. This resampler has been long removed. Our current resampler (libav/swresample) checks supported sample rates on reconfiguration, and will error out if a sample rate is not supported. And I think that is the correct behavior.
* player: dvdnav: fix start time when entering and leaving menuwm42014-03-301-0/+4
| | | | | Unfortunately, quite a hack, because we have check the nav state outside of discnav.c.
* Merge remote-tracking branch 'mpv/pr/676'wm42014-03-3012-182/+566
|\
| * player: rename dvdnav to discnavxylosper2014-03-3011-29/+30
| | | | | | | | | | Now, navigation works both of DVD and non-BD-J Blu-ray. Therefore, rename all 'dvdnav' strings which are not DVD specific to 'discnav'
| * stream_bluray: cosmetic refactoringxylosper2014-03-301-74/+33
| | | | | | | | | | Remove unused variables. Declare variables when they are needed. Adjust brackets for mpv's convention. Clean up too many empty lines.
| * stream_bluray: select initial angle only if peeking title succeededxylosper2014-03-301-39/+52
| | | | | | | | | | | | The angles should be set and queried only if a valid title is selected. Also, in navigation mode, there are some limitations which make it impossible to query current title/angle.
| * stream_bluray: use more proper error code for stream controlxylosper2014-03-301-7/+7
| | | | | | | | | | | | Use STREAM_OK instead of hardcoded value 1. Handle failure of setting title as an unsupported behaviour rather than an error.
| * stream_bluray: implement navigation interface for Blu-ray streamxylosper2014-03-294-71/+482
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit introduces new stream protocols: bdnav(and others). bdnav stream shares lots of codes with original bluray stream, so it's not separated in different source file. Major difference from bluray is that bdnav does not support longest title because there is no way to query that information. bdnav://menu and bdnav://first correspond to top menu title and first play title respectively, though they often point same title. Also, binary position based seeking has been removed, because it didn't have no point.
* | manpage: remove misleading description for --ontopStefano Pigozzi2014-03-291-2/+1
| | | | | | | | | | Pretty much all the VOs and backends support this, so there is no point in listing only X11 and corevideo support.
* | Fix compilation on OSX and win32wm42014-03-292-2/+1
| | | | | | | | Probably.
* | video/out: remove legacy colorspace stuffwm42014-03-2913-144/+115
| | | | | | | | | | | | | | | | | | Reduce most dependencies on struct mp_csp_details, which was a bad first attempt at dealing with colorspace stuff. Instead, consistently use mp_image_params. Code which retrieves colorspace matrices from csputils.c still uses this type, though.
* | mp_image: add missing field to mp_image_params_equals()wm42014-03-281-0/+1
|/ | | | | | This is pretty obscure, so it didn't matter much. It still breaks switching output levels at runtime, because the video output is not reinitialized with the new params.
* af_volume: fix replaygainwm42014-03-271-2/+3
| | | | | | | | This was accidentally broken in commit b72ba3f7. I somehow made the wild assumption that replaygain adjusted the volume relative to 0% instead of 100%. The detach suboption was similarly broken.
* stream_bluray: remove BD_EVENT_IDLEwm42014-03-261-3/+0
| | | | | | | | This was actually supposed to be removed with pull reuqest #671, but I accidentally re-added it with a rebasing mistake. This probably also coincidentally fixes compilation with older libbluray (issue #672).
* stream_bluray: use bd_get_playlist_info()xylosper2014-03-261-4/+10
| | | | | | | | Use bd_get_playlist_info() instead of bd_get_title_info(). The previous implementation couldn't query current playlist and this made it impossible to call bd_get_playlist_info() which is more desirable than bd_get_title_info() because, for Blu-rays, playlist is the unit of playback not title. This commit fixes that.
* stream_bluray: cache current playback informationsxylosper2014-03-261-20/+34
| | | | | | | | The cost of calling bd_get_title_info() is quite expensive and requires lots of CPU usage. Using BD_EVENT_PLAYLIST and BD_EVENT_TITLE, it's possible to cache BLURAY_TITLE_INFO object for current title and BD_EVENT_ANGLE handler caches current angle. In my test case, with this commit, CPU usage can be saved about 15-20%.
* stream_bluray: implement event handler for libblurayxylosper2014-03-261-0/+16
| | | | | | This commit brings libbluray's event queue into stream_bluray. Signed-off-by: wm4 <wm4@nowhere>
* mf: fix operation with --cachewm42014-03-261-0/+1
| | | | | | | | | | | | demux_mf.c explicitly checks for the stream type to check whether images are opened via pattern (mf://..., i.e. stream_mf.c) or directly. Of course the stream type is not set to STREAMTYPE_MF if the stream is wrapped through the cache, so it tried to open the pattern directly as file, which failed. Fix this by disabling caching for mf://. The cache doesn't make sense here anyway, because each file is opened and closed every frame (perhaps to avoid memory bloat).
* player: fix unchecked access for chapter metadatawm42014-03-261-3/+1
| | | | | | | | | | It's possible that MPContext has a chapter list, but the demuxer doesn't. In this case, accesing the chapter-metadata property would lead to invalid accesses. (This fixes the out of bound access, but in theory, the returned data can still be incorrect, since MPContext chapters don't need to map directly to demuxer chapters.)
* stream_cdda: print cd text header only if there are any cd text fieldswm42014-03-261-2/+6
|
* stream_cdda: remove unused stuffwm42014-03-265-254/+3
| | | | | | This cd_info_t struct was practically unused. The only thing it did was storing the track name of the form "Track %d" in a very roundabout way. Remove it. (It made more sense when there was still CDDB support.)
* stream_cdda: fix track time accuracywm42014-03-261-2/+2
| | | | | | | | | | Don't use an integer division to get the time, since that would round on second boundaries. Also round up the time by sector size. Seeking rounds down due to alignment constraints, but if we round up the time, we can make it land on the exact destination sector. This fixes that the track change code printed the previous track when seeking by chapter.
* dvdnav: fix minor memory leakwm42014-03-251-0/+1
| | | | | | This was usually handled at the end of the switch statement, so if something returns from the function before that, the event has to be freed explicitly.
* dvdnav: check and update video resolution whenever renderingxylosper2014-03-251-14/+25
| | | | | | | Previous implementation updated video resolution when highlight event was given. However, this may not work if highlight event is given before video size is queried. This commit adds checking routine into rendering function, too.
* dvdnav: make MP_NAV_EVENT_RESET_ALL handled properlyxylosper2014-03-252-31/+40
| | | | | | | | | | | dvdnav.c did not handle event in regular sequence. Usually this does not make any trouble except around MP_NAV_EVENT_RESET_ALL. Those events should be handled in regular sequence. If they're mixed, it can make wrong result. For instance, MP_NAV_EVENT_HIGHLIGHT right after MP_NAV_EVENT_RESET_ALL should not be ignored but it might be because MP_NAV_EVENT_RESET_ALL makes the demuxer reloaded and osd hidden.
* dvdnav: prevent reallocation of fake highlight bufferxylosper2014-03-251-0/+2
| | | | | Since subsizes were never updated, the bitmap buffer was always reallocated whenever mp_nav_get_highlight() called.
* player: use MP_NOPTS_VALUE as rel_time_to_abs() error valuewm42014-03-254-16/+15
| | | | | | And consistently use MP_NOPTS_VALUE as error value for the users of this function. This is better than using -1, especially because negative values can be valid timestamps.
* player: handle chapter range like --start/--endwm42014-03-252-8/+8
| | | | | | | | | | | Instead of comparing the current chapter every time, set the playback end timestamp to the chapter end. Likewise, don't execute an extra seek for the start chapter. Maybe we could also use the timeline facility to restrict playback to the given chapter range, but this would be strange when using --chapter=N to start playback at a given chapter. Then you couldn't seek back, which is possibly not what the user wants.
* player: let chapter_start_time() return MP_NOPTS_VALUE for unknown timeswm42014-03-253-4/+4
|
* player: remove weird separation between no chapters and 0 chapterswm42014-03-252-17/+11
| | | | | | For some reason, it mattered whether mpctx->chapters was NULL or not, even if mpctx->num_chapters was 0. Remove this separation; it serves no purpose.
* player: remove demuxer chapoter API wrapperswm42014-03-255-108/+39
| | | | | | Instead, always use the mpctx->chapters array. Before this commit, this array was used only for ordered chapters and such, but now it's always populated if there are chapters.
* stream: remove old chapter handling codewm42014-03-257-144/+11
| | | | | | | | Stream-level chapters (like DVD etc.) did potentially not have timestamps for each chapter, so STREAM_CTRL_SEEK_TO_CHAPTER and STREAM_CTRL_GET_CURRENT_CHAPTER were needed to navigate chapters. We've switched everything to use timestamps and that seems to work, so we can simplify the code and remove this old mechanism.
* stream_cdda: report track timeswm42014-03-251-27/+8
| | | | | | | | | Report the time for each chapter (tracks are treated as chapters). This allows us to get rid of the "old" chapter mechanism, and also behaves better with the frontend. This makes assumptions about the audio formats, but that format is hardcoded anyway in the rawaudio demuxer defaults (and always was).
* vo_opengl: runtime icc profile switchingwm42014-03-242-19/+40
| | | | | The changes in vo_opengl.c are merely for adding the icc options to the set of options than can be changed with the vo_cmdline command.
* stream_bluray: fix for significant memory leakxylosper2014-03-241-0/+1
| | | | | It's obvious but, since STREAM_CTRL_GET_TIME_LENGTH is called frequently, the amount of leaked memory here is quite big.
* travis-ci: update Libav releasewm42014-03-242-1/+2
| | | | | | | | Libav 10 was released, so we can enable testing the stable Libav version again. FFmpeg 2.2 was also released, but since we still support 2.1.4, we stick with the older version. This is better for testing.
* player: remove confusing argc/argv adjustmentwm42014-03-232-7/+2
| | | | It's better if argc/argv always mean the same thing.
* x11_common: fix some problems with window draggingwm42014-03-221-1/+2
| | | | | | | | | | | | | | | | There were some bad interactions with the OSC. For one, dragging the OSC bar, and then moving the mouse outside of the OSC (while mouse button still held) would suddenly initiate window dragging. This was because win_drag_button1_down was not reset when sending a normal mouse event, which means the window dragging code can become active even after we've basically decided that the preceding click didn't initiate window dragging. Second, dragging the window and clicking on the OSC bar after that did nothing. This was because no mouse button up event was sent to the core, even though a mouse down event was sent. So make sure the key state is erased with MP_INPUT_RELEASE_ALL.
* manpage: osc: document some recent additionswm42014-03-201-0/+27
|
* manpage: clarify what to pass to --hwdec-codecs optionwm42014-03-201-1/+3
|
* vdpau: remove pointer indirection for a fieldwm42014-03-195-14/+13
| | | | There's no reason to. This is basically a cosmetic change.
* vdpau: fix decoder init return valuewm42014-03-191-3/+3
|
* x11: implement window dragging by grabbingwm42014-03-182-1/+37
| | | | | | | | | | | | | | | | | | We don't check whether the WM supports _NET_WM_MOVERESIZE_MOVE, but if it doesn't, nothing bad happens. There might be a race condition when pressing a button, and then moving the mouse and releasing the button at the same time; then the WM might get the message to initiate moving the window after the mouse button has been released, in which case the result will probably be annoying. This could possibly be fixed by sending _NET_WM_MOVERESIZE_CANCEL on button release, but on the other hand, we probably won't receive a button release event in this situation, so ignore this problem. The dragging is initiated only when moving the mouse pointer after a click in order to reduce annoying behavior when the user is e.g. doubleclicking. Closes #608.
* manpage: mark disc-title as writeablewm42014-03-181-2/+3
|
* stream_bluray: fix for zero-based title index for Blu-rayxylosper2014-03-181-7/+11
| | | | | | | | | | The title for stream_bluray DID start from 1 and I misunderstood that it started from 0 because mpv accepted bd://0 as a proper argument. In fact, 0 title was an alias for the longest title but it was not handled as a special value. This commit fixes these behavious. 'disc-title' property for Blu-ray now starts from 0 and the default title can be specified by 'longest' title just like stream_dvdnav: bd://longest. Of course, 'longest' can be omitted.
* command: make 'disc-title' property writablexylosper2014-03-182-3/+16
| | | | | | | | This commit makes 'disc-title' property writable using STREAM_CTRL_SET_CURRENT_TITLE. This commit also contains implementation of STREAM_CTRL_SET_CURRENT_TITLE for stream_bluray. Currently, 'disc-title' is writable only for stream_dvdnav and stream_bluray and stream_dvd is not supported.
* changes.rst: add dvd://1 -> dvd://0 changewm42014-03-171-0/+1
| | | | Done two commits ago.
* options: fix allowed DVD start titlewm42014-03-171-1/+1
|
* stream_dvd/stream_dvdnav: make disc-title for DVDs start from 0xylosper2014-03-172-27/+35
| | | | | | | | This commit makes 'disc-title' properties for DVDs start from 0. There was an inconsistency around 'disc-title' property between DVDs (from 1) and Blu-rays (from 0). This fixes #648. Signed-off-by: wm4 <wm4@nowhere>
* build: only check for Linux fstatfs on LinuxJames Ross-Gowan2014-03-171-0/+1
| | | | | | This check incorrectly passed on Cygwin. While Cygwin has the statfs.f_type field, it contains the volume's FileSystemAttributes, which aren't useful for detecting network mounts.
* osc: add enable/disable message, and map DEL to disabling the OSCwm42014-03-171-0/+14
| | | | | | | | | "enable-osc" will make the OSC appear at any time (although it'll quickly disappear again if the mouse is not inside the OSC). "disable- osc" will make it disappear permanently. Also, if the OSC is visible, force remap the DEL key to make the OSC disappear.
* lua: rename mp.register_script_command() to mp.register_script_message()wm42014-03-172-18/+18
| | | | More consistent naming.
* command, lua: change script_message semanticswm42014-03-177-17/+54
| | | | | | | | Change script_message to broadcast the message to all clients. Add a new script_message_to command, which does what the old script_message command did. This is intended as simplification, although it might lead to chaos too.
* vaapi: solve potential problem with ambiguous image formatswm42014-03-171-32/+27
| | | | | | | | | | | | | VAAPI has some ambiguous image formats, like VA_FOURCC_I420, VA_FOURCC_IYUV, VA_FOURCC_YV12 (the latter exactly the same as the first two, just with swapped planes). There is potentially a problem when one specific VAAPI format was picked, and converting it to a mpv format and back to a VAAPI FourCC would result in a numerically different format (even if it's actually the same). Then it could e.g. happen that functions like va_surface_upload() reallocate the underlying VAImage, which would be inefficient. Change the code so that this can't happen. (Probably not a problem in practice with the current VAAPI usage.)
* vaapi: simplifywm42014-03-171-67/+60
| | | | Merge va_surface_priv into va_surface.
* vaapi: make struct va_surface privatewm42014-03-176-90/+78
| | | | | | It's not really needed to be public. Other code can just use mp_image. The only disadvantage is that the other code needs to call an accessor to get the VASurfaceID.
* vaapi: replace image pool implementation with mp_image_poolwm42014-03-175-241/+152
| | | | | | | | | | | | Although I at first thought it would be better to have a separate implementation for hwaccels because the difference to software images are too large, it turns out you can actually save some code with it. Note that the old implementation had a small memory management bug. This got painted over in commit 269c1e1, but is hereby solved properly. Also note that I couldn't test vf_vavpp.c (due to lack of hardware), and I hope I didn't accidentally break it.
* mp_image_pool: add features needed for use with hwaccelwm42014-03-172-18/+69
| | | | | | | | | | | | | | The plan is to get rid of the custom VAAPI and possibly VDPAU surface allocators. Add custom surface allocation, because hwaccel surfaces are allocated completely differently from software surfaces. Add optional LRU allocation, which is (probably) helpful for hwaccel, but (probably) less optimal for software surfaces. mp_image_pool_get_no_alloc() is specifically for VAAPI, which can't allocate new decoder surfaces after decoder init.
* vdpau: remove legacy pixel formatswm42014-03-176-41/+10
| | | | | | They were used by ancient libavcodec versions. This also removes the need to distinguish vdpau image formats at all (since there is only one), and some code can be simplified.
* vdpau: remove unused typewm42014-03-171-6/+0
|
* video: change image format from unsigned int to int in some placeswm42014-03-176-12/+12
| | | | | | Image formats used to be FourCCs, so unsigned int was better. But now it's annoying and the only difference is that unsigned int is more to type than int.
* img_format: AV_PIX_FMT_FLAG_ALPHA is always availablewm42014-03-171-5/+0
| | | | We no more support ancient libavutil versions.
* vd_lavc: reinit hwdec on profile changeswm42014-03-172-2/+6
| | | | | Needed in theory. I don't know if there are even any real-world files which change the profile mid-stream.
* video: fix FFmpeg or Libav being a special snowflakewm42014-03-161-1/+2
|
* vd_lavc: remove unused fieldwm42014-03-162-3/+0
|
* vd_lavc: reduce hardware decoder mid-stream reinitializationswm42014-03-161