Commit Graph

434 Commits

Author SHA1 Message Date
Uoti Urpala 56fec4dfdc mencoder.c: Remove unused function
mp_check_interrupt_callback should have been removed when
stream_set_interrupt_callback was added as stream no longer requires
the symbol.
2008-04-30 07:01:33 +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 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 0885f4e5b5 Move vf_settings to options struct 2008-04-26 01:19:29 +03:00
Uoti Urpala 66bd120a3a Move dvdsub_id to options struct
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.
2008-04-23 13:48:38 +03:00
Uoti Urpala c0c914effd Move audio_id and video_id to options struct 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 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 9b06b5ed85 Move correct_pts to options struct 2008-04-23 13:41:05 +03:00
Uoti Urpala 0d59f81e54 Add option pointer to vf struct 2008-04-23 13:41:05 +03:00
Uoti Urpala 7039bc090a Add option pointer to demuxers and stheader.h structs 2008-04-23 13:41:05 +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
albeu db3ca5062a Fix the indentation after the noconfig patch.
Patch by Andrew Savchenko (Bircoph -at- list -dot- ru).


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26450 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-04-14 11:24:24 +00:00
albeu 6e62b3a85f Add options to disable some or all config files.
Patch by Andrew Savchenko (Bircoph -at- list -dot- ru).


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26448 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-04-14 11:21:29 +00:00
albeu c439e8b468 Add support for system wide config file in mencoder.
Patch by Andrew Savchenko (Bircoph -at- list -dot- ru).


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26447 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-04-14 11:05:52 +00:00
albeu e4dc453ea0 Replace the trivial command line preparser with a more robust version
allowing all kind of options to be used.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26440 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-04-13 19:18:51 +00:00
reimar 58054ed4a0 Better mark variables that are changed by the signal handler as volatile
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26321 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-04-03 16:57:16 +00:00
eugeni 7cc46c2e87 Support 'default' attribute for audio and subtitle tracks.
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
2008-03-30 16:55:46 +00:00
diego 2a9e515c77 Move duplicated extern declarations of mp_msg_levels and mp_msg_level_all
to cfg-common.h where they are really needed.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26162 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-03-04 21:45:36 +00:00
diego 2c66b8ea24 #include parser-cfg.h instead of declaring m_config_parse_config_file extern.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26160 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-03-04 21:02:42 +00:00
eugeni 22465e56cc Select audio stream in mplayer and mencoder, overriding demuxer decision.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26122 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-29 17:25:50 +00:00
eugeni 96b0752265 Demuxer-independent subtitle track selection.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26119 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-29 17:25:44 +00:00
reimar 576e184411 Attempt to fix -chapter broken for mkv in r25987
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26113 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-28 19:41:40 +00:00
diego 21c200e767 FFmpeg now uses different (unified) #include paths.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26101 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-25 15:46:36 +00:00
diego 77eb726c3d Remove pointless #ifdefs around extern declarations.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26039 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-20 08:51:53 +00:00
reimar 85f638a50e Try to make fps float -> AVRational conversion work better.
Might make sense to change this once we at least use double for
fps everywhere.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25998 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-14 17:38:52 +00:00
reimar c1a683ad8c Change force_fps and force_ofps to double
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25997 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-14 14:50:34 +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 f785eba8a1 -chapter is now handled uniformly calling demuxer_seek_chapter() instead
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
2008-02-11 22:03:34 +00:00
reimar fd9fe1584d It seems that mencoder can not handle correct-pts (lots of "No pts ..." messages),
so disable it for now.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25954 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-05 09:02:01 +00:00
iive 27edd5ed7f Extend the precision of rationale conversion so
it would give proper result for framerate 60000/1001 .
Otherwise framerate restrained encoders like lavc mpeg2video
would refuse to encode, even if -ofps 60000/1001 is given.



