xine-lib  1.2.10
video_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 video decoder plugin interface
21  */
22 
23 #ifndef HAVE_VIDEO_DECODER_H
24 #define HAVE_VIDEO_DECODER_H
25 
26 #include <xine/attributes.h>
27 #include <xine/buffer.h>
28 
29 struct plugin_node_s;
30 
31 #define VIDEO_DECODER_IFACE_VERSION 19
32 
33 
34 /*
35  * generic xine video decoder plugin interface
36  */
37 
40 
42 
43  /*
44  * open a new instance of this plugin class
45  */
46  video_decoder_t* (*open_plugin) (video_decoder_class_t *this_gen, xine_stream_t *stream);
47 
51  const char *identifier;
52 
58  const char *description;
59 
63  const char *text_domain;
64 
65  /*
66  * free all class-related resources
67  */
68  void (*dispose) (video_decoder_class_t *this_gen);
69 };
70 
71 #define default_video_decoder_class_dispose (void (*) (video_decoder_class_t *this_gen))free
72 
74 
75  /*
76  * decode data from buf and feed decoded frames to
77  * video output
78  */
79  void (*decode_data) (video_decoder_t *this_gen, buf_element_t *buf);
80 
81  /*
82  * reset decoder after engine flush (prepare for new
83  * video data not related to recently decoded data)
84  */
85  void (*reset) (video_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) (video_decoder_t *this_gen);
92 
93  /*
94  * flush out any frames that are still stored in the decoder
95  */
96  void (*flush) (video_decoder_t *this_gen);
97 
98  /*
99  * close down, free all resources
100  */
101  void (*dispose) (video_decoder_t *this_gen);
102 
110 };
111 
112 #endif
video_decoder_s
Definition: video_decoder.h:73
xine_stream_s
Definition: xine_internal.h:123
video_decoder_s::flush
void(* flush)(video_decoder_t *this_gen)
Definition: video_decoder.h:96
video_decoder_class_s::identifier
const char * identifier
short human readable identifier for this plugin class
Definition: video_decoder.h:51
video_decoder_class_s::dispose
void(* dispose)(video_decoder_class_t *this_gen)
Definition: video_decoder.h:68
video_decoder_s::decode_data
void(* decode_data)(video_decoder_t *this_gen, buf_element_t *buf)
Definition: video_decoder.h:79
attributes.h
video_decoder_s::discontinuity
void(* discontinuity)(video_decoder_t *this_gen)
Definition: video_decoder.h:91
video_decoder_s::reset
void(* reset)(video_decoder_t *this_gen)
Definition: video_decoder.h:85
video_decoder_class_s::text_domain
const char * text_domain
Optional non-standard catalog to use with dgettext() for description.
Definition: video_decoder.h:63
buf_element_s
Definition: buffer.h:337
buffer.h
video_decoder_class_s
Definition: video_decoder.h:41
video_decoder_class_s::description
const char * description
human readable (verbose = 1 line) description for this plugin class
Definition: video_decoder.h:58
plugin_node_s
Definition: plugin_catalog.h:44
video_decoder_s::XINE_PRIVATE_FIELD
struct plugin_node_s *node XINE_PRIVATE_FIELD
Pointer to the loaded plugin node.
Definition: video_decoder.h:109
video_decoder_s::dispose
void(* dispose)(video_decoder_t *this_gen)
Definition: video_decoder.h:101