1
mirror of https://github.com/mpv-player/mpv synced 2024-09-12 23:45:53 +02:00
Commit Graph

64 Commits

Author SHA1 Message Date
wm4
a19f197cb1 core: show quvi page title in window title, clean up libquvi handling
Clean up handling of libquvi (which resolves URLs of streaming sites
into URLs to the actual media playable by mpv). Move the code out of
open.c to quvi.c, and invoke it explicitly from mplayer.c, instead of
trying to resolve every filename passed to open_stream().

This allows easily passing metadata from the quvi context to the
frontend. Expose QUVIPROP_PAGETITLE as "media-title" property, and use
that instead of "filename" for the mplayer window title. (For YouTube,
this is the video title.) It's cleaner too.

Handle a potential reliability issue: check quvi_getprop return values.

Since open.c contains barely anything but the open_stream() stub, move
that to stream.c and delete open.c.
2012-10-14 22:26:41 +02:00
wm4
6f1486b397 commands: replace --hardframedrop, change framedropping property
Replace --hardframedrop with --framedrop=hard. Rename the framedrop
property from "framedropping" to "framedrop" for the sake of making
command line options have the same name as their corresponding
property. Change the property to accept choice values instead of
numeric values.

Remove unused/forgotten auto_quality variable.
2012-10-12 10:10:30 +02:00
Stefano Pigozzi
70e7d63ba0 core, timeline: cache external ordered chapter files too
Previously, Matroska source files other than the initially opened one
were always accessed without caching. Enable cache for extra files
too. A separate cache process/thread is started for each file, which
is less than optimal but probably better than no caching if the user
explicitly enabled cache. This commit only implements caching for
Matroska ordered chapters (not for EDL timeline).

To build the timeline we need to demux the files in the current
directory to look for segments with matching uuid. This first demux is
done with no cache since we don't need to read a lot of the stream. If
the file is recognized as one of the needed sources it's reopened with
cache enabled.

Also move the stream_cache_size global variable to the options struct.

Conflicts:
	cfg-mplayer.h
	mplayer.c
	stream/stream.h
	timeline/tl_matroska.c
2012-09-18 21:07:30 +02:00
wm4
17b69493b7 libvo: remove exit_player_bad()
For some reason, these 3 VOs basically call exit() if something
went wrong.
2012-07-30 15:46:05 +02:00
wm4
897d1c01bc mplayer: remove crash handler stuff
mplayer tries to catch all signals by default, and displays a "nice"
crash message if a signal is caught. This is mostly useless for
diagnosing problems, and it's extremely fragile. It's likely to cause
more harm than it possibly solves.

Also remove the current_module variable, which was supposed to give a
hint which submodule was being run. This was far from accurate or
useful.

mplayer also caught SIG_CHILD, and tried to wait for any children. This
potentially gets rid of zombies, but I'm not sure which ones. The only
places that fork(), cache2.c and unrar_exec.c, seem to wait for their
child processes properly. Just get rid of it.

Note that we don't even catch SIGTERM. Maybe this will have to be added
back in order to re-enable screensavers and such when the user
terminates mplayer with ^C on the terminal.
2012-07-30 01:38:53 +02:00
wm4
74e7a1e937 osd: use libass for OSD rendering
The OSD will now be rendered with libass. The old rendering code, which
used freetype/fontconfig and did text layout manually, is disabled. To
re-enable the old code, use the --disable-libass-osd configure switch.

Some switches do nothing with the new code enabled, such as -subalign,
-sub-bg-alpha, -sub-bg-color, and many more. (The reason is mostly that
the code for rendering unstyled subtitles with libass doesn't make any
attempts to support them. Some of them could be supported in theory.)

Teletext rendering is not implemented in the new OSD rendering code. I
don't have any teletext sources for testing, and since teletext is
being phased out world-wide, the need for this is questionable.

Note that rendering is extremely inefficient, mostly because the libass
output is blended with the extremely strange mplayer OSD format. This
could be improved at a later point.

Remove most OSD rendering from vo_aa.c, because that was extremely
hacky, can't be made work with osd_libass, and didn't work anyway in
my tests.

