summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ass_mp.c: remove code duplicationwm42012-03-061-2/+1
| | | | | | | mp_ass_configure() (first time setup for subtitle options) and mp_ass_reload_options() (update options) duplicated the code for setting some options. There is no reason why they shouldn't use the same code.
* Merge remote-tracking branch 'origin/master' into my_masterwm42012-03-0566-2099/+387
|\ | | | | | | | | | | Conflicts: mplayer.c screenshot.c
| * aviheader.c: silence a warningUoti Urpala2012-02-291-2/+4
| | | | | | | | libmpdemux/aviheader.c:235:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
| * vo_png: set AVCodecContext parameters before opening itUoti Urpala2012-02-281-19/+21
| | | | | | | | | | | | | | Instead of opening avctx in preinit() and setting paramters later, (re)open it in config() where parameters can be set first. This fixes a failure to open the codec with new libavcodec versions that check pix_fmt during avcodec_open2().
| * configure: remove obsolete messages for mtrr / no w32codecsUoti Urpala2012-02-281-28/+1
| | | | | | | | | | | | | | | | | | | | Remove "Please check mtrr settings at /proc/mtrr" and "NOTE: Win32 codec DLLs are not supported on your CPU" messages printed at the end of a configure run. mtrr should be irrelevant on today's machines, and the DLLs are a lot less important nowadays. Also remove mtrr detection logic that was only used to decide whether or not to print that message. Bizarrely, there were --enable-mtrr and --disable-mtrr options for this too (with no effect except for the message).
| * vo: reject vo_redraw_frame() if no frames have been drawnUoti Urpala2012-02-282-1/+4
| | | | | | | | | | | | | | | | vo_xv crashed if existing frames had been lost due to a config() call in the middle of a file and vo_redraw_frame() was called. Add checks to reject vo_redraw_frame() unless at least one frame has been flipped after the the last configuration change, so individual VOs do not have to deal with this case.
| * configure, build: support compiling without libpostprocUoti Urpala2012-02-275-6/+26
| | | | | | | | | | | | libpostproc has been removed from Libav and the library now exists as a separate project. Because it's not essential, separate it from the Libav library check and allow compiling without it.
| * configure, ao_alsa: drop support for obsolete ALSA versionsUoti Urpala2012-02-276-695/+11
| | | | | | | | | | Drop compatibility code for ALSA versions prior to 1.0.9. Change the configure check to use pkg-config only.
| * configure: simplify pkg-config handling, drop other testsUoti Urpala2012-02-271-201/+46
| | | | | | | | | | | | | | | | | | | | | | Add helper function pkg_config_add() that checks for the presence of a package and also adds cflags/ldflags if it is found. Change existing pkg-config-using feature tests to use that. Also change the freetype test that used a separate libfreetype-config binary before; using pkg-config instead helps cross-compiling. Drop other kinds of checks (such as test compiles) from these tests. It's possible that this could cause problems on some (broken) systems, but that can't be verified without user testing.
| * demux_lavf: update growing file size info for AVSEEK_SIZEUoti Urpala2012-02-261-2/+5
| | | | | | | | | | | | | | | | demux_lavf was returning a static size value when libavformat queried file size with AVSEEK_SIZE. Add code to query the stream for possibly changed value first. This at least improves seeking with growing MPEG files; before seeks would never go beyond the part of the file that existed when the stream was first opened.
| * osd: erase terminal OSD line with mp_msg() instead of printf()Uoti Urpala2012-02-251-1/+1
| | | | | | | | | | | | | | | | The terminal OSD line was written with mp_msg(MSGT_CPLAYER, ...) but erased with printf(). This meant that disabling MSGT_CPLAYER messages would prevent the terminal line from being printed, but a line (probably unrelated) would still be cleared. Change the clearing code to use mp_msg(MSGT_CPLAYER, ...) too.
| * screenshot: fix libav API use (pix_fmt and some other things)wm42012-02-251-8/+13
| | | | | | | | | | | | | | | | | | | | | | Libavcodec started checking that avctx->pix_fmt is set when opening an encoder. The existing code (originally from vf_screenshot.c) only set it afterwards, which now made screenshots fail. Fix the code to set parameters before calling avcodec_open2(). Also fix some minor things, which seems to make it work for other encoders. This could be used to add more libavcodec based image writers. Fix memory leak (missing av_free(avctx)).
| * vd_ffmpeg: fix flushing of buffered framesUoti Urpala2012-02-032-5/+12
| | | | | | | | | | | | | | | | | | The vd_ffmpeg decode() function returned without doing anything if the input packet had size 0. This meant that flushing buffered frames at EOF did not work. Remove this test. Have the core code skip such packets coming from the file being played instead (Libav treats 0-sized packets as flush signals anyway, so better assume such packets do not represent real frames with any codec).
| * vd_ffmpeg: adjust buffered frame count based on threads againUoti Urpala2012-02-031-0/+2
| | | | | | | | | | | | | | | | | | Libav has changed back to not modifying avctx->has_b_frames based on the extra buffering caused by thread use. Add back the code to do the adjustment on the player side once again. The timing mode using the buffering info is no longer the default, so in most cases having this right or not won't matter for playback.
| * build: switch to libavutil bswap.h and intreadwrite.hUoti Urpala2012-02-0137-642/+113
| | | | | | | | | | | | | | | | | | | | | | | | Remove the private bswap and intreadwrite.h implementations and use libavutil headers instead. Originally these headers weren't publicly installed by libavutil at all. That already changed in 2010, but the pure C bswap version in installed headers was very inefficient. That was recently (2011-12) improved and now using the public bswap version probably shouldn't cause noticeable performance problems, at least if using a new enough compiler.
| * demux_lavf: use Libav RIFF tag lists directlyUoti Urpala2012-02-015-400/+47
| | | | | | | | | | | | Change demux_lavf to use CodecID -> RIFF tag mappings that are now available through the public Libav API. Previously it used a copy in ffmpeg_files/taglists.c. That can now be deleted.
| * Update Libav API usesUoti Urpala2012-02-0118-102/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change various code to use the latest Libav API. The libavcodec error_recognition setting has been removed and replaced with different semantics. I removed the "--lavdopts=er=<value>" option accordingly, as I don't think it's widely enough used to be worth attempting to emulate the old option semantics using the new API. A new option with the new semantics can be added later if needed. Libav dropped APIs that were necessary with all Libav versions until quite recently (like setting avctx->age), and it would thus not be possible to keep compatibility with previous Libav versions without adding workarounds. The new APIs also had some bugs/limitations in the recent Libav release 0.8, and it would not work fully (at least some avcodec options would not be set correctly). Because of those issues, this commit makes no attempt to maintain compatibility with anything but the latest Libav git head. Hopefully the required fixes and improvements will be included in a following Libav point release.
* | screenshot: don't convert image if it's already in required formatwm42012-02-291-17/+27
| |
* | screenshot: move code to open file out of image writer functionswm42012-02-291-29/+16
| | | | | | | | | | | | | | This is a minor simplification. The original intend was to only open a file if opening the image encoder went well, but this obscure special case is not worth bothering the image writer functions with more error handling.
* | screenshot: make screenshot filenames configurablewm42012-02-295-31/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the --screenshot-template option, which specifies a template for the filename used for a screenshot. The '%' character is parsed as format specifier. These format specifiers insert metadata into the filename. For example, '%f' is replaced with the filename of the currently played file. The following format specifiers are available: %n Insert sequence number (padded with 4 zeros), e.g. "0002". %0Nn Like %n, but pad to N zeros (N = 0 to 9). %n behaves like %04n. %#n Like %n, but reset the sequence counter on every screenshot. (Useful if other parts in the template make the resulting filename already mostly unique.) %#0Nn Use %0Nn and %#n at the same time. %f Insert filename of the currently played video. %F Like %f, but with stripped file extension ("." and rest). %p Insert current playback time, in HH:MM:SS format. %P Like %p, but adds milliseconds: HH:MM:SS.mmmm %tX Insert the current local date/time, using the date format X. X is a single letter and is passed to strftime() as "%X". E.g. "%td" inserts the number of the current day. %{prop} Insert the value of the slave property 'prop'. E.g. %{filename} is the same as %f. If the property doesn't exist or is not available, nothing is inserted, unless a fallback is specified as in %{prop:fallback text}. %% Insert the character '%'. The strings inserted by format specifiers will be checked for characters not allowed in filenames (including '/' and '\'), and replaced with the placeholder '_'. (This doesn't happen for text that was passed with the --screenshot-template option, and allows specifying a screenshot target directory by prefixing the template with a relative or absolute path.)
* | screenshot: allow forcing taking screenshots with the video filterwm42012-02-293-2/+29
| | | | | | | | | | | | | | | | | | | | If the screenshot_force video filter is inserted, taking screenshots will always use the video filter, and skip the VO specific screenshot code. This can be useful if the VO code causes problems, or if it's intended to take screenshots from a specific location in the filter chain. The 'screenshot' filter is intended as fallback, it's not used if possible.
* | core: rename --paused to --pause, and improve how pausing is donewm42012-02-292-2/+2
| | | | | | | | | | | | Callign add_step_frame is not necessary, because mplayer always decodes at least one frame when starting a new file. Calling pause_player is sufficient, and unlike add_step_frame doesn't play any audio.
* | struct stat.st_blocks is not available on MinGWwm42012-02-281-4/+4
| |
* | cue: play .bin files as raw PCM audio (even if it means playing noise)wm42012-02-261-0/+14
| | | | | | | | | | | | | | | | | | | | The cue code will open the .bin file with demux_rawaudio if the file can't be opened otherwise. In case the .bin file isn't in the exact format demux_rawaudio uses (usually 44100 Hz, 2 ch, s16le PCM), noise will be played. This is done only if no other demuxer could open the file, and the file extension is ".bin".
* | core: sort chapterswm42012-02-261-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure that chapters are sorted by time. There are some broken mkv files that have chapters in random order. Using simple chapter skipping with the seek_chapter slave command is very confusing and just doesn't work if the chapters are not in order. The chapters are resorted every time a chapter is added, that would make the chapter list unsorted. While this is algorithmically very stupid, it doesn't require changes per demuxer, or reasoning when exactly chapters could be added. Turning this into an insertion sort isn't worth the code, and the added demuxer_sort_chapters() function could possibly be moved to the "right" place later. This is not done when ordered chapters are used, because timeline support uses different data structures for chapters.
* | Fix minor memory leak from 2003wm42012-02-251-2/+8
| |
* | input: restore terminal attributes after resumewm42012-02-251-6/+21
| | | | | | | | | | | | | | | | | | | | Install a signal handler on SIGCONT, and restore the terminal attributes with tcsetattr() if it happens. This is needed with some shells (such as tcsh) that don't restore the terminal attributes set by mplayer. Without this, terminal I/O doesn't work as intended after resume with these shells. Fixes #155.
* | osd: clear terminal OSD line with mp_msg() instead of printfwm42012-02-251-1/+1
| | | | | | | | | | | | | | | | | | If mplayer is started with -msglevel cplayer=-1, there can't be any terminal OSD output, but the terminal line was still cleared unconditionally. Fix this by using mp_msg(), which will throw away the output to clear the terminal if disabled. Fixes #154.
* | mpcodecs: remove mp_image_t.x/ywm42012-02-249-25/+19
| | | | | | | | These were never used.
* | x11: fix crash when using switch_video (broken by UTF-8 input changes)wm42012-02-241-0/+1
| |
* | Merge remote-tracking branch 'origin/master' into my_masterwm42012-02-192-2/+2
|\|
| * Update copyright yearUoti Urpala2012-01-282-2/+2
| |
* | stream: refuse to open directorieswm42012-02-191-0/+9
| | | | | | | | It's pointless.
* | Don't print awkward negative seek message when playing directorywm42012-02-191-1/+0
| | | | | | | | | | | | | | This was caused by a demuxer trying to undo the header read when probing for its file format. This is pointless in any case, because the core demuxer code seeks back to the start of the file when initializing a demuxer.
* | input: fix "enter" on consolewm42012-02-191-8/+9
| | | | | | | | | | | | | | The commit "input: handle UTF-8 terminal input" accidentally messed up the handling of certain special keys. Apparently only KEY_ENTER was affected by this, because the code was valid UTF-8, but didn't directly map to the keycode.
* | screenshot: fix error messagewm42012-02-191-1/+1
| | | | | | | | This happens with JPG screenshots as well.
* | input: fix OSD cyclingwm42012-02-121-1/+1
| |
* | commands: add pt_clear command to clear playlistwm42012-02-103-0/+29
| | | | | | | | | | | | | | | | | | This deletes all playlist elements, except the currently active playlist entry. NOTE: this doesn't remove parent nodes in the case when we really have a play tree (as opposed to a play list). Apparently this doesn't cause any harm.
* | bstr: add bstr_eatstart()wm42012-02-092-0/+11
| |
* | vo_gl: add "backend" suboption to allow selecting the GUI backendwm42012-02-094-35/+54
| | | | | | | | | | | | | | | | | | | | | | | | The "backend" suboption allows selecting the GUI backend used by vo_gl. Normally, it's auto-selected, but sometimes it's desireable to explicitly select it. Remove the gl_sdl VO. This can now be done by using: --vo=gl:backend=sdl This is based on svn commit 34438, and tries to be compatible with it. The undocumented numeric backend names serve this purpose. (They are undocumented because names are preferred.)
* | vo_gl: minor cleanupsreimar2012-02-093-22/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix spelling. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34006 b3059339-0415-0410-9bf9-f77b7e298cf2 Fix disabled code. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34007 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove pointless pointer indirection for shader program strings. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34016 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove usage of glColor3f, there is not really a point in it. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34149 b3059339-0415-0410-9bf9-f77b7e298cf2
* | vo_gl: add noise filterreimar2012-02-094-13/+84
| | | | | | | | | | | | | | | | | | | | Add disabled feature: noise filter for vo_gl. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34014 b3059339-0415-0410-9bf9-f77b7e298cf2 Hook up -vo gl noise support. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34015 b3059339-0415-0410-9bf9-f77b7e298cf2
* | core: add option to start in paused statewm42012-02-093-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | The --paused option will start the player in paused state. That means it will start out with a still image of the first frame. This can be useful in combination with --ss to inspect a certain frame. Caveat: this plays a small bit of audio at the start, which might be perceived as an annoying artifact. This is because this is implemented by frame stepping after initialization in order to decode and display the first video frame.
* | i lost my brainwm42012-01-261-1/+1
| | | | | | | | should be squashed with "screenshot: improve quality by using additional swscale flags"
* | input.c: simplify command definitionswm42012-01-262-129/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using type = -1 for terminating the command argument list was an unnecessary complication. Change it to 0 to make use of default initialization. Remove the explicit termination from the command definitions. Now the argument list is automatically terminated by C default initialization rules. Also remove other redundant {0} initializers. When an argument's default value is actually initialized to something other than 0, make the field being initialized explicit (e.g. {1} becomes {.i = 1}). Try to make use of whitespace more consistent.
* | x11: fix setting UTF-8 window titles for some special caseswm42012-01-251-9/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting the WM_NAME/WM_ICON_NAME window properties didn't always work: apparently there are some characters that can't be represented in the X STRING or COMPOUND_TEXT encodings, such as U+2013 EN DASH. The function Xutf8TextListToTextProperty partially converts the string, and returns a