Commit Graph

47 Commits

Author SHA1 Message Date
Uoti Urpala 77c709ad31 Start pause handling changes
Add separate pause_player() / unpause_player functions(), move some
pausing-related state into explicit variables and make commands while
paused not unpause. Not everything works properly while paused yet (no
screen updates etc).
2008-12-09 04:31:07 +02:00
Uoti Urpala 8c144171bb Merge svn changes up to r28087
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
2008-12-04 01:55:52 +02:00
reimar f6b9f42516 Print ID_EXIT and exit reason message in identify mode when exiting.
Patch by rvm [rvm3000 ya com]


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28066 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-12-02 19:53:41 +00:00
Uoti Urpala 8ea7eb77fc core: Clean up move-to-next-file logic
The mpctx->eof field was used to also store other reasons to stop
playing the current file besides EOF, and the code didn't properly
distinguish those from EOF. Rename the field to "stop_play" and clean
up some of the code accessing it. Properly separating EOF from other
reasons allows handling file switching better.

Before this commit buffered audio was always drained before moving to
the next file (the only exception when it was NOT drained when
stopping a file was when quitting the player completely). This added
an extra delay when manually moving to the next file as you had to
wait for the currently buffered audio to finish playing before the
next file would start. After this commit audio is only drained if the
file reaches EOF normally; otherwise audio is cut and the next file
starts immediately.
2008-08-13 08:06:26 +03:00
diego 02135001b4 Change a bunch of video/audio-output-specific preprocessor directives from
a HAVE_ prefix to a CONFIG_ prefix.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27402 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-08-03 15:21:40 +00:00
Uoti Urpala 04f3909a72 Merge svn changes up to r27374
Conflicts:

	cfg-common-opts.h
	cfg-mplayer.h
	command.c
	configure
	libmpcodecs/dec_video.c
	libmpcodecs/vd.c
	libmpcodecs/vf_vo.c
	libmpdemux/demuxer.h
	libmpdemux/stheader.h
	mp_core.h
	mplayer.c
	stream/stream_radio.c
2008-07-30 16:39:24 +03:00
diego 4b141479da Start unifying names of internal preprocessor directives.
Replace all USE_ prefixes by CONFIG_ prefixes to indicate
options which are configurable.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27373 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-07-30 12:01:30 +00:00
Uoti Urpala a232f564d3 Create a context struct for OSD state
This commit creates the struct and passes it to some functions that
needs to access OSD state but does not yet move much data from globals
to it.

vf_expand accesses the OSD state for rendering purposes outside of the
normal OSD draw time. The way this currently works is suboptimal, but
I did not attempt to clean it up now. To keep things working the same
way vf_expand needs to know the address of the state object to be able
to access the data even in the functions that should normally not need
it. For that purpose this commit adds a VFCTRL to tell vf_expand the
address of the object.
2008-06-24 01:53:58 +03:00
Uoti Urpala d5c868325c Merge svn changes up to r26979
Most of the conflicts are trivial.

Conflicts:

	Makefile
	cfg-mplayer.h
	input/input.c
	libmenu/vf_menu.c
	libmpcodecs/dec_video.c
	libmpcodecs/vf_expand.c
	libmpcodecs/vf_vo.c
	libmpdemux/demux_mkv.c
	libmpdemux/demuxer.c
	libmpdemux/demuxer.h
	libvo/vo_directfb2.c
	libvo/vo_gl.c
	libvo/vo_winvidix.c
	libvo/vo_xv.c
	libvo/vo_xvidix.c
	libvo/vo_xvmc.c
	libvo/x11_common.c
	mplayer.c
	osdep/timer-linux.c
	stream/cache2.c
2008-06-04 08:10:48 +03:00
ben bc212e3500 Add a slave command to stop stream playback.
Mostly useful when used with -idle mode.
Patch by Mathieu Schroeter ( mathieu dot schroeter at gamesover dot ch )



git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26909 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-27 18:39:57 +00:00
Uoti Urpala 66db9ec7d6 Remove INITIALIZED_INPUT from mpctx->initialized_flags
The input functions are never uninited except at exit. Move the uninit
to player exit function and remove the flag.
2008-04-30 13:24:56 +03:00
Uoti Urpala 9e9932d4d7 Create a context for input.c state
Start moving static variables to a context struct. Only autorepeat
state is moved to the struct in this commit.

