xine-lib  1.2.9
audio_decoder.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2000-2017 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/os_types.h>
27 #include <xine/buffer.h>
28 
29 #ifdef XINE_COMPILE
30 # include <xine/plugin_catalog.h>
31 #endif
32 
33 #define AUDIO_DECODER_IFACE_VERSION 16
34 
35 /*
36  * generic xine audio decoder plugin interface
37  */
38 
41 
43 
44  /*
45  * open a new instance of this plugin class
46  */
47  audio_decoder_t* (*open_plugin) (audio_decoder_class_t *this_gen, xine_stream_t *stream);
48 
52  const char *identifier;
53 
59  const char *description;
60 
64  const char *text_domain;
65 
66  /*
67  * free all class-related resources
68  */
69 
70  void (*dispose) (audio_decoder_class_t *this_gen);
71 };
72 
73 #define default_audio_decoder_class_dispose (void (*) (audio_decoder_class_t *this_gen))free
74 
76 
77  /*
78  * decode data from buf and feed decoded samples to
79  * audio output
80  */
81  void (*decode_data) (audio_decoder_t *this_gen, buf_element_t *buf);
82 
83  /*
84  * reset decoder after engine flush (prepare for new
85  * audio data not related to recently decoded data)
86  */
87  void (*reset) (audio_decoder_t *this_gen);
88 
89  /*
90  * inform decoder that a time reference discontinuity has happened.
91  * that is, it must forget any currently held pts value
92  */
93  void (*discontinuity) (audio_decoder_t *this_gen);
94 
95  /*
96  * close down, free all resources
97  */
98  void (*dispose) (audio_decoder_t *this_gen);
99 
106 #ifdef XINE_COMPILE
108 #else
109  void *node;
110 #endif
111 };
112 
113 #endif
Definition: buffer.h:334
Definition: plugin_catalog.h:44
Definition: xine_internal.h:210
const char * identifier
short human readable identifier for this plugin class
Definition: audio_decoder.h:52
const char * text_domain
Optional non-standard catalog to use with dgettext() for description.
Definition: audio_decoder.h:64
plugin_node_t * node
Pointer to the loaded plugin node.
Definition: audio_decoder.h:107
void(* reset)(audio_decoder_t *this_gen)
Definition: audio_decoder.h:87
void(* decode_data)(audio_decoder_t *this_gen, buf_element_t *buf)
Definition: audio_decoder.h:81
void(* dispose)(audio_decoder_class_t *this_gen)
Definition: audio_decoder.h:70
const char * description
human readable (verbose = 1 line) description for this plugin class
Definition: audio_decoder.h:59
void(* dispose)(audio_decoder_t *this_gen)
Definition: audio_decoder.h:98
Definition: audio_decoder.h:42
Definition: audio_decoder.h:75
void(* discontinuity)(audio_decoder_t *this_gen)
Definition: audio_decoder.h:93