summaryrefslogtreecommitdiffstats
path: root/player/lua
Commit message (Collapse)AuthorAgeFilesLines
* ytdl_hook: rework edl joining to use lua tablesRicardo Constantino2017-05-041-5/+7
| | | | Seems much more resource efficient than concatenating a string.
* osc: also add processing for axis_up/down eventsRicardo Constantino2017-04-251-4/+6
| | | | | | Considered semantically equivalent with mouse_btn3/4. This is a preemptive fix for upcoming changes to AXIS_* events.
* ytdl_hook: treat single-entry playlists as a single videoRicardo Constantino2017-04-231-1/+9
|
* ytdl_hook: move single video code to a separate functionRicardo Constantino2017-04-231-94/+98
|
* osc: add user_opts.boxmaxchars for box layout title limitAvi Halachmi (:avih)2017-04-191-3/+6
| | | | | The default of 80 is conservative to allow relatively wide fonts, but with many common fonts a bigger number can be used without overflow.
* osc: add volume icons to osd font and use themRicardo Constantino2017-04-191-3/+4
| | | | | Glyphs taken and based on U+1F507 to U+1F50A from Symbola, which is available under public domain: http://users.teilar.gr/~g1951d/
* osc: move volume left of fullscreen buttonRicardo Constantino2017-04-191-16/+17
|
* osc: bottom/topbar: add fullscreen buttonRicardo Constantino2017-04-191-4/+13
|
* osc: add volume buttonRicardo Constantino2017-04-191-3/+41
| | | | | Click to toggle mute, mouse wheel to change volume. OSD is shown on volume change.
* osc: support handling mouse wheel eventsRicardo Constantino2017-04-191-4/+8
|
* osc: simplify checks in key handlerRicardo Constantino2017-04-191-30/+25
| | | | Use a helper function for these safety checks.
* osc: fix last potential race condition on key eventsRicardo Constantino2017-04-191-1/+2
|
* osc: use "loop-playlist" instead of "loop" propertywm42017-04-111-1/+1
|
* osc: escape ASS and strip newlines on titleRicardo Constantino2017-03-271-0/+2
|
* osc: make title configurable and use property expansion on itRicardo Constantino2017-03-271-6/+4
|
* Revert "osc: make the title toggleable between media-title and filename"Ricardo Constantino2017-03-271-11/+10
| | | | This reverts commit 6573b73462e336da0daca845ba4df02782afc2b6.
* osc: make the title toggleable between media-title and filenameRicardo Constantino2017-03-261-10/+11
| | | | Close #4221
* osc: fix PlayResX undefined warning when aspect is 0Ricardo Constantino2017-03-241-3/+6
|
* osc: bottom/topbar: don't clip title verticallyRicardo Constantino2017-03-241-2/+2
|
* osc: bottom/topbar: increase timecodes width a bitRicardo Constantino2017-03-241-4/+4
| | | | | | | Compensates for wider fonts like DejaVu Sans Mono. Further compensate for the minus sign in the right timecode by 10px. Closes #3952
* osc: refactor cache status displayRicardo Constantino2017-03-241-11/+18
| | | | This removes the twitch of the right-aligned cache status.
* osc: refactor osc message scalingRicardo Constantino2017-03-241-35/+20
| | | | | | | | | | Will still hide playlist items with long enough filenames and osd-font-size but not as soon. osc messages should now preserve their scaling with fullscreen toggling and cycling through audio-only files and files with video. Closes #4081, #4083, #4102
* osc: fix window dragging with showwindowed=noAkemi2017-02-271-0/+2
| | | | | | | initialise OSC with a zero mouse area so mp_input_test_dragging returns a proper value. Fixes #1819
* ytdl_hook: support livestream segmented DASH VODsRicardo Constantino2017-02-101-4/+6
| | | | | | | | | | | | Seen with a VOD of a recently ended livestream on Youtube. They seem to use segmented DASH but unlike normal Youtube segmented DASH, the segments don't seem to need the initialization segment. The video actually fails to start to play if the init segment is prepended with a lot of 'Found duplicated MOOV Atom. Skipped it' errors popping up.
* ytdl_hook: reenable support for length-less segments in EDLRicardo Constantino2017-02-061-12/+28
| | | | They're unsupported only in MP4 DASH mode.
* ytdl_hook: fix EDL syntaxwm42017-02-051-1/+1
| | | | | All entries must be separated by ";" or "\n". The parser just doesn't enforce it if an entry uses quoting.
* ytdl_hook: Add non-dash fallbacks to default formatsRicardo Constantino2017-02-041-3/+3
|
* ytdl_hook, edl: implement pseudo-DASH supportwm42017-02-041-3/+9
| | | | | | | | | We use the metadata provided by youtube-dl to sort-of implement fragmented DASH streaming. This is all a bit hacky, but hopefully a makeshift solution until libavformat has proper mechanisms. (Although in danger of being one of those temporary hacks that become permanent.)
* ytdl: support segmented dashRicardo Constantino2017-02-041-12/+16
|
* osc: allow playlist buttons when loopingRicardo Constantino2017-02-011-2/+3
| | | | Closes #4092
* osc: box: clip with ellipsis after too much stretchingRicardo Constantino2017-01-311-2/+9
|
* osc: bottom/topbar: clip title instead of stretchingRicardo Constantino2017-01-311-4/+6
|
* ytdl_hook: refactor edl track joiningRicardo Constantino2017-01-301-20/+28
| | | | | | Only used once for now. Also, support switched format strings, like bestaudio+bestvideo.
* ytdl_hook: respect --no-audio, don't force-select trackRicardo Constantino2017-01-301-1/+1
|
* ytdl_hook: fix opening hitbox.tv rtmp streamRicardo Constantino2017-01-291-0/+2
| | | | | Worked with librtmp, but ffrtmp needs to set rtmp_swfurl in addition to rtmp_swfverify, even if they're the same value.
* stream_lavf: add support for data URIsRicardo Constantino2017-01-251-1/+1
| | | | | | | Only FFmpeg supports them and they need to be in the format data:// like other protocols or prefixed with ffmpeg:// or lavf://. Closes #4058
* osc: fix crashes related to field eventresponder being nilRoland Hieber2017-01-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm still getting some crashes after issue #3210 was fixed in commit 5beb2306904b4437b5acf136b02aeaa073c351c7. It's hard to reproduce those crashes, they happen maybe once a month, so I guess it could be a race condition. But in any case, I don't see anything wrong in applying some defensive programming here. For reference, here is what was happening on 0.23.0-1 from Debian testing: Playing: ytdl://usL5CeP_row (+) Video --vid=1 (*) (h264) (+) Audio --aid=1 --alang=und (*) (aac) [osc] [osc] stack traceback: [osc] @osc.lua:2074: in function 'process_event' [osc] @osc.lua:2246: in function 'cb' [osc] mp.defaults:107: in function 'fn' [osc] mp.defaults:60: in function 'handler' [osc] mp.defaults:339: in function 'handler' [osc] mp.defaults:448: in function 'call_event_handlers' [osc] mp.defaults:485: in function 'dispatch_events' [osc] mp.defaults:441: in function <mp.defaults:440> [osc] [C]: in ? [osc] [C]: in ? [osc] Lua error: @osc.lua:2074: attempt to index field 'eventresponder' (a nil value) Note that the location is different from where issue #3210 happens. Signed-off-by: Roland Hieber <rohieb@rohieb.name>
* lua: allow unregistration of idle handlersOlivier Perret2017-01-151-0/+10
|
* osc: bottombar/topbar: make chapter markers slightly biggerRicardo Constantino2016-12-251-17/+18
| | | | | | | 1px squares to 2px triangles and layout=box markers from 1px squares to 2x1px rectangles. While we're at it, wrap a few lines to 80col again.
* osc: replace length property with durationpavelxdd2016-12-041-1/+1
| | | | | | Length property is deprecated and no longer works. This fixes a bug when the total file duration wasn't visible if the option to display milliseconds was activated.
* osc: don't hide playlist buttons, just disableRicardo Constantino2016-12-021-5/+6
| | | | | | | | Having empty space before the title in layout=*bar looks worse than the floating buttons in layout=box. Also disable both playlist buttons selectively according to the current position.
* osc: topbar: use same styles as bottombarRicardo Constantino2016-12-021-13/+13
|
* osc: fix use of deprecated idle propertyRicardo Constantino2016-11-221-1/+1
| | | | Fixes regression since 7201fd7d
* client API: turn mpv_suspend() and mpv_resume() into stubswm42016-11-221-6/+6
| | | | | | | | | | | As threatened by the API changes document. This commit also removes or stubs equivalent calls in IPC and Lua scripting. The stubs are left to maintain ABI compatibility. The semantics of the API functions have been close enough to doing nothing that this probably won't even break existing API users. Probably.
* osc: fix possible race condition in right timecodeRicardo Constantino2016-11-211-2/+1
|
* ytdl_hook: sort chapters by timeRicardo Constantino2016-11-151-1/+1
| | | | | mpv doesn't work well with unordered chapters. ex: https://youtu.be/DIKPUL6b4N8
* osc: add seekbarstyle=knobRicardo Constantino2016-11-091-4/+16
| | | | | | | | Most code from @leiserfg in #2365. Closes #2365 Cut guides to the center of the knob. This makes the knob knob look more like IRL knob sliders.
* osc: fix crashes when dragging seekbar across file changesRicardo Constantino2016-11-081-2/+3
| | | | Fixes #3210
* osc: slimbox: fix clipping with seekbarstyle=barRicardo Constantino2016-11-071-1/+3
| | | | Fixes #3737
* osc: add alpha animation to tooltipRicardo Constantino2016-10-311-1/+14
| | | | | Fixes lingering tooltip with full alpha if mouse leaves window with OSC still active.
* osc: top/bottombar: rescale layout to same size with scale=1Ricardo Constantino2016-10-291-49/+53
| | | | | Basically, there's two less values to revert to previous defaults and top/bottombar now look at scale=1 like they looked with scale=1.5.
* osc: top/bottombar: scale title if too large like boxRicardo Constantino2016-10-291-14/+24
|
* osc: compromise on default deadzonesizeRicardo Constantino2016-10-291-2/+2
| | | | | | This way people can still use the mouse to quickly check the elapsed time without moving it all the way to the bottom while still having half the screen to ignore mouse movement.
* osc: don't wrap the titleRicardo Constantino2016-10-291-1/+1
|
* osc: top/bottombar: also scale when min-width is reachedRicardo Constantino2016-10-291-12/+34
| | | | Same behavior as box/slimbox.
* osc: top/bottombar: dynamically size timecodes according to timemsRicardo Constantino2016-10-291-9/+14
|
* osc: fix missing chapter ticks with seekbarstyle=barRicardo Constantino2016-10-291-0/+1
|
* osc: fix crash with no chaptersRicardo Constantino2016-10-251-4/+4
| | | | Also, chapter position which wasn't changed to work with 1-based.
* osc: Fix and simplify limited_listMiroslav Koskar2016-10-251-28/+25
| | | | | | | | | | | * Fixes: when on the end of playlist only half of entries are displayed. * Simplifies the logic of limited_list so it's easy to follow. * limited_list's pos parameter is now 1 based which seem more natural. * Few changes to comply with code style thorough the file. * Small format change: "Playlist: (%d/%d):" -> "Playlist [%d/%d]:" "Chapters: (%d/%d):" -> "Chapters [%d/%d]:"
* osc: add script message handlers for chapter/track/playlistsRicardo Constantino2016-10-241-0/+13
| | | | | | | | | | These can be used in input.conf for pretty formatting of lists as with shift+clicking the OSC buttons. Ex: z script-message osc-playlist Z script-message osc-chapterlist x script-message osc-tracklist
* osc: fix crash after reaching a certain position in limited listsRicardo Constantino2016-10-201-1/+1
| | | | | Don't try to display more items than there are in the chapter/playlist. Fixes #3691
* osc: use the same characters as track list for playlist/chapterRicardo Constantino2016-10-171-10/+4
| | | | | | | | | Had only tested with luajit which supports the \xHH syntax added in Lua 5.2. The arrow is troublesome to use since the ideal way to use it, as the OSD code uses it, needs \alpha&H00<arrow>\r to work, which does not in OSC's way of showing messages.
* osc: fix chapter/playlist listing if emptyRicardo Constantino2016-10-151-1/+1
|
* osc: show playlist/chapter list on prev/next instead of osdRicardo Constantino2016-10-151-4/+16
|
* osc: fix listing of chapters and playlistRicardo Constantino2016-10-151-10/+87
| | | | | | | Fixes regression since 05c398f. Add helper functions for limiting potentially huge lists of playlists and chapters and use them.
* osc: fix display of chapters and playlist scalingRicardo Constantino2016-10-151-2/+11
| | | | Compensate \fs when using non-default scale(fullscreen|windowed).
* osc: add user-alterable margin for top/bottombarRicardo Constantino2016-10-151-5/+6
|
* osc: add right-click behavior to playlist and chapter buttonsRicardo Constantino2016-10-151-0/+8
|
* osc: change default layout to bottombarRicardo Constantino2016-10-151-6/+6
| | | | | | Change a few other defaults accordingly: - seekbarstyle=bar looks better with bottombar. - Bigger scalewindowed and scalefullscreen make bottom/topbar more readable.
* ytdl_hook: Add title to playlist items if availableRicardo Constantino2016-10-151-0/+6
|
* osc: move tooltip to inside seekbar for top/bottombarRicardo Constantino2016-10-071-25/+28
| | | | Tooltip border is user-alterable
* osc: change seekbar background's alpha scalingRicardo Constantino2016-10-071-2/+4
| | | | | | This avoids a full transparent seekbar with only boxalpha=115. No change with default values.
* osc: align text vertically in top/bottombarRicardo Constantino2016-10-071-32/+39
| | | | Close #2093
* ytdl_hook: add chapters by parsing video's descriptionMaurycy Skier2016-10-061-0/+46
|
* ytdl_hook: Set aspect ratio for anamorphic videoRicardo Constantino2016-09-281-0/+6
|
* osc: Fix scaling issues when toggling fullscreenRicardo Constantino2016-09-251-0/+1
| | | | Fixes #3429
* ytdl_hook: temporarily force disable dash segments formatsRicardo Constantino2016-09-221-4/+5
|
* lua: add API for registering idle handlerswm42016-09-211-0/+10
| | | | | This is only a functionality the Lua event dispatcher provides, rather than the libmpv client API.
* lua: run timers only after draining the event queuewm42016-09-211-12/+11
| | | | | | Instead of rechecking the timers every time after an event is read, do it only once the event queue is empty. This is probably slightly more efficient, and facilitates the next commit.
* ytdl_hook: don't bother adding subtitles if duration isn't knownRicardo Constantino2016-09-131-5/+3
| | | | EDL doesn't work with subtitles with unknown length.
* ytdl_hook: Support playlist entries without subtitlesRicardo Constantino2016-09-131-3/+17
| | | | | | | | | | | | | Fixes missing subtitle tracks if the first entry didn't have any. Previously it just checked for the first entry in the playlist for requested languages and if that entry happened to not have subtitles they also wouldn't show up for the other entries. It will skip languages if the first entry with subs has less or different languages than the others. Unrelated to http_dash_segments.
* player: fix minor spelling mistake in osc.luaJames Cowgill2016-08-271-1/+1
| | | | | Lintain (https://lintian.debian.org/) complains about this particular spelling mistake.
* ytdl: Error out with http_dash_