Commit Graph

81 Commits

Author SHA1 Message Date
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 78172918ff Move vo_screenwidth,vo_screenheight to options struct 2008-04-23 13:46:40 +03:00
Uoti Urpala eaab1ce896 Move vo_dx,vo_dy,vo_dwidth,vo_dheight to vo struct 2008-04-23 13:46:40 +03:00
Uoti Urpala 7521aac665 Move global vo_config_count to vo struct
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.
2008-04-23 13:46:39 +03:00
Uoti Urpala bfe569b76e Move vo_ontop to options struct
Add a 'struct vo *vo' argument to the x11_common.c functions that
access the variable so it's available as vo->opts->vo_ontop. To keep
VOs using the old API working create a global vo variable that is set
to the currently used old vo. "vo_ontop" will be #defined to
"global_vo->opts->vo_ontop", and x11_common.h will add defines like
the following when it is included by old VOs:
 #define vo_x11_ontop() vo_x11_ontop(global_vo)
so that they will call the function according to the new declaration.
2008-04-23 13:41:06 +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 99901138ab Remove unnecessary includes
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
2008-04-01 15:24:53 +00:00
uau 03bb309e4e Include some .h files in corresponding .c files
Include the corresponding .h file in command.c, parser-cfg.c and
parser-mpcmd.c. This allows the compiler to check that the
declarations in the .h file match the actual defition.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26295 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-03-28 01:07:59 +00:00
eugeni bb006c761a Add missing #include.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26127 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-29 17:44:54 +00:00
eugeni a2fad60c7f Fill sh_sub_t.lang in lavf, mkv and ogg demuxers. Use it for printing subtitle
track language.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26116 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-29 17:25:39 +00:00
eugeni 18fea2aa49 Fill sh_audio_t.lang in lavf and mkv demuxers. Use it for printing audio track
language when available.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26115 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-29 17:25:37 +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
nicodvb 4c1fa58fbc show dvdnav selection in the OSD only when the osd_level>1; patch by foxcore gmail com
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25915 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-29 21:38:23 +00:00
reimar 92dd21a14d More places that should use SEEK_ABSOLUTE / SEEK_FACTOR
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25912 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-29 16:22:34 +00:00
reimar 69cbd37807 Simplify a condition that probably is not necessary at all
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25906 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-28 18:28:17 +00:00
ben 0728cf9637 reindent after r25881
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25882 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-27 15:32:09 +00:00
ben 073360b3a4 sub_scale command can now handle both ass and non-ass subs at a time
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25881 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-27 15:31:24 +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
ben e28bd7c6de Add new command to switch between dvdnav titles
Based on parts of dvdnav monster patches from Otvos Attila



git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25845 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-24 19:14:05 +00:00
ben 9b72cde125 cosmetic: reindent code after r25843
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25844 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-23 22:34:51 +00:00
ben 127ed985dd sub_scale command now works with ass subtitles renderer
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25843 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-23 22:33:46 +00:00
eugeni f817a5dc52 Add ass_use_margins command and property to shift subtitles to margins and back
on the fly.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25842 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-23 21:18:32 +00:00
reimar 00e5fe9b31 Make mp_properties const
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25745 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-13 17:00:46 +00:00
eugeni 0d36212f39 Remove global_ass_track. Instead create an ass_track for each 't' track.
Global_ass_track obviously can not work when there is more than one 't tracks,
their lines will be mixed up.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25684 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-11 21:45:20 +00:00
eugeni 8661c5f8c0 Clear demuxed data when subtitle track is changed.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25667 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-10 19:59:09 +00:00
nicodvb d5ac9af32e properties to get and set angle; patch by oattila chello hu
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25605 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-05 14:32:39 +00:00
ulion 3ca9d94c64 Fix property audio_delay bug when step up/down with arg value NULL.
Original patched by Davide Capodaglio <davidecapod A inwind P it>.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25595 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-05 01:40:36 +00:00
reimar 951bc25530 Add some const/static qualifiers as appropriate
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25523 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-24 16:27:52 +00:00
ulion acec444aa5 Check availability before check argument for getting gamma properties.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25493 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-22 08:35:15 +00:00
ulion 3db51117dd Revert to r25490, since the r25491 is not correct.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25492 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-22 06:35:35 +00:00
ulion 61d91f8196 Combine code for check availability of property audio(id).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25491 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-22 06:27:55 +00:00
ulion 376bbbdae0 Combine common code for check whether chapter is available.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25490 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-22 06:20:48 +00:00
ulion 673246be0c OSD menu support mouse selection.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25489 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-22 06:14:38 +00:00
ulion 6b51b17c51 Modified for using chapter property for $(NAME:TEXT) or ?(NAME:TEXT).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25430 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-17 03:42:54 +00:00
nicodvb c5ad15d8c0 dvb cleanup: call dvb_(set|step)_channel() without dereferencing stream->priv (1000l to me)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25405 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-15 13:05:06 +00:00
ulion d5e868e7cb Support chapter as a property.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25391 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-14 08:33:11 +00:00
ulion 0f04ca9adf Skip empty vobsub streams when selecting subtitles.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25279 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-03 04:08:36 +00:00
reimar 2f4b840f62 Remove last remains of long-gone VOCTRL_SCREENSHOT
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25243 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-02 13:53:03 +00:00
ulion 595de9b1fc Support select subtitle by source, add 4 properties:
1. sub_source for current sub source (sub file, vobsub, or from demuxer).
2. sub_file for all subtitles from files.
3. sub_vobsub for all subtitles from vobsub.
4. sub_demux for all subtitles from demuxer.
Now mplayer can supply a stable and clear interface to external programs
using mplayer in slave mode to select a subtitle by its source and
its unique id for that source printed by mplayer using -identify parameter. 


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25157 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-25 04:09:04 +00:00
ulion 647585034a Fix pausing_toggle not continue play bug when it follows a pause immediately.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25060 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-17 11:23:58 +00:00
voroshil c4debc9042 Implement X/27/0 packet decoding.
It contains information about navigation links.

Modified patch from Otvos Attila oattila at chello dot hu


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24264 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-28 14:10:47 +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 2c57acb279 Extract a poor int declaration from within the uncouth grip of an if statement
where it lay stranded in violation of both syntax and decency.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24183 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-25 16:15:46 +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 86354b25dd Move button variable into the if () where it is actually used.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24174 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-25 13:08:49 +00:00
diego d5fe94ec4c Fix unused variable warning when USE_DVDNAV is not defined.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24170 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-25 12:47:41 +00:00
voroshil f1fbca4bdd Automatic TV channels scanning ability for MPlayer.
Code is based on patch from Otvos Attila oattila at chello dot hu


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24125 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-23 16:09:30 +00:00