Internally, some cleanup is done. Subtitle and OSD related variable
declarations were literally all over the place. Move them to sub.h and
sub.c, which were hoarding most of these declarations already. Make the
player core in mplayer.c free of concerns like bitmap font loading.

The old OSD rendering code has been moved to osd_ft.c. The font_load.c
and font_load_ft.c are only needed and compiled if the old OSD
rendering code is configured.
2012-07-28 23:36:07 +02:00
Clément Bœsch
4587f030cc options: move sub_name, sub_auto and vobsub_name to struct 2011-04-20 04:22:52 +03:00
Uoti Urpala
43b1de1dd7 core: move most mpcommon.c contents to mplayer.c
The contents of mpcommon.c were quite arbitrary; the most common
reason to place some functions in this file had been "MEncoder happens
to need similar code as MPlayer and we want to share some parts, but
we have no clue whatsoever how to organize things in a sensible way,
so we'll just dump those parts we want to share in mpcommon.c". As a
result of containing an essentially random subset of top-level player
functionality the mpcommon.h header required access to central structs
and was unsuitable for inclusion in lower-level code, but was
nonetheless included there for the mplayer_version symbol.

Move almost all contents from mpcommon.c to mplayer.c. mplayer.c is
already big and should perhaps be split further, but keeping a few
random functions in mpcommon.c would not be an improvement.
2011-01-15 18:45:43 +02:00
Clément Bœsch
9a9a7feafe options: move various mplayer.c options to option struct
Following options were moved: [no]quiet, [no]autosync, softsleep,
[no]rtc, rtc-device.
2010-11-13 23:06:33 +02:00
diego
8e16ab8898 cosmetics: mplayer.c: Remove obsolete declarations
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32126 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:16:45 +02:00
Uoti Urpala
66a983985d mplayer.h: remove unnecessary declarations (dvd_device, cdrom_device) 2010-04-25 22:58:35 +03:00
Uoti Urpala
12d3caebc7 Merge svn changes up to r30475 2010-03-09 19:18:43 +02:00
diego
99c1bbca2a Add license header to all top-level files missing them.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30471 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-30 23:24:23 +00:00
Anton Khirnov
87366694d8 Remove the internal GUI
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.
2009-07-07 21:49:42 +03:00
Uoti Urpala
694c067e19 options: Move osd_level and osd_duration to options struct 2009-03-31 18:24:10 +03: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
diego
0864f92e7a Get rid of pointless 'extern' keywords.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28085 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-12-03 23:01:03 +00:00
Uoti Urpala
8685eea8c2 Rename exit_player() use outside core to exit_player_bad()
The VOs which use it shouldn't really exit the whole program. The
renaming will allow including mplayer.h in mplayer.c without clashing
with the static exit_player() there.
2008-08-12 14:57:18 +03:00
Uoti Urpala
80d43e8632 Move global filename to mpctx 2008-04-26 15:17:51 +03:00
Uoti Urpala
60e2c8604d Move movie_aspect to options struct 2008-04-25 03:34:28 +03:00
Uoti Urpala
1351b50ea5 Move flip and softzoom to options struct 2008-04-25 03:34:27 +03:00
Uoti Urpala
41d6879236 Move fullscreen to options struct 2008-04-25 03:34:27 +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
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
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
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
26691d09f8 Remove redundant extern variable declarations, include proper headers instead.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24169 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-25 12:25:34 +00:00
diego
a931e510b1 Identifiers starting with underscores are reserved.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23954 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-07-31 07:04:07 +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
reimar
f9b2e78d79 Remove some of the worst "headers include headers which include
completely unrelated headers" mess.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21386 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-29 14:08:24 +00:00
reynaldo
58ed2c3fe0 marks several read-only string parameters which aren't modified inside the called function as const. Patch by Stefan Huehner, stefan AT huehner-org
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19109 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-07-15 16:03:12 +00:00
uau
bee52bbd10 Remove updating of vo_mouse_timer_const from the main loop and also
remove the variable itself. Convert code in x11_common.c and OSD timing
that depended on the variable to use real time instead.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18288 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-04-25 21:36:02 +00:00
rathann
e7db4ccf1a Patch by Stefan Huehner / stefan % huehner ! org \
patch replaces '()' for the correct '(void)' in function
declarations/prototypes which have no parameters. The '()' syntax tell
thats there is a variable list of arguments, so that the compiler cannot
check this. The extra CFLAG '-Wstrict-declarations' shows those cases.

