summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* av_log: mp_msg conversionwm42013-12-213-34/+73
| | | | | | | | This is pretty nasty, because FFmpeg/Libav is yet another library with a global message callback. We do something with mutexes trying to get it done, but of course we can't actually solve this problem. If more than one library in a process use FFmpeg/Libav, only one of them will get log messages.
* m_option: add mp_log context to sub-module print_help callbackwm42013-12-215-13/+11
|
* m_option: add mp_log callback to OPT_STRING_VALIDATE optionswm42013-12-219-79/+81
| | | | | And also convert a bunch of other code, especially ao_wasapi and ao_portaudio.
* m_option, m_config: mp_msg conversionswm42013-12-2120-297/+275
| | | | | | | | Always pass around mp_log contexts in the option parser code. This of course affects all users of this API as well. In stream.c, pass a mp_null_log, because we can't do it properly yet. This will be fixed later.
* m_property: mp_msg conversionswm42013-12-215-25/+34
| | | | | Includes some semi-crappy hacks to avoid changing too much code for this conversion (allowing NULL log argument for m_property_do()).
* input: rework how input sources are addedwm42013-12-2113-205/+213
| | | | | | | | | | | | | | Until now, there were two functions to add input sources (stuff like stdin input, slave mode, lirc, joystick). Unify them to a single function (mp_input_add_fd()), and make sure the associated callbacks always have a context parameter. Change the lirc and joystick code such that they take store their state in a context struct (probably worthless), and use the new mp_msg replacements (the point of this refactoring). Additionally, get rid of the ugly USE_FD0_CMD_SELECT etc. ifdeffery in the terminal handling code.
* m_config: add custom context to includefunc callbackwm42013-12-213-4/+7
|
* sub/osd: mp_msg conversionswm42013-12-2119-80/+104
|
* find_subfiles: mp_msg conversionswm42013-12-213-12/+14
|
* player/timeline: mp_msg conversionswm42013-12-213-39/+36
|
* demux: use fprintf() for printing fatal errorswm42013-12-211-6/+4
| | | | | We print these before calling abort(), which is deadly unclean anyway. Avoids having to add log contexts.
* codecs: avoid having to print error messagewm42013-12-211-3/+2
| | | | | | | | | The mp_select_decoders() function doesn't have a log context (and I don't want to give it one), so get rid of the mp_msg error message by enhancing the semantics such that the syntax error is replaced by a new feature. Now doing "--ad=something" will enable all decoders in the "something" module, same as "--ad=something:*". Pretty useless, but gets rid of the annoyance.
* codecs: mp_msg conversionwm42013-12-215-11/+13
|
* av_common: abuse av_log to print message instead of mp_msgwm42013-12-211-1/+2
| | | | Saves a little bit of pain.
* ao: some missing mp_msg conversionswm42013-12-211-13/+17
|
* ao_wasapi: mp_msg conversionswm42013-12-211-67/+34
| | | | | | | Remove the nonsensical print_lock too. Things that are called from the option validator are not converted yet, because the option parser doesn't provide a log context yet.
* audio/fmt-conversion.c: remove unknown audio format messageswm42013-12-214-15/+19
| | | | Same deal as with video/fmt-conversion.c.
* audio: mp_msg conversionswm42013-12-2124-194/+180
|
* mixer: mp_msg conversionswm42013-12-213-14/+13
|
* lua: minor simplificationwm42013-12-211-2/+1
| | | | | Using m_property_do() is more complicated, and will have to be changed later for mp_msg conversions.
* osdep/priority: drop message output when setting prioritywm42013-12-211-2/+0
|
* player: use MSGL_SMODE for some slave-mode stuffwm42013-12-212-10/+10
| | | | | Replacement for MSGT_IDENTIFY. Can't kill it off completely yet; certain people would complain to me personally.
* img_format: drop message about unknown pixel formatswm42013-12-211-7/+1
| | | | Too bad.
* bitmap_packer: use printf() for fatal messagewm42013-12-211-2/+2
| | | | | | This is printed right before abort(), which is bad style anyway. Converting this to mp_msg will help nobody, and passing through a mp_log is effort.
* vaapi: mp_msg conversionswm42013-12-216-123/+135
| | | | | | This ended up a little bit messy. In order to get a mp_log everywhere, mostly make use of the fact that va_surface already references global state anyway.
* vdpau: mp_msg conversionswm42013-12-216-73/+77
|
* video/fmt-conversion.c: remove unknown pixel format messageswm42013-12-213-20/+17
| | | | | | | | | | | This removes the messages printed on unknown pixel format messages. Passing a mp_log to them would be too messy. Actually, this is a good change, because in the past we often had trouble with these messages printed too often (causing terminal spam etc.), and printing warnings or error messages on the caller sides is much cleaner. vd_lavc.c had a change earlier to print an error message if a decoder outputs an unsupported pixel format.
* image_writer: mp_msg conversionswm42013-12-214-16/+14
| | | | Adds an awkward mp_log argument for error messages.
* sws_utils: mp_msg conversionswm42013-12-213-3/+13
| | | | | | This requires the caller to provide a mp_log in order to see error messages. Unfortunately we don't do this in most places, but I guess we have to live with it.
* gl_lcms: use global lock to deal with crappy lcms2 message callbackwm42013-12-211-14/+22
| | | | | | | | | lcms2 has a global message callback for error reporting. If you don't set this, these error messages are silently thrown away. I think we still want the error messages, so we have to do dumb stuff to avoid clashes. This doesn't handle the case if another library in the same process sets the message callback, but at least this should exclude possible memory errors when running multiple instances of mpv.
* video/out: pass along global contextwm42013-12-215-4/+10
| | | | Will be needed for other parts (especially in gl_lcms.c).
* video/decode: mp_msg conversionswm42013-12-216-65/+73
| | | | Doesn't cover vdpau/vaapi parts yet, because these are a bit messier.
* video/filter: mp_msg conversionswm42013-12-2117-122/+103
|
* x11: don't set global error handlerwm42013-12-211-22/+0
| | | | | | | | | This has similar problems as the ALSA message callback, though in theory we could use the Display handle to find the right mpv instance from the global callback. It still wouldn't work if another library happens to set the error handler at the same time. There doesn't seem much of an advantage overriding the error handler (though it used to be required), so remove it.
* ao_alsa: don't set ALSA message callbackwm42013-12-211-21/+0
| | | | | | | This could output additional, potentially useful error messages. But the callback is global and not library-safe, and would require us to add additional state. Remove it, because it's obviously too much of a pain. Also, it seems ALSA prints stuff to stderr anyway.
* msg: handle vsnprintf errorswm42013-12-201-1/+2
| | | | | | | I don't know under which circumstances this can error (other than a broken format string). It seems it won't return an error code on I/O errors, so maybe broken format strings are the only case. Either way, don't continue if an error is returned.
* msg: use a global lock to synchronize printingwm42013-12-201-4/+7
| | | | | | | | | | | | | | We have certain race conditions coming from doing multiple fprintf() calls (setting up colors etc.). I'm not sure whether it would be worth changing to code such that we do only one fprintf() call (and assume this synchronizes access), but considering it would be hard to do (Windows compatibility, ...), and that stdio uses per FILE locks anyway, this is simpler and probably not less efficient. Also, there's no problem handling the weird statusline special case this way. Note that mp_msg_* calls which are silent won't acquire the lock, and acquiring the lock happens on actual output only (which is slow and serialized anyway).
* msg: change --msglevel, reduce legacy gluewm42013-12-209-140/+190
| | | | | | | | | | | | Basically, reimplement --msglevel. Instead of making the new msg code use the legacy code, make the legacy code use the reimplemented functionality. The handling of the deprecated --identify switch changes. It temporarily stops working; this will be fixed in later commits. The actual sub-options syntax (like --msglevel-vo=...) goes away, but I bet nobody knew about this or used this anyway.
* msg: cosmetic changeswm42013-12-202-124/+87
| | | | | In particular, condense the legacy MSGT_ defines and move them to the end of the file.
* msg: change hack to silence command line pre-parse error messageswm42013-12-203-6/+6
| | | | mp_msg_levels[] will go away.
* terminal: remove separate formatting for --msgmodulewm42013-12-201-4/+1
| | | | Instead, --msgmodule uses the same formatting as -v.
* terminal: abstract terminal color handlingwm42013-12-205-105/+81
| | | | | | | | Instead of making msg.c an ifdef hell for unix vs. windows code, move the code to separate functions defined in terminal-unix.c/terminal- win.c. Drop the code that selects random colors for --msgmodule prefixes.
* w32_common: support file drag and dropMartin Herkt2013-12-201-0/+38
|
* input: make parse_cmd_strv take const argsMartin Herkt2013-12-202-2/+2
|
* osc: use mp.send_commandvwm42013-12-201-18/+18
| | | | | See previous commit. Drop no-osd prefixes, as this is the default for send_commandv anyway. send_command should probably be renamed later.
* input, lua: add functions to take pre-split input commandswm42013-12-203-70/+185
| | | | | | | | | | | | | | So you can pass a command as list of strings (each item is an argument), instead of having to worry about escaping and such. These functions also take an argument for the default command flags. In particular, this allows setting saner defaults for commands sent by program code. Expose this to Lua as mp.send_commandv command (suggestions for a better name welcome). The Lua version doesn't allow setting the default command flags, but it can still use command prefixes. The default flags are different from input.conf, and disable OSD and property expansion.
* terminal: move SIGTTOU signal handler setup codewm42013-12-192-7/+2
| | | | | | This comes with a real change in behavior: now the signal handler is set only when the terminal input code is active (e.g. not with --no-consolecontrols), but this should be ok.
* Rename getch2....c/h to terminal....c/hwm42013-12-1911-19/+16
| | | | | "getch2" really tells nothing about what the heck this code does. It'd be even worse when moving the rest of terminal handling code there.
* crosscompile-mingw.txt: fix instructionswm42013-12-191-1/+1
| | | | | The instructions hardcode some paths, so it sure would be better if the listed commands actually use this path.
* player: replace some overlooked mp_msgswm42013-12-198-42/+31
| | | | | There are still some using IDENTIFY, and some without context in configfiles.c.
* options: use M_OPT_EXIT with -Vwm42013-12-191-1/+1
| | | | | Otherwise, output will actually be muted during pre-pase stage, and it will exit before running it again with output enabled.
* ta: fix compilation with NDEBUGwm42013-12-191-1/+2
|
* m_option.h: actually remove config.h includewm42013-12-191-1/+0
| | | | This was supposed to be done in commit 80b34ebe.
* stream: remove stale MAX_STREAM_PROTOCOLS definewm42013-12-191-2/+0
|
* command: remove radio commandswm42013-12-194-50/+1
| | | | | | | Remove these because I'm too lazy to convert them to proper STREAM_CTRLs. Considering that probably nobody uses radio://, caring about this is a complete waste of time. I will add these commands back if someone asks for them, but I don't expect this to happen.
* w32_common: fix mouse clicksMartin Herkt2013-12-191-12/+17
| | | | | | | | | | | | | | Apparently this has been broken for a year or so. The were three reasons for the breakage here: 1. The window dragging hack prevented any DOWN event from passing through since it always returned before we even got the button. 2. The window style had CS_DBLCLKS in its flags, so we did not get any DOWN events when the OS had detected a double click (instead expecting us to handle a DBL event). 3. We never sent any mouse buttons when mouse movement handling was disabled.
* ao_wasapi: fix includeswm42013-12-181-3/+2
| | | | Broken due to recent header renaming. Untested.
* vf_lavfi: don't access AVFilterPad directlywm42013-12-181-2/+3
| | | | Direct access is deprecated.
* ad_lavc: work around deprecation warningwm42013-12-181-1/+4
| | | | | | | | | | request_channels has been deprecated for years (request_channel_layout is the replacement), but it appears it's still needed despite the deprecation at least on older libavcodec versions. So still set request_channels, but to it with the avoption API, which hides the deprecation warning. This should also prevent mpv getting trashed when libavcodec happens to bump its major version.
* m_option: don't include config.h in headerwm42013-12-182-7/+11
| | | | Requires a small workaround.
* Reduce recursive config.h inclusions in headerswm42013-12-1816-17/+18
| | | | | | In my opinion, config.h inclusions should be kept to a minimum. MPlayer code really liked including config.h everywhere, though, even in often used header files. Try to reduce this.
* stream: move O_BINARY dummy definitionwm42013-12-182-4/+4
|
* Remove the _ macrowm42013-12-187-47/+48
| | | | | This was a gettext-style macro to mark strings that should be translated.
* ildetect: add ILDETECT_FORCE_RUN (if interlacing could not be decided, ↵Rudolf Polzer2013-12-181-1/+7
| | | | assume yadif).
* command: better check whether file duration is availablewm42013-12-171-1/+1
|
* old-makefile: fix mpvcore references and the DIRS variablewm42013-12-171-3/+8
|
* Fix OSX build; remove all remaining mpvcore references11rcombs2013-12-178-20/+20
|
* Split mpvcore/ into common/, misc/, bstr/wm42013-12-17235-376/+380
|
* Merge mp_talloc.h into ta/ta_talloc.hwm42013-12-1710-70/+45
|
* Move options/config related files from mpvcore/ to options/wm42013-12-17144-210/+210
| | | | | | | | | Since m_option.h and options.h are extremely often included, a lot of files have to be changed. Moving path.c/h to options/ is a bit questionable, but since this is mainly about access to config files (which are also handled in options/), it's probably ok.
* Move libquvi stuff to stream/resolve/wm42013-12-179-8/+6
|
* Move mpvcore/input/ to input/wm42013-12-1727-42/+45
|
* Rename mp_lua.c/h to lua.c/hwm42013-12-176-8/+8
|
* Rename mp_core.h to core.hwm42013-12-1718-17/+17
| | | | Get rid of the mp_ prefix.
* Move mpvcore/player/ to player/wm42013-12-1725-54/+56
|
* Replace mp_tmsg, mp_dbg -> mp_msg, remove mp_gtext(), remove set_osd_tmsgwm42013-12-1649-325/+309
| | | | | | | | | The tmsg stuff was for the internal gettext() based translation system, which nobody ever attempted to use and thus was removed. mp_gtext() and set_osd_tmsg() were also for this. mp_dbg was once enabled in debug mode only, but since we have log level for enabling debug messages, it seems utterly useless.
* input: remove LIRCCD supportwm42013-12-164-36/+0
| | | | | | | This removes support for the "LIRC Client Daemon", which is separate from LIRC, and hasn't been maintained for 10 years. See github issue #413.
* command: mess with previous commitwm42013-12-161-11/+9
| | | | | | Nothing actually used the returned length. Since the remaining time can easily become 0 or negative (e.g. incorrectly estimated file duration), the time_remaining function still needs 2 return values, though.
* command: scale osd’s time remaining by the current speedVivek Jain2013-12-163-6/+29
| | | | Signed-off-by: wm4 <wm4@nowhere>
* manpage: fix --vf=expand aspect ratio exampleAlessandro Ghedini2013-12-161-1/+1
|
* input: move multi-command parsing somewhere elsewm42013-12-161-32/+38
| | | | | I'm planning to add a mode to pass commands as a pre-split list of strings, and this will probably be useful to reach this goal.
* input: adjust code to make quoted/not quoted cases more unifiedwm42013-12-161-8/+11
|
*