Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

dummy.c

00001 /*****************************************************************************
00002  * dummy.c: dummy stream output module
00003  *****************************************************************************
00004  * Copyright (C) 2003-2004 the VideoLAN team
00005  * $Id: dummy.c 11664 2005-07-09 06:17:09Z courmisch $
00006  *
00007  * Authors: Laurent Aimar <[email protected]>
00008  *
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
00022  *****************************************************************************/
00023 
00024 /*****************************************************************************
00025  * Preamble
00026  *****************************************************************************/
00027 #include <stdlib.h>
00028 #include <string.h>
00029 
00030 #include <vlc/vlc.h>
00031 #include <vlc/sout.h>
00032 
00033 /*****************************************************************************
00034  * Exported prototypes
00035  *****************************************************************************/
00036 static int      Open    ( vlc_object_t * );
00037 static void     Close   ( vlc_object_t * );
00038 
00039 static sout_stream_id_t *Add ( sout_stream_t *, es_format_t * );
00040 static int               Del ( sout_stream_t *, sout_stream_id_t * );
00041 static int               Send( sout_stream_t *, sout_stream_id_t *, block_t* );
00042 
00043 /*****************************************************************************
00044  * Module descriptor
00045  *****************************************************************************/
00046 vlc_module_begin();
00047     set_description( _("Dummy stream output") );
00048     set_capability( "sout stream", 50 );
00049     add_shortcut( "dummy" );
00050     set_callbacks( Open, Close );
00051 vlc_module_end();
00052 
00053 /*****************************************************************************
00054  * Open:
00055  *****************************************************************************/
00056 static int Open( vlc_object_t *p_this )
00057 {
00058     sout_stream_t *p_stream = (sout_stream_t*)p_this;
00059 
00060     p_stream->pf_add    = Add;
00061     p_stream->pf_del    = Del;
00062     p_stream->pf_send   = Send;
00063 
00064     p_stream->p_sys     = NULL;
00065 
00066     return VLC_SUCCESS;
00067 }
00068 
00069 /*****************************************************************************
00070  * Close:
00071  *****************************************************************************/
00072 static void Close( vlc_object_t * p_this )
00073 {
00074 #if 0
00075     sout_stream_t   *p_stream = (sout_stream_t*)p_this;
00076 #endif
00077 }
00078 
00079 struct sout_stream_id_t
00080 {
00081     int i_d_u_m_m_y;
00082 };
00083 
00084 static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
00085 {
00086     sout_stream_id_t *id;
00087 
00088     id = malloc( sizeof( sout_stream_id_t ) );
00089     id->i_d_u_m_m_y = 0;
00090 
00091     return id;
00092 }
00093 
00094 static int Del( sout_stream_t *p_stream, sout_stream_id_t *id )
00095 {
00096     free( id );
00097 
00098     return VLC_SUCCESS;
00099 }
00100 
00101 static int Send( sout_stream_t *p_stream, sout_stream_id_t *id,
00102                  block_t *p_buffer )
00103 {
00104     block_ChainRelease( p_buffer );
00105     return VLC_SUCCESS;
00106 }
00107 

Generated on Tue Dec 20 10:14:27 2005 for vlc-0.8.4a by  doxygen 1.4.2