Comments about a similar patch applied to ffmpeg:

That in C++ these mean the same, but in ANSI C the semantics are
different; function() is an (obsolete) K&R C style forward declaration,
it basically means that the function can have any number and any types
of parameters, effectively completely preventing the compiler from doing
any sort of type checking. -- Erik Slagter

Defining functions with unspecified arguments is allowed but bad.
With arguments unspecified the compiler can't report an error/warning
if the function is called with incorrect arguments. -- Måns Rullgård


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17567 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-02-09 14:08:03 +00:00
henry
3f4505eabb support for multiple subtitle files by Marcin Wojdyr <wojdyr@unipress.waw.pl>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9871 b3059339-0415-0410-9bf9-f77b7e298cf2
2003-04-07 16:04:02 +00:00
albeu
5787833ca9 Stream cleanup, don't use blah_on options anymore.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9747 b3059339-0415-0410-9bf9-f77b7e298cf2
2003-03-30 17:07:31 +00:00
pontscho
ebdb38271e - add subcp
- fix some 10l in gui
- fix one 10l bug in subreader


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9057 b3059339-0415-0410-9bf9-f77b7e298cf2
2003-01-21 19:12:46 +00:00
pontscho
337542a331 - rewrite sub_fps
- add fps support
- rewrite history


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9056 b3059339-0415-0410-9bf9-f77b7e298cf2
2003-01-21 13:33:40 +00:00
pontscho
906ad7fdb9 add DVD and CDRom device entry's, and fix two 10l bug
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8934 b3059339-0415-0410-9bf9-f77b7e298cf2
2003-01-12 23:38:55 +00:00
pontscho
3549dbe813 add overlapping to preferences
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8718 b3059339-0415-0410-9bf9-f77b7e298cf2
2003-01-02 14:41:40 +00:00
pontscho
15dc6ef3f7 - fix three submenu bug
- audio/video track hiding
	- normal/double/fullscreen handling
	- dvd audio channel setting bug
- fix file/url/vcd/dvd playing
- fix variables initialization
- some small bug fix
- applied some patch from Rüdiger Kuhlmann


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8424 b3059339-0415-0410-9bf9-f77b7e298cf2
2002-12-11 01:21:12 +00:00
pontscho
4984919e0b add autosync && some 10l bugfix
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8312 b3059339-0415-0410-9bf9-f77b7e298cf2
2002-11-28 23:17:14 +00:00
pontscho
e06bb680b4 add and extended Gregory Kovriga's <gkovriga@techunix.technion.ac.il> patch
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7822 b3059339-0415-0410-9bf9-f77b7e298cf2
2002-10-21 11:11:39 +00:00
pontscho
f4eefb71c8 add [video||audio]_driver_list
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7583 b3059339-0415-0410-9bf9-f77b7e298cf2
2002-10-02 13:16:15 +00:00
arpi
eb7eb4bdde some cleanup - made private vars/funcs static, removed obsolete externs
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7560 b3059339-0415-0410-9bf9-f77b7e298cf2
2002-09-29 19:26:40 +00:00
pontscho
f73a875f01 add aspect changing support
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7542 b3059339-0415-0410-9bf9-f77b7e298cf2
2002-09-28 21:16:12 +00:00
arpi
b124a4f9f9 removed obsolete/unused audio|video_fm|codec, has_audio|video
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7530 b3059339-0415-0410-9bf9-f77b7e298cf2
2002-09-28 18:45:47 +00:00
pontscho
253c9833b7 - fix new afm/vfm support
- fix fullscreen with xv
- add cache support


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7527 b3059339-0415-0410-9bf9-f77b7e298cf2
2002-09-28 18:03:34 +00:00
pontscho
7ce4e2d2eb fix vfm and add afm support
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7187 b3059339-0415-0410-9bf9-f77b7e298cf2
2002-08-31 09:45:59 +00:00
arpi
1b667f61ba -afm/-vfm migration from ID (int) to NAME (string) - simplifies code and makes dlopen()'ing possible
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7181 b3059339-0415-0410-9bf9-f77b7e298cf2
2002-08-30 21:44:20 +00:00