summaryrefslogtreecommitdiffstats
path: root/stream/stream_bluray.c
Commit message (Collapse)AuthorAgeFilesLines
* stream_bluray: always show list of available titlesRicardo Constantino2018-01-231-2/+2
|
* stream_bluray: silence libbluray's debug messages unless we want themRicardo Constantino2018-01-231-0/+4
| | | | libbluray's way too verbose on default loglevel with non-breaking issues.
* stream_bluray: support detecting UHD BD directoriesRicardo Constantino2018-01-111-10/+7
| | | | Close #5325
* stream_bluray: change license to LGPLwm42017-06-261-7/+7
| | | | | | | | While I'm not particularly attached to this, the history is pretty simple, and all relevant authors have agreed. 2f004875: removed in 2c693a47, patch author was not asked. 1ef239a4: removed, author was not asked.
* stream: get rid of streamtype enumwm42017-02-021-1/+0
| | | | | | | | | Because it's kind of dumb. (But not sure if it was worth the trouble.) For stream_file.c, we add new explicit fields. The rest are rather special uses and can be killed by comparing the stream impl. name. The changes to DVD/BD/CD/TV are entirely untested.
* stream_bluray: use proper 0-based idxRicardo Constantino2017-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Even though the title list code was copied from FFmpeg/libbluray, I didn't check that mpv used 0-based title indexing. $ mpv bd://1 --bluray-device=. --msg-level=bd=v [bd] Opening bd:// [bd] List of available titles: [bd] idx: 1 duration: 00:00:36 (playlist: 00000.mpls) [bd] idx: 2 duration: 01:31:30 (playlist: 00001.mpls) [bd] idx: 3 duration: 00:00:50 (playlist: 00003.mpls) bd://1 actually opens idx 2 from the list, not 1. bd://mpls/1 opens playlist 00001.mpls as expected. With this commit: $ mpv bd://1 --bluray-device=. --msg-level=bd=v [bd] Opening bd:// [bd] List of available titles: [bd] idx: 0 duration: 00:00:36 (playlist: 00000.mpls) [bd] idx: 1 duration: 01:31:30 (playlist: 00001.mpls) [bd] idx: 2 duration: 00:00:50 (playlist: 00003.mpls) should play the expected idx 1.
* demux, stream: add option to prevent opening referenced fileswm42016-12-041-0/+3
| | | | Quite irresponsibly hacked together. Sue me.
* stream_bluray: check title index/playlist rangeschnusch2016-10-171-6/+20
| | | | | Blu-ray title index/playlist must be in the range 0-99999, otherwise an error will be returned
* stream_bluray: select title by playlistschnusch2016-10-171-18/+34
| | | | | Blu-ray titles can now be selected by playlist number like this: bd://mpls/[playlist]
* stream_bluray: fix a minor memory leakwm42016-09-081-2/+3
|
* stream_bluray: remove weird option parsing stuffwm42016-09-081-51/+45
| | | | | | | Instead, parse manually. This is to get rid of the option API usages, which seem unnecessary and shoehorned. (Just look at the URL pseudo parsing and the dumb url_options map. They were pretty much artifacts from refactoring old mplayer code.)
* stream/stream_bluray: display list of available titles on verboseRicardo Constantino2016-08-111-0/+6
| | | | Based on similar code on FFmpeg and libbluray's list_titles example.
* mpv_talloc.h: rename from talloc.hDmitrij D. Czarkoff2016-01-111-1/+1
| | | | This change helps avoiding conflict with talloc.h from libtalloc.
* stream_bluray: remove menu implementationwm42015-08-031-358/+11
|
* Disable DVD and BD menu support (to be removed)wm42015-06-261-0/+2
| | | | | | | | | | | | | | | | | | DVD/BD menu support never worked right, and are a pain to maintain. In particular, DVD menus never actually worked correctly, because highlights were not rendered correctly. Fixing this requires major effort, which I'm not interested to spend. Most importantly, the requirement to switch streams without losing the DVD/BD state caused major weirdness in the playback core. It was implemented by somehow syncing the playback state to the DVD/BD implementation (in stream_dvdnav.c etc.), and then reloading the demuxer without destroying and recreating the stream. This caused a bunch of special-cases which I'm looking forward to remove. For now, don't just remove everything related to menu support and just disable it. If someone volunteers, it can be restored (i.e. rewritten) in a reasonable way. If nobody volunteers soon, it goes.
* Remove trailing whitespacesMichael Vetter2015-05-151-4/+4
|
* path: make mp_path_join accept normal C stringswm42015-05-091-2/+2
| | | | | Instead of bstr. Most callers of this function do not need bstr. The bstr version of this function is now mp_path_join_bstr().
* command: disc-mouse-on-button propertyxylosper2015-04-211-2/+6
| | | | | This property indicates whether mouse cursor is located on button or not for disc naviation.
* Update license headersMarcin Kurczewski2015-04-131-5/+4
| | | | Signed-off-by: wm4 <wm4@nowhere>
* stream: get rid of remaining uses of the end_pos fieldwm42015-02-061-1/+3
| | | | | | | | Most things stopped using this field for better support of growing files. Go through the trouble to repalce the remaining uses, so it can be removed. Also move the "streaming" field; saves 4 bytes (wow!).
* stream_bluray: autodetect AVCHD directorieswm42014-09-271-3/+4
| | | | Fixes #1127.
* stream_bluray: allow opening BDMV directories directlywm42014-09-261-0/+86
| | | | | | | | Similar as the previous commits. Most of the code is actually copied from the stream_dvdnav.c code, but I'd rather prefer to duplicate it, than to entangle them. The latter would probably result in terrible things in a few years.
* Revert "Remove DVD and Bluray support"wm42014-07-151-0/+831
| | | | | | This reverts commit 4b93210e0c244a65ef10a566abed2ad25ecaf9a1. *shrug*
* Remove DVD and Bluray supportwm42014-07-141-831/+0
| | | | It never worked well. Just remux your DVD and BD images to mkv.
* stream: remove now unused STREAM_CTRL_GET_START_TIMEwm42014-07-061-4/+0
| | | | demux_disc.c takes care of this now.
* dvd, bluray, cdda: add demux_disc containing all related hackswm42014-07-051-2/+1
| | | | | | | | | | | | DVD and Bluray (and to some extent cdda) require awful hacks all over the codebase to make them work. The main reason is that they act like container, but are entirely implemented on the stream layer. The raw mpeg data resulting from these streams must be "extended" with the container-like metadata transported via STREAM_CTRLs. The result were hacks all over demux.c and some higher-level parts. Add a "disc" pseudo-demuxer, and move all these hacks and special-cases to it.
* stream_bluray: fix some const declarationswm42014-06-121-6/+6
| | | | Like in commit 99f5fe.
* stream_dvd, stream_dvdnav, stream_bluray: remove global option variableswm42014-06-111-8/+7
|
* stream: remove chaos related to writeable streamswm42014-05-241-1/+1
| | | | | | | | | | For some reason, we support writeable streams. (Only encoding uses that, and the use of it looks messy enough that I want to replace it with FILE or avio today.) It's a chaos: most streams do not actually check the mode parameter like they should. Simplify it, and let streams signal availability of write mode by setting a flag in the stream info struct.
* stream: don't use end_poswm42014-05-241-1/+0
| | | | | | | | | | | | | | | | | | | Stop using it in most places, and prefer STREAM_CTRL_GET_SIZE. The advantage is that always the correct size will be used. There can be no doubt anymore whether the end_pos value is outdated (as it happens often with files that are being downloaded). Some streams still use end_pos. They don't change size, and it's easier to emulate STREAM_CTRL_GET_SIZE using end_pos, instead of adding a STREAM_CTRL_GET_SIZE implementation to these streams. Make sure int64_t is always used for STREAM_CTRL_GET_SIZE (it was uint64_t before). Remove the seek flags mess, and replace them with a seekable flag. Every stream must set it consistently now, and an assertion in stream.c checks this. Don't distinguish between streams that can only be forward or backwards seeked, since we have no such stream types.
* stream_bluray: remove unused variableswm42014-05-041-3/+0
| | | | | They were used for printing slave mode stuff, which was recently removed.
* options: remove deprecated --identifyMartin Herkt2014-05-041-11/+0
| | | | | | | Also remove MSGL_SMODE and friends. Note: The indent in options.rst was added to work around a bug in ReportLab that causes the PDF manual build to fail.
* stream_bluray: move lookup of AACS error codes into a functionwm42014-03-301-30/+16
| | | | Mostly a cosmetic change. Makes the code a little bit shorter.
* 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.
* player: rename dvdnav to discnavxylosper2014-03-301-1/+1
| | | | | 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-291-62/+439
| | | | | | | | | | | | | | 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.
* 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>
* stream: remove old chapter handling codewm42014-03-251-27/+0
| | | | | | | | 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_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.
* 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-181-1/+8
| | | | | | | | 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.
* command: set 'media-title' property for bluray disc with meta-dataxylosper2014-03-131-1/+9
|
* player: avoid stalling when starting a network streamwm42014-01-141-0/+1
| | | | | | | | | | | | Starting a network stream could stall by executing uncacheable stream control requests (STREAM_CTRL_GET_LANG and STREAM_CTRL_GET_DVD_INFO). Being uncacheable means the player has to wait until the cache is done reading the current block of data. These requests can't be cached because they're too complicated, so the only way to avoid them is special casing the DVD and Bluray streams (which are the only things which need these requests), and not doing them in other cases. (This is kind of inelegant, but so is the rest of the DVD/BD code.)
* stream: mp_msg conversionswm42013-12-211-16/+10
| | | | We also drop some slave mode stuff from stream_vcd.
* Reduce recursive config.h inclusions in headerswm42013-12-181-0/+1
| | | | | | In my opinion, config.h inclusions should be kept to a minimum. MPlayer code really liked including config.h everywhere, though, even in often used header files. Try to reduce this.
* Split mpvcore/ into common/, misc/, bstr/wm42013-12-171-1/+1
|
* Move options/config related files from mpvcore/ to options/wm42013-12-171-1/+1
| | | | | | | | | Since m_option.h and options.h are extremely often included, a lot of files have to be changed. Moving path.c/h to options/ is a bit questionable, but since this is mainly about access to config files (which are also handled in options/), it's probably ok.
* Replace mp_tmsg, mp_dbg -> mp_msg, remove mp_gtext(), remove set_osd_tmsgwm42013-12-161-3/+3
| | | | | | | | | The tmsg stuff was for the internal gettext() based translation system, which nobody ever attempted to use and thus was removed. mp_gtext() and set_osd_tmsg() were also for this. mp_dbg was once enabled in debug mode only, but since we have log level for enabling debug messages, it seems utterly useless.
* Reduce stheader.h includes, move stream types to mp_common.hwm42013-11-231-1/+0
|
* stream_bluray: return number of titleswm42013-09-101-6/+11
| | | | So that the "titles" property returns the number of titles.
* stream: fix url_options field, make protocols field not fixed lengthwm42013-08-261-7/+7
| | | | | | | | | | | | | | | | | | | | The way the url_options field was handled was not entirely sane: it's actually a flexible array member, so it points to garbage for streams which do not initialize this member (it just points to the data right after the struct, which is garbage in theory and practice). This was not actually a problem, since the field is only used if priv_size is set (due to how this stuff is used). But it doesn't allow setting priv_size only, which might be useful in some cases. Also, make the protocols array not a fixed size array. Most stream implementations have only 1 protocol prefix, but stream_lavf.c has over 10 (whitelists ffmpeg protocols). The high size of the fixed size protocol array wastes space, and it is _still_ annoying to add new prefixes to stream_lavf (have to bump the maximum length), so make it arbitrary length. The two changes (plus some more cosmetic changes) arte conflated into one, because it was annoying going over all the stream implementations.
* stream: don't require streams to set s->pos in seek callbackwm42013-08-221-1/+0
| | | | Instead, set s->pos depending on the success of the seek callback.
* stream_bluray: fix bd:// url segfault introduced by commit bc1d61Noble Huang2013-08-121-6/+2
|
* core: move contents to mpvcore (2/2)Stefano Pigozzi2013-08-061-2/+2
| | | | Followup commit. Fixes all the files references.
* stream: redo URL parsing, replace m_struct usage with m_configwm42013-08-021-25/+21
| | | | | | | | | | | | | Move the URL parsing code from m_option.c to stream.c, and simplify it dramatically. This code originates from times when http code used this, but now it's just relict from other stream implementations reusing this code. Remove the unused bits and simplify the rest. stream_vcd is insane, and the priv struct is different on every platform, so drop the URL parsing. This means you can't specify a track anymore, only the device. (Does anyone use stream_vcd? Not like this couldn't be fixed, but it doesn't seem worth the effort, especially because it'd require potentially touching platform specific code.)
* stream: remove useless author/comment fieldswm42013-07-121-3/+0
| | | | | | | | | These were printed only with -v. Most streams had them set to useless or redundant values, so it's just badly maintained bloat. Since we remove the "author" field too, and since this may have copyright implications, we add the contents of the author fields to the file headers, except if the name is already part of the file header.
* stream: don't require streams to set a typewm42013-07-121-1/+0
| | | | | Set the type only for streams that have special treatment in other parts of the code.
* Cleanup some include statementswm42013-07-121-3/+4
|
* core: change open_stream and demux_open signaturewm42013-07-121-2/+1
| | | | | | | | | | | This removes the dependency on DEMUXER_TYPE_* and the file_format parameter from the stream open functions. Remove some of the playlist handling code. It looks like this was needed only for loading linked mov files with demux_mov (which was removed long ago). Delete a minor bit of dead network-related code from stream.c as well.
* stream: remove weird STREAMTYPE_STREAM special handlingwm42013-07-071-1/+1
| | | | | | | | | This was an old leftover from an earlier cleanup (which happened in 2003), and which used "special" stuff for streams t