xine-lib  1.2.10
audio_decoder.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2000-2018 the xine project
3  *
4  * This file is part of xine, a free video player.
5  *
6  * xine is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * xine is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
19  *
20  * xine audio decoder plugin interface
21  */
22 
23 #ifndef HAVE_AUDIO_DECODER_H
24 #define HAVE_AUDIO_DECODER_H
25 
26 #include <xine/attributes.h>
27 #include <xine/buffer.h>
28 
29 struct plugin_node_s;
30 
31 #define AUDIO_DECODER_IFACE_VERSION 16
32 
33 /*
34  * generic xine audio decoder plugin interface
35  */
36 
39 
41 
42  /*
43  * open a new instance of this plugin class
44  */
45  audio_decoder_t* (*open_plugin) (audio_decoder_class_t *this_gen, xine_stream_t *stream);
46 
50  const char *identifier;
51 
57  const char *description;
58 
62  const char *text_domain;
63 
64  /*
65  * free all class-related resources
66  */
67 
68  void (*dispose) (audio_decoder_class_t *this_gen);
69 };
70 
71 #define default_audio_decoder_class_dispose (void (*) (audio_decoder_class_t *this_gen))free
72 
74 
75  /*
76  * decode data from buf and feed decoded samples to
77  * audio output
78  */
79  void (*decode_data) (audio_decoder_t *this_gen, buf_element_t *buf);
80 
81  /*
82  * reset decoder after engine flush (prepare for new
83  * audio data not related to recently decoded data)
84  */
85  void (*reset) (audio_decoder_t *this_gen);
86 
87  /*
88  * inform decoder that a time reference discontinuity has happened.
89  * that is, it must forget any currently held pts value
90  */
91  void (*discontinuity) (audio_decoder_t *this_gen);
92 
93  /*
94  * close down, free all resources
95  */
96  void (*dispose) (audio_decoder_t *this_gen);
97 
105 };
106 
107 #endif
audio_decoder_class_s::text_domain
const char * text_domain
Optional non-standard catalog to use with dgettext() for description.
Definition: audio_decoder.h:62
xine_stream_s
Definition: xine_internal.h:123
audio_decoder_class_s::identifier
const char * identifier
short human readable identifier for this plugin class
Definition: audio_decoder.h:50
audio_decoder_s::discontinuity
void(* discontinuity)(audio_decoder_t *this_gen)
Definition: audio_decoder.h:91
audio_decoder_s::reset
void(* reset)(audio_decoder_t *this_gen)
Definition: audio_decoder.h:85
audio_decoder_s
Definition: audio_decoder.h:73
audio_decoder_s::decode_data
void(* decode_data)(audio_decoder_t *this_gen, buf_element_t *buf)
Definition: audio_decoder.h:79
attributes.h
audio_decoder_class_s::description
const char * description
human readable (verbose = 1 line) description for this plugin class
Definition: audio_decoder.h:57
audio_decoder_class_s
Definition: audio_decoder.h:40
audio_decoder_s::dispose
void(* dispose)(audio_decoder_t *this_gen)
Definition: audio_decoder.h:96
audio_decoder_class_s::dispose
void(* dispose)(audio_decoder_class_t *this_gen)
Definition: audio_decoder.h:68
buf_element_s
Definition: buffer.h:337
buffer.h
audio_decoder_s::XINE_PRIVATE_FIELD
struct plugin_node_s *node XINE_PRIVATE_FIELD
Pointer to the loaded plugin node.
Definition: audio_decoder.h:104
plugin_node_s
Definition: plugin_catalog.h:44