summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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
* | example.conf: add some profile information and user-agent examplescompn2010-12-161-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32709 b3059339-0415-0410-9bf9-f77b7e298cf2 add realplayer user-agent git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32712 b3059339-0415-0410-9bf9-f77b7e298cf2 add winamp useragent example git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32713 b3059339-0415-0410-9bf9-f77b7e298cf2
* | demux_mov: fix possible hang on invalid inputreimar2010-12-161-1/+1
| | | | | | | | | | | | | | len < 8 is also invalid for 64-bit codec chunk size. Previous code could cause hang. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32708 b3059339-0415-0410-9bf9-f77b7e298cf2
* | aviheader.c: avoid using uninitialized data in an error casereimar2010-12-161-1/+3
| | | | | | | | | | | | Avoid using uninitialized data if index read does not return enough data. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32707 b3059339-0415-0410-9bf9-f77b7e298cf2
* | ad_faad: fix crash when used on an empty audio streamreimar2010-12-161-0/+5
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32706 b3059339-0415-0410-9bf9-f77b7e298cf2
* | ad_speex: improve timestamp handlingreimar2010-12-161-1/+9
| | | | | | | | | | | | | | Improve speex codec pts handling, make audio timestamps work reasonably even with the native demuxer as long as seeking is not done. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32704 b3059339-0415-0410-9bf9-f77b7e298cf2
* | demux_mov: fix some memory allocation handlingreimar2010-12-161-5/+13
| | | | | | | | | | | | | | | | Always free before overwriting a pointer with a newly allocated one, always use calloc instead of realloc when the previous data is not needed. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32703 b3059339-0415-0410-9bf9-f77b7e298cf2
* | stream.h: check against huge negative values in stream_seek()reimar2010-12-161-0/+4
| | | | | | | | | | | | | | | | Add validity check for stream_seek argument to avoid a integer overflow for huge negative values that would break the internal state of the stream buffer. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32702 b3059339-0415-0410-9bf9-f77b7e298cf2
* | demux_gif: Fix memleaks on errorreimar2010-12-161-0/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32701 b3059339-0415-0410-9bf9-f77b7e298cf2
* | vd_ffmpeg: fix MP_IMGTYPE selection for non-ref non-B framesreimar2010-12-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change direct rendering buffer allocation code to treat non-ref frames like B-frames even if has_b_frames is not set and they are indeed not B-frames (no reordering). Treating it as an I/P frame would violate the assumptions of MPlayer's buffering system, which thinks only the latest previous I/P fra