]> git.sesse.net Git - vlc/blob - modules/codec/edummy.c
upnp: change item b_net and i_type
[vlc] / modules / codec / edummy.c
1 /*****************************************************************************
2  * edummy.c: dummy encoder plugin for vlc.
3  *****************************************************************************
4  * Copyright (C) 2002 VLC authors and VideoLAN
5  * $Id$
6  *
7  * Authors: Gildas Bazin <gbazin@netcourrier.com>
8  *
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.
13  *
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.
18  *
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  *****************************************************************************/
23
24 /*****************************************************************************
25  * Preamble
26  *****************************************************************************/
27 #ifdef HAVE_CONFIG_H
28 # include "config.h"
29 #endif
30
31 #include <vlc_common.h>
32 #include <vlc_plugin.h>
33 #include <vlc_codec.h>
34
35 static int OpenEncoder( vlc_object_t * );
36 static void CloseEncoder( vlc_object_t * );
37
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 ()
45
46
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 );
52
53 /*****************************************************************************
54  * OpenDecoder: open the dummy encoder.
55  *****************************************************************************/
56 static int OpenEncoder( vlc_object_t *p_this )
57 {
58     encoder_t *p_enc = (encoder_t *)p_this;
59
60     p_enc->pf_encode_video = EncodeVideo;
61     p_enc->pf_encode_audio = EncodeAudio;
62
63     return VLC_SUCCESS;
64 }
65
66 /****************************************************************************
67  * EncodeVideo: the whole thing
68  ****************************************************************************/
69 static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
70 {
71     VLC_UNUSED(p_enc); VLC_UNUSED(p_pict);
72     return NULL;
73 }
74
75 /****************************************************************************
76  * EncodeAudio: the whole thing
77  ****************************************************************************/
78 static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_buf )
79 {
80     VLC_UNUSED(p_enc); VLC_UNUSED(p_buf);
81     return NULL;
82 }
83
84 /*****************************************************************************
85  * CloseDecoder: decoder destruction
86  *****************************************************************************/
87 static void CloseEncoder( vlc_object_t *p_this )
88 {
89     VLC_UNUSED(p_this);
90 }