summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* demux: remove some old stream header functionswm42013-07-087-47/+14
|
* demux: remove audio parserwm42013-07-086-104/+5
| | | | | | | | | | | The audio parser was needed only by the "old" demuxers, and demux_rawaudio. All other demuxers output already parsed packets. demux_rawaudio is usually for raw audio, so using a parser with it doesn't usually make sense. But you can also force it to read compressed formats with fixed packet sizes, in which case the parser would have been used. This use case is probably broken now, but you will be able to do the same thing with libavformat demuxers.
* Remove old demuxerswm42013-07-0737-10597/+38
| | | | | | | | | | Delete demux_avi, demux_asf, demux_mpg, demux_ts. libavformat does better than them (except in rare corner cases), and the demuxers have a bad influence on the rest of the code. Often they don't output proper packets, and require additional audio and video parsing. Most work only in --no-correct-pts mode. Remove them to facilitate further cleanups.
* stream: unbreak streams with large sector sizes (stream_cdda)wm42013-07-071-1/+2
| | | | | | | Commit 7b16d4b changed some stream implementations to check the buffer size passed to them. This made stream_cdda stop working, because the default buffer size is smaller than the CDIO frame size. So pass the sector size instead of the (arbitrary) default buffer size.
* osdep: remove unused mmap compatibility hackswm42013-07-075-176/+1
| | | | | | | Not sure how this worked. Only af_export.c and tvi_v4l2.c were using mmap, but they didn't include osdep/mmap.h or mmap_anon.h. In any case, we trust that the target system is sufficiently POSIX compliant if mmap is actually defined (as checked by configure).
* configure: simplify arch macroswm42013-07-071-33/+12
|
* configure: prune some more crapwm42013-07-071-45/+0
| | | | All of the removed lines are hopefully useless and didn't do anything.
* stream: don't treat position 0 speciallywm42013-07-071-7/+6
| | | | | | | | | Seeking to position 0 meant to try reconnecting with some streams, actually just the internal http implementation. This has been removed, so we don't need the special handling anymore. This means we don't have to be stuck in a retry loop if the stream doesn't even support reconnect.
* Remove some leftovers from network removalwm42013-07-077-213/+4
| | | | | | | | stream_vstream.c in particular was actually dependent on the network code, and didn't compile anymore. Cleanup the protocol list in mpv.rst, and add some missing ones supported by libavformat to stream_lavf.c.
* stream: remove weird STREAMTYPE_STREAM special handlingwm42013-07-076-50/+27
| | | | | | | | | This was an old leftover from an earlier cleanup (which happened in 2003), and which used "special" stuff for streams that could be only forward-seeked. Also, don't add mode flags to s->flags; they're supposed to be in s->mode instead.
* stream: re-add accidentally removed seek callwm42013-07-071-0/+7
| | | | | | | This was under CONFIG_NETWORKING, so in theory it should have been save to remove. But actually this disables forward skipping when reading from a pipe. (Still a questionable feature, because it doesn't behave well with libavformat - but it was not supposed to be changed.)
* manpage: fix section headingsMartin Herkt2013-07-073-26/+27
|
* Remove internal network supportwm42013-07-0728-6240/+43
| | | | | | | | | | | This commit removes the "old" networking code in favor of libavformat's code. The code was still used for mp_http, udp, ftp, cddb. http has been mapped to libavformat's http support since approximately 6 months ago. udp and ftp have support in ffmpeg (though ftp was added only last month). cddb support is removed with this commit - it's probably not important and rarely used if at all, so we don't care about it.
* core: make network options available even if old net code is disabledwm42013-07-077-25/+21
| | | | Preparation for removing the old network code.
* ao_jack: allow more control about channel layoutswm42013-07-073-1/+37
|
* ao_jack: increase buffer size, always round up buffer sizewm42013-07-061-2/+2
| | | | | This should help with github issue #128, which reported stuttering distorted sound with 6 channel audio, but not with 2 channels.
* configure: rename --enable/disable-libquvi to --enable/disable-libquvi4wm42013-07-051-15/+15
| | | | | | | --disable-libquvi creates the impression that it disables libquvi 0.9 as well. It doesn't, because it refers to libquvi 0.4, and 0.4 and 0.9 are practically completely different libraries. Make this more explicit by renaming the switch to include the "4" version number.
* dither: don't use long doublewm42013-07-051-2/+2
| | | | | | | | | | This fixes compilation with broken libcs, like on Cygwin. C99 absolutely requires long double and associated functions like expl, even if long double is double. But newlib (used by cygwin) omits declaration for these if long double is equivalent to double. The extra precision is not needed here, so remove it to make life easier for the single person using mpv with cygwin.
* playlist: don't add entries in reversewm42013-07-051-0/+1
| | | | | | | | The entries were always added after the insertion point - but that means the entries are appended in reverse order. So update the insertion point on each entry. Regression introduced by commit 5f664d7.
* stream: make eof flag more consistentwm42013-07-041-1/+6
| | | | | | When reading something successfully, the eof flag should never be 1, so clear it in these situations. The eof flag will be set properly on the next read call.
* core: remove mp_fifo leftoverswm42013-07-044-43/+0
|
* wayland: remove mp_fifo headerAlexander Preisinger2013-07-031-1/+0
|
* cocoa: remove usage of mp_fifoStefano Pigozzi2013-07-035-12/+2
| | | | | | Update Cocoa parts to remove usage of the mp_fifo internal API to send events to the core and use the input context directly. This is to follow commits the work in commits 70a8079c and d603e73c.
* wayland: fix typoAlexander Preisinger2013-07-031-1/+1
|
* wayland: remove unused membersAlexander Preisinger2013-07-031-2/+0
|
* wayland: remove mp_fifoAlexander Preisinger2013-07-021-7/+7
|
* wayland: implement MOUSE_LEAVEAlexander Preisinger2013-07-021-0/+2
|
* core: cleanup more mp_fifo leftoverswm42013-07-0211-45/+39
| | | | Now only the OSX and Wayland parts are using this.
* core: remove mp_fifo indirectionwm42013-07-0212-110/+74
| | | | | | | | | | For some reason mp_fifo specifically handled double clicks, and other than that was a pointless wrapper around input.c functionality. Move the double click handling into input.c, and get rid of mp_fifo. Add some compatibility wrappers, because so much VO code uses these functions. Where struct mp_fifo is still used it's just a casted struct input_ctx.
* command: add some playlist manipulation commandswm42013-07-026-0/+55
| | | | playlist_remove and playlist_move.
* stream_lavf: request and read streamcast/ICY metadatawm42013-07-021-4/+89
| | | | Requires recent ffmpeg git, otherwise will do nothing.
* core: update metadata during playback, allow streams to export metadatawm42013-07-026-1/+45
| | | | | | | STREAM_CTRL_GET_METADATA will be used to poll for streamcast metadata. Also add DEMUXER_CTRL_UPDATE_INFO, which could in theory be used by demux_lavf.c. (Unfortunately, libavformat is too crappy to read metadata mid-stream for mp3 or ogg, so we don't implement it.)
* cache: fix per-block metadata memory leakwm42013-07-021-0/+1
|
* input: require VOs to send key up events, redo input key lookupwm42013-07-0210-87/+94
| | | | | | | | | | | | | | Making key up events implicit was sort-of a nice idea, but it's too tricky and unreliable and makes the key lookup code (interpret_keys()) hard to reason about. See e.g. previous commit for subtle bugs and issues this caused. Make key-up events explicit instead. Add key up events to all VOs. Any time MP_KEY_STATE_DOWN is used, the matching key up event must use MP_KEY_STATE_UP. Rewrite the key lookup code. It should be simpler and more robust now. (Even though the LOC increases, because the new code is less "compact".)
* input: fix behavior if there are actually key up eventswm42013-07-021-1/+2
| | | | | | | | | Wayland is the only backend that actually sends per-key key up events (the X11 one just sends MP_INPUT_RELEASE_ALL for simplicity). Handling was broken with Wayland, and each key event was interpreted twice, once on key down and once on key up. This commit should fix it.
* demux_mkv: pass extradata for opuswm42013-07-011-0/+1
| | | | Fixes playing 5.1 opus audio tracks.
* input: don't ignore press-only mouse button eventswm42013-06-301-1/+2
| | | | | | | | Before this commit, only mouse events with both down and up events were processed. This caused a regression with ignoring mouse wheel events in cocoa, because these don't distinguish between up and down. Regression caused by 5b38a52.
* Merge pull request #124 from rossy2401/w32-display-requiredMartin Herkt2013-06-301-0/+3
|\ | | | | Prevent display power management in Windows
| * w32_common: prevent display power managementJames Ross-Gowan2013-06-301-0/+3
|/ | | | | | | | Handling SC_MONITORPOWER doesn't seem to prevent the screen from dimming. The recommended way to do this in Windows XP and Vista is to call SetThreadExecutionState with ES_DISPLAY_REQUIRED. Windows 7 also has the PowerCreateRequest/PowerSetRequest/PowerClearRequest APIs but they're probably too complicated for this task.
* osxbundle: suggest some ways to correct missing dependenciesStefano Pigozzi2013-06-301-2/+11
| | | | | Hopefully this can give some more clues to users about what broke if they find themselves in this situation.
* sd_lavc: respect forced subs only setting for DVD subswm42013-06-291-3/+9
| | | | | Like the old spudec.c code did. Untested, I (probably) don't have a sample with subtitles that have this flag set.
* sd_ass: convert pts to integer for get_text()wm42013-06-291-3/+2
| | | | Gives more consistent rounding, which makes sub_step behave better.
* dec_sub: introduce sub_control(), use it for sub_stepwm42013-06-295-24/+41
| | | | | | | This means the direct libass usage can be removed from command.c, and no weird hacks for retrieving the ASS_Track are needed. Also fix a bug when using this feature with ordered chapters.
* command: redraw subs if sub-delay is changedwm42013-06-291-1/+1
| | | | | Though in practice this probably happened anyway, because OSD was redrawn.
* sub: update subtitle time offset even if pausedwm42013-06-293-7/+7
| | | | | | This was changed as part of commit b44202b as an intended simplification, but it's actually nicer to have the subtitles update immediately even if paused.
* input: store number of binds, instead of using 0-terminationwm42013-06-291-60/+54
|
* input: store number of keys, instead of using 0-terminationwm42013-06-291-21/+24
|
* input: don't keep separate sections for builtin key bindingswm42013-06-291-62/+76
| | | | | | | | | | Instead mark individual key bindings as builtin. Not sure whether this is conceptually simpler or more complicated. For one, it requires the annoying remove_binds() function to wipe existing bindings instead of just killing the section, on the other hand it gets rid of almost all special handling of builtin vs. normal sections.
* w32_common: prevent that window dragging and mouse input interferewm42013-06-291-1/+1
|
* w32_common: refactor mouse button code, handle mouse up eventswm42013-06-291-31/+39
| | | | | Instead of sending a single event on click, send both down and up events.
* mplayer: don't hide mouse cursor if mouse is inside mouse areawm42013-06-292-1/+5
|
* input: trigger mouse_leave key bindings if mouse leaves mouse areawm42013-06-295-14/+58
| | | | | | Also, implement mouse leave events for X11. But evne on other platforms, these events will be generated if mouse crosses a section's mouse area boundaries within the mpv window.
* command: add commands to enable/disable input sectionswm42013-06-294-0/+34
| | | | | For now, it's mostly for testing. It also might allow to create key binding state machines, but this sounds questionable.
* manpage: document input sectionswm42013-06-291-1/+21
|
* input: handle mouse movement differentlywm42013-06-2911-151/+354
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, mouse movement events emitted a special command ("set_mouse_pos"), which was specially handled in command.c. This was once special-cased to the dvdnav and menu code, and did nothing after libmenu and dvdnav were removed. Change it so that mouse movement triggers a pseudo-key ("MOUSE_MOVE"), which then can be bound to an arbitrary command. The mouse position is now managed in input.c. A command which actually needs the mouse position can use either mp_input_get_mouse_pos() or mp_get_osd_mouse_pos() to query it. The former returns raw window-space coordinates, while the latter returns coordinates transformed to OSD- space. (Both are the same for most VOs, except vo_xv and vo_x11, which can't render OSD in window-space. These require extra code for mapping mouse position.) As of this commit, there is still nothing that uses mouse movement, so MOUSE_MOVE is mapped to "ignore" to silence warnings when moving the mouse (much like MOUSE_BTN0). Extend the concept of input sections. Allow multiple sections to be active at once, and organize them as stack. Bindings from the top of the stack are preferred to lower ones. Each section has a mouse input section associated, inside which mouse events are associated with the bindings. If the mouse pointer is outside of a section's mouse area, mouse events will be dispatched to an input section lower on the stack of active sections. This is intended for scripting, which is to be added later. Two scripts could occupy different areas of the screen without conflicting with each other. (If it turns out that this mechanism is useless, we'll just remove it again.)
* command: make raw percent-pos property return fractionswm42013-06-292-3/+7
| | | | | | | | | percent-pos was an integer (0-100). Sometimes higher precision is wanted, but the property is this way because fractional parts would look silly with normal OSD usage. As a compromise, make percent-pos double (i.e. includes fractional parts), but print it as integer. So ${percent-pos} is like an integer, but not ${=percent-pos}.
* command: add properties for playlist positionwm42013-06-296-10/+105
| | | | | playlist-pos can set/get the current playlist index. playlist-count returns the number of entries in the playlist.
* cocoa_common: uninit fs window properlyStefano Pigozzi2013-06-291-0/+3
| | | | | | | | In fullscreen `s->window` is the windowed window. So freeing that didn't get rid of the FS window and OpenGL view. Fixes #122 [ci skip]
* csputils.h: don't recursively include libavcodec headerwm42013-06-283-16/+16
| | | | | | | | Some functions (avcol_spc_to_mp_csp() etc.) used libavcodec enum types as parameters. Remove these in order to get rid of the avcodec.h include statement. This prevents that avcodec.h is recursively included by dozens of files. Fix mp_image.c, which used the header without explicitly including avcodec.h.
* vo_opengl: handle chroma locationwm42013-06-2810-3/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the video decoder chroma location flags and render chroma locations other than centered. Until now, we've always used the intuitive and obvious centered chroma location, but H.264 uses something else. FFmpeg provides a small overview in libavcodec/avcodec.h: ----------- /** * X X 3 4 X X are luma samples, * 1 2 1-6 are possible chroma positions * X X 5 6 X 0 is undefined/unknown position */ enum AVChromaLocation{ AVCHROMA_LOC_UNSPECIFIED = 0, AVCHROMA_LOC_LEFT = 1, ///< mpeg2/4, h264 default AVCHROMA_LOC_CENTER = 2, ///< mpeg1, jpeg, h263 AVCHROMA_LOC_TOPLEFT = 3, ///< DV AVCHROMA_LOC_TOP = 4, AVCHROMA_LOC_BOTTOMLEFT = 5, AVCHROMA_LOC_BOTTOM = 6, AVCHROMA_LOC_NB , ///< Not part of ABI }; ----------- The visual difference is literally minimal, but since videophiles apparently consider this detail as quality mark of a video renderer, support it anyway. We don't bother with chroma locations other than centered and left, though. Not sure about correctness, but it's probably ok.
* video: add a new method to configure filters and VOswm42013-06-2817-141/+211
| | | | | | | | | | | | | | | | | | The filter chain and the video ouputs have config() functions. They are strictly limited to transfering the video size and format. Other parameters (like color levels) have to be transferred separately. Improve upon this by introducing a separate set of reconfig() functions, which use mp_image_params to carry format parameters. This struct contains all image format related parameters from config(), plus additional parameters such as colorspace. Change vf_rotate to use it, as well as vo_opengl. vf_rotate is just an example/test case, but vo_opengl will need it later. The intention is also to get rid of VOCTRL_SET_YUV_COLORSPACE. This information is now handed to the VOs via reconfig(). The getter, VOCTRL_GET_YUV_COLORSPACE, will still be needed though.
* mp_image: copy palette only if allocatedwm42013-06-281-1/+2
| | | | | | Normally, we assume that IMGFMT_PAL8 always has a palette allocated in plane 1. But there may be corner cases in ffmpeg where it doesn't (namely pseudo-pal stuff).
* vf_rotate: fix params >= 4wm42013-06-281-0/+2
|
* configure: prefer libquvi 0.4.x over libquvi 0.9.xwm42013-06-281-18/+18
| | | | Because 0.4.x is the current series of stable releases.
* core: add libquvi 0.9 supportwm42013-06-2810-10/+330
| | | | | | | | | | | | | This adds support for libquvi 0.9.x, and these features: - start time (part of youtube URL) - youtube subtitles - alternative source switching ('l' and 'L' keys) - youtube playlists Note that libquvi 0.9 is still in development. Although this seems to be API stable now, it looks like there will be a 1.0 release, which is supposed to be the next stable release and the actual successor of libquvi 0.4.x.
* core: rename mplayer.h and quvi.cwm42013-06-286-12/+7
| | | | | | mplayer.h used to be used for much more stuff, but all what is left are quvi related definitions. Rename quvi.c as well to make its purpose clearer.
* stream: redo memory streamswm42013-06-284-8/+92
| | | | | Make memory streams actual streams. This causes fewer weird corner cases and actually allows using demuxers with them.
* options: rename --mkv-subtitle-preroll, --dtshdwm42013-06-282-32/+41
| | | | We still keep the old names as alias for short-time compatibility.
* options: rename --rawvideo to --demuxer-rawvideo, same with --rawaudiowm42013-06-283-37/+41
|
* options: rename -lavdopts to -vd-lavc, -lavfdopts to -demuxer-lavfwm42013-06-283-104/+98
| | | | | Also change manpage so that top-level options are documented instead of suboptions. Suboptions still work, but might go away eventually.
*