git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25811 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-19 23:19:41 +00:00
zuxy d3d6089472 Happy New Year!
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25583 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-02 07:38:40 +00:00
ulion 4f4c08415c Fix libass to support -nofontconfig.
For history reason, fontconfig is auto-enabled when ass is enabled,
we keep this behavior and document it clearly.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25379 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-12 10:00:34 +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
uau 6338c068a2 Simplify init_audio_filters() arguments
Remove the following arguments as redundant: in_channels, in_format,
out_minsize, out_maxsize. The first two always equal fields of the
sh_audio_t struct given as the first argument to the function. The
last two are unused after the allocation of sh_audio->a_out_buffer
was changed to be done on demand.

After the out_minsize and out_maxsize arguments are removed the
function preinit_audio_filters() is identical to init_audio_filters(),
so remove it and use the latter instead.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24922 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-01 06:52:28 +00:00
uau 1844e1dd0c Change decode_audio() interface
Rewrite decode_audio to better deal with filters that handle input in
large blocks. It now always places output in sh_audio->a_out_buffer
(which was always given as a parameter before) and reallocates the
buffer if needed. After the changes filters can return arbitrarily
large blocks of data without some of it being lost. The new version
also allows simplifying some code.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24920 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-01 06:52:19 +00:00
uau a6d6f18216 Clean up some fields in stheader.h structs
sh_video_t: void *video_out: only assigned to, never read. Remove.
sh_video_t: void *vfilter: change type to struct vf_instance_s *
sh_audio_t: void *afilter: change type to struct af_stream_s *

The latter two never hold different types so there's no reason to use
void *. Maybe they were originally defined that way because the
option of using pointers to incomplete struct types was missed (the
typedefs vf_instance_t and af_stream_t would require extra headers)?


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24919 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-01 06:52:14 +00:00
diego 7415e7aad1 warning fix:
cfg-common.h:347: warning: redundant redeclaration of 'vd_use_slices'
libmpcodecs/vd.h:19: warning: previous declaration of 'vd_use_slices' was here


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24397 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-09-10 10:57:40 +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 aaf54a6f04 Fix warning:
mencoder.c:137: warning: redundant redeclaration of 'verbose'
mp_msg.h:6: warning: previous declaration of 'verbose' was here


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24181 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-25 15:53:27 +00:00
uau c51c1fc668 Make terminal input work more like VO key input
The Unix version of getch2() could either return an internally buffered
key or do a second-level select() in addition to the input.c one and
then read more data. Change getch2() to always add all read keys with
mplayer_put_key() (like video output window keyboard input does) and
remove the internal select() from the Unix version. Make input.c call
mplayer_get_key() directly.

The primary motivation for this change is to make combining multiple
event sources under one select() easier. Now getch2() only needs to be
called when the corresponding fd is readable, and it will be possible to
handle events from X-based VOs with the same code.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24149 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-25 04:28:08 +00:00
cehoyos 14ad2241a6 Kill two warnings.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24025 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-07 21:49:17 +00:00
nicodvb 40b96432a1 added support for -alang and -slang with dvdnav:// streams
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23787 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-07-15 20:32:19 +00:00
diego ba2799502d Create a new MSGT for just the status line.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23478 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-06-05 16:13:00 +00:00
reimar 5d02058b47 Do not use fast_memcpy for small size copy, esp. when the size is constant
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23476 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-06-05 15:09:49 +00:00
reimar 6a09e8e2ed Replace implicit use of fast_memcpy via macro by explicit use to allow
for future optimization.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23475 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-06-05 14:27:54 +00:00
ben 194fc1b15b add new -subfont option, that allows having a different font for OSD (controls and menu) and subtitles
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23356 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-05-20 16:10:45 +00:00
diego 4dd84909d1 Simplify #include directives.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23138 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-26 13:26:41 +00:00
compn 8b55dfcf11 make -really-quiet hide the mencoder version tags. patch copied from michael
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23113 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-25 13:47:06 +00:00