Commit 3264e6d5 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

stats: eliminate useless data and callback

parent 7de1884e
......@@ -21,9 +21,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
......@@ -33,45 +30,6 @@
#include "stats.h"
/*****************************************************************************
* encoder_sys_t
*****************************************************************************/
struct encoder_sys_t
{
int i;
};
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict );
static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_abuff );
/*****************************************************************************
* OpenDecoder: open the dummy encoder.
*****************************************************************************/
int OpenEncoder ( vlc_object_t *p_this )
{
encoder_t *p_enc = (encoder_t *)p_this;
p_enc->p_sys = malloc(sizeof(encoder_sys_t));
if( !p_enc->p_sys ) return VLC_ENOMEM;
p_enc->p_sys->i = 0;
msg_Dbg( p_this, "opening stats encoder" );
p_enc->pf_encode_video = EncodeVideo;
p_enc->pf_encode_audio = EncodeAudio;
return VLC_SUCCESS;
}
/****************************************************************************
* EncodeVideo: the whole thing
****************************************************************************/
static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
{
(void)p_pict;
......@@ -87,9 +45,6 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
return p_block;
}
/****************************************************************************
* EncodeVideo: the whole thing
****************************************************************************/
static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_abuff )
{
(void)p_abuff;
......@@ -97,14 +52,14 @@ static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_abuff )
return NULL;
}
/*****************************************************************************
* CloseDecoder: decoder destruction
*****************************************************************************/
void CloseEncoder ( vlc_object_t *p_this )
int OpenEncoder ( vlc_object_t *p_this )
{
encoder_t *p_enc = (encoder_t *)p_this;
msg_Dbg( p_this, "closing stats encoder" );
free( p_enc->p_sys );
msg_Dbg( p_this, "opening stats encoder" );
p_enc->pf_encode_video = EncodeVideo;
p_enc->pf_encode_audio = EncodeAudio;
return VLC_SUCCESS;
}
......@@ -49,7 +49,7 @@ vlc_module_begin ()
set_description( N_("Stats encoder function") )
set_capability( "encoder", 0 )
add_shortcut( "stats" )
set_callbacks( OpenEncoder, CloseEncoder )
set_callbacks( OpenEncoder, NULL )
add_submodule ()
set_section( N_( "Stats decoder" ), NULL )
set_description( N_("Stats decoder function") )
......
......@@ -28,7 +28,6 @@
int OpenDecoder ( vlc_object_t * );
int OpenEncoder ( vlc_object_t * );
void CloseEncoder ( vlc_object_t * );
int OpenDemux ( vlc_object_t * );
void CloseDemux ( vlc_object_t * );
......
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