resource.h 2.79 KB
Newer Older
1
/*****************************************************************************
2
 * resource.h
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
 *****************************************************************************
 * Copyright (C) 2008 Laurent Aimar
 * $Id$
 *
 * Authors: Laurent Aimar < fenrir _AT_ videolan _DOT_ org >
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
 *****************************************************************************/

#if defined(__PLUGIN__) || defined(__BUILTIN__) || !defined(__LIBVLC__)
# error This header file can only be included from LibVLC.
#endif

Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
28 29
#ifndef _INPUT_RESOURCE_H
#define _INPUT_RESOURCE_H 1
30 31 32 33

#include <vlc_common.h>

/**
34
 * This function creates an empty input_resource_t.
35
 */
36
input_resource_t *input_resource_New( void );
37 38 39 40

/**
 * This function set the associated input.
 */
41
void input_resource_SetInput( input_resource_t *, input_thread_t * );
42

43 44 45 46 47 48 49
/**
 * This function return a input_resource_t with all resources detach from the
 * given input_resource_t.
 * It must not be associated to an input.
 */
input_resource_t *input_resource_Detach( input_resource_t * );

50 51 52
/**
 * This function handles sout request.
 */
53
sout_instance_t *input_resource_RequestSout( input_resource_t *, sout_instance_t *, const char *psz_sout );
54 55 56 57

/**
 * This function handles aout request.
 */
58
aout_instance_t *input_resource_RequestAout( input_resource_t *, aout_instance_t * );
59

60 61 62 63 64
/**
 * This function return the current aout if any.
 *
 * You must call vlc_object_release on the value returned (if non NULL).
 */
65
aout_instance_t *input_resource_HoldAout( input_resource_t *p_resource );
66

67 68 69
/**
 * This function handles vout request.
 */
70
vout_thread_t *input_resource_RequestVout( input_resource_t *, vout_thread_t *, video_format_t *, unsigned dpb_size, bool b_recycle );
71 72

/**
73
 * This function return one of the current vout if any.
74 75 76
 *
 * You must call vlc_object_release on the value returned (if non NULL).
 */
77
vout_thread_t *input_resource_HoldVout( input_resource_t * );
78

79 80 81 82 83
/**
 * This function return all current vouts if any.
 *
 * You must call vlc_object_release on all values returned (if non NULL).
 */
84
void input_resource_HoldVouts( input_resource_t *, vout_thread_t ***, size_t * );
85

86 87
#endif