summaryrefslogtreecommitdiffstats
path: root/mplayer.c
Commit message (Collapse)AuthorAgeFilesLines
* timers: Remove GetRelativeTime()Uoti Urpala2008-04-281-7/+17
| | | | | | | | | | Move the code calculating time delta since last query out of the platform-specific drivers and into mplayer.c. The platform-specific drivers now return absolute values only. The way the code in timer-darwin.c uses doubles in wrapping arithmetic looks questionable and this change might make problems in it more visible.
* Move initialized_flags to mpctxUoti Urpala2008-04-261-28/+26
| | | | | | | | The function exit_sighandler had a line if(initialized_flags==0 && sig_count>1) exit(1); rather than try to make this work without the variable I just removed the line as it looks unlikely this condition would occur except very rarely.
* Move global filename to mpctxUoti Urpala2008-04-261-33/+32
|
* Disable automatic playlist parsing properlyUoti Urpala2008-04-261-0/+6
| | | | | | The playlist code is unsafe to use with potentially hostile sources. It was disabled by default for local files but not for network streams. Make sure it is not automatically triggered for network streams either.
* Silence "discards qualifiers" warnings when compiling mplayer.cUoti Urpala2008-04-261-2/+2
| | | | | | | | | | Add casts to subconfig entries in option lists to avoid the excessive amount of "initialization discards qualifiers from pointer target type" warnings. Also add const to the type of mpctx_get_audio_out to eliminate a warning and make it match the type in the header (svn r25793 had added a const to the header but not mplayer.c). Make libmenu_vfs a table of pointers to const to eliminate another warning plus make the table itself const.
* Move global mconfig to mpctxUoti Urpala2008-04-261-29/+28
| | | | | | | | | | | The global was used in the function cfg_include which handles the -include option. Make the address available in that function by creating a new dynamically allocated option in m_config_new that has the address in the option's private data. asxparser.c also used the global. Making it available through all ways the code could get called required a number of relatively straightforward changes to playtree and menu code.
* Merge svn changes up to r26540Uoti Urpala2008-04-261-1/+1
|\ | | | | | | | | | | Conflicts: Makefile
| * use existing MSGTR_FilefmtFourccSizeFpsFtime translatable string macrocorey2008-04-231-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26511 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Move vf_settings to options structUoti Urpala2008-04-261-4/+4
| |
* | Remove global vo_flagsUoti Urpala2008-04-251-2/+2
| | | | | | | | Move the information to struct sh_video field.
* | Remove _s/_st suffix from some struct namesUoti Urpala2008-04-251-1/+1
| | | | | | | | | | Since the names are always used after the keyword "struct" having a suffix as in "struct demuxer_st" is almost completely pointless.
* | Remove some unnecessary recursive includesUoti Urpala2008-04-231-0/+1
| | | | | | | | | | | | | | | | Remove some #include lines from headers, some of those removals made possible by using incomplete struct types instead of typedefs. Include mp_osd.h in mplayer.c and command.c after removing it from mp_core.h. Remove "#ifdef USE_ASS" around some "struct ass_track_s *" fields which will now compile even without ASS support.
* | Move dvdsub_id to options structUoti Urpala2008-04-231-16/+15
| | | | | | | | | | | | | | Name the field "sub_id" as it's not specific to DVD subs. Remove some other unused extern declarations together with dvdsub_id from demux_mkv.c and demux_lavf.c.
* | Move audio_id and video_id to options structUoti Urpala2008-04-231-7/+4
| |
* | Add option pointer to stream struct (at least temporarily)Uoti Urpala2008-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The stream code does not access many option variables directly, but it does access some such as audio_id and network_bandwidth (and does that without including proper headers for them). Add option pointer to the stream struct to allow access to those variables. Remove the unused (always NULL) and clumsy-looking char** options parameter in the open_stream call and replace it with the option pointer. The parameter is currently only set in the main open_stream() call in MPlayer.c and not in any other locations that can open a stream. In the long term it might be better to pass a more limited set of values somehow, but this should do for now.
* | Move playback_speed to options structUoti Urpala2008-04-231-26/+31
| |
* | Move global rel_seek_secs and abs_seek_pos to mpctxUoti Urpala2008-04-231-13/+9
| |
* | Remove static mpctx from mplayer.cUoti Urpala2008-04-231-104/+115
| | | | | | | | | | | | | | | | Pass it in function calls instead. There's no reasonable way to pass it to exit_player() when used outside mplayer.c. However most of those uses seem to be wrong (the code should not make the program exit) and should be removed. For now just make exit_player() uses outside mplayer.c simply call exit() without any shutdown code.
* | Move loop_times to option structUoti Urpala2008-04-231-7/+6
| |
* | Remove pointless #ifdefsUoti Urpala2008-04-231-2/+0
| | | | | | | | | | These #ifdefs only made MPContext 2 variables smaller when dvbin support was disabled.
* | Move global vo_config_count to vo structUoti Urpala2008-04-231-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the global and Add a corresponding field to the vo struct, plus another which tells whether the LAST config call was successful.The latter value which tells whether the VO should be properly configured at the moment seems a better match for the semantics actually needed in most places where the old value was used. The 'count' field with the old semantics is not currently used by anything, but I'm leaving it there for vo drivers which would need those semantics if converted to use the struct. Existing uses of the global outside old vo drivers are either converted to use the struct field or moved inside the vo_xyz() calls (instead of "if (vo_config_count) vo_flip_page(..." just call vo_flip_page which will now do nothing if not configured). The removal of the check in mpcommon.c/update_subtitles() is less trivial than the others, but I think it shouldn't cause problems.
* | Move global mDisplay to x11 state structUoti Urpala2008-04-231-3/+3
| |
* | Create a struct for X11 stateUoti Urpala2008-04-231-1/+6
| | | | | | | | | | | | | | | | Will be used for common data between X11 VOs. The main reasons for making it a separate struct rather than extra fields in the main VO struct are that some field definitions need X headers and that the code keeps basic X state such as the display connection over opening and closing of individual VOs.
* | Add option pointer to vo structUoti Urpala2008-04-231-1/+1
| |
* | Move correct_pts to options structUoti Urpala2008-04-231-1/+2
| |
* | Add option pointer to vf structUoti Urpala2008-04-231-3/+3
| |
* | Add option pointer to demuxers and stheader.h structsUoti Urpala2008-04-231-1/+1
| |
* | Declare demuxer *_streams fields with proper typesUoti Urpala2008-04-231-1/+1
| | | | | | | | | | | | | | | | Give sh_audio_t, sh_video_t and sh_sub_t which before had typedef names only a matching struct name (without _t) too. Change the a_streams, v_streams and s_streams demuxer fields from void * to struct sh_audio *, struct sh_video * and struct sh_sub *. Remove a now unnecessary cast from mplayer.c.
* | Move options "vo" and "ao" to common structUoti Urpala2008-04-231-14/+11
| |
* | Start of new option systemUoti Urpala2008-04-231-7/+10
| | | | | | | | | | | | | | | | First part of option restructuring. The aim is to move option values from a huge number of separate globals to a single non-global struct. This part adds some support for parsing option values into such struct instances, and moves one example option (fixed-vo) to the struct.
* | Add a context argument to mp_input_add_event_fd callbackUoti Urpala2008-04-231-1/+8
| |
* | Add new video driver APIUoti Urpala2008-04-231-8/+11
|/ | | | | | | | | | | | | Create new video driver API that has a per-instance context structure and does not rely on keeping status in global or static variables. Existing drivers are not yet converted to this API; instead there is a wrapper which translates calls to them. In the new API, an old API call vo_functions->xyz(args) is generally replaced by vo_xyz(vo_instance, args). The changes to keep the vesa, dxr2 and xover drivers compiling have not been tested.
* Add options to disable some or all config files.albeu2008-04-141-2/+4
| | | | | | | Patch by Andrew Savchenko (Bircoph -at- list -dot- ru). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26448 b3059339-0415-0410-9bf9-f77b7e298cf2
* Replace the trivial command line preparser with a more robust versionalbeu2008-04-131-7/+7
| | | | | | | allowing all kind of options to be used. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26440 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove the need for code using stream to export an mp_input_check_interrupt()albeu2008-04-091-0/+2
| | | | | | | function. It also removes the compile-time dependency on input. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26358 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add some const qualifiers to reduce warningsuau2008-04-021-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26320 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove unnecessary includesuau2008-04-011-2/+0
| | | | | | | | | | command.c: Don't include libmpcodecs/mp_image.h, libmpdemux/matroska.h mplayer.c: Don't include libmpdemux/matroska.h matroska.h: Remove declaration of already removed function demux_mkv_change_subs and stop including demuxer.h git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26313 b3059339-0415-0410-9bf9-f77b7e298cf2
* Support 'default' attribute for audio and subtitle tracks.eugeni2008-03-301-0/+2
| | | | | | | | | The first default track is chosen for playback if language-based selection failes. Additionally, for audio tracks, the first one is chosen if there are no default tracks at all. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26301 b3059339-0415-0410-9bf9-f77b7e298cf2
* Handle property commands in idle mode.reimar2008-03-281-0/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26296 b3059339-0415-0410-9bf9-f77b7e298cf2
* Experimental support for -framedrop with -correct-pts.reimar2008-03-171-21/+29
| | | | | | | | The code is not really correct, but it is very little and works "well enough" to be useful in my tests. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26260 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: Decrapify the indentation of the last few blocks of main().diego2008-03-071-68/+65
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26191 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move duplicated extern declarations of mp_msg_levels and mp_msg_level_alldiego2008-03-041-3/+0
| | | | | | | to cfg-common.h where they are really needed. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26162 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add ID_SEEKABLE information to -identify output.diego2008-03-031-0/+1
| | | | | | | patch by Mathieu SCHROETER, mathieu.schroeter gamesover ch git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26144 b3059339-0415-0410-9bf9-f77b7e298cf2
* Select audio stream in mplayer and mencoder, overriding demuxer decision.eugeni2008-02-291-0/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26122 b3059339-0415-0410-9bf9-f77b7e298cf2
* Demuxer-independent subtitle track selection.eugeni2008-02-291-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26119 b3059339-0415-0410-9bf9-f77b7e298cf2
* Attempt to fix -chapter broken for mkv in r25987reimar2008-02-281-1/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26113 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix continuous scrolling on OS/2 due to status line updates unless -quietdiego2008-02-221-1/+1
| | | | | | | | | option is specified. The problem is similar on Windows, so share the same workaround for both systems. patch by KO Myung-Hun, komh chollian net git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26059 b3059339-0415-0410-9bf9-f77b7e298cf2
* OS/2 getch2() supportdiego2008-02-211-5/+1
| | | | | | | patch by KO Myung-Hun, komh chollian net git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26048 b3059339-0415-0410-9bf9-f77b7e298cf2
* Rename mp_input_win32_slave_cmd_func to mp_input_slave_cmd_func.diego2008-02-211-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26047 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove pointless #ifdefs around extern declarations.diego2008-02-201-2/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26039 b3059339-0415-0410-9bf9-f77b7e298cf2
* Change force_fps and force_ofps to doublereimar2008-02-141-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25997 b3059339-0415-0410-9bf9-f77b7e298cf2
* typo fix: inited --> initializeddiego2008-02-141-49/+49
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25994 b3059339-0415-0410-9bf9-f77b7e298cf2
* -chapter is now handled uniformly calling demuxer_seek_chapter() insteadnicodvb2008-02-111-0/+12
| | | | | | | of letting individual demuxers and stream readers do their nasty job git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25987 b3059339-0415-0410-9bf9-f77b7e298cf2
* Do not reset correct_pts in mp_dvdnav_reset_stream, it does not seem necessaryreimar2008-02-031-1/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25952 b3059339-0415-0410-9bf9-f77b7e298cf2
* ao_functions_t should be const, part 1reimar2008-02-011-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25945 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use defines to give names to the different seek flags.reimar2008-01-291-4/+4
| | | | | | | | A better solution should be considered later, esp. for the many broken demuxers that do not treat these flags correctly. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25911 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make sure sub_font is freed.reimar2008-01-271-0/+2
| | | | | | | Patch by Guillaume LECERF (foxcore gmail com). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25880 b3059339-0415-0410-9bf9-f77b7e298cf2
* Support vobsub palette in extradata, as exported by libavformatreimar2008-01-261-0/+8
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25872 b3059339-0415-0410-9bf9-f77b7e298cf2
* Check for stream change in dvdnav.ben2008-01-261-0/+8
| | | | | | | | Set new aspect ratio if needed (for example in cell change) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25859 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add support for dvdnav still frames playback.ben2008-01-261-1/+170
| | | | | | | | | | | Based on various patches from Otvos Attila and MPlayer'ized by me. N.B. Always use -vc ffmpeg12 with dvdnav:// git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25852 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix auto-sub code to support filenames with any extension length.ulion2008-01-201-4/+9
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25818 b3059339-0415-0410-9bf9-f77b7e298cf2
* audio_out / video_out structs should be treated as constreimar2008-01-191-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25793 b3059339-0415-0410-9bf9-f77b7e298cf2
* Instead of keeping attachments in mkv demuxer, use demuxer_add_attachment().eugeni2008-01-121-0/+13
| | | | | | | These attachments are passed to libass after demuxer is opened. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25686 b3059339-0415-0410-9bf9-f77b7e298cf2
* allow profile loading per audio/video outputben2008-01-101-0/+22
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25669 b3059339-0415-0410-9bf9-f77b7e298cf2
* factorizes variable checkben2008-01-101-3/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25664 b3059339-0415-0410-9bf9-f77b7e298cf2
* add support for per protocol and per extension playback profile loadingben2008-01-101-0/+48
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25663 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use getppid instead of getpid and move a snprintf to where it is actually ↵reimar2008-01-081-2/+2
| | | | | | needed. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25653 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify a needlessly complex use of snprintfreimar2008-01-081-2/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25652 b3059339-0415-0410-9bf9-f77b7e298cf2
* Do not use exit_player in the signal handler, this code just can notreimar