2009-02-08 03:27:30 +00:00
|
|
|
/*
|
|
|
|
* libvo common functions, variables used by many/all drivers.
|
|
|
|
*
|
|
|
|
* This file is part of MPlayer.
|
|
|
|
*
|
|
|
|
* MPlayer is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* MPlayer is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with MPlayer; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
2001-02-24 20:28:24 +00:00
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
2009-09-17 14:47:43 +00:00
|
|
|
#include <assert.h>
|
2009-09-18 13:27:55 +00:00
|
|
|
#include <stdbool.h>
|
2001-02-24 20:28:24 +00:00
|
|
|
|
|
|
|
#include <unistd.h>
|
2013-03-02 21:50:09 +00:00
|
|
|
|
|
|
|
#include "talloc.h"
|
2001-02-24 20:28:24 +00:00
|
|
|
|
|
|
|
#include "config.h"
|
2013-03-02 21:50:09 +00:00
|
|
|
#include "osdep/timer.h"
|
2012-11-09 00:06:43 +00:00
|
|
|
#include "core/options.h"
|
|
|
|
#include "core/bstr.h"
|
|
|
|
#include "vo.h"
|
2007-02-17 20:58:55 +00:00
|
|
|
#include "aspect.h"
|
2012-11-09 00:06:43 +00:00
|
|
|
#include "core/input/input.h"
|
|
|
|
#include "core/mp_fifo.h"
|
|
|
|
#include "core/m_config.h"
|
|
|
|
#include "core/mp_msg.h"
|
video/filter: change filter API, use refcounting, remove filter DR
Change the entire filter API to use reference counted images instead
of vf_get_image().
Remove filter "direct rendering". This was useful for vf_expand and (in
rare cases) vf_sub: DR allowed these filters to pass a cropped image to
the filters before them. Then, on filtering, the image was "uncropped",
so that black bars could be added around the image without copying. This
means that in some cases, vf_expand will be slower (-vf gradfun,expand
for example).
Note that another form of DR used for in-place filters has been replaced
by simpler logic. Instead of trying to do DR, filters can check if the
image is writeable (with mp_image_is_writeable()), and do true in-place
if that's the case. This affects filters like vf_gradfun and vf_sub.
Everything has to support strides now. If something doesn't, making a
copy of the image data is required.
2012-11-05 13:25:04 +00:00
|
|
|
#include "video/mp_image.h"
|
2012-11-09 00:06:43 +00:00
|
|
|
#include "video/vfcap.h"
|
2012-10-27 20:10:32 +00:00
|
|
|
#include "sub/sub.h"
|
2002-09-29 21:53:05 +00:00
|
|
|
|
2001-02-24 20:28:24 +00:00
|
|
|
//
|
|
|
|
// Externally visible list of all vo drivers
|
|
|
|
//
|
2008-04-03 03:25:41 +00:00
|
|
|
extern struct vo_driver video_out_x11;
|
2009-02-17 23:07:37 +00:00
|
|
|
extern struct vo_driver video_out_vdpau;
|
2008-04-03 03:25:41 +00:00
|
|
|
extern struct vo_driver video_out_xv;
|
2012-09-23 14:10:00 +00:00
|
|
|
extern struct vo_driver video_out_opengl;
|
2012-09-29 16:36:05 +00:00
|
|
|
extern struct vo_driver video_out_opengl_hq;
|
2012-09-23 14:10:00 +00:00
|
|
|
extern struct vo_driver video_out_opengl_old;
|
2008-04-03 03:25:41 +00:00
|
|
|
extern struct vo_driver video_out_null;
|
2012-08-06 15:52:17 +00:00
|
|
|
extern struct vo_driver video_out_image;
|
2012-09-14 15:51:26 +00:00
|
|
|
extern struct vo_driver video_out_lavc;
|
2008-04-03 03:25:41 +00:00
|
|
|
extern struct vo_driver video_out_caca;
|
2008-11-22 17:16:43 +00:00
|
|
|
extern struct vo_driver video_out_direct3d;
|
2011-11-04 07:39:20 +00:00
|
|
|
extern struct vo_driver video_out_direct3d_shaders;
|
2012-12-28 07:07:14 +00:00
|
|
|
extern struct vo_driver video_out_sdl;
|
2009-05-08 20:50:26 +00:00
|
|
|
extern struct vo_driver video_out_corevideo;
|
2008-04-03 03:25:41 +00:00
|
|
|
|
|
|
|
const struct vo_driver *video_out_drivers[] =
|
2001-02-24 20:28:24 +00:00
|
|
|
{
|
2013-02-06 21:29:21 +00:00
|
|
|
#if CONFIG_VDPAU
|
|
|
|
&video_out_vdpau,
|
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_GL
|
|
|
|
&video_out_opengl,
|
|
|
|
#endif
|
2008-11-18 13:18:55 +00:00
|
|
|
#ifdef CONFIG_DIRECT3D
|
2011-11-04 07:39:20 +00:00
|
|
|
&video_out_direct3d_shaders,
|
2012-02-27 23:25:17 +00:00
|
|
|
&video_out_direct3d,
|
2008-11-18 13:18:55 +00:00
|
|
|
#endif
|
2008-08-06 07:42:26 +00:00
|
|
|
#ifdef CONFIG_COREVIDEO
|
2009-05-04 16:55:05 +00:00
|
|
|
&video_out_corevideo,
|
2005-05-05 00:17:27 +00:00
|
|
|
#endif
|
2009-09-18 21:25:36 +00:00
|
|
|
#ifdef CONFIG_XV
|
|
|
|
&video_out_xv,
|
|
|
|
#endif
|
2012-12-28 07:07:14 +00:00
|
|
|
#ifdef CONFIG_SDL2
|
|
|
|
&video_out_sdl,
|
|
|
|
#endif
|
2013-02-06 21:29:21 +00:00
|
|
|
#ifdef CONFIG_GL
|
|
|
|
&video_out_opengl_old,
|
|
|
|
#endif
|
2012-04-23 22:48:14 +00:00
|
|
|
#ifdef CONFIG_X11
|
2001-02-24 20:28:24 +00:00
|
|
|
&video_out_x11,
|
2004-10-04 19:36:12 +00:00
|
|
|
#endif
|
|
|
|
&video_out_null,
|
2008-12-20 11:49:00 +00:00
|
|
|
// should not be auto-selected
|
2012-08-06 15:52:17 +00:00
|
|
|
&video_out_image,
|
2013-02-06 21:29:21 +00:00
|
|
|
#ifdef CONFIG_CACA
|
|
|
|
&video_out_caca,
|
|
|
|
#endif
|
2012-09-14 15:51:26 +00:00
|
|
|
#ifdef CONFIG_ENCODING
|
|
|
|
&video_out_lavc,
|
2012-09-29 16:36:05 +00:00
|
|
|
#endif
|
|
|
|
#ifdef CONFIG_GL
|
|
|
|
&video_out_opengl_hq,
|
2004-10-23 22:43:19 +00:00
|
|
|
#endif
|
2001-02-24 20:28:24 +00:00
|
|
|
NULL
|
|
|
|
};
|
2002-05-13 13:15:40 +00:00
|
|
|
|
2008-04-03 03:25:41 +00:00
|
|
|
|
2012-06-25 20:12:03 +00:00
|
|
|
static int vo_preinit(struct vo *vo, char *arg)
|
2008-04-03 03:25:41 +00:00
|
|
|
{
|
2013-02-06 21:54:03 +00:00
|
|
|
if (vo->driver->encode != !!vo->encode_lavc_ctx)
|
|
|
|
return -1;
|
2012-08-06 15:52:17 +00:00
|
|
|
if (vo->driver->priv_size) {
|
2012-08-06 15:51:53 +00:00
|
|
|
vo->priv = talloc_zero_size(vo, vo->driver->priv_size);
|
2012-08-06 15:52:17 +00:00
|
|
|
if (vo->driver->priv_defaults)
|
|
|
|
memcpy(vo->priv, vo->driver->priv_defaults, vo->driver->priv_size);
|
|
|
|
}
|
2012-06-25 20:12:03 +00:00
|
|
|
if (vo->driver->options) {
|
2012-08-04 09:33:24 +00:00
|
|
|
struct m_config *cfg = m_config_simple(vo->priv);
|
2012-08-04 09:14:38 +00:00
|
|
|
talloc_steal(vo->priv, cfg);
|
2012-08-04 09:33:24 +00:00
|
|
|
m_config_register_options(cfg, vo->driver->options);
|
2012-06-25 20:12:03 +00:00
|
|
|
char n[50];
|
|
|
|
int l = snprintf(n, sizeof(n), "vo/%s", vo->driver->info->short_name);
|
|
|
|
assert(l < sizeof(n));
|
2013-03-01 20:19:20 +00:00
|
|
|
if (vo->driver->init_option_string) {
|
|
|
|
m_config_parse_suboptions(cfg, n,
|
|
|
|
(char *)vo->driver->init_option_string);
|
|
|
|
}
|
mplayer: turn playtree into a list, and change per-file option handling
Summary:
- There is no playtree anymore. It's reduced to a simple list.
- Options are now always global. You can still have per-file options,
but these are optional and require special syntax.
- The slave command pt_step has been removed, and playlist_next
and playlist_prev added. (See etc/input.conf changes.)
This is a user visible incompatible change, and will break slave-mode
applications.
- The pt_clear slave command is renamed to playlist_clear.
- Playtree entries could have multiple files. This is not the case
anymore, and playlist entries have always exactly one entry. Whenever
something adds more than one file (like ASX playlists or dvd:// or
dvdnav:// on the command line), all files are added as separate
playlist entries.
Note that some of the changes are quite deep and violent. Expect
regressions.
The playlist parsing code in particular is of low quality. I didn't try
to improve it, and merely spent to least effort necessary to keep it
somehow working. (Especially ASX playlist handling.)
The playtree code was complicated and bloated. It was also barely used.
Most users don't even know that mplayer manages the playlist as tree,
or how to use it. The most obscure features was probably specifying a
tree on command line (with '{' and '}' to create/close tree nodes). It
filled the player code with complexity and confused users with weird
slave commands like pt_up.
Replace the playtree with a simple flat playlist. Playlist parsers that
actually return trees are changed to append all files to the playlist
pre-order.
It used to be the responsibility of the playtree code to change per-file
config options. Now this is done by the player core, and the playlist
code is free of such details.
Options are not per-file by default anymore. This was a very obscure and
complicated feature that confused even experienced users. Consider the
following command line:
mplayer file1.mkv file2.mkv --no-audio file3.mkv
This will disable the audio for file2.mkv only, because options are
per-file by default. To make the option affect all files, you're
supposed to put it before the first file.
This is bad, because normally you don't need per-file options. They are
very rarely needed, and the only reasonable use cases I can imagine are
use of the encode backend (mplayer encode branch), or for debugging. The
normal use case is made harder, and the feature is perceived as bug.
Even worse, correct usage is hard to explain for users.
Make all options global by default. The position of an option isn't
significant anymore (except for options that compensate each other,
consider --shuffle --no-shuffle).
One other important change is that no options are reset anymore if a
new file is started. If you change settings with slave mode commands,
they will not be changed by playing a new file. (Exceptions include
settings that are too file specific, like audio/subtitle stream
selection.)
There is still some need for per-file options. Debugging and encoding
are use cases that profit from per-file options. Per-file profiles (as
well as per-protocol and per-VO/AO options) need the implementation
related mechanisms to backup and restore options when the playback file
changes.
Simplify the save-slot stuff, which is possible because there is no
hierarchical play tree anymore. Now there's a simple backup field.
Add a way to specify per-file options on command line. Example:
mplayer f1.mkv -o0 --{ -o1 f2.mkv -o2 f3.mkv --} f4.mkv -o3
will have the following options per file set:
f1.mkv, f4.mkv: -o0 -o3
f2.mkv, f3.mkv: -o0 -o3 -o1 -o2
The options --{ and --} start and end per-file options. All files inside
the { } will be affected by the options equally (similar to how global
options and multiple files are handled). When playback of a file starts,
the per-file options are set according to the command line. When
playback ends, the per-file options are restored to the values when
playback started.
2012-07-31 19:33:26 +00:00
|
|
|
int r = m_config_parse_suboptions(cfg, n, arg);
|
2013-03-01 20:19:20 +00:00
|
|
|
if (r < 0) {
|
|
|
|
if (vo->driver->help_text)
|
|
|
|
mp_msg(MSGT_VO, MSGL_FATAL, "%s\n", vo->driver->help_text);
|
2012-06-25 20:12:03 +00:00
|
|
|
return r;
|
2013-03-01 20:19:20 +00:00
|
|
|
}
|
2012-06-25 20:12:03 +00:00
|
|
|
}
|
2008-04-03 03:25:41 +00:00
|
|
|
return vo->driver->preinit(vo, arg);
|
|
|
|
}
|
|
|
|
|
|
|
|
int vo_control(struct vo *vo, uint32_t request, void *data)
|
|
|
|
{
|
|
|
|
return vo->driver->control(vo, request, data);
|
|
|
|
}
|
|
|
|
|
2013-03-28 20:39:10 +00:00
|
|
|
void vo_queue_image(struct vo *vo, struct mp_image *mpi)
|
2009-09-18 13:27:55 +00:00
|
|
|
{
|
|
|
|
if (!vo->config_ok)
|
2013-03-28 20:39:10 +00:00
|
|
|
return;
|
2009-09-18 13:27:55 +00:00
|
|
|
if (vo->driver->buffer_frames) {
|
video/filter: change filter API, use refcounting, remove filter DR
Change the entire filter API to use reference counted images instead
of vf_get_image().
Remove filter "direct rendering". This was useful for vf_expand and (in
rare cases) vf_sub: DR allowed these filters to pass a cropped image to
the filters before them. Then, on filtering, the image was "uncropped",
so that black bars could be added around the image without copying. This
means that in some cases, vf_expand will be slower (-vf gradfun,expand
for example).
Note that another form of DR used for in-place filters has been replaced
by simpler logic. Instead of trying to do DR, filters can check if the
image is writeable (with mp_image_is_writeable()), and do true in-place
if that's the case. This affects filters like vf_gradfun and vf_sub.
Everything has to support strides now. If something doesn't, making a
copy of the image data is required.
2012-11-05 13:25:04 +00:00
|
|
|
vo->driver->draw_image(vo, mpi);
|
2013-03-28 20:39:10 +00:00
|
|
|
return;
|
2009-09-18 13:27:55 +00:00
|
|
|
}
|
|
|
|
vo->frame_loaded = true;
|
video/filter: change filter API, use refcounting, remove filter DR
Change the entire filter API to use reference counted images instead
of vf_get_image().
Remove filter "direct rendering". This was useful for vf_expand and (in
rare cases) vf_sub: DR allowed these filters to pass a cropped image to
the filters before them. Then, on filtering, the image was "uncropped",
so that black bars could be added around the image without copying. This
means that in some cases, vf_expand will be slower (-vf gradfun,expand
for example).
Note that another form of DR used for in-place filters has been replaced
by simpler logic. Instead of trying to do DR, filters can check if the
image is writeable (with mp_image_is_writeable()), and do true in-place
if that's the case. This affects filters like vf_gradfun and vf_sub.
Everything has to support strides now. If something doesn't, making a
copy of the image data is required.
2012-11-05 13:25:04 +00:00
|
|
|
vo->next_pts = mpi->pts;
|
|
|
|
assert(!vo->waiting_mpi);
|
|
|
|
vo->waiting_mpi = mp_image_new_ref(mpi);
|
2009-09-18 13:27:55 +00:00
|
|
|
}
|
|
|
|
|
2011-12-05 03:24:18 +00:00
|
|
|
int vo_redraw_frame(struct vo *vo)
|
|
|
|
{
|
2012-02-28 01:17:25 +00:00
|
|
|
if (!vo->config_ok || !vo->hasframe)
|
2011-12-05 03:24:18 +00:00
|
|
|
return -1;
|
|
|
|
if (vo_control(vo, VOCTRL_REDRAW_FRAME, NULL) == true) {
|
2013-03-01 10:16:01 +00:00
|
|
|
vo->want_redraw = false;
|
2011-12-05 03:24:18 +00:00
|
|
|
vo->redrawing = true;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
2013-03-01 10:16:01 +00:00
|
|
|
bool vo_get_want_redraw(struct vo *vo)
|
|
|
|
{
|
|
|
|
if (!vo->config_ok || !vo->hasframe)
|
|
|
|
return false;
|
|
|
|
return vo->want_redraw;
|
|
|
|
}
|
|
|
|
|
2009-09-18 13:27:55 +00:00
|
|
|
int vo_get_buffered_frame(struct vo *vo, bool eof)
|
|
|
|
{
|
|
|
|
if (!vo->config_ok)
|
|
|
|
return -1;
|
|
|
|
if (vo->frame_loaded)
|
|
|
|
return 0;
|
|
|
|
if (!vo->driver->buffer_frames)
|
|
|
|
return -1;
|
|
|
|
vo->driver->get_buffered_frame(vo, eof);
|
|
|
|
return vo->frame_loaded ? 0 : -1;
|
|
|
|
}
|
|
|
|
|
2011-03-03 10:54:36 +00:00
|
|
|
void vo_skip_frame(struct vo *vo)
|
|
|
|
{
|
2011-12-04 16:10:17 +00:00
|
|
|
vo_control(vo, VOCTRL_SKIPFRAME, NULL);
|
2011-03-03 10:54:36 +00:00
|
|
|
vo->frame_loaded = false;
|
video/filter: change filter API, use refcounting, remove filter DR
Change the entire filter API to use reference counted images instead
of vf_get_image().
Remove filter "direct rendering". This was useful for vf_expand and (in
rare cases) vf_sub: DR allowed these filters to pass a cropped image to
the filters before them. Then, on filtering, the image was "uncropped",
so that black bars could be added around the image without copying. This
means that in some cases, vf_expand will be slower (-vf gradfun,expand
for example).
Note that another form of DR used for in-place filters has been replaced
by simpler logic. Instead of trying to do DR, filters can check if the
image is writeable (with mp_image_is_writeable()), and do true in-place
if that's the case. This affects filters like vf_gradfun and vf_sub.
Everything has to support strides now. If something doesn't, making a
copy of the image data is required.
2012-11-05 13:25:04 +00:00
|
|
|
mp_image_unrefp(&vo->waiting_mpi);
|
2011-03-03 10:54:36 +00:00
|
|
|
}
|
|
|
|
|
2011-12-04 16:10:17 +00:00
|
|
|
void vo_new_frame_imminent(struct vo *vo)
|
|
|
|
{
|
|
|
|
if (vo->driver->buffer_frames)
|
|
|
|
vo_control(vo, VOCTRL_NEWFRAME, NULL);
|
|
|
|
else {
|
video/filter: change filter API, use refcounting, remove filter DR
Change the entire filter API to use reference counted images instead
of vf_get_image().
Remove filter "direct rendering". This was useful for vf_expand and (in
rare cases) vf_sub: DR allowed these filters to pass a cropped image to
the filters before them. Then, on filtering, the image was "uncropped",
so that black bars could be added around the image without copying. This
means that in some cases, vf_expand will be slower (-vf gradfun,expand
for example).
Note that another form of DR used for in-place filters has been replaced
by simpler logic. Instead of trying to do DR, filters can check if the
image is writeable (with mp_image_is_writeable()), and do true in-place
if that's the case. This affects filters like vf_gradfun and vf_sub.
Everything has to support strides now. If something doesn't, making a
copy of the image data is required.
2012-11-05 13:25:04 +00:00
|
|
|
assert(vo->frame_loaded);
|
|
|
|
assert(vo->waiting_mpi);
|
|
|
|
assert(vo->waiting_mpi->pts == vo->next_pts);
|
|
|
|
vo->driver->draw_image(vo, vo->waiting_mpi);
|
|
|
|
mp_image_unrefp(&vo->waiting_mpi);
|
2011-12-04 16:10:17 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-06-23 22:53:58 +00:00
|
|
|
void vo_draw_osd(struct vo *vo, struct osd_state *osd)
|
2008-04-03 03:25:41 +00:00
|
|
|
{
|
2013-03-01 10:16:01 +00:00
|
|
|
if (vo->config_ok && vo->driver->draw_osd)
|
2012-10-21 13:54:22 +00:00
|
|
|
vo->driver->draw_osd(vo, osd);
|
2008-04-03 03:25:41 +00:00
|
|
|
}
|
|
|
|
|
2009-11-15 02:39:22 +00:00
|
|
|
void vo_flip_page(struct vo *vo, unsigned int pts_us, int duration)
|
2008-04-03 03:25:41 +00:00
|
|
|
{
|
2008-04-18 03:28:47 +00:00
|
|
|
if (!vo->config_ok)
|
|
|
|
return;
|
2011-12-05 03:24:18 +00:00
|
|
|
if (!vo->redrawing) {
|
|
|
|
vo->frame_loaded = false;
|
|
|
|
vo->next_pts = MP_NOPTS_VALUE;
|
|
|
|
}
|
2011-12-05 04:36:20 +00:00
|
|
|
vo->want_redraw = false;
|
2011-12-05 03:24:18 +00:00
|
|
|
vo->redrawing = false;
|
2009-11-15 02:39:22 +00:00
|
|
|
if (vo->driver->flip_page_timed)
|
|
|
|
vo->driver->flip_page_timed(vo, pts_us, duration);
|
|
|
|
else
|
|
|
|
vo->driver->flip_page(vo);
|
2012-02-28 01:17:25 +00:00
|
|
|
vo->hasframe = true;
|
2008-04-03 03:25:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void vo_check_events(struct vo *vo)
|
|
|
|
{
|
2010-12-14 19:58:47 +00:00
|
|
|
if (!vo->config_ok) {
|
|
|
|
if (vo->registered_fd != -1)
|
|
|
|
mp_input_rm_key_fd(vo->input_ctx, vo->registered_fd);
|
|
|
|
vo->registered_fd = -1;
|
2008-04-18 03:28:47 +00:00
|
|
|
return;
|
2010-12-14 19:58:47 +00:00
|
|
|
}
|
2013-05-15 16:17:18 +00:00
|
|
|
vo_control(vo, VOCTRL_CHECK_EVENTS, NULL);
|
2008-04-03 03:25:41 +00:00
|
|
|
}
|
|
|
|
|
2009-09-18 13:27:55 +00:00
|
|
|
void vo_seek_reset(struct vo *vo)
|
|
|
|
{
|
|
|
|
vo_control(vo, VOCTRL_RESET, NULL);
|
|
|
|
vo->frame_loaded = false;
|
2012-03-14 23:24:52 +00:00
|
|
|
vo->hasframe = false;
|
video/filter: change filter API, use refcounting, remove filter DR
Change the entire filter API to use reference counted images instead
of vf_get_image().
Remove filter "direct rendering". This was useful for vf_expand and (in
rare cases) vf_sub: DR allowed these filters to pass a cropped image to
the filters before them. Then, on filtering, the image was "uncropped",
so that black bars could be added around the image without copying. This
means that in some cases, vf_expand will be slower (-vf gradfun,expand
for example).
Note that another form of DR used for in-place filters has been replaced
by simpler logic. Instead of trying to do DR, filters can check if the
image is writeable (with mp_image_is_writeable()), and do true in-place
if that's the case. This affects filters like vf_gradfun and vf_sub.
Everything has to support strides now. If something doesn't, making a
copy of the image data is required.
2012-11-05 13:25:04 +00:00
|
|
|
mp_image_unrefp(&vo->waiting_mpi);
|
2009-09-18 13:27:55 +00:00
|
|
|
}
|
|
|
|
|
2008-04-03 03:25:41 +00:00
|
|
|
void vo_destroy(struct vo *vo)
|
|
|
|
{
|
2010-12-14 19:58:47 +00:00
|
|
|
if (vo->registered_fd != -1)
|
|
|
|
mp_input_rm_key_fd(vo->input_ctx, vo->registered_fd);
|
2008-04-03 03:25:41 +00:00
|
|
|
vo->driver->uninit(vo);
|
video/filter: change filter API, use refcounting, remove filter DR
Change the entire filter API to use reference counted images instead
of vf_get_image().
Remove filter "direct rendering". This was useful for vf_expand and (in
rare cases) vf_sub: DR allowed these filters to pass a cropped image to
the filters before them. Then, on filtering, the image was "uncropped",
so that black bars could be added around the image without copying. This
means that in some cases, vf_expand will be slower (-vf gradfun,expand
for example).
Note that another form of DR used for in-place filters has been replaced
by simpler logic. Instead of trying to do DR, filters can check if the
image is writeable (with mp_image_is_writeable()), and do true in-place
if that's the case. This affects filters like vf_gradfun and vf_sub.
Everything has to support strides now. If something doesn't, making a
copy of the image data is required.
2012-11-05 13:25:04 +00:00
|
|
|
talloc_free(vo->waiting_mpi);
|
2008-04-20 03:04:10 +00:00
|
|
|
talloc_free(vo);
|
2008-04-03 03:25:41 +00:00
|
|
|
}
|
|
|
|
|
2008-04-03 01:58:32 +00:00
|
|
|
void list_video_out(void)
|
|
|
|
{
|
2009-07-06 22:15:02 +00:00
|
|
|
mp_tmsg(MSGT_CPLAYER, MSGL_INFO, "Available video output drivers:\n");
|
2008-04-03 01:58:32 +00:00
|
|
|
mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_VIDEO_OUTPUTS\n");
|
2013-02-06 21:54:03 +00:00
|
|
|
for (int i = 0; video_out_drivers[i]; i++) {
|
|
|
|
const vo_info_t *info = video_out_drivers[i]->info;
|
|
|
|
if (!video_out_drivers[i]->encode) {
|
|
|
|
mp_msg(MSGT_GLOBAL, MSGL_INFO,"\t%s\t%s\n",
|
|
|
|
info->short_name, info->name);
|
|
|
|
}
|
2008-04-03 01:58:32 +00:00
|
|
|
}
|
|
|
|
mp_msg(MSGT_GLOBAL, MSGL_INFO,"\n");
|
2002-09-29 21:53:05 +00:00
|
|
|
}
|
|
|
|
|
2012-09-29 16:10:33 +00:00
|
|
|
static void replace_legacy_vo_name(bstr *name)
|
|
|
|
{
|
|
|
|
bstr new = *name;
|
|
|
|
if (bstr_equals0(*name, "gl"))
|
|
|
|
new = bstr0("opengl");
|
|
|
|
if (bstr_equals0(*name, "gl3"))
|
2012-09-29 16:36:05 +00:00
|
|
|
new = bstr0("opengl-hq");
|
2012-09-29 16:10:33 +00:00
|
|
|
if (!bstr_equals(*name, new)) {
|
|
|
|
mp_tmsg(MSGT_CPLAYER, MSGL_ERR, "VO driver '%.*s' has been replaced "
|
|
|
|
"with '%.*s'!\n", BSTR_P(*name), BSTR_P(new));
|
|
|
|
}
|
|
|
|
*name = new;
|
|
|
|
}
|
|
|
|
|
2013-03-04 21:41:27 +00:00
|
|
|
struct vo *init_best_video_out(struct mp_vo_opts *opts,
|
2008-04-30 08:06:55 +00:00
|
|
|
struct mp_fifo *key_fifo,
|
2012-09-14 15:51:26 +00:00
|
|
|
struct input_ctx *input_ctx,
|
|
|
|
struct encode_lavc_context *encode_lavc_ctx)
|
2008-04-03 01:58:32 +00:00
|
|
|
{
|
2008-04-19 04:04:55 +00:00
|
|
|
char **vo_list = opts->video_driver_list;
|
2002-09-29 21:53:05 +00:00
|
|
|
int i;
|
2008-04-20 03:04:10 +00:00
|
|
|
struct vo *vo = talloc_ptrtype(NULL, vo);
|
2008-04-30 08:06:55 +00:00
|
|
|
struct vo initial_values = {
|
|
|
|
.opts = opts,
|
|
|
|
.key_fifo = key_fifo,
|
2012-09-14 15:51:26 +00:00
|
|
|
.encode_lavc_ctx = encode_lavc_ctx,
|
2008-04-30 08:06:55 +00:00
|
|
|
.input_ctx = input_ctx,
|
2010-12-14 19:58:47 +00:00
|
|
|
.event_fd = -1,
|
|
|
|
.registered_fd = -1,
|
2013-03-14 15:21:37 +00:00
|
|
|
.aspdat = { .monitor_par = 1 },
|
2008-04-30 08:06:55 +00:00
|
|
|
};
|
2002-09-29 21:53:05 +00:00
|
|
|
// first try the preferred drivers, with their optional subdevice param:
|
2008-04-03 01:58:32 +00:00
|
|
|
if (vo_list && vo_list[0])
|
|
|
|
while (vo_list[0][0]) {
|
2012-09-29 16:10:33 +00:00
|
|
|
char *arg = vo_list[0];
|
|
|
|
bstr name = bstr0(arg);
|
|
|
|
char *params = strchr(arg, ':');
|
|
|
|
if (params) {
|
|
|
|
name = bstr_splice(name, 0, params - arg);
|
|
|
|
params++;
|
2008-04-03 01:58:32 +00:00
|
|
|
}
|
2012-09-29 16:10:33 +00:00
|
|
|
replace_legacy_vo_name(&name);
|
2008-04-03 01:58:32 +00:00
|
|
|
for (i = 0; video_out_drivers[i]; i++) {
|
2008-04-03 03:25:41 +00:00
|
|
|
const struct vo_driver *video_driver = video_out_drivers[i];
|
2008-04-03 01:58:32 +00:00
|
|
|
const vo_info_t *info = video_driver->info;
|
2012-09-29 16:10:33 +00:00
|
|
|
if (bstr_equals0(name, info->short_name)) {
|
2008-04-03 01:58:32 +00:00
|
|
|
// name matches, try it
|
2008-04-30 08:06:55 +00:00
|
|
|
*vo = initial_values;
|
2008-04-03 03:25:41 +00:00
|
|
|
vo->driver = video_driver;
|
2012-09-29 16:10:33 +00:00
|
|
|
if (!vo_preinit(vo, params))
|
2008-04-03 03:25:41 +00:00
|
|
|
return vo; // success!
|
2009-05-08 23:37:35 +00:00
|
|
|
talloc_free_children(vo);
|
2003-05-31 17:33:33 +00:00
|
|
|
}
|
2002-09-29 21:53:05 +00:00
|
|
|
}
|
2008-04-03 01:58:32 +00:00
|
|
|
// continue...
|
|
|
|
++vo_list;
|
2012-08-25 10:11:52 +00:00
|
|
|
if (!(vo_list[0])) {
|
|
|
|
talloc_free(vo);
|
2008-04-03 01:58:32 +00:00
|
|
|
return NULL; // do NOT fallback to others
|
2012-08-25 10:11:52 +00:00
|
|
|
}
|
2002-09-29 21:53:05 +00:00
|
|
|
}
|
|
|
|
// now try the rest...
|
2008-04-03 01:58:32 +00:00
|
|
|
for (i = 0; video_out_drivers[i]; i++) {
|
2008-04-03 03:25:41 +00:00
|
|
|
const struct vo_driver *video_driver = video_out_drivers[i];
|
2008-04-30 08:06:55 +00:00
|
|
|
*vo = initial_values;
|
2008-04-03 03:25:41 +00:00
|
|
|
vo->driver = video_driver;
|
2012-09-01 16:36:45 +00:00
|
|
|
if (!vo_preinit(vo, NULL))
|
2008-04-03 03:25:41 +00:00
|
|
|
return vo; // success!
|
2009-05-08 23:37:35 +00:00
|
|
|
talloc_free_children(vo);
|
2002-09-29 21:53:05 +00:00
|
|
|
}
|
2012-08-16 14:18:51 +00:00
|
|
|
talloc_free(vo);
|
2002-09-29 21:53:05 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2013-01-23 09:56:36 +00:00
|
|
|
// Fit *w/*h into the size specified by geo.
|
|
|
|
static void apply_autofit(int *w, int *h, int scr_w, int scr_h,
|
|
|
|
struct m_geometry *geo, bool allow_upscale)
|
|
|
|
{
|
|
|
|
if (!geo->wh_valid)
|
|
|
|
return;
|
|
|
|
|
|
|
|
int dummy;
|
|
|
|
int n_w = *w, n_h = *h;
|
|
|
|
m_geometry_apply(&dummy, &dummy, &n_w, &n_h, scr_w, scr_h, geo);
|
|
|
|
|
|
|
|
if (!allow_upscale && *w <= n_w && *h <= n_h)
|
|
|
|
return;
|
|
|
|
|
|
|
|
// If aspect mismatches, always make the window smaller than the fit box
|
|
|
|
double asp = (double)*w / *h;
|
|
|
|
double n_asp = (double)n_w / n_h;
|
|
|
|
if (n_asp <= asp) {
|
|
|
|
*w = n_w;
|
|
|
|
*h = n_w / asp;
|
|
|
|
} else {
|
|
|
|
*w = n_h * asp;
|
|
|
|
*h = n_h;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-01-22 12:28:31 +00:00
|
|
|
// Set window size (vo->dwidth/dheight) and position (vo->dx/dy) according to
|
|
|
|
// the video display size d_w/d_h.
|
|
|
|
// NOTE: currently, all GUI backends do their own handling of window geometry
|
|
|
|
// additional to this code. This is to deal with initial window placement,
|
|
|
|
// fullscreen handling, avoiding resize on config() with no size change,
|
|
|
|
// multi-monitor stuff, and possibly more.
|
|
|
|
static void determine_window_geometry(struct vo *vo, int d_w, int d_h)
|
|
|
|
{
|
2013-03-04 21:41:27 +00:00
|
|
|
struct mp_vo_opts *opts = vo->opts;
|
2013-01-22 12:28:31 +00:00
|
|
|
|
2013-03-04 21:41:27 +00:00
|
|
|
int scr_w = opts->screenwidth;
|
|
|
|
int scr_h = opts->screenheight;
|
2013-01-23 09:56:36 +00:00
|
|
|
|
2013-03-14 15:21:37 +00:00
|
|
|
aspect_calc_monitor(vo, &d_w, &d_h);
|
2013-01-22 12:28:31 +00:00
|
|
|
|
2013-03-04 21:41:27 +00:00
|
|
|
apply_autofit(&d_w, &d_h, scr_w, scr_h, &opts->autofit, true);
|
|
|
|
apply_autofit(&d_w, &d_h, scr_w, scr_h, &opts->autofit_larger, false);
|
2013-01-23 09:56:36 +00:00
|
|
|
|
2013-03-04 21:41:27 +00:00
|
|
|
vo->dx = (int)(opts->screenwidth - d_w) / 2;
|
|
|
|
vo->dy = (int)(opts->screenheight - d_h) / 2;
|
2013-01-23 09:56:36 +00:00
|
|
|
m_geometry_apply(&vo->dx, &vo->dy, &d_w, &d_h, scr_w, scr_h,
|
2013-03-04 21:41:27 +00:00
|
|
|
&opts->geometry);
|
2013-01-22 12:28:31 +00:00
|
|
|
|
2013-03-04 16:40:21 +00:00
|
|
|
vo->dx += vo->xinerama_x;
|
|
|
|
vo->dy += vo->xinerama_y;
|
2013-01-22 12:28:31 +00:00
|
|
|
vo->dwidth = d_w;
|
|
|
|
vo->dheight = d_h;
|
|
|
|
}
|
|
|
|
|
2010-12-14 19:58:47 +00:00
|
|
|
static int event_fd_callback(void *ctx, int fd)
|
|
|
|
{
|
|
|
|
struct vo *vo = ctx;
|
|
|
|
vo_check_events(vo);
|
2011-07-17 01:47:50 +00:00
|
|
|
return MP_INPUT_NOTHING;
|
2010-12-14 19:58:47 +00:00
|
|
|
}
|
|
|
|
|
2008-04-03 03:25:41 +00:00
|
|
|
int vo_config(struct vo *vo, uint32_t width, uint32_t height,
|
2007-02-17 20:58:55 +00:00
|
|
|
uint32_t d_width, uint32_t d_height, uint32_t flags,
|
2011-12-06 19:23:54 +00:00
|
|
|
uint32_t format)
|
2008-04-03 01:58:32 +00:00
|
|
|
{
|
2012-10-18 15:31:00 +00:00
|
|
|
aspect_save_videores(vo, width, height, d_width, d_height);
|
2007-02-17 20:58:55 +00:00
|
|
|
|
2008-04-03 03:25:41 +00:00
|
|
|
if (vo_control(vo, VOCTRL_UPDATE_SCREENINFO, NULL) == VO_TRUE) {
|
2013-01-22 12:28:31 +00:00
|
|
|
determine_window_geometry(vo, d_width, d_height);
|
|
|
|
d_width = vo->dwidth;
|
|
|
|
d_height = vo->dheight;
|
2008-04-03 01:58:32 +00:00
|
|
|
}
|
2007-02-17 20:58:55 +00:00
|
|
|
|
2008-04-18 03:28:47 +00:00
|
|
|
int ret = vo->driver->config(vo, width, height, d_width, d_height, flags,
|
2011-12-06 19:23:54 +00:00
|
|
|
format);
|
2008-04-18 03:28:47 +00:00
|
|
|
vo->config_ok = (ret == 0);
|
|
|
|
vo->config_count += vo->config_ok;
|
2010-12-14 19:58:47 +00:00
|
|
|
if (vo->registered_fd == -1 && vo->event_fd != -1 && vo->config_ok) {
|
|
|
|
mp_input_add_key_fd(vo->input_ctx, vo->event_fd, 1, event_fd_callback,
|
|
|
|
NULL, vo);
|
|
|
|
vo->registered_fd = vo->event_fd;
|
|
|
|
}
|
2011-12-04 16:10:17 +00:00
|
|
|
vo->frame_loaded = false;
|
|
|
|
vo->waiting_mpi = NULL;
|
2011-12-05 03:24:18 +00:00
|
|
|
vo->redrawing = false;
|
2012-02-28 01:17:25 +00:00
|
|
|
vo->hasframe = false;
|
2008-04-18 03:28:47 +00:00
|
|
|
return ret;
|
2007-02-17 20:58:55 +00:00
|
|
|
}
|
2002-09-29 21:53:05 +00:00
|
|
|
|
2008-12-20 11:52:11 +00:00
|
|
|
/**
|
|
|
|
* \brief lookup an integer in a table, table must have 0 as the last key
|
|
|
|
* \param key key to search for
|
|
|
|
* \result translation corresponding to key or "to" value of last mapping
|
|
|
|
* if not found.
|
|
|
|
*/
|
2010-04-23 10:22:44 +00:00
|
|
|
int lookup_keymap_table(const struct mp_keymap *map, int key) {
|
2008-12-20 11:52:11 +00:00
|
|
|
while (map->from && map->from != key) map++;
|
|
|
|
return map->to;
|
|
|
|
}
|
|
|
|
|
2012-10-27 20:10:32 +00:00
|
|
|
static void print_video_rect(struct vo *vo, struct mp_rect src,
|
|
|
|
struct mp_rect dst, struct mp_osd_res osd)
|
|
|
|
{
|
|
|
|
int lv = MSGL_V;
|
|
|
|
|
|
|
|
int sw = src.x1 - src.x0, sh = src.y1 - src.y0;
|
|
|
|
int dw = dst.x1 - dst.x0, dh = dst.y1 - dst.y0;
|
|
|
|
|
|
|
|
mp_msg(MSGT_VO, lv, "[vo] Window size: %dx%d\n",
|
|
|
|
vo->dwidth, vo->dheight);
|
|
|
|
mp_msg(MSGT_VO, lv, "[vo] Video source: %dx%d (%dx%d)\n",
|
|
|
|
vo->aspdat.orgw, vo->aspdat.orgh,
|
|
|
|
vo->aspdat.prew, vo->aspdat.preh);
|
|
|
|
mp_msg(MSGT_VO, lv, "[vo] Video display: (%d, %d) %dx%d -> (%d, %d) %dx%d\n",
|
|
|
|
src.x0, src.y0, sw, sh, dst.x0, dst.y0, dw, dh);
|
|
|
|
mp_msg(MSGT_VO, lv, "[vo] Video scale: %f/%f\n",
|
|
|
|
(double)dw / sw, (double)dh / sh);
|
|
|
|
mp_msg(MSGT_VO, lv, "[vo] OSD borders: l=%d t=%d r=%d b=%d\n",
|
|
|
|
osd.ml, osd.mt, osd.mr, osd.mb);
|
|
|
|
mp_msg(MSGT_VO, lv, "[vo] Video borders: l=%d t=%d r=%d b=%d\n",
|
|
|
|
dst.x0, dst.y0, vo->dwidth - dst.x1, vo->dheight - dst.y1);
|
2009-02-12 17:40:53 +00:00
|
|
|
}
|
|
|
|
|
2013-06-14 21:59:53 +00:00
|
|
|
// Clamp [start, end) to range [0, size) with various fallbacks.
|
|
|
|
static void clamp_size(int size, int *start, int *end)
|
|
|
|
{
|
|
|
|
*start = FFMAX(0, *start);
|
|
|
|
*end = FFMIN(size, *end);
|
|
|
|
if (*start >= *end) {
|
|
|
|
*start = 0;
|
|
|
|
*end = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Round source to a multiple of 2, this is at least needed for vo_direct3d
|
|
|
|
// and ATI cards.
|
|
|
|
#define VID_SRC_ROUND_UP(x) (((x) + 1) & ~1)
|
|
|
|
|
2012-10-27 20:10:32 +00:00
|
|
|
static void src_dst_split_scaling(int src_size, int dst_size,
|
2013-06-14 21:59:53 +00:00
|
|
|
int scaled_src_size,
|
|
|
|
int *src_start, int *src_end,
|
|
|
|
int *dst_start, int *dst_end,
|
|
|
|
int *osd_margin_a, int *osd_margin_b)
|
2009-02-17 23:07:37 +00:00
|
|
|
{
|
2013-06-14 21:59:53 +00:00
|
|
|
*src_start = 0;
|
|
|
|
*src_end = src_size;
|
|
|
|
*dst_start = (dst_size - scaled_src_size) / 2;
|
|
|
|
*dst_end = *dst_start + scaled_src_size;
|
|
|
|
|
|
|
|
// Distance of screen frame to video
|
|
|
|
*osd_margin_a = *dst_start;
|
|
|
|
*osd_margin_b = dst_size - *dst_end;
|
|
|
|
|
|
|
|
// Clip to screen
|
|
|
|
int s_src = *src_end - *src_start;
|
|
|
|
int s_dst = *dst_end - *dst_start;
|
|
|
|
if (*dst_start < 0) {
|
|
|
|
int border = -(*dst_start) * s_src / s_dst;
|
|
|
|
*src_start += VID_SRC_ROUND_UP(border);
|
2012-10-27 20:10:32 +00:00
|
|
|
*dst_start = 0;
|
2009-02-17 11:59:49 +00:00
|
|
|
}
|
2013-06-14 21:59:53 +00:00
|
|
|
if (*dst_end > dst_size) {
|
|
|
|
int border = (*dst_end - dst_size) * s_src / s_dst;
|
|
|
|
*src_end -= VID_SRC_ROUND_UP(border);
|
|
|
|
*dst_end = dst_size;
|
|
|
|
}
|
|
|
|
|
|
|
|
// For sanity: avoid bothering VOs with corner cases
|
|
|
|
clamp_size(src_size, src_start, src_end);
|
|
|
|
clamp_size(dst_size, dst_start, dst_end);
|
2012-10-27 20:10:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Calculate the appropriate source and destination rectangle to
|
|
|
|
// get a correctly scaled picture, including pan-scan.
|
|
|
|
// out_src: visible part of the video
|
|
|
|
// out_dst: area of screen covered by the video source rectangle
|
|
|
|
// out_osd: OSD size, OSD margins, etc.
|
|
|
|
void vo_get_src_dst_rects(struct vo *vo, struct mp_rect *out_src,
|
|
|
|
struct mp_rect *out_dst, struct mp_osd_res *out_osd)
|
2009-02-17 23:07:37 +00:00
|
|
|
{
|
2013-06-14 21:59:53 +00:00
|
|
|
struct mp_vo_opts *opts = vo->opts;
|
2012-10-27 20:10:32 +00:00
|
|
|
int src_w = vo->aspdat.orgw;
|
|
|
|
int src_h = vo->aspdat.orgh;
|
|
|
|
struct mp_rect dst = {0, 0, vo->dwidth, vo->dheight};
|
|
|
|
struct mp_rect src = {0, 0, src_w, src_h};
|
|
|
|
struct mp_osd_res osd = {
|
|
|
|
.w = vo->dwidth,
|
|
|
|
.h = vo->dheight,
|
2013-03-14 15:21:37 +00:00
|
|
|
.display_par = vo->aspdat.monitor_par,
|
2012-10-27 20:10:32 +00:00
|
|
|
.video_par = vo->aspdat.par,
|
|
|
|
};
|
2013-06-14 21:59:53 +00:00
|
|
|
if (opts->keepaspect) {
|
2013-03-14 15:21:37 +00:00
|
|
|
int scaled_width, scaled_height;
|
|
|
|
aspect_calc_panscan(vo, &scaled_width, &scaled_height);
|
2012-10-27 20:10:32 +00:00
|
|
|
src_dst_split_scaling(src_w, vo->dwidth, scaled_width,
|
2013-06-14 21:59:53 +00:00
|
|
|
&src.x0, &src.x1, &dst.x0, &dst.x1,
|
|
|
|
&osd.ml, &osd.mr);
|
2012-10-27 20:10:32 +00:00
|
|
|
src_dst_split_scaling(src_h, vo->dheight, scaled_height,
|
2013-06-14 21:59:53 +00:00
|
|
|
&src.y0, &src.y1, &dst.y0, &dst.y1,
|
|
|
|
&osd.mt, &osd.mb);
|
2009-02-17 11:59:49 +00:00
|
|
|
}
|
2012-10-27 20:10:32 +00:00
|
|
|
|
|
|
|
*out_src = src;
|
|
|
|
*out_dst = dst;
|
|
|
|
*out_osd = osd;
|
|
|
|
|
|
|
|
print_video_rect(vo, src, dst, osd);
|
2009-02-12 17:40:53 +00:00
|
|
|
}
|
|
|
|
|
2011-12-06 19:23:54 +00:00
|
|
|
// Return the window title the VO should set. Always returns a null terminated
|
|
|
|
// string. The string is valid until frontend code is invoked again. Copy it if
|
|
|
|
// you need to keep the string for an extended period of time.
|
|
|
|
const char *vo_get_window_title(struct vo *vo)
|
|
|
|
{
|
2012-08-16 14:18:51 +00:00
|
|
|
if (!vo->window_title)
|
|
|
|
vo->window_title = talloc_strdup(vo, "");
|
2012-08-02 00:36:26 +00:00
|
|
|
return vo->window_title;
|
2011-12-06 19:23:54 +00:00
|
|
|
}
|
|
|
|
|
2010-04-25 16:13:57 +00:00
|
|
|
/**
|
|
|
|
* Generates a mouse movement message if those are enable and sends it
|
|
|
|
* to the "main" MPlayer.
|
|
|
|
*
|
|
|
|
* \param posx new x position of mouse
|
|
|
|
* \param posy new y position of mouse
|
|
|
|
*/
|
2010-04-26 16:22:56 +00:00
|
|
|
void vo_mouse_movement(struct vo *vo, int posx, int posy)
|
|
|
|
{
|
2010-04-25 16:13:57 +00:00
|
|
|
char cmd_str[40];
|
2013-03-04 21:41:27 +00:00
|
|
|
if (!vo->opts->enable_mouse_movements)
|
2010-04-25 16:13:57 +00:00
|
|
|
return;
|
|
|
|
snprintf(cmd_str, sizeof(cmd_str), "set_mouse_pos %i %i", posx, posy);
|
2012-10-13 19:09:42 +00:00
|
|
|
mp_input_queue_cmd(vo->input_ctx, mp_input_parse_cmd(bstr0(cmd_str), ""));
|
2010-04-25 16:13:57 +00:00
|
|
|
}
|
2013-03-04 16:40:21 +00:00
|
|
|
|