summaryrefslogtreecommitdiffstats
path: root/mencoder.c
Commit message (Collapse)AuthorAgeFilesLines
* Restore collapsed whitespace in output messagesUoti Urpala2010-03-071-4/+4
| | | | | | | | | For some reason commit e306174952d42e1cd6cc5efc50ae6bb0410501bc, which replaced translation macro names with the corresponding English strings, also collapsed multiple consecutive space characters into one. Change most of these back. In a couple of cases the amount of whitespace is important for alignment, and for the rest it at least keeps the strings closer to the existing translations.
* audio: Remove fixed decode_audio() return size limit (MAX_OUTBURST)Uoti Urpala2009-12-291-1/+0
| | | | | | | | | | | | A couple of months ago MPlayer's ALSA driver started rounding the amount of input data it was willing to accept in one call down to an integer multiple of the value it set in ao_data.outburst. In some configurations it was possible for this value to exceed the 64 KiB limit on the amount MPlayer was willing to write in a single call to the AO. As a result ao_alsa accepted 0 bytes in each play() call and audio playback failed. Fix this by removing the fixed 64 KiB limit on the amount of audio sent to AO at once; the limit was mostly a remnant of older code anyway.
* vf_vo: Use vo_seek_reset() instead of vo_control()Uoti Urpala2009-12-021-0/+1
| | | | | | | | | Change the vo_control(vo, VOCTRL_RESET, NULL) call done when the vf_vo filter is uninited to vo_seek_reset(vo). The latter also sets vo->frame_loaded to false. Remove the vo->config_ok check from vo_seek_reset(). The reset call should be doable even if config failed.
* Merge svn changes up to r29912Uoti Urpala2009-11-161-0/+8
|\
| * Add -tsprog support for lavf to mencoder, similar to what SVN r29846 did for ↵reimar2009-11-131-0/+8
| | | | | | | | | | | | mplayer. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29910 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge branch 'vdpau'Uoti Urpala2009-11-161-1/+1
|\ \
| * | Implement vsync-aware frame timing for VDPAUUoti Urpala2009-11-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Main things added are custom frame dropping for VDPAU to work around the display FPS limit, frame timing adjustment to avoid jitter when video frame times keep falling near vsyncs, and use of VDPAU's timing feature to keep one future frame queued in advance. NVIDIA's VDPAU implementation refuses to change the displayed frame more than once per vsync. This set a limit on how much video could be sped up, and caused problems for nearly all videos on low-FPS video projectors (playing 24 FPS video on a 24 FPS projector would not work reliably as MPlayer may need to slightly speed up the video for AV sync). This commit adds a framedrop mechanism that drops some frames so that no more than one is sent for display per vsync. The code tries to select the dropped frames smartly, selecting the best one to show for each vsync. Because of the timing features needed the drop functionality currently does not work if the correct-pts option is disabled. The code also adjusts frame timing slightly to avoid jitter. If you for example play 24 FPS video content on a 72 FPS display then normally a frame would be shown for 3 vsyncs, but if the frame times happen to fall near vsyncs and change between just before and just after then there could be frames alternating between 2 and 4 vsyncs. The code changes frame timing by up to one quarter vsync interval to avoid this. The above functionality depends on having reliable vsync timing information available. The display refresh rate is not directly provided by the VDPAU API. The current code uses information from the XF86VidMode extension if available; I'm not sure how common cases where that is inaccurate are. The refresh rate can be specified manually if necessary. After the changes in this commit MPlayer now always tries to keep one frame queued for future display using VDPAU's internal timing mechanism (however no more than 50 ms to the future). This should make video playback somewhat more robust against timing inaccuracies caused by system load.
* | | av_log callback handling overhaulUoti Urpala2009-10-311-0/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move av_log callback handling from vd_ffmpeg.c to a new file av_log.c and install the callback immediately when starting the program. Main functionality improvements of the new code: - The old version only installed the callback when opening an FFmpeg video decoder. If nothing had triggered that then av_log() messages from other sources (libavformat, audio decoding, swscale usage) bypassed MPlayer's output system completely. Now the callback is always installed. - Current av_log message severity levels are handled correctly. The old code used MSGL_ERR for some messages that should be MSGL_V. - Message type is now set for libavformat contexts (MSGT_DEMUXER / MSGT_MUXER). - The old code did "mp_msg_test(type, mp_level)" before actually determining the type, so that it always used MSGT_FIXME. This led to some messages being incorrectly dropped in case the user had specified module-specific verbosity levels. The old check in question was originally motivated by performance problems when there were a lot of callbacks; however it's not clear whether the part about it skipping the type determination was intentional (most of the performance problems must have come from the way the original code used snprintf) and in my tests current FFmpeg libraries have not generated unreasonable amounts of callbacks anyway.
* | Merge svn changes up to r29752Uoti Urpala2009-10-061-5/+11
|\| | | | | | | | | | | | | | | | | As part of merging subtitle-in-terminal changes make update_subtitles() only clear existing subtitles if called with the reset argument, and not try to set new ones. Later calls should set the needed new subtitles, and this change avoids some problems with trying to set subtitles when mp_property_sub() in command.c gets called from initialization code before full initialization.
| * Make -nosub work to disable subtitles even if -slang and dvd streams are used.reimar2009-09-291-2/+2
| | | | | | | | | | | | | | This still needs some additional checking that subtitle selection via dvdnav works. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29732 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add a -nosub option that allows disabling auto-selected subtitles as e.g. thereimar2009-09-281-3/+3
| | | | | | | | | | | | | | mkv demuxer supports. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29730 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add support for displaying subtitles on the command-line when playingreimar2009-09-231-0/+6
| | | | | | | | | | | | | | audio-only files. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29712 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Make update_subtitles work without sh_video for text subtitles.reimar2009-09-231-1/+1
| | | | | | | | | | | | | | | | | | This fixes a crash with e.g. auto-enabled subtitles and -novideo due to command.c calling update_subtitles even without video and is a step toward subtitle support for audio-only files. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29710 b3059339-0415-0410-9bf9-f77b7e298cf2
* | core/VO: Allow VO drivers to add/modify framesUoti Urpala2009-09-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add interfaces to allow VO drivers to add or remove frames from the video stream and to alter timestamps. Currently this functionality only works with in correct-pts mode. Use the new functionality in vo_vdpau to properly support frame-adding deinterlace modes. Frames added by the VDPAU deinterlacing code are now properly timed. Before every second frame was always shown immediately (probably next monitor refresh) after the previous one, even if you were watching things in slow motion, and framestepping didn't stop at them at all. When seeking the deinterlace algorithm is no longer fed a mix of frames from old and new positions. As a side effect of the changes a problem with resize events was also fixed. Resizing calls video_to_output_surface() to render the frame at the new resolution, but before this function also changed the list of history frames, so resizing could give an image different from the original one, and also corrupt next frames due to them seeing the wrong history. Now the function has no such side effects. There are more resize-related problems though that will be fixed in a later commit. The deint_mpi[] list of reserved frames is increased from 2 to 3 entries for reasons related to the above. Having 2 entries is enough when you initially get a new frame in draw_image() because then you'll have those two entries plus the new one for a total of 3 (the code relied on the oldest mpi implicitly staying reserved for the duration of the call even after usage count was decreased). However if you want to be able to reproduce the rendering outside draw_image(), relying on the explicitly reserved list only, then it needs to store 3 entries.
* | Merge svn changes up to r29532Uoti Urpala2009-08-181-6/+2
|\|
| * Handle demuxers that never set filepos by using stream_tell.reimar2009-08-171-1/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29528 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Remove pointless #ifdefs around harmless internal header #includes.diego2009-08-021-7/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29471 b3059339-0415-0410-9bf9-f77b7e298cf2
| * whitespace cosmetics: Remove all trailing whitespace.diego2009-05-131-23/+23
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Remove internal libass treeUoti Urpala2009-07-261-4/+1
| | | | | | | | | | Remove the libass/ directory and use the newest standalone version of the library instead.
* | Remove trailing whitespace from most filesUoti Urpala2009-07-071-23/+23
| |
* | Translation system changes part 2: replace macros by stringsAmar Takhar2009-07-071-68/+75
| | | | | | | | | | Replace all MSGTR_ macros in the source by the corresponding English string.
* | Translation system changes part 1: wrap translated stringsAmar Takhar2009-07-071-69/+69
| | | | | | | | | | Replace mp_msg() calls which have a translated string as the format argument with mp_tmsg and add _() around all other translated strings.
* | Merge svn changes up to r29277Uoti Urpala2009-05-081-2/+0
|\|
| * Remove pointless #ifdef around spudec.h #include.diego2009-05-051-2/+0
| | | | | | | | | | | | | | Fixes the build with dvdread disabled. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29262 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge branch 'ordered_chapters'Uoti Urpala2009-04-081-3/+3
|\ \
| * | Change demuxer_seek_chapter() parametersUoti Urpala2009-04-021-2/+2
| | | | | | | | | | | | | | | | | | Remove the "num_chapters" and "mode" parameters that aren't needed by any callers. Change "float *seek_pts" to "double *". Allocate the string returned via "chapter_name" with talloc.
| * | Initial ordered chapters supportUoti Urpala2009-04-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add basic support for Matroska ordered chapters. The switching between segments is implemented as a general edit timeline that could also be used for other purposes. Some things still need improvement. In particular the current code does not try to do any proper mapping between audio/video/subtitle streams of different files and there should be options for better control of how MPlayer searches other files for the required content.
* | | Merge svn changes up to r29117Uoti Urpala2009-04-011-0/+2
|\ \ \ | |/ / |/| / | |/
| * Set the forced_subs_only value correctly whenever a new spudec is created.reimar2009-03-301-0/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29108 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28537Uoti Urpala2009-02-121-14/+3
|\|
| * Add priority support for OS/2 and factorize the Windows priority support.diego2009-02-101-14/+3
| | | | | | | | | | | | | | patch by KO Myung-Hun, komh chollian net git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28520 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28366Uoti Urpala2009-01-261-38/+1
|\| | | | | | | | | | | | | | | | | Contains more changes needed to sync build system with latest FFmpeg. Conflicts: Makefile configure mplayer.c
| * Factorize print_version().diego2009-01-251-38/+1
| | | | | | | | | | | | | | Print CPU information in verbose mode instead of by default. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28360 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28341Uoti Urpala2009-01-191-7/+7
|\| | | | | | | | | | | Conflicts: configure libmpcodecs/native/rtjpegn.c
| * More #ifdef -> #ifreimar2009-01-161-7/+7
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28324 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28310Uoti Urpala2009-01-151-1/+1
|\| | | | | | | | | | | | | | | The libdvdread4 and libdvdnav directories, which are externals in the svn repository, are at least for now not included in any form. I added configure checks to automatically disable internal libdvdread and libdvdnav if the corresponding directories are not present; if they're added manually then things work the same as in svn.
| * Update copyright year.diego2009-01-111-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28306 b3059339-0415-0410-9bf9-f77b7e298cf2
* | OSD: Ensure that OSD content is drawn in filter-added framesUoti Urpala2009-01-151-2/+12
| | | | | | | | | | | | Move the OSD drawing calls from filter_video() to higher-level code to ensure that VOs will draw the OSD also in filter-added frames, which are displayed without a separate call to filter_video().
* | core: Better -nocorrect-pts pause and filter-added frames handlingUoti Urpala2009-01-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Rewrite the -nocorrect-pts frame creation code. The new version always updates the visible frame when seeking while pausing, and supports filter-added frames. It can not time those properly though. Now the handling of filter-added frames in MPlayer always uses the new method independently of the value of correct-pts but MEncoder still expects the old behavior. Add a global variable that is set under MEncoder only and change the filters to choose behavior based on that instead of the correct_pts option.
* | Merge svn changes up to r28087Uoti Urpala2008-12-041-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: command.c libao2/ao_ivtv.c libao2/ao_v4l2.c libmpcodecs/dec_video.h libvo/aspect.h libvo/sub.c libvo/sub.h libvo/vo_directx.c libvo/vo_macosx.m libvo/vo_quartz.c mp_core.h mplayer.c mplayer.h osdep/getch2.h osdep/timer.h
| * Get rid of pointless 'extern' keywords.diego2008-12-031-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28085 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r27841Uoti Urpala2008-10-281-5/+2
|\| | | | | | | | | Conflicts: mplayer.c
| * Factorize vobsub idx/extradata handling.aurel2008-10-271-5/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27841 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to 27824Uoti Urpala2008-10-251-5/+5
|\| | | | | | | | | | | | | | | | | | | Conflicts: cfg-common-opts.h libmpcodecs/dec_video.c libmpcodecs/vd.c libvo/x11_common.h mplayer.c stream/cache2.c
| * Replace preprocessor check for WIN32 with checks for __MINGW32__ and __CYGWIN__.diego2008-10-131-5/+5
| | | | | | | | | | | | | | This avoids a pointless indirection that only obscures what is really done. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27761 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r27441Uoti Urpala2008-08-081-4/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: cfg-common-opts.h command.c configure input/input.c libmp