xine-lib 1.2.13-20230125hg15249
info_helper.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2000-2009 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 * stream metainfo helper functions
21 * hide some xine engine details from demuxers and reduce code duplication
22 *
23 * $id$
24 */
25
26#ifndef INFO_HELPER_H
27#define INFO_HELPER_H
28
29#include <stdarg.h>
30#include "xine_internal.h"
31
32/*
33 * set a stream info
34 *
35 * params:
36 * *stream the xine stream
37 * info stream info id (see xine.h, XINE_STREAM_INFO_*)
38 * value the value to assign
39 *
40 */
41void _x_stream_info_set(xine_stream_t *stream, int info, int value) XINE_PROTECTED;
42
43/*
44 * reset a stream info (internal ones only)
45 *
46 * params :
47 * *stream the xine stream
48 * info meta info id (see xine.h, XINE_STREAM_INFO_*)
49 *
50 */
52
53/*
54 * reset a stream info (public ones only)
55 *
56 * params :
57 * *stream the xine stream
58 * info meta info id (see xine.h, XINE_STREAM_INFO_*)
59 *
60 */
62
63/*
64 * retrieve stream info (internal ones only)
65 *
66 * params :
67 * *stream the xine stream
68 * info meta info id (see xine.h, XINE_STREAM_INFO_*)
69 *
70 */
71uint32_t _x_stream_info_get(xine_stream_t *stream, int info) XINE_PROTECTED;
72
73/*
74 * retrieve stream info (public ones only)
75 *
76 * params :
77 * *stream the xine stream
78 * info meta info id (see xine.h, XINE_STREAM_INFO_*)
79 *
80 */
82
83/*
84 * set a stream meta info
85 *
86 * params:
87 * *stream the xine stream
88 * info meta info id (see xine.h, XINE_META_INFO_*)
89 * *str null-terminated string (using current locale)
90 *
91 */
92void _x_meta_info_set(xine_stream_t *stream, int info, const char *str) XINE_PROTECTED;
93
94/*
95 * set a stream meta info
96 *
97 * params:
98 * *stream the xine stream
99 * info meta info id (see xine.h, XINE_META_INFO_*)
100 * *str null-terminated string (using utf8)
101 *
102 */
103void _x_meta_info_set_utf8(xine_stream_t *stream, int info, const char *str) XINE_PROTECTED;
104
105/*
106 * set a stream meta info
107 *
108 * params:
109 * *stream the xine stream
110 * info meta info id (see xine.h, XINE_META_INFO_*)
111 * *str null-terminated string (using encoding below)
112 * *enc charset encoding of the string
113 *
114 */
115void _x_meta_info_set_generic(xine_stream_t *stream, int info, const char *str, const char *enc) XINE_PROTECTED;
116
117/*
118 * set a stream meta multiple info
119 *
120 * params:
121 * *stream the xine stream
122 * info meta info id (see xine.h, XINE_META_INFO_*)
123 * ... one or more meta info, followed by a NULL pointer
124 *
125 */
127
128/*
129 * set a stream meta info
130 *
131 * params:
132 * *stream the xine stream
133 * info meta info id (see xine.h, XINE_META_INFO_*)
134 * *buf char buffer (not a null-terminated string)
135 * len length of the metainfo
136 *
137 */
138void _x_meta_info_n_set(xine_stream_t *stream, int info, const char *buf, int len) XINE_PROTECTED;
139
140/*
141 * reset a stream meta info (internal ones only)
142 *
143 * params :
144 * *stream the xine stream
145 * info meta info id (see xine.h, XINE_META_INFO_*)
146 *
147 */
148void _x_meta_info_reset(xine_stream_t *stream, int info) XINE_PROTECTED;
149
150/*
151 * reset a stream meta info (public ones only)
152 *
153 * params :
154 * *stream the xine stream
155 * info meta info id (see xine.h, XINE_META_INFO_*)
156 *
157 */
159
160/*
161 * retrieve stream meta info (internal ones only)
162 *
163 * params :
164 * *stream the xine stream
165 * info meta info id (see xine.h, XINE_META_INFO_*)
166 *
167 */
168const char *_x_meta_info_get(xine_stream_t *stream, int info) XINE_PROTECTED;
169
170/*
171 * retrieve stream meta info (public ones only)
172 *
173 * params :
174 * *stream the xine stream
175 * info meta info id (see xine.h, XINE_META_INFO_*)
176 *
177 */
178const char *_x_meta_info_get_public(xine_stream_t *stream, int info) XINE_PROTECTED;
179
180#endif /* INFO_HELPER_H */
#define XINE_PROTECTED
Definition attributes.h:75
#define XINE_SENTINEL
Definition attributes.h:81
void _x_meta_info_set_utf8(xine_stream_t *stream, int info, const char *str)
Definition info_helper.c:341
void _x_stream_info_public_reset(xine_stream_t *stream, int info)
Definition info_helper.c:71
uint32_t _x_stream_info_get_public(xine_stream_t *stream, int info)
Definition info_helper.c:113
const char * _x_meta_info_get_public(xine_stream_t *stream, int info)
Definition info_helper.c:427
const char * _x_meta_info_get(xine_stream_t *stream, int info)
Definition info_helper.c:414
void _x_meta_info_set_generic(xine_stream_t *stream, int info, const char *str, const char *enc)
Definition info_helper.c:331
void _x_meta_info_set_multi(xine_stream_t *stream, int info,...) XINE_SENTINEL
Definition info_helper.c:364
void _x_stream_info_set(xine_stream_t *stream, int info, int value)
Definition info_helper.c:79
void _x_meta_info_reset(xine_stream_t *stream, int info)
Definition info_helper.c:298
void _x_stream_info_reset(xine_stream_t *stream, int info)
Definition info_helper.c:58
void _x_meta_info_set(xine_stream_t *stream, int info, const char *str)
Definition info_helper.c:321
uint32_t _x_stream_info_get(xine_stream_t *stream, int info)
Definition info_helper.c:100
void _x_meta_info_n_set(xine_stream_t *stream, int info, const char *buf, int len)
Definition info_helper.c:351
void _x_meta_info_public_reset(xine_stream_t *stream, int info)
Definition info_helper.c:307
Definition xine_internal.h:123