summaryrefslogtreecommitdiffstats
path: root/command.c
Commit message (Collapse)AuthorAgeFilesLines
* command.c: Change cast to avoid a warningreimar2010-11-021-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31795 b3059339-0415-0410-9bf9-f77b7e298cf2
* slave mode: Add stream_time_pos propertyreimar2010-11-021-0/+13
| | | | | | Patch by Paul Huwe [reicow yahoo com] with some modifications by me. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31794 b3059339-0415-0410-9bf9-f77b7e298cf2
* subs: Change global subtitle numbering schemereimar2010-11-021-48/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf"Uoti Urpala2010-05-291-1/+1
| | | | | | | Change 'struct vf_instance' pointer arguments to more standard style as in the subject. Also some other minor formatting fixes. Patch by Diego Biurrun.
* Make audio stream index handling saner in stream switchingUoti Urpala2010-05-221-13/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The handling of audio stream numbering was handled in the stream selection property was a total mess. The most important issue was confusion between values used as index for demuxer->audio_streams[] array (consistently stored in demuxer->audio->id) and values stored in sh_audio->aid and used as "-aid N" option values. Now demuxer audio switch control functions and demuxer_switch_audio() are supposed to return the new value for the "-aid" option (internal MPEG demuxers still don't; the demuxer requirement could perhaps be dropped as it can be easily calculated afterwards). That is also the value returned for the "switch_audio" property. The main changes are: - Make command.c mp_property_audio() consistently use and return the "-aid" values. Before it used that as input but the array index as output, with extra mess related to demuxer_switch_audio() return value. Don't modify the audio_id option field any more. - Make demuxer_switch_audio() always return "-aid" values (like it takes as input). There are two changes for this: picking this return value in case the demuxer doesn't support switching, and overriding demuxer return value (for internal MPEG demuxers). - Make demux_lavf return "-aid" values from DEMUXER_CTRL_SWITCH_AUDIO code. This isn't actually necessary because of the override part above. Here's some history of the relevant behavior that I looked up: * For most demuxers array index and "-aid" values are the same. At least demux_mkv, (some of?) the internal MPEG demuxers and demux_ogg have differed for a long time. demux_ogg doesn't matter because it doesn't support stream switching. * Old code seemed to assume that demuxer_switch_audio() return value was array index, but this wasn't true at least for demux_mkv. * In svn r19951 reimar mostly removed use of the return value. * In r20162 ptt added mp_property_audio(). This set the global audio_id variable (-aid option value) to the return value of demuxer_switch_audio() and treated the global as the persistent value of the property, apparently assuming that it would be set to the "-aid" value, not array index. This was false for internal MPEG. * In r30124 reimar changed the property code so that even though it still modified the option value it didn't use that as the value of the property any more; instead it incorrectly used the array index. This meant that for demux_mkv the return value didn't match -aid any more (though input still did, so setting the property and querying it didn't match as they used different value systems). * In r31129 aurel made demux_lavf changes that resulted in its -aid and array index values no longer matching either. He didn't change the return value from audio switch when changing -aid, so it now matched array index only. The latter part didn't cause additional problems from r20162 though because either choice would have been broken anyway after r30124 as long as they weren't the same value.
* Merge svn change r31134Uoti Urpala2010-05-071-1316/+1316
|\ | | | | | | Fix some search/replace errors introduced in the svn commit.
| * the great MPlayer tab removal: part IIdiego2010-05-031-1416/+1416
| | | | | | | | | | | | | | some extra indentation fixes are put in as a bonus git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31134 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r31033Uoti Urpala2010-04-261-0/+48
|\|
| * Add slave commands for loading and unloading audio filters at runtime.cehoyos2010-04-111-0/+37
| | | | | | | | | | | | | | Patch by Jehan Hysseo, hysseo zemarmot net git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31030 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add osd_show_progression: Show progress bar and elapsed/total time.cehoyos2010-04-091-0/+11
| | | | | | | | | | | | | | Patch by Hugo Chargois, hugo D chargois A free fr git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31028 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30967Uoti Urpala2010-04-261-1/+1
|\|
| * 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
* | Fix chapter handling with first chapter not at beginning of fileUoti Urpala2010-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | Before "-chapter 1" did nothing even if the first chapter didn't start at the beginning of file. Fix it. Before all chapter property commands (including chapter seek keys) failed if the current playback position was before the start of the first chapter. Now they'll work. Relative chapter seeks will go to the first chapter (even if that's in the wrong direction for backward seeks).
* | Move seek-reset functionality out of demuxer.cUoti Urpala2010-04-231-0/+11
| | | | | | | | | | | | | | Move code for resetting decoders after seeks, chapter seeks and angle changes out of demuxer.c. This functionality belongs on a higher level; the demux layer can't always know what kind of reinitialization is required.
* | Delete things related to old translation systemUoti Urpala2010-03-101-1/+0
| | | | | | | | | | Remove the help/ subdirectory, configure code to create toplevel help_mp.h, and all the '#include "help_mp.h"' lines from .c files.
* | Merge svn changes up to r30475Uoti Urpala2010-03-091-0/+18
|\|
| * Add license header to all top-level files missing them.diego2010-01-301-0/+18
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30471 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30419Uoti Urpala2010-01-251-40/+56
|\|
| * Also handle ASS subtitles when removing subtitles via sub_remove slave command.reimar2010-01-221-0/+15
| | | | | | | | | | | | | | | | Fixes memory leaks and other strange behaviour like mismatch of name and subtitle data. Based on patch by Yuriy Kaminskiy [yumkam mail ru]. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30387 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Avoid duplicating code to remove subtitles (sub_remove slave command).reimar2010-01-221-38/+41
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30386 b3059339-0415-0410-9bf9-f77b7e298cf2
* | translations: corrently translate most OSD outputUoti Urpala2010-01-121-49/+52
| | | | | | | | | | | | Add various fixes needed to actually produce translated OSD output. About every OSD string that had a translation macro under the old system should be translatable now.
* | translations: add infrastructure for translated OSD messagesUoti Urpala2010-01-121-4/+4
| | | | | | | | | | | | | | Add function set_osd_tmsg() which is a version of set_osd_msg that translates its format argument. Pass OSD message strings in the command.c property_osd_display table through mp_gtext before they're used.
* | Merge svn changes up to r30136Uoti Urpala2009-12-301-27/+41
|\| | | | | | | Ignore another broken correct-pts change in 30134.
| * Return the actually playing audio/video id for get_property, not the onereimar2009-12-271-12/+12
| | | | | | | | | | | | | | | | selected e.g. via commandline (which resulted in -1 being returned most of the time). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30124 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Subtitle are now also available without video, so remove thatreimar2009-12-271-3/+0
| | | | | | | | | | | | | | check from the subtitle property handling. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30122 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Use the same condition to decide if the audio/video id property isreimar2009-12-271-12/+4
| | | | | | | | | | | | | | not available for all commands (get, set and print). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30121 b3059339-0415-0410-9bf9-f77b7e298cf2
| * When setting audio or video track make sure we will not try toreimar2009-12-271-2/+4
| | | | | | | | | | | | | | dereference a NULL pointer, e.g. because there is no video stream. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30120 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Print a ANS_ERROR reply if one of the *_property slave command fails.reimar2009-12-271-2/+25
| | | | | | | | | | | | | | Based on patch by Adrian Stutz [adrian sttz ch]. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30119 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Never include ass.h and ass_types.h directly, use ass_mp.h instead.reimar2009-12-191-1/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30067 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Fix printf format strings with invalid '%lf' conversionUoti Urpala2009-12-151-2/+2
| | | | | | | | | | | | | | Some code used an invalid '%lf' conversion specification for double arguments. Maybe they were written that way due to confusion with scanf where doubles are indicated by '%lf'; however it is not a valid printf format specifier. Change those cases to use '%f'.
* | options: Move ass_enabled to options structUoti Urpala2009-12-021-5/+6
| |
* | Merge svn changes up to r29912Uoti Urpala2009-11-161-31/+21
|\|
| * Show OSD message when enabling/disabling de-interlacing.cehoyos2009-11-141-0/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29912 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Avoid modifying dvdsub_id in command.c where possible.reimar2009-11-111-2/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29895 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Make sure the teletext property stuff does not crash if no demuxer is available.reimar2009-11-091-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29862 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Remove CONFIG_TV_TELETEXT.cehoyos2009-11-071-10/+0
| | | | | | | | | | | | | | | | DVB teletext support is nearly finished, it will be possible to read teletext from file, it will not be depending on reception any more. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29851 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Separate teletext from tv support.cehoyos2009-11-071-19/+18
| | | | | | | | | | | | | | Path by Francesco Lavra, francescolavra interfree it git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29848 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Move teletext specific code from stream into libmpcodecs.cehoyos2009-10-291-0/+1
| | | | | | | | | | | | | | Patch by Francesco Lavra, francescolavra interfree it git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29801 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Add yuv_colorspace property, implemented in vo_vdpau and vo_xvUoti Urpala2009-11-151-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a property to select YUV colorspace. Currently implemented only in vo_vdpau and vo_xv. Allows switching between BT.601, BT.709 and SMPTE-240M (vdpau only). The xv support uses the "XV_ITURBT_709" attribute. At least my NVIDIA card supports that; I don't know whether other xv implementations do. Bind the colorspace switch to the 'c' key by default. 'c' is currently used by vo_sdl for some fullscreen mode change thing, but at the moment that does not conflict and if it will in the future then vo_sdl can change. VDPAU part based on a patch from Lauri Mylläri <lauri.myllari@gmail.com>
* | Merge svn changes up to r29752Uoti Urpala2009-10-061-2/+3
|\| | | | | | | | | | | | | | | | | 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 update_subtitles work without sh_video for text subtitles.reimar2009-09-231-1/+6
| | | | | | | | | | | | | | | | | | 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
* | UI: Make the 'D' key print the new deinterlace statusUoti Urpala2009-09-191-1/+4
| | | | | | | | | | | | | | Define a way to show the property on the OSD and use step_property_osd instead of step_property. Also change the mp_property_deinterlace() function to use m_property_flag_ro() to make it print 'enabled/disabled' instead of 'yes/no'.
* | commands: Add set_property_osd and step_property_osdUoti Urpala2009-09-191-0/+11
| |
* | command.c: Split property OSD display from property commandsUoti Urpala2009-09-191-75/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function set_property_command() handles commands that require only changing a property and then possibly displaying the new value on the OSD somehow. Split it into two parts: one that executes commands by doing property manipulation according to a table, and one that displays the value of a given property on the OSD in a manner listed for that property in another table. The goal is to allow using the OSD-display code and information in generic commands that take the property name as an argument. Splitting the table in two was not strictly necessary - I could have kept it as a single table with possibly dummy field values for entries that only make sense for one part of the split function or the other. However I think splitting it is cleaner and more readable.
* | Merge svn changes up to r29684Uoti Urpala2009-09-161-0/+4
|\|
| * Make indentation consistent with the rest of the filereimar2009-09-081-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29659 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Never switch to a program with no audio and no video.reimar2009-09-081-0/+4
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29658 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r29532Uoti Urpala2009-08-181-10/+0
|\|
| * Only #include stream/stream_dvd.h when libdvdread is enabled.diego2009-08-031-0/+2
| | | | | | | | | | | | | | | | stream_dvd.h #includes some system headers that may be unavailable. Fixes compilation with libdvdread disabled. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29475 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Remove pointless #ifdefs around harmless internal header #includes.diego2009-08-021-16/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29471 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 the internal GUIAnton Khirnov2009-07-071-24/+0
| | | | | | | | | | | | | | | | | | The GUI is badly designed and too closely coupled to the internal details of other code. The GUI code is in bad shape and unmaintained for years. There is no indication that anyone would maintain it in the future either. Even if someone did volunteer to implement a better integrated GUI having the current code in the tree probably wouldn't help much. So get rid of it.
* | Merge svn changes up to r29412Uoti Urpala2009-07-071-4/+4
|\|
| * Make set_property chapter 0-based like all other chapter-relatedreimar<