qt: playlist: use item title if available
[vlc.git] / modules / stream_out / dummy.c
blobfcff156546f6fc432846e4c5947f53d672954b32
1 /*****************************************************************************
2 * dummy.c: dummy stream output module
3 *****************************************************************************
4 * Copyright (C) 2003-2004 VLC authors and VideoLAN
6 * Authors: Laurent Aimar <fenrir@via.ecp.fr>
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU Lesser General Public License as published by
10 * the Free Software Foundation; either version 2.1 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this program; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
21 *****************************************************************************/
23 /*****************************************************************************
24 * Preamble
25 *****************************************************************************/
27 #ifdef HAVE_CONFIG_H
28 # include "config.h"
29 #endif
31 #include <vlc_common.h>
32 #include <vlc_plugin.h>
33 #include <vlc_block.h>
34 #include <vlc_sout.h>
36 static void *Add( sout_stream_t *p_stream, const es_format_t *p_fmt )
38 VLC_UNUSED(p_stream); VLC_UNUSED(p_fmt);
39 return malloc( 1 );
42 static void Del( sout_stream_t *p_stream, void *id )
44 VLC_UNUSED(p_stream);
45 free( id );
48 static int Send( sout_stream_t *p_stream, void *id, block_t *p_buffer )
50 (void)p_stream; (void)id;
51 block_ChainRelease( p_buffer );
52 return VLC_SUCCESS;
55 static const struct sout_stream_operations ops = {
56 Add, Del, Send, NULL, NULL,
59 /*****************************************************************************
60 * Open:
61 *****************************************************************************/
62 static int Open( vlc_object_t *p_this )
64 sout_stream_t *p_stream = (sout_stream_t*)p_this;
66 p_stream->ops = &ops;
67 return VLC_SUCCESS;
70 /*****************************************************************************
71 * Module descriptor
72 *****************************************************************************/
73 vlc_module_begin()
74 set_description(N_("Dummy stream output"))
75 set_capability("sout output", 50)
76 add_shortcut("dummy", "drop")
77 set_callback(Open )
78 vlc_module_end()