mp_input_check_interrupt now requires the context variable. Change
stream functions to pass it. It's still stored in a static variable in
stream/.
2008-04-30 13:24:54 +03:00
Uoti Urpala 77ec83e351 Add a context for mp_fifo
Store data in an allocated context and take it as an argument instead
of using static variables.
2008-04-29 15:36:51 +03:00
Uoti Urpala eaf7857b7f timers: Remove GetRelativeTime()
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.
2008-04-28 12:18:45 +03:00
Uoti Urpala 37e1edee35 Move initialized_flags to mpctx
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.
2008-04-26 15:31:39 +03:00
Uoti Urpala 80d43e8632 Move global filename to mpctx 2008-04-26 15:17:51 +03:00
Uoti Urpala fb33e286b5 Move global mconfig to mpctx
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.
2008-04-26 10:44:59 +03:00
Uoti Urpala 0e757bf9da Remove _s/_st suffix from some struct names
Since the names are always used after the keyword "struct" having a
suffix as in "struct demuxer_st" is almost completely pointless.
2008-04-25 03:34:22 +03:00
Uoti Urpala c510959da5 Remove some unnecessary recursive includes
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.
2008-04-23 13:48:38 +03:00
Uoti Urpala d9aa368a6d Move playback_speed to options struct 2008-04-23 13:48:37 +03:00
Uoti Urpala 3ee6503a07 Move global rel_seek_secs and abs_seek_pos to mpctx 2008-04-23 13:48:37 +03:00
Uoti Urpala c1f9fe7d67 Remove static mpctx from mplayer.c
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.
2008-04-23 13:48:33 +03:00
Uoti Urpala ef74d21b1f Move loop_times to option struct 2008-04-23 13:47:44 +03:00
Uoti Urpala 67778746ce Remove pointless #ifdefs
These #ifdefs only made MPContext 2 variables smaller when dvbin
support was disabled.
2008-04-23 13:47:43 +03:00
Uoti Urpala acf319b3ed Create a struct for X11 state
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.
2008-04-23 13:41:07 +03:00
Uoti Urpala 9db0c118d3 Start of new option system
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.
2008-04-23 13:41:05 +03:00
Uoti Urpala 2bcfe1e077 Add new video driver API
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.
2008-04-23 13:41:04 +03:00
uau e3a29a7f4e mp_core.h: Fix use of 'mp_image_t' without definition
A field under #ifdef USE_DVDNAV had type "mp_image_t *', but a
definition of the type was not included. Fix by changing the type to
"struct mp_image_s *".

This probably started causing visible compilation failures after
'#include "command.h"' was added to command.c, as that led to
mp_core.h being included earlier.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26304 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-03-31 04:10:51 +00:00
diego b5ed673f32 Add necessary #includes to pass 'make checkheaders'.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26163 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-03-04 23:35:24 +00:00
diego 8efb2fa21c Add MPLAYER_ prefix to multiple inclusion guards.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26061 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-22 09:09:46 +00:00
diego 835c654bb0 typo fix: inited --> initialized
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25994 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-14 14:23:55 +00:00
reimar 6921ab9e24 ao_functions_t should be const, part 1
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25945 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-01 20:11:14 +00:00
ulion e68bcf565f Split osd related stuff from mp_core.h into new header file mp_osd.h.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25931 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-30 07:21:05 +00:00
ben d56fe785be Add support for dvdnav still frames playback.
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
2008-01-26 11:51:34 +00:00
diego 2b6af2000b Add multiple inclusion guards to all header files that lack them.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25581 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-01 21:35:58 +00:00
ulion d2ace632c6 When auto loading subs, log warning instead of error for load failure.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25292 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-04 12:34:44 +00:00
reimar 844c8ffc48 Mark several uses of vo_functions_t as const to stop some of the current
hacks e.g. in vidix code from spreading.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25247 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-02 14:24:23 +00:00
diego 84157efa5a Clean up the way get_path is handled: Compile get_path.c to an object to link
against instead of directly #including the C file and replace the many extern
declarations by a proper header file.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24262 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-28 11:20:24 +00:00
diego 11dbdc22db Fix warnings:
In file included from mplayer.c:191:
mp_fifo.h:5: warning: redundant redeclaration of 'mplayer_put_key'
mp_core.h:129: warning: previous declaration of 'mplayer_put_key' was here
In file included from command.c:59:
mp_fifo.h:5: warning: redundant redeclaration of 'mplayer_put_key'
mp_core.h:129: warning: previous declaration of 'mplayer_put_key' was here


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24182 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-25 16:03:02 +00:00
diego 030020a181 Fix warnings:
In file included from mplayer.c:341:
libass/ass_mp.h:27: warning: redundant redeclaration of 'ass_enabled'
mp_core.h:115: warning: previous declaration of 'ass_enabled' was here
In file included from command.c:58:
mp_core.h:115: warning: redundant redeclaration of 'ass_enabled'
libass/ass_mp.h:27: warning: previous declaration of 'ass_enabled' was here


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24178 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-25 13:28:25 +00:00
diego b39cfa205f Declare all vo_gamma variables in libvo/video_out.h and remove them from
mp_core.h to avoid some redundant redeclaration warnings.
patch by Gábor Mizda, gabrov freemail hu


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24047 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-12 12:21:07 +00:00
Gabrov d2705f7abe fix redundant redeclaration warning
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23817 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-07-18 13:02:08 +00:00
albeu f48a4beff0 Move loop_times into mpctx.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23746 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-07-09 14:51:47 +00:00
uau c60af33716 Move the sh_audio->delay field to mpctx->delay.
The value is related to overall a/v sync and is not used by audio
demuxers or decoders.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22506 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-03-11 06:16:14 +00:00
uau 29f6d11d8c Move some related variables together & add a comment
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22315 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-02-22 20:44:48 +00:00
uau 3c0c8686fd Cleanup, move "global" state from the frame_time_remaining mainloop
variable to mpctx.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22306 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-02-21 21:59:33 +00:00
uau d5d4c6c7e2 Split command/property handling from mplayer.c to a new file command.c.
Move some global and static variables under a struct that can be given
as a parameter. Add a context argument to the property functions so that
they do not have to depend on global/static variables.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22298 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-02-21 00:49:24 +00:00