Commit 329be451 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Move and split dummy decoder

parent 09fde612
......@@ -86,6 +86,7 @@ $Id$
* cvdsub: CVD subtitles decoder
* dbus: D-Bus control interface
* dc1394: firewire input module
* ddummy: dummy decoder
* decklink: input module to read from a Blackmagic SDI card
* decomp: Decompression module
* deinterlace: naive deinterlacing filter
......
......@@ -38,6 +38,7 @@ SOURCES_subsusf = subsusf.c
SOURCES_t140 = t140.c
SOURCES_crystalhd = crystalhd.c
SOURCES_stl = stl.c
SOURCES_ddummy = ddummy.c
libvlc_LTLIBRARIES += \
liba52_plugin.la \
......@@ -47,6 +48,7 @@ libvlc_LTLIBRARIES += \
libcc_plugin.la \
libcdg_plugin.la \
libcvdsub_plugin.la \
libddummy_plugin.la \
libdts_plugin.la \
libdvbsub_plugin.la \
liblpcm_plugin.la \
......
/*****************************************************************************
* decoder.c: dummy decoder plugin for vlc.
* dddumy.c: dummy decoder plugin for vlc.
*****************************************************************************
* Copyright (C) 2002 the VideoLAN team
* $Id$
......@@ -29,11 +29,37 @@
#endif
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_codec.h>
#include <vlc_fs.h>
#define SAVE_TEXT N_("Save raw codec data")
#define SAVE_LONGTEXT N_( \
"Save the raw codec data if you have selected/forced the dummy " \
"decoder in the main options." )
static int OpenDecoder( vlc_object_t * );
static int OpenDecoderDump( vlc_object_t * );
static void CloseDecoder( vlc_object_t * );
vlc_module_begin ()
set_shortname( N_("Dummy") )
set_description( N_("Dummy decoder") )
set_capability( "decoder", 0 )
set_callbacks( OpenDecoder, CloseDecoder )
set_category( CAT_INPUT )
set_subcategory( SUBCAT_INPUT_SCODEC )
add_bool( "dummy-save-es", false, SAVE_TEXT, SAVE_LONGTEXT, true )
add_shortcut( "dummy" )
add_submodule ()
set_section( N_( "Dump decoder" ), NULL )
set_description( N_("Dump decoder") )
set_capability( "decoder", -1 )
set_callbacks( OpenDecoderDump, CloseDecoder )
add_shortcut( "dump" )
vlc_module_end ()
#include "dummy.h"
/*****************************************************************************
* Local prototypes
......@@ -79,12 +105,12 @@ static int OpenDecoderCommon( vlc_object_t *p_this, bool b_force_dump )
return VLC_SUCCESS;
}
int OpenDecoder( vlc_object_t *p_this )
static int OpenDecoder( vlc_object_t *p_this )
{
return OpenDecoderCommon( p_this, false );
}
int OpenDecoderDump( vlc_object_t *p_this )
static int OpenDecoderDump( vlc_object_t *p_this )
{
return OpenDecoderCommon( p_this, true );
}
......@@ -117,7 +143,7 @@ static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
/*****************************************************************************
* CloseDecoder: decoder destruction
*****************************************************************************/
void CloseDecoder ( vlc_object_t *p_this )
static void CloseDecoder( vlc_object_t *p_this )
{
decoder_t *p_dec = (decoder_t *)p_this;
FILE *stream = (void *)p_dec->p_sys;
......@@ -125,4 +151,3 @@ void CloseDecoder ( vlc_object_t *p_this )
if( stream != NULL )
fclose( stream );
}
......@@ -2,7 +2,6 @@ SOURCES_dummy = \
dummy.c \
dummy.h \
interface.c \
decoder.c \
encoder.c \
renderer.c \
$(NULL)
......
......@@ -39,11 +39,6 @@ static int OpenDummy(vlc_object_t *);
/*****************************************************************************
* Module descriptor
*****************************************************************************/
#define SAVE_TEXT N_("Save raw codec data")
#define SAVE_LONGTEXT N_( \
"Save the raw codec data if you have selected/forced the dummy " \
"decoder in the main options." )
#ifdef WIN32
#define QUIET_TEXT N_("Do not open a DOS command box interface")
#define QUIET_LONGTEXT N_( \
......@@ -63,20 +58,6 @@ vlc_module_begin ()
add_category_hint( N_("Interface"), NULL, false )
add_bool( "dummy-quiet", false, QUIET_TEXT, QUIET_LONGTEXT, false )
#endif
add_submodule ()
set_section( N_( "Dummy decoder" ), NULL )
set_description( N_("Dummy decoder function") )
set_capability( "decoder", 0 )
set_callbacks( OpenDecoder, CloseDecoder )
set_category( CAT_INPUT )
set_subcategory( SUBCAT_INPUT_SCODEC )
add_bool( "dummy-save-es", false, SAVE_TEXT, SAVE_LONGTEXT, true )
add_submodule ()
set_section( N_( "Dump decoder" ), NULL )
set_description( N_("Dump decoder function") )
set_capability( "decoder", -1 )
set_callbacks( OpenDecoderDump, CloseDecoder )
add_shortcut( "dump" )
add_submodule ()
set_description( N_("Dummy encoder function") )
set_capability( "encoder", 0 )
......
......@@ -26,10 +26,6 @@
*****************************************************************************/
int OpenIntf ( vlc_object_t * );
int OpenDecoder ( vlc_object_t * );
int OpenDecoderDump( vlc_object_t * );
void CloseDecoder ( vlc_object_t * );
int OpenEncoder ( vlc_object_t * );
void CloseEncoder ( vlc_object_t * );
......
......@@ -345,6 +345,7 @@ modules/codec/cc.c
modules/codec/cc.h
modules/codec/cdg.c
modules/codec/cvdsub.c
modules/codec/ddummy.c
modules/codec/dirac.c
modules/codec/dmo/buffer.c
modules/codec/dmo/dmo.c
......@@ -908,7 +909,6 @@ modules/meta_engine/folder.c
modules/meta_engine/taglib.cpp
modules/misc/audioscrobbler.c
modules/misc/dhparams.h
modules/misc/dummy/decoder.c
modules/misc/dummy/dummy.c
modules/misc/dummy/dummy.h
modules/misc/dummy/encoder.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