]> git.sesse.net Git - vlc/blob - modules/stream_out/dummy.c
* include/vlc_video.h: Fixed mask variable types for YUV to RGB conversions.
[vlc] / modules / stream_out / dummy.c
1 /*****************************************************************************
2  * dummy.c: dummy stream output module
3  *****************************************************************************
4  * Copyright (C) 2003-2004 the VideoLAN team
5  * $Id$
6  *
7  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 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 General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23
24 /*****************************************************************************
25  * Preamble
26  *****************************************************************************/
27 #include <stdlib.h>
28 #include <string.h>
29
30 #include <vlc/vlc.h>
31 #include <vlc/sout.h>
32
33 /*****************************************************************************
34  * Exported prototypes
35  *****************************************************************************/
36 static int      Open    ( vlc_object_t * );
37 static void     Close   ( vlc_object_t * );
38
39 static sout_stream_id_t *Add ( sout_stream_t *, es_format_t * );
40 static int               Del ( sout_stream_t *, sout_stream_id_t * );
41 static int               Send( sout_stream_t *, sout_stream_id_t *, block_t* );
42
43 /*****************************************************************************
44  * Module descriptor
45  *****************************************************************************/
46 vlc_module_begin();
47     set_description( _("Dummy stream output") );
48     set_capability( "sout stream", 50 );
49     add_shortcut( "dummy" );
50     set_callbacks( Open, Close );
51 vlc_module_end();
52
53 /*****************************************************************************
54  * Open:
55  *****************************************************************************/
56 static int Open( vlc_object_t *p_this )
57 {
58     sout_stream_t *p_stream = (sout_stream_t*)p_this;
59
60     p_stream->pf_add    = Add;
61     p_stream->pf_del    = Del;
62     p_stream->pf_send   = Send;
63
64     p_stream->p_sys     = NULL;
65
66     return VLC_SUCCESS;
67 }
68
69 /*****************************************************************************
70  * Close:
71  *****************************************************************************/
72 static void Close( vlc_object_t * p_this )
73 {
74 #if 0
75     sout_stream_t   *p_stream = (sout_stream_t*)p_this;
76 #endif
77 }
78
79 struct sout_stream_id_t
80 {
81     int i_d_u_m_m_y;
82 };
83
84 static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
85 {
86     sout_stream_id_t *id;
87
88     id = malloc( sizeof( sout_stream_id_t ) );
89     id->i_d_u_m_m_y = 0;
90
91     return id;
92 }
93
94 static int Del( sout_stream_t *p_stream, sout_stream_id_t *id )
95 {
96     free( id );
97
98     return VLC_SUCCESS;
99 }
100
101 static int Send( sout_stream_t *p_stream, sout_stream_id_t *id,
102                  block_t *p_buffer )
103 {
104     block_ChainRelease( p_buffer );
105     return VLC_SUCCESS;
106 }
107