summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* sub/OSD: move some related files to sub/Uoti Urpala2011-01-2677-101/+97
|
* subtitles: options: enable -ass by defaultUoti Urpala2011-01-262-13/+15
| | | | | | | | | | | | | | | There are still some problems with -ass. For example some other subtitle options won't work the same way or at all with it enabled, and inserting the video filter for VOs that lack native rendering support won't work with different colorspaces. However I think that the benefit from styling support outweights those disadvantages, and also that the "discoverability" of features is better this way; it will be easier for people who encounter problems to find -noass than for people who see no styling to find out that they could add it with -ass. Enable -ass by default. Also fix other outdated information in the manpage entries for -ass and -fontconfig.
* subtitles: change default libass rendering styleUoti Urpala2011-01-261-18/+16
| | | | | | | | | | | | | | | | | | | | | | Change the default style used for rendering plaintext subtitles with libass. The following attributes change: * FontSize: Increase the size multiplier used with the default -subfont-autoscale 3 from 1.4 to 1.7, thus making the font 21% larger. Actually implementing the -subfont-autoscale modes other than 1 would give a multiplier of 5/3=1.67 for 4:3 aspect ratio video, sqrt(337)/9=2.04 for 16:9. * PrimaryColour: Change color from yellow to white. * Outline: Before this was 2 regardless of user font size choice. Make it FontSize/16 instead. With default font size this is about half the previous width. * Kerning: Enable kerning for the track. There won't be styling designed for VSFilter's lack of kerning, and hopefully people won't use broken fonts with bad kerning tables for the default font either.
* demux_mkv, chapters: change millisecond arithmetic to nsUoti Urpala2011-01-264-45/+42
| | | | | | | | | | | | demux_mkv kept various integer timestamps in millisecond units. Matroska timestamp arithmetic is however specified in nanoseconds (even though files typically use 1 ms precision), and using ms units instead of that only made things more complex. Based on the demux_mkv example the general demuxer-level chapter structure also used ms units. Change the demux_mkv arithmetic and demuxer chapter structures to use nanoseconds instead. This also fixes a seeking problem in demux_mkv with files using a TimecodeScale other than the usual 1000000 (confusion between ms and TimecodeScale*ns units).
* cleanup: rename ass_* functions to mp_ass_*Uoti Urpala2011-01-266-37/+38
| | | | | | | | The various ass_* functions were created when libass was part of the MPlayer tree and the distinction between MPlayer-specific and other functions was less clear. Now that libass is a clearly separate library, using the same ass_* namespace for player functions is ugly. Rename the functions to use mp_ass_ prefix instead.
* subs: use correct font aspect ratio for libass + converted subsUoti Urpala2011-01-267-28/+85
| | | | | | | | | | | | | | | | | | | | | | Rendering of ASS subtitles tries to be bug compatible with VSFilter and stretches fonts when the video is anamorphic (some scripts try to compensate for this VSFilter behavior, so trying to render them "correctly" would give the wrong result). However this behavior is not appropriate for subtitles we converted to ASS format ourselves for libass rendering, as they certainly don't have VSFilter bug workarounds. Change the code to use different behavior for "native" ASS tracks and converted ones. It's questionable whether the VSFilter-compatible behavior is appropriate for external .ass files either, as there could be anamorphic and non-anamorphic versions of the same video and the bug-compatible behavior can only be correct for one alternative at most. However it's probably better to keep it as a default at least, so that extracting a muxed subtitle track and using that does not give behavior different from the original muxed one. The aspect ratio setting is per ASS_Renderer, and changing it resets libass caches. For that reason this commit adds separate renderer instances to use for the "correct" and "VSFilter bug compatible" cases.
* cleanup: some random minor code simplification and cleanupUoti Urpala2011-01-267-22/+19
|
* vf_vo: fix EOSD change detection bugUoti Urpala2011-01-181-1/+0
| | | | | | | | | | vf_vo had code setting its prev_visibility variable correctly, then a line that overrode the value just set with an incorrect one. Remove the wrong extra line. As a result of the bug the "contents changed" indicator wasn't forced to true when switching from a subtitle track to "no track" and then back. A visible effect was at least that a currently visible static subtitle disappeared when doing that switch back and forth.
* sd_ass: remove subreader use, support plaintext markupUoti Urpala2011-01-183-14/+67
| | | | | | | | | | | Originally, when rendering plaintext subs with libass, the subtitles were first converted to the "struct subtitle" form with sub_add_text() and then from that to libass events. Change sd_ass to convert the subtitles directly to libass events without using the old sub machinery. The new conversion at least fixes some timing issues. Also use the markup support added in the previous commit, so that HTML-style markup is also supported in "plaintext" subs rendered with libass.
* subtitles: style support for common SubRip tags and MicroDVDUoti Urpala2011-01-186-21/+669
| | | | | | | | | | | SubRip subtitles have no "official" spec for any styling support, but various tags are in common use; previous code filtered out text between <> to remove HTML-style tags. Add support for those tags and for MicroDVD subtitle styling. The style display is implemented by converting the subtitles to the ASS subtitle format and displaying them with libass, so libass needs to be enabled. Original patch by Clément Bœsch <ubitux@gmail.com>.
* core: ordered chapters: fix bad subtitle parameterUoti Urpala2011-01-181-1/+1
| | | | | | | | | | | | mp_property_do() takes the value to set a property to through a pointer. The calling code used '&mpctx->global_sub_pos' as the pointer; however that variable could be changed during the mp_property_do() call. Use a pointer to a copy of the original value instead. I think this only caused problems if you switched subtitle tracks from a real one to "disabled" and then switched to a timeline part from another source.
* subs/demux: don't try to enable sub track when creating itUoti Urpala2011-01-181-4/+0
| | | | | | | | | | | | demuxer.c new_sh_sub_sid() tried to immediately select the created sub track for playback if its id matched the "-sid" option value. This was buggy, as more initialization is needed to properly enable subtitles. Normally the correct track to play is selected after the demuxer has been created. It's possible that some DVD use case or such depended on the removed code to make -sid work with a subtitle track that's not found at start and only added later (vobsubs probably would start playing without separate initialization); if so then that needs to be fixed later in a different way.
* subtitles/demux: store duration instead of endpts in demux packetsUoti Urpala2011-01-185-15/+18
|
* subtitles: add framework for subtitle decodersUoti Urpala2011-01-1810-55/+244
| | | | | | | | | | Add a framework for subtitle decoder modules that work more like audio/video decoders do, and change libass rendering of demuxed subtitles to use the new framework. The old subtitle code is messy, with details specific to handling particular subtitle types spread over high-level code. This should make it easier to clean things up and fix some bugs/limitations.
* options: add special -leak-report optionUoti Urpala2011-01-153-2/+4
| | | | | | | | | | | | Add a special option "-leak-report" that enables talloc leak reporting. It only works if it's given as the first argument. The code abuses the CONF_TYPE_PRINT option type to make main option parsing ignore the option. The parser incorrectly consumed the following commandline argument as a "parameter" for options of this type when they had the flag to not exit after printing the message. Fix this. It makes no difference for any previously existing option I think.
* subtitles: remove code trying to handle text subs with libavcodecUoti Urpala2011-01-153-31/+22
| | | | | | | | | | The avsub implementation tries to fall back to MPlayer's other text subtitle decoding if libavcodec returns text as the 'decoded' subtitle. The code implementing this is buggy, and as far as I can see it should not be triggered normally (libavcodec decoding is only used for xvid, pgs and dvb subtitles, and for those libavcodec should return bitmaps). Remove the buggy code (don't try to support non-bitmap results) and simplify things a bit.
* cleanup: move MP_NOPTS_VALUE definition to mpcommon.hUoti Urpala2011-01-156-14/+8
|
* subtitles: move global ass_track to struct osd_stateUoti Urpala2011-01-157-37/+36
|
* core: move most mpcommon.c contents to mplayer.cUoti Urpala2011-01-157-356/+314
| | | | | | | | | | | | | | | | The contents of mpcommon.c were quite arbitrary; the most common reason to place some functions in this file had been "MEncoder happens to need similar code as MPlayer and we want to share some parts, but we have no clue whatsoever how to organize things in a sensible way, so we'll just dump those parts we want to share in mpcommon.c". As a result of containing an essentially random subset of top-level player functionality the mpcommon.h header required access to central structs and was unsuitable for inclusion in lower-level code, but was nonetheless included there for the mplayer_version symbol. Move almost all contents from mpcommon.c to mplayer.c. mplayer.c is already big and should perhaps be split further, but keeping a few random functions in mpcommon.c would not be an improvement.
* core: move global "subdata" and "vo_sub_last" to mpctxUoti Urpala2011-01-116-26/+27
|
* subtitles: remove sub_last_pts hackUoti Urpala2011-01-112-10/+3
| | | | | This code was probably added because of bad pts handling in old timing code, and should not be needed any more.
* options: move -noconfig to option struct, simplifyUoti Urpala2011-01-115-25/+6
|
* manpage: Remove forgotten "MPlayer only" notesClément Bœsch2011-01-091-5/+5
|
* manpage: Remove "MPlayer only" notesClément Bœsch2011-01-061-16/+16
|
* vo_vdpau: allow "deint=-N" to specify mode without enabling deintUoti Urpala2011-01-042-13/+20
| | | | | | | | | Allow negative values of the "deint" parameter and make them select the same deinterlacing mode as the corresponding positive value, but without enabling deinterlace on startup. This is useful for configuration files. Also tweak the overall manpage description of vo_vdpau a bit to make it sound less as if the VO would be for hardware acceleration only.
* core: add timing workaround for PulseAudio misbehaviorUoti Urpala2011-01-011-0/+3
| | | | | | | PulseAudio could keep reporting high delay values after a reset of playing audio. This broke playback after seeking in some cases. Add a workaround that should make things more robust against such misbehavior.
* manpage: Remove MEncoder referencesClément Bœsch2010-12-251-3808/+25
|
* core: fix audio-only + framestep weird behaviorUoti Urpala2010-12-201-0/+5
| | | | | | | Trying to do a framestep while playing an audio-only file would play the file until the end, then start the next file in paused state. Make framestep state enter pause again immediately if there is no video. Also reset framestep state when switching files.
* Merge branch 'hr-seek'Uoti Urpala2010-12-2018-482/+801
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * hr-seek: input: add default keybindings Shift+[arrow] for small exact seeks input: support bindings with modifier keys for X input core: audio: make ogg missing audio timing workaround more complex core: add support for precise non-keyframe-limited seeks core: add struct for queued seek info commands: add generic option -> property wrapper options: add "choice" option type, use for -pts-association-mode core: remove looping in update_video(), modify command handling a bit core: seek: use accurate seek mode with audio-only files core: avoid using sh_video->pts as "current pts" libvo: register X11 connection fd in input event system core: timing: add special handling of long frame intervals core: move central play loop to a separate function Conflicts: DOCS/tech/slave.txt
| * input: add default keybindings Shift+[arrow] for small exact seeksUoti Urpala2010-12-203-0/+13
| |
| * input: support bindings with modifier keys for X inputUoti Urpala2010-12-205-56/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for binding commands to modifier+key combinations like "Shift+Left" or "Ctrl+Alt+x", and support reading such combinations from the output window of X VOs. The recognized modifier names are Shift, Ctrl, Alt and Meta. Any combination of those and then a non-modifier key name, separated by '+', is accepted as a key name in input.conf. For non-special keys that produce characters shift is ignored as a modifier. For example "A" is handled as a key without modifiers even if you use shift to write the capital letter; 'a' vs 'A' already distinguishes the combinations with a normal keymap, and having separate 'a', 'Shift+A' and 'A' (written with caps lock for example) would bring more confusion than benefit. Currently reading the modifier+key combinations is only supported in the output window of those VOs that use x11_common.c event handling. It's not possible to input the key combinations in other VOs or in a terminal window.
| * core: audio: make ogg missing audio timing workaround more complexUoti Urpala2010-12-201-2/+15
| | | | | | | | | | | | | | | | | | | | | | After the addition of exact seeking the code to work around missing audio timestamps with ogg/ogm needs improvement. Now it's normal to need adjustment at stream start time 0 (seeking to a position after start of video but before second keyframe) with any video format, and for exact seeks with ogg it's now more important not to skip the sync. Make the check to detect the problem case more precise to avoid affecting most other formats, and try to decode a second of audio (hoping to get timestamps for those packets) before giving up.
| * core: add support for precise non-keyframe-limited seeksUoti Urpala2010-12-208-22/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | Add support for seeking to an arbitrary non-keyframe position by decoding video starting from the previous keyframe. Whether to use this functionality when seeking is controlled by the new option -hr-seek and a new third argument to the "seek" command. The default is to use it for absolute seeks (like chapter seeks) but not for relative ones. Because there's currently no support for cutting encoded audio some desync is expected if encoded audio passthrough is used. Currently precise seeks always go to the first frame with timestamp equal to or greater than the target position; there's no support for "matching or earlier" backwards seeks at frame level.
| * core: add struct for queued seek infoUoti Urpala2010-12-203-61/+106
| | | | | | | | | | | | | | | | To prepare for the addition of exact seek support, add a struct for queued seek state and a helper function to update its state. It would have been cumbersome to update additional state (showing whether the seek is forced to be exact or non-exact) manually at every point that handles seeks.
| * commands: add generic option -> property wrapperUoti Urpala2010-12-184-2/+46
| | | | | | | | | | | | | | | | | | Add mp_property_generic_option(), a property function that can be used for generic option-based properties that do not require any action beyond manipulating the value of the option variable. Currently it directly implements GET and SET, plus STEP_UP for "choice" options only. Use it to add a property for -pts-association-mode (not particularly useful in normal use, but serves as a test).
| * options: add "choice" option type, use for -pts-association-modeUoti Urpala2010-12-184-5/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | Add a "choice" option type. Options of this type take a string as input and set an int option variable to the value corresponding to the string. The string->int mapping is option-specific and is given in the option definition. Strings not found in the mapping are rejected as invalid option values. Change the option -pts-association-mode to use this new option type and accept values "auto, decoder, sort" instead of "0, 1, 2". The change in accepted values shouldn't cause problems as this option is not appropriate to use in normal user config files.
| * core: remove looping in update_video(), modify command handling a bitUoti Urpala2010-12-162-27/+47
| | | | | | | | | | | | | | | | | | Let higher-level code call update_video() again instead of looping inside it until there's a frame ready to show. Change the conditions for running user commands somewhat. Overall effect shouldn't be that big. Now other commands can be executed after a seek before a video frame is decoded; in this case the seek target time may be used as the "current position".
| * core: seek: use accurate seek mode with audio-only filesUoti Urpala2010-12-141-1/+1
| | | | | | | | Allow more accurate absolute-only seeks even if there is no video.
| * core: avoid using sh_video->pts as "current pts"Uoti Urpala2010-12-143-15/+19
| | | | | | | | | | | | Add a new field "video_pts" to mpctx. It records the time of the last frame flipped visible on VO. Change various code which used sh_video->pts to use either the new field or get_current_time(mpctx).
| * libvo: register X11 connection fd in input event systemUoti Urpala2010-12-144-17/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Register the X11 connection fd in the input system so that mp_input_get_cmd() can immediately wake up and handle keyboard or other X events. The callback calls vo_check_events() and tells the input system to handle any input possibly recorded during that. Before this was done for vo_xv only; this commit generalizes it to all VOs that call vo_x11_create_vo_window() - those are hopefully ones that will handle all X events in check_events(). The callback is only kept registered while the vo is properly configured. At other times calling check_events() would not clear pending input and so could lead to a busy loop.
| * core: timing: add special handling of long frame intervalsUoti Urpala2010-12-141-35/+36
| | | | | | | | | | | | | | | | | | Add separate handling for the case where the time to flip the next frame on the VO is more than 50 ms away. In that case don't update OSD contents yet, but wait for possible changes until 50 ms before the frame. Sleep until that time in mp_input_get_cmd(), so the sleep is done in select() and input events can be responded to immediately. Also raise the limit on audio out delay used to limit sleep.
| * core: move central play loop to a separate functionUoti Urpala2010-12-131-289/+287
| |
* | cosmetics: remove unused code, small formatting tweaksUoti Urpala2010-12-206-79/+10
| |
* | commands: clean up get_metadata() and related codeUoti Urpala2010-12-202-141/+82
| | | | | | | | | | | | | | Code in get_metadata() allocated too small a buffer for the text it wrote (noticed by Clément Bœsch). Make the code cleaner and more robust by changing it to use talloc_asprintf(). Also make it always return non-NULL and remove checks on caller side.
* | vd_ffmpeg: set thread count to number of cores on machine by defaultUoti Urpala2010-12-206-4/+88
| | | | | | | | | | | | | | | | | | | | | | Make "-lavdopts threads=0" mean an autodetected number of threads, and make that the default value of the option. Also increase the upper limit of the option from 8 to 16. Add new file osdep/numcores.c which tries to determine the number of cores available on the machine. numcores.c is based (heavily modified) on public domain numcpus.c by Philip Willoughby <pgw99@doc.ic.ac.uk>, downloaded from http://csgsoft.doc.ic.ac.uk/numcpus/
* | demux_mkv: remove old code for -nocorrect-pts supportUoti Urpala2010-12-201-131/+0
| | | | | | | | | | There should be no reason for anyone to use demux_mkv in -nocorrect-pts mode any more, so delete the code used for that.
* | demux_mkv: fix seeks to before the first index entryUoti Urpala2010-12-201-19/+16
| | | | | | | | | | | | | | Make seeks backward from a time before the first index entry go to the first entry instead of failing completely. This change doesn't affect behavior for most files, because seeks are clamped to 0 from below and normally files have the first index entry at 0.
* | DOCS/tech/slave.txt: update some obsolete informationUoti Urpala2010-12-181-10/+7
| | | | | | | | | | Update obsolete information based on old pause behavior. Remove mention of old GUI-specific commands.
* | demux_asf: Add a missing free to ASF demuxer closereimar2010-12-161-0/+1
| | | | | | | | | | | | Fixes bug #1238. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32711 b3059339-0415-0410-9bf9-f77b7e298cf2
* | playtreeparser.c: Add playlist parser for .nsc filesreimar2010-12-161-0/+114
| | | | | | | | | | | | | | | | | | | | | | Tested to properly decode .nsc files, but not properly tested since no publically available stream could be found. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32710 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove pointless NULL checks before free. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32715 b3059339-0415-0410-9bf9-f77b7e298cf2
* | exa