1 /*****************************************************************************
3 *****************************************************************************
4 * Copyright (C) 2001, 2002 VideoLAN
5 * $Id: dummy.c,v 1.1 2003/04/13 20:00:21 fenrir Exp $
7 * Authors: Laurent Aimar <fenrir@via.ecp.fr>
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.
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.
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., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
22 *****************************************************************************/
24 /*****************************************************************************
26 *****************************************************************************/
33 /*****************************************************************************
35 *****************************************************************************/
36 static int Open ( vlc_object_t * );
37 static void Close ( vlc_object_t * );
39 static sout_stream_id_t *Add ( sout_stream_t *, sout_format_t * );
40 static int Del ( sout_stream_t *, sout_stream_id_t * );
41 static int Send( sout_stream_t *, sout_stream_id_t *, sout_buffer_t* );
43 /*****************************************************************************
45 *****************************************************************************/
47 set_description( _("Dummy stream") );
48 set_capability( "sout stream", 50 );
49 add_shortcut( "dummy" );
50 set_callbacks( Open, Close );
53 /*****************************************************************************
55 *****************************************************************************/
56 static int Open( vlc_object_t *p_this )
58 sout_stream_t *p_stream = (sout_stream_t*)p_this;
60 p_stream->pf_add = Add;
61 p_stream->pf_del = Del;
62 p_stream->pf_send = Send;
64 p_stream->p_sys = NULL;
69 /*****************************************************************************
71 *****************************************************************************/
73 static void Close( vlc_object_t * p_this )
75 sout_stream_t *p_stream = (sout_stream_t*)p_this;
79 struct sout_stream_id_t
85 static sout_stream_id_t * Add ( sout_stream_t *p_stream, sout_format_t *p_fmt )
89 id = malloc( sizeof( sout_stream_id_t ) );
95 static int Del ( sout_stream_t *p_stream, sout_stream_id_t *id )
102 static int Send ( sout_stream_t *p_stream, sout_stream_id_t *id, sout_buffer_t *p_buffer )
104 sout_buffer_t *p_next;
108 p_next = p_buffer->p_next;
110 sout_BufferDelete( p_stream->p_sout, p_buffer );