Commit fcc6a70f authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

Move and split dummy video output

parent 9d85032d
......@@ -342,6 +342,7 @@ $Id$
* vc1: VC-1 Video demuxer
* vcd: input module for accessing Video CDs
* vcdx: input module for accessing Video CDs with navigation & stills
* vdummy: dummy video display
* visual: visualisation system
* vmem: memory video driver
* vobsub: VobSUB subtitles demuxer
......
SOURCES_dummy = \
dummy.c \
dummy.h \
vout.c \
interface.c \
input.c \
decoder.c \
......
......@@ -39,12 +39,6 @@ static int OpenDummy(vlc_object_t *);
/*****************************************************************************
* Module descriptor
*****************************************************************************/
#define CHROMA_TEXT N_("Dummy image chroma format")
#define CHROMA_LONGTEXT N_( \
"Force the dummy video output to create images using a specific chroma " \
"format instead of trying to improve performances by using the most " \
"efficient one.")
#define SAVE_TEXT N_("Save raw codec data")
#define SAVE_LONGTEXT N_( \
"Save the raw codec data if you have selected/forced the dummy " \
......@@ -92,21 +86,6 @@ vlc_module_begin ()
set_description( N_("Dummy encoder function") )
set_capability( "encoder", 0 )
set_callbacks( OpenEncoder, CloseEncoder )
add_submodule ()
set_description( N_("Dummy video output function") )
set_section( N_( "Dummy Video output" ), NULL )
set_capability( "vout display", 1 )
set_callbacks( OpenVideo, CloseVideo )
set_category( CAT_VIDEO )
set_subcategory( SUBCAT_VIDEO_VOUT )
add_category_hint( N_("Video"), NULL, false )
add_string( "dummy-chroma", NULL, CHROMA_TEXT, CHROMA_LONGTEXT, true )
add_submodule ()
set_section( N_( "Stats video output" ), NULL )
set_description( N_("Stats video output function") )
set_capability( "vout display", 0 )
add_shortcut( "stats" )
set_callbacks( OpenVideoStat, CloseVideo )
add_submodule ()
set_description( N_("Dummy font renderer function") )
set_capability( "text renderer", 1 )
......
......@@ -36,8 +36,4 @@ void CloseDecoder ( vlc_object_t * );
int OpenEncoder ( vlc_object_t * );
void CloseEncoder ( vlc_object_t * );
int OpenVideo ( vlc_object_t * );
int OpenVideoStat( vlc_object_t * );
void CloseVideo ( vlc_object_t * );
int OpenRenderer ( vlc_object_t * );
......@@ -119,6 +119,12 @@ EXTRA_LTLIBRARIES += libegl_plugin.la
libvlc_LTLIBRARIES += $(LTLIBegl)
### Common ###
libvdummy_plugin_la_SOURCES = vdummy.c
libvdummy_plugin_la_CFLAGS = $(AM_CFLAGS)
libvdummy_plugin_la_LIBADD = $(AM_LIBADD)
libvdummy_plugin_la_DEPENDENCIES =
libvlc_LTLIBRARIES += \
libvdummy_plugin.la \
libvmem_plugin.la \
libyuv_plugin.la
......@@ -30,8 +30,37 @@
#endif
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_vout_display.h>
#include "dummy.h"
#define CHROMA_TEXT N_("Dummy image chroma format")
#define CHROMA_LONGTEXT N_( \
"Force the dummy video output to create images using a specific chroma " \
"format instead of trying to improve performances by using the most " \
"efficient one.")
static int OpenDummy( vlc_object_t * );
static int OpenStats( vlc_object_t * );
static void Close( vlc_object_t * );
vlc_module_begin ()
set_shortname( N_("Dummy") )
set_description( N_("Dummy video output") )
set_capability( "vout display", 1 )
set_callbacks( OpenDummy, Close )
add_shortcut( "dummy" )
set_category( CAT_VIDEO )
set_subcategory( SUBCAT_VIDEO_VOUT )
add_string( "dummy-chroma", NULL, CHROMA_TEXT, CHROMA_LONGTEXT, true )
add_submodule ()
set_description( N_("Statistics video output") )
set_capability( "vout display", 0 )
add_shortcut( "stats" )
set_callbacks( OpenStats, Close )
vlc_module_end ()
/*****************************************************************************
* Local prototypes
......@@ -48,7 +77,8 @@ static void Manage (vout_display_t *);
/*****************************************************************************
* OpenVideo: activates dummy vout display method
*****************************************************************************/
static int OpenVideoCommon(vlc_object_t *object, bool display_stat)
static int Open(vlc_object_t *object,
void (*display)(vout_display_t *, picture_t *, subpicture_t *))
{
vout_display_t *vd = (vout_display_t *)object;
vout_display_sys_t *sys;
......@@ -71,22 +101,24 @@ static int OpenVideoCommon(vlc_object_t *object, bool display_stat)
}
vd->pool = Pool;
vd->prepare = NULL;
vd->display = display_stat ? DisplayStat : Display;
vd->display = display;
vd->control = Control;
vd->manage = Manage;
return VLC_SUCCESS;
}
int OpenVideo(vlc_object_t *object)
static int OpenDummy(vlc_object_t *object)
{
return OpenVideoCommon(object, false);
return Open(object, Display);
}
int OpenVideoStat(vlc_object_t *object)
static int OpenStats(vlc_object_t *object)
{
return OpenVideoCommon(object, true);
return Open(object, DisplayStat);
}
void CloseVideo(vlc_object_t *object)
static void Close(vlc_object_t *object)
{
vout_display_t *vd = (vout_display_t *)object;
vout_display_sys_t *sys = vd->sys;
......
......@@ -914,7 +914,6 @@ modules/misc/dummy/encoder.c
modules/misc/dummy/input.c
modules/misc/dummy/interface.c
modules/misc/dummy/renderer.c
modules/misc/dummy/vout.c
modules/misc/gnutls.c
modules/misc/inhibit.c
modules/misc/inhibit/osso.c
......@@ -1121,6 +1120,7 @@ modules/video_output/msw/events.c
modules/video_output/msw/glwin32.c
modules/video_output/msw/wingdi.c
modules/video_output/sdl.c
modules/video_output/vdummy.c
modules/video_output/vmem.c
modules/video_output/xcb/glx.c
modules/video_output/xcb/window.c
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment