demux: mp4: avoid audio cuts on seek
[vlc.git] / modules / codec / edummy.c
blob46b280d809827b9aa15179c3a9b989489f867ab0
1 /*****************************************************************************
2 * edummy.c: dummy encoder plugin for vlc.
3 *****************************************************************************
4 * Copyright (C) 2002 VLC authors and VideoLAN
5 * $Id$
7 * Authors: Gildas Bazin <gbazin@netcourrier.com>
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU Lesser General Public License as published by
11 * the Free Software Foundation; either version 2.1 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public License
20 * along with this program; if not, write to the Free Software Foundation,
21 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22 *****************************************************************************/
24 /*****************************************************************************
25 * Preamble
26 *****************************************************************************/
27 #ifdef HAVE_CONFIG_H
28 # include "config.h"
29 #endif
31 #include <vlc_common.h>
32 #include <vlc_plugin.h>
33 #include <vlc_codec.h>
35 static int OpenEncoder( vlc_object_t * );
36 static void CloseEncoder( vlc_object_t * );
38 vlc_module_begin ()
39 set_shortname( N_("Dummy") )
40 set_description( N_("Dummy encoder") )
41 set_capability( "encoder", 0 )
42 set_callbacks( OpenEncoder, CloseEncoder )
43 add_shortcut( "dummy" )
44 vlc_module_end ()
47 /*****************************************************************************
48 * Local prototypes
49 *****************************************************************************/
50 static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict );
51 static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_buf );
53 /*****************************************************************************
54 * OpenDecoder: open the dummy encoder.
55 *****************************************************************************/
56 static int OpenEncoder( vlc_object_t *p_this )
58 encoder_t *p_enc = (encoder_t *)p_this;
60 p_enc->pf_encode_video = EncodeVideo;
61 p_enc->pf_encode_audio = EncodeAudio;
63 return VLC_SUCCESS;
66 /****************************************************************************
67 * EncodeVideo: the whole thing
68 ****************************************************************************/
69 static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
71 VLC_UNUSED(p_enc); VLC_UNUSED(p_pict);
72 return NULL;
75 /****************************************************************************
76 * EncodeAudio: the whole thing
77 ****************************************************************************/
78 static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_buf )
80 VLC_UNUSED(p_enc); VLC_UNUSED(p_buf);
81 return NULL;
84 /*****************************************************************************
85 * CloseDecoder: decoder destruction
86 *****************************************************************************/
87 static void CloseEncoder( vlc_object_t *p_this )
89 VLC_UNUSED(p_this);