Contribs: update dvdnav to 6.0.1
[vlc.git] / include / vlc_decoder.h
bloba2ab48d2c684353368f287f4c6ae262f77fadc0a
1 /*****************************************************************************
2 * vlc_decoder.h: decoder API
3 *****************************************************************************
4 * Copyright (C) 1999-2015 VLC authors and VideoLAN
6 * Authors: Christophe Massiot <massiot@via.ecp.fr>
7 * 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 #ifndef VLC_DECODER_H
25 #define VLC_DECODER_H 1
27 /**
28 * \defgroup input Decoder
29 * \ingroup vlc
30 * Decoder
31 * @{
34 #include <vlc_subpicture.h>
36 /**
37 * This defines an opaque input resource handler.
39 typedef struct input_resource_t input_resource_t;
41 /* */
42 VLC_API decoder_t * input_DecoderCreate( vlc_object_t *, const es_format_t *, input_resource_t * ) VLC_USED;
43 VLC_API void input_DecoderDelete( decoder_t * );
44 VLC_API void input_DecoderDecode( decoder_t *, block_t *, bool b_do_pace );
45 VLC_API void input_DecoderDrain( decoder_t * );
46 VLC_API void input_DecoderFlush( decoder_t * );
47 VLC_API int input_DecoderSetSpuHighlight( decoder_t *, const vlc_spu_highlight_t * );
49 /**
50 * It creates an empty input resource handler.
52 * The given object MUST stay alive as long as the input_resource_t is
53 * not deleted.
55 VLC_API input_resource_t * input_resource_New( vlc_object_t * ) VLC_USED;
57 /**
58 * It releases an input resource.
60 VLC_API void input_resource_Release( input_resource_t * );
62 /**
63 * \return the current audio output if any.
64 * Use aout_Release() to drop the reference.
66 VLC_API audio_output_t *input_resource_HoldAout( input_resource_t * );
68 /**
69 * This function creates or recycles an audio output.
71 VLC_API audio_output_t *input_resource_GetAout( input_resource_t * );
73 /**
74 * This function retains or destroys an audio output.
76 VLC_API void input_resource_PutAout( input_resource_t *, audio_output_t * );
78 /** @} */
79 #endif