xine-lib 1.2.11
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
29struct 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
Definition: audio_decoder.h:40
const char * text_domain
Optional non-standard catalog to use with dgettext() for description.
Definition: audio_decoder.h:62
void(* dispose)(audio_decoder_class_t *this_gen)
Definition: audio_decoder.h:68
const char * identifier
short human readable identifier for this plugin class
Definition: audio_decoder.h:50
const char * description
human readable (verbose = 1 line) description for this plugin class
Definition: audio_decoder.h:57
Definition: audio_decoder.h:73
void(* discontinuity)(audio_decoder_t *this_gen)
Definition: audio_decoder.h:91
void(* reset)(audio_decoder_t *this_gen)
Definition: audio_decoder.h:85
void(* decode_data)(audio_decoder_t *this_gen, buf_element_t *buf)
Definition: audio_decoder.h:79
struct plugin_node_s *node XINE_PRIVATE_FIELD
Pointer to the loaded plugin node.
Definition: audio_decoder.h:104
void(* dispose)(audio_decoder_t *this_gen)
Definition: audio_decoder.h:96
Definition: buffer.h:338
Definition: plugin_catalog.h:44
Definition: xine_internal.h:123