1 /*****************************************************************************
3 *****************************************************************************
4 * Copyright (C) 2001, 2002, 2004 VLC authors and VideoLAN
7 * Authors: Laurent Aimar <fenrir@via.ecp.fr>
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 /*****************************************************************************
26 *****************************************************************************/
32 #include <vlc_common.h>
33 #include <vlc_plugin.h>
35 #include <vlc_block.h>
37 /*****************************************************************************
39 *****************************************************************************/
40 static int Open ( vlc_object_t
* );
43 set_description( N_("Dummy stream output") )
44 set_shortname( N_( "Dummy" ))
45 set_capability( "sout access", 0 )
46 set_category( CAT_SOUT
)
47 set_subcategory( SUBCAT_SOUT_ACO
)
48 add_shortcut( "dummy" )
49 set_callbacks( Open
, NULL
)
53 /*****************************************************************************
55 *****************************************************************************/
56 static ssize_t
Write( sout_access_out_t
*, block_t
* );
58 /*****************************************************************************
60 *****************************************************************************/
61 static int Open( vlc_object_t
*p_this
)
63 sout_access_out_t
*p_access
= (sout_access_out_t
*)p_this
;
65 p_access
->pf_write
= Write
;
70 /*****************************************************************************
71 * Read: standard read on a file descriptor.
72 *****************************************************************************/
73 static ssize_t
Write( sout_access_out_t
*p_access
, block_t
*p_buffer
)
76 block_t
*b
= p_buffer
;
80 i_write
+= b
->i_buffer
;
85 block_ChainRelease( p_buffer
);