summaryrefslogtreecommitdiffstats
path: root/mplayer.c
Commit message (Collapse)AuthorAgeFilesLines
* demux_lavf: mark AVI timestamps non-pts to avoid messagesUoti Urpala2010-11-141-1/+2
| | | | | | | | Playing AVI files containing B-frames with demux_lavf printed two "decreasing pts" info messages at the start of the file. We know the timestamps from AVI won't be valid pts, so add a demuxer field to convey that information to the timing code and make that not even try to use the timestamps as valid pts.
* options: more mplayer.c options moved to option structClément Bœsch2010-11-141-32/+26
| | | | | | Following options were moved: autoq, benchmark, [no]term-osd, term-osd-esc, playing-msg, [no]idle, [no]consolecontrols, list-properties.
* options: move various mplayer.c options to option structClément Bœsch2010-11-131-19/+11
| | | | | Following options were moved: [no]quiet, [no]autosync, softsleep, [no]rtc, rtc-device.
* core: do initial A-V sync by modifying audio streamUoti Urpala2010-11-131-12/+91
| | | | | | | Add code to enforce matching pts with video when (re)starting the audio stream, by either cutting away the first samples or inserting silence at the beginning. New option -noinitial-audio-sync can be used to disable this and return to old behavior.
* core: give pts as parameter to demuxer_get_current_chapter()Uoti Urpala2010-11-131-4/+4
| | | | | | | | | demuxer_get_current_chapter() accessed sh_video/sh_audio pts fields to determine playback position. demux layer shouldn't access those and the values used weren't quite correct anyway. Give the playback position as a parameter to the demux layer function instead. Also change the top-level get_current_chapter() to use get_current_time() in the timeline case where it didn't refer to demux layer.
* audio: add -gapless-audio optionUoti Urpala2010-11-121-12/+20
| | | | | | | | | If the option is enabled and all audio has been buffered to the AO, then the player will move to the next file without waiting for the buffered audio to drain, while leaving the AO initialized. If the playback of the next file starts quickly enough (before the AO buffer empties) then it should continue writing audio to the same AO with no gap in between.
* audio: don't try to send partial samples to AO at EOFUoti Urpala2010-11-121-1/+2
| | | | | | | | | | At least with PCM it's possible to get an audio stream that doesn't end at a multiple of whole sample per channel. At least ao_alsa refuses to accept that part of input, and so EOF detection in fill_audio_out_buffers didn't trigger until the 0.04 second sanity check (as there "was still audio not sent to AO left"). Change the logic to detect EOF if there's less than one sample per channel of unsent data left.
* options: move -cache-min and cache-seek-min to option structClément Bœsch2010-11-111-4/+2
|
* options: move some demux options to option structClément Bœsch2010-11-111-8/+3
| | | | | Following options were moved: audiofile, audiofile-cache, subfile, demuxer, audio-demuxer, sub-demuxer, [no]extbased.
* core: rename update_video_immediately->restart_playbackUoti Urpala2010-11-111-6/+6
|
* core: print an explicit error if file format detection failsUoti Urpala2010-11-101-2/+4
| | | | | | | When file format detection failed the output only said "Exiting... (End of file)" after "Playing <file>." (or possibly error messages triggered by format-specific check functions in between). Add an explicit "Failed to recognize file format." error message.
* demux: improve -alang / -slang track choosing logicUoti Urpala2010-11-081-4/+3
| | | | | | | | | | | | When -alang / -slang was specified the numerically first matching track (if any) was always chosen. This meant that specifying "-alang eng" could change the track choice even if all tracks were in English, because now the default flag of tracks was ignored. Change the logic to take the default flag into account as a secondary sorting key. The code also accepted prefix matches, so that "-slang g" would match track language "ger". I think that was not intentional. Change it to require exact matches.
* core: use correct demuxer with -audiofile / -subfileUoti Urpala2010-11-081-3/+4
| | | | | | | | | | | Various code referred to "mpctx->demuxer" where it should really have referred to the one used for audio/subtitles in case those differ. Fix by using "mpctx->d_audio->demuxer" etc instead. Disable the copying of streams in demux_demuxers; that was a partial workaround for things referring to the main demuxer (and it wasn't enough anyway). This fixes, among other things, switching audio tracks within the file specified by -audiofile.
* core: move video pos/length query functions from demux to coreUoti Urpala2010-11-081-26/+76
| | | | | | | | | Move functions to query current playback position, percentage position and total video length from from the demuxer layer to top level. The functions need access to playback state that doesn't belong on the demuxing level. Make the new functions more capable and simplify some code that can now rely on them. This fixes some errors in displayed in OSD and slave mode information when using timeline (ordered chapters).
* cleanup: don't check for NULL before free()diego2010-11-081-4/+3
| | | | | | patch by Clément Bœsch, ubitux gmail com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32598 b3059339-0415-0410-9bf9-f77b7e298cf2
* options: move -name and -title to option structClément Bœsch2010-11-041-2/+2
|
* options: move -dumpfile to option structUoti Urpala2010-11-021-5/+4
|
* cosmetics: remove some #if 0 code from mplayer.creimar2010-11-021-8/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32468 b3059339-0415-0410-9bf9-f77b7e298cf2
* mplayer.c: remove some obsolete commented-out linesdiego2010-11-021-10/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32427 b3059339-0415-0410-9bf9-f77b7e298cf2
* options: move audio_output_channels, audio_output_format to structUoti Urpala2010-11-021-2/+1
|
* mplayer.c: remove unnecessary #definediego2010-11-021-2/+0
| | | | | | | | Remove cache_fill_status #define. The #define is only set if CONFIG_STREAM_CACHE is not defined, but in this case the variable is not used. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32131 b3059339-0415-0410-9bf9-f77b7e298cf2
* cache: Move cache_fill_status extern declaration to cache2.hdiego2010-11-021-2/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32120 b3059339-0415-0410-9bf9-f77b7e298cf2
* menu: Move vf_info_menu extern declaration to menu.hdiego2010-11-021-1/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32089 b3059339-0415-0410-9bf9-f77b7e298cf2 Mark vf_info_menu declaration as const. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32109 b3059339-0415-0410-9bf9-f77b7e298cf2
* loader: Disable loading codecs from the current directoryreimar2010-11-021-1/+5
| | | | | | | | | | While convenient, it is too risky. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32025 b3059339-0415-0410-9bf9-f77b7e298cf2 100l, we need to search for SetDllDirectoryA instead of SetDllDirectory git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32026 b3059339-0415-0410-9bf9-f77b7e298cf2
* core: Do not call *_aid_from_lang when audio_lang is NULLreimar2010-11-021-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31963 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: Remove useless castreimar2010-11-021-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31916 b3059339-0415-0410-9bf9-f77b7e298cf2
* dvdnav: Support for image highlights for dvdnav menus.reimar2010-11-021-0/+6
| | | | | | Does not work 100% reliably and needs -sid 0. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31828 b3059339-0415-0410-9bf9-f77b7e298cf2
* audio: support parameter changes (e.g. channel count) during playbackreimar2010-11-021-43/+62
| | | | | | | | | | | | | | | | | Add support for parameter changes (e.g. channel count) during playback. This makes decoding AC3 files that switch between 2 and 6 channels work reasonably well even with -channels 6 and ffac3 decoder. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31737 b3059339-0415-0410-9bf9-f77b7e298cf2 Fix typo in error message: ACC -> AAC git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32473 b3059339-0415-0410-9bf9-f77b7e298cf2 Avoid printing AAC with SBR warning on every decode call, instead print it only after every decoder reconfiguration. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32476 b3059339-0415-0410-9bf9-f77b7e298cf2
* commands: Allow fullscreen switching during -idle.reimar2010-11-021-0/+1
| | | | | | | Useful in combination with -fixed-vo and a vo that can do rescaling during "pause" like gl. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31736 b3059339-0415-0410-9bf9-f77b7e298cf2
* subs: Change global subtitle numbering schemereimar2010-11-021-44/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change numbering so that demuxers can "asynchronously" add subtitles during playback. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31678 b3059339-0415-0410-9bf9-f77b7e298cf2 Fix calculation of global_sub_size. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31711 b3059339-0415-0410-9bf9-f77b7e298cf2 Update global_sub_pos if we auto-selected a subtitle. This avoid strange behaviour with subtitle selection in that case, because the subtitle selection code thinks no subtitle was displayed while we actually did display one. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31863 b3059339-0415-0410-9bf9-f77b7e298cf2 Move function to avoid a forward declaration. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31864 b3059339-0415-0410-9bf9-f77b7e298cf2 Fix subtitle selection: make selecting -sid 0 work again by replacing the M_PROPERTY_STEP_UP hack by M_PROPERTY_SET and set the global sub pos also when we do not yet have a subtitle stream but do know the number of subs from out-of-band as e.g. for DVD. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31882 b3059339-0415-0410-9bf9-f77b7e298cf2 100l, re-add vobsub_get_id_by_index call accidentally removed in r31678. Patch by ubitux [ubitux gmail com]. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31985 b3059339-0415-0410-9bf9-f77b7e298cf2
* cfg-common*: Replace common options template by a common options arraydiego2010-11-021-0/+1
| | | | | | | | | This solution works just as well, but avoids a separate template file that needs to be #included from multiple places. The end result is simpler since common options and those of MPlayer and MEncoder are now in only one file each. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31434 b3059339-0415-0410-9bf9-f77b7e298cf2
* core: Try to exit cleanly on SIGPIPEreimar2010-11-021-0/+1
| | | | | | | | SIGPIPE is not really a crash, try to exit cleanly in case we receive one. Particularly in the network code it would be better to ignore it, but some window managers use it to indicate a close request. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31432 b3059339-0415-0410-9bf9-f77b7e298cf2
* -identify output: print media start timereimar2010-11-021-0/+13
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31344 b3059339-0415-0410-9bf9-f77b7e298cf2
* mplayer.c: move some --identify code to a separate functionreimar2010-11-021-35/+40
| | | | | | | Move the code that prints main per-file -identify info to a separate function. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31343 b3059339-0415-0410-9bf9-f77b7e298cf2
* Merge svn changes r31318 to r31328Uoti Urpala2010-06-051-1/+1
|\ | | | | | | | | r31328 is a somewhat questionable (changing the option at that point isn't quite safe), but it was a failure case already...
| * If we have no FPS value, try enabling -correct-pts mode, it doesreimar2010-06-051-2/+2
| | | | | | | | | | | | | | not require any FPS value. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31328 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Do not use libass functions if it is disabled.reimar2010-06-041-1/+1
| | | | | | | | | | | | | | Fixes compilation if freetype is not available. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31317 b3059339-0415-0410-9bf9-f77b7e298cf2
| * If an invalid pts value is detected, try to to make up some if it seemsreimar2010-06-031-2/+8
| | | | | | | | | | | | | | | | | | | | | | reasonable. This avoids completely losing A-V sync e.g. when pts was not reordered correctly. This was tested with http://samples.mplayerhq.hu/V-codecs/h264/PAFF/tv_cut.mkv for this sample proper pts reordering is the correct solution, but more resilient handling of the error case is still useful. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31311 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Simplify libass version check.cehoyos2010-06-031-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31309 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix compilation with external libass.cehoyos2010-06-021-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31305 b3059339-0415-0410-9bf9-f77b7e298cf2
| * backport ass_flush_events() from upstream libass and make use of itaurel2010-05-311-0/+5
| | | | | | | | | | | | | | | | This fixes subtitles duplication when seeking back in ass stream formated with the "standard" format FFmpeg uses. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31293 b3059339-0415-0410-9bf9-f77b7e298cf2
| * misc cosmetics: K&R style nits, #include placement, indentationdiego2010-05-291-6/+10
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31263 b3059339-0415-0410-9bf9-f77b7e298cf2
* | libass: match font attachments based on extensionGrigori Goronzy2010-06-011-4/+1
| | | | | | | | | | | | | | Instead of only relying on the MIME type, use the file extension as a fallback for deciding which attachments are fonts and should be fed to libass. This also refactors the check into a separate function in mpcommon.
* | Merge svn changes up to r31211Uoti Urpala2010-05-301-1/+1
|\| | | | | | | | | The merged cache2.c changes are known to have problems. Will merge further fixes to them before merging this to the master branch.
| * Use MP_NOPTS_VALUE as "default" pts for delayed frames instead of somereimar2010-05-231-1/+1
| | | | | | | | | | | | | | | | insanely large value. Avoids hang if a decoder handles the data/size == 0 condition incorrectly. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31205 b3059339-0415-0410-9bf9-f77b7e298cf2
* | core: apply audio track options to all ordered chapter filesUoti Urpala2010-05-221-1/+6
| | | | | | | | | | | | | | Options selecting audio track to play (-nosound, -alang, -aid) only affected the first source file. When you moved to a timeline part that came from another file the default audio track for that file was used. Add code to apply the options to all files.
* | options: move -alang and -slang to option structUoti Urpala2010-05-221-13/+11
| | | | | | | | | | | | | | The option field corresponding to -slang is now called "sub_lang" instead of the old misleading global name "dvdsub_lang". The code handling -slang in subreader.c looks rather broken; disable it instead of converting it to use the option field.
* | vo_vdpau: support queuing an arbitrary number of frames aheadUoti Urpala2010-05-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Make the number of output surfaces allocated by vo_vdpau configurable and allow queuing multiple future frames with the VDPAU frame timing functionality. There are two known issues that could be polished in the future for particularly long queue time cases. First, toplevel code should possibly wait for the queued changes to finish displaying in some situations like switching files. Second, the VO can block waiting for a surface to become available, and in the worst case this wait can be almost as long as the maximum queuing time (potentially causing audio underruns). However those issues are not high priority.
* | mplayer.c: remove an unnecessary #includeUoti Urpala2010-05-081-1/+0
| |
* | Merge svn changes up to r31097Uoti Urpala2010-04-261-1/+2
|\|
| * Fix crash if a DVD is played with dvdnav:// and without videoreimar2010-04-251-1/+2
| | | | | | | | | | | | | | (e.g. because vo initialization failed). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31090 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30967Uoti Urpala2010-04-261-8/+2
|\|
| * Rename SetCodecPath() --> set_codec_path().diego2010-03-211-1/+1
| | | | | | | | | | | | | | This keeps the naming of all path-related functions consistent. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30944 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Rename get_path.[ch] --> path.[ch].diego2010-03-201-1/+1
| | | | | | | | | | | | | | These files now contain different functions related to path handling. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30943 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Move SetCodecPath() from loader to get_path.c and make it unconditional.diego2010-03-201-3/+0
| | | | | | | | | | | | | | | | This fixes compilation with the Win32 loader disabled but other binary codec loaders enabled. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30942 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Remove unnecessary #ifdefs around harmless loader/codecpath.h #include.diego2010-03-181-4/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30931 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Split codec path related code into a separate file to fix Windows build.reimar2010-03-181-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30930 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30917Uoti Urpala2010-04-261-0/+4
|\|
| * Follow a more proper way to support -codecpath.komh2010-03-171-0/+4
| | | | | | | | |