Imported Upstream version 1.3.2
Sebastian Dröge
9 years ago
0 | === release 1.3.2 === | |
1 | ||
2 | 2014-05-21 Sebastian Dröge <slomo@coaxion.net> | |
3 | ||
4 | * configure.ac: | |
5 | releasing 1.3.2 | |
6 | ||
7 | 2014-05-21 10:50:43 +0200 Sebastian Dröge <sebastian@centricular.com> | |
8 | ||
9 | * README: | |
10 | * common: | |
11 | Automatic update of common submodule | |
12 | From 211fa5f to 1f5d3c3 | |
13 | ||
14 | 2014-05-19 11:05:12 +0200 Sebastian Dröge <sebastian@centricular.com> | |
15 | ||
16 | * tests/check/gst/gstvalue.c: | |
17 | value: Add some positive testcase for string deserialization | |
18 | ||
19 | 2014-05-18 10:49:50 +0100 Tim-Philipp Müller <tim@centricular.com> | |
20 | ||
21 | * README: | |
22 | * docs/faq/getting.xml: | |
23 | docs: remove reference to Mandrake and packages we no longer provide | |
24 | https://bugzilla.gnome.org/show_bug.cgi?id=730312 | |
25 | ||
26 | 2014-05-15 16:41:58 +0200 Wim Taymans <wtaymans@redhat.com> | |
27 | ||
28 | * docs/design/part-caps.txt: | |
29 | docs: fix typo | |
30 | ||
31 | 2014-05-14 13:40:03 +0100 Tim-Philipp Müller <tim@centricular.com> | |
32 | ||
33 | * gst/gstpluginloader.c: | |
34 | pluginloader: fix compiler warning on windows | |
35 | gstpluginloader.c:584:1: error: label 'beach' defined but not used | |
36 | https://bugzilla.gnome.org/show_bug.cgi?id=730125 | |
37 | ||
38 | 2014-05-13 19:51:34 +0100 Tim-Philipp Müller <tim@centricular.com> | |
39 | ||
40 | * plugins/elements/gstdownloadbuffer.c: | |
41 | * plugins/elements/gstsparsefile.c: | |
42 | * plugins/elements/gstsparsefile.h: | |
43 | elements: don't depend on libgio just for g_io_error_from_errno() | |
44 | https://bugzilla.gnome.org/show_bug.cgi?id=729949 | |
45 | ||
46 | 2014-05-13 19:30:38 +0100 Tim-Philipp Müller <tim@centricular.com> | |
47 | ||
48 | * docs/libs/gstreamer-libs-sections.txt: | |
49 | * libs/gst/base/Makefile.am: | |
50 | * libs/gst/base/gstsparsefile.c: | |
51 | * libs/gst/base/gstsparsefile.h: | |
52 | * plugins/elements/Makefile.am: | |
53 | * plugins/elements/gstdownloadbuffer.h: | |
54 | * plugins/elements/gstsparsefile.c: | |
55 | * plugins/elements/gstsparsefile.h: | |
56 | * tests/check/libs/sparsefile.c: | |
57 | * win32/common/libgstbase.def: | |
58 | sparsefile: keep it private as helper API for downloadbuffer | |
59 | There's no expectation that any other element or applications | |
60 | might want to use this helper API any time soon, so keep it | |
61 | private for the time being. There were open questions regarding | |
62 | portability and binding-friendliness too. | |
63 | This also removes the gio dependency of -base again. | |
64 | https://bugzilla.gnome.org/show_bug.cgi?id=729951 | |
65 | https://bugzilla.gnome.org/show_bug.cgi?id=729949 | |
66 | ||
67 | 2014-05-13 19:14:08 +0100 Tim-Philipp Müller <tim@centricular.com> | |
68 | ||
69 | * docs/libs/gstreamer-libs.types: | |
70 | docs: pick up GstBaseParse hierarchy and properties | |
71 | ||
72 | 2014-05-13 19:10:43 +0100 Tim-Philipp Müller <tim@centricular.com> | |
73 | ||
74 | * docs/libs/gstreamer-libs-sections.txt: | |
75 | docs: expose GstPushSrcClass in documentation | |
76 | Might come in handy in case someone wants to derive from it. | |
77 | ||
78 | 2014-05-12 17:03:46 +0200 Edward Hervey <bilboed@bilboed.com> | |
79 | ||
80 | * gst/gstpluginloader.c: | |
81 | pluginloader: Don't leak pluginloader in error cases | |
82 | CID #1212154 | |
83 | ||
84 | 2014-05-12 16:59:29 +0200 Edward Hervey <bilboed@bilboed.com> | |
85 | ||
86 | * gst/gstcaps.c: | |
87 | caps: Don't leak features on error cases | |
88 | If we fail to parse fields, we would end up leaking the features we | |
89 | parsed just before | |
90 | CID #1212152 | |
91 | ||
92 | 2014-05-09 14:28:59 -0400 Nicolas Dufresne <nicolas.dufresne@collabora.com> | |
93 | ||
94 | * libs/gst/base/gstbasetransform.c: | |
95 | basetransform: Correctly reset configuration | |
96 | When pool can't we use, and we fall back to default pool, we need to | |
97 | correctly reset that pool configuration. | |
98 | ||
99 | 2014-05-09 14:46:59 +0200 Edward Hervey <bilboed@bilboed.com> | |
100 | ||
101 | * libs/gst/net/gstnettimeprovider.c: | |
102 | nettimeprovider: Use non-freed variable | |
103 | address is only used temporarily. Use the proper variable instead. | |
104 | CID #1212189 | |
105 | ||
106 | 2014-05-08 17:33:37 -0300 Thiago Santos <ts.santos@sisa.samsung.com> | |
107 | ||
108 | * tests/check/elements/multiqueue.c: | |
109 | tests: multiqueue: test to check queue overrun with pts=none | |
110 | Checks if buffers with pts=none can break the queue time size limit | |
111 | and allow more buffers than expected | |
112 | ||
113 | 2014-05-08 14:48:00 -0400 Nicolas Dufresne <nicolas.dufresne@collabora.com> | |
114 | ||
115 | * plugins/elements/gstdownloadbuffer.c: | |
116 | downloadbuffer: Fix 32bit build | |
117 | format '%lli' expects argument of type 'long long int', but argument 8 has type 'gsize' | |
118 | ||
119 | 2014-05-08 14:12:16 -0400 Nicolas Dufresne <nicolas.dufresne@collabora.com> | |
120 | ||
121 | * libs/gst/base/gstbasesrc.c: | |
122 | pool-nego: Correctly reset the configuration | |
123 | When pool cannot be used, correctly reset the configuration before | |
124 | configuration a default pool. | |
125 | ||
126 | 2014-04-15 14:17:00 -0400 Nicolas Dufresne <nicolas.dufresne@collabora.com> | |
127 | ||
128 | * libs/gst/base/gstbasesrc.c: | |
129 | * libs/gst/base/gstbasetransform.c: | |
130 | pool-nego: Retry setting configuration with modified config | |
131 | Buffer pool set_config() may return FALSE if requested configuration needed | |
132 | small changes. Reget the config and try setting it again (validating the | |
133 | changes first). This ensure we have a configured pool if possible. | |
134 | https://bugzilla.gnome.org/show_bug.cgi?id=727916 | |
135 | ||
136 | 2014-05-08 12:47:43 -0400 Nicolas Dufresne <nicolas.dufresne@collabora.com> | |
137 | ||
138 | * docs/gst/gstreamer-sections.txt: | |
139 | * gst/gstbufferpool.c: | |
140 | * gst/gstbufferpool.h: | |
141 | * tests/check/gst/gstbufferpool.c: | |
142 | * win32/common/libgstreamer.def: | |
143 | bufferpool: Add an helper to validate config | |
144 | When we call gst_buffer_pool_set_config() the pool may return FALSE and | |
145 | slightly change the parameters. This helper is useful to do the minial required | |
146 | validation before accepting the modified configuration. | |
147 | https://bugzilla.gnome.org/show_bug.cgi?id=727916 | |
148 | ||
149 | 2014-04-08 19:27:55 -0400 Nicolas Dufresne <nicolas.dufresne@collabora.com> | |
150 | ||
151 | * gst/gstbufferpool.c: | |
152 | bufferpool: Update the configure even if set_config() returned false | |
153 | According to the documentation, when set_config() return false, it should be | |
154 | possible to read the modified version of the config. This patch fixes the | |
155 | implementation so it is now according to the documentation. | |
156 | https://bugzilla.gnome.org/show_bug.cgi?id=727916 | |
157 | ||
158 | 2014-05-06 15:35:14 -0400 Nicolas Dufresne <nicolas.dufresne@collabora.co.uk> | |
159 | ||
160 | * gst/gstbufferpool.c: | |
161 | * tests/check/gst/gstbufferpool.c: | |
162 | bufferpool: Add support for reconfiguring a pool | |
163 | If a pool config is being configured again, check if the configuration have changed. | |
164 | If not, skip that step. Finally, if the pool is active, try deactivating it. | |
165 | https://bugzilla.gnome.org/show_bug.cgi?id=728268 | |
166 | ||
167 | 2014-05-06 16:59:34 -0400 Nicolas Dufresne <nicolas.dufresne@collabora.co.uk> | |
168 | ||
169 | * gst/gstvalue.c: | |
170 | * tests/check/gst/gstvalue.c: | |
171 | value: Add support for GstAllocationParams comparision | |
172 | This is useful to compare buffer pool configuaration. | |
173 | https://bugzilla.gnome.org/show_bug.cgi?id=728268 | |
174 | ||
175 | 2014-05-06 16:46:55 -0400 Nicolas Dufresne <nicolas.dufresne@collabora.co.uk> | |
176 | ||
177 | * gst/gstvalue.c: | |
178 | * tests/check/gst/gstvalue.c: | |
179 | value: Add support for GObject comparising in structures | |
180 | This is useful to allow comparing pool configuration where a GstAllocator | |
181 | is set. | |
182 | https://bugzilla.gnome.org/show_bug.cgi?id=728268 | |
183 | ||
184 | 2014-05-08 17:50:50 +0100 Tim-Philipp Müller <tim@centricular.com> | |
185 | ||
186 | * gst/gstplugin.c: | |
187 | plugin: fix case where gst_plugin_load_file() didn't set the error on failure | |
188 | ||
189 | 2014-05-08 16:30:55 +0100 Tim-Philipp Müller <tim@centricular.com> | |
190 | ||
191 | * libs/gst/base/gstsparsefile.c: | |
192 | sparsefile: add some Since markers to docs | |
193 | ||
194 | 2014-05-08 16:25:55 +0100 Tim-Philipp Müller <tim@centricular.com> | |
195 | ||
196 | * libs/gst/base/gstsparsefile.c: | |
197 | * libs/gst/base/gstsparsefile.h: | |
198 | * tests/check/libs/.gitignore: | |
199 | sparsefile: sprinkle G_BEGIN_DECLS / G_END_DECLS | |
200 | for c++, and remove outdated comment, and add | |
201 | new unit test to .gitignore. | |
202 | ||
203 | 2014-05-08 16:49:53 +0200 Wim Taymans <wtaymans@redhat.com> | |
204 | ||
205 | * plugins/elements/gstdownloadbuffer.c: | |
206 | downloadbuffer: small cleanups | |
207 | ||
208 | 2014-05-08 14:51:12 +0200 Wim Taymans <wtaymans@redhat.com> | |
209 | ||
210 | * docs/libs/gstreamer-libs-sections.txt: | |
211 | * docs/plugins/Makefile.am: | |
212 | * docs/plugins/gstreamer-plugins-docs.sgml: | |
213 | * docs/plugins/gstreamer-plugins-sections.txt: | |
214 | * docs/plugins/gstreamer-plugins.args: | |
215 | * docs/plugins/gstreamer-plugins.hierarchy: | |
216 | * docs/plugins/inspect/plugin-coreelements.xml: | |
217 | * plugins/elements/gstdownloadbuffer.c: | |
218 | downloadbuffer: update docs | |
219 | ||
220 | 2014-05-08 14:50:42 +0200 Wim Taymans <wtaymans@redhat.com> | |
221 | ||
222 | * win32/common/libgstbase.def: | |
223 | win32: update def | |
224 | ||
225 | 2014-02-21 16:32:52 +0100 Wim Taymans <wtaymans@redhat.com> | |
226 | ||
227 | * libs/gst/base/Makefile.am: | |
228 | * libs/gst/base/gstsparsefile.c: | |
229 | * libs/gst/base/gstsparsefile.h: | |
230 | * plugins/elements/Makefile.am: | |
231 | * plugins/elements/gstdownloadbuffer.c: | |
232 | * plugins/elements/gstdownloadbuffer.h: | |
233 | * plugins/elements/gstelements.c: | |
234 | * tests/check/Makefile.am: | |
235 | * tests/check/libs/sparsefile.c: | |
236 | Add new downloadbuffer element | |
237 | See https://bugzilla.gnome.org/show_bug.cgi?id=680183 | |
238 | ||
239 | 2014-05-02 17:42:58 +0200 Wim Taymans <wtaymans@redhat.com> | |
240 | ||
241 | * gst/gstelement.c: | |
242 | * gst/gstpadtemplate.h: | |
243 | * plugins/elements/gstmultiqueue.c: | |
244 | pads: update docs for request pads | |
245 | We would like to encourage the use of gst_element_request_pad() | |
246 | ||
247 | 2014-05-02 17:02:37 +0100 Tim-Philipp Müller <tim@centricular.com> | |
248 | ||
249 | * libs/gst/check/libcheck/check.c: | |
250 | check: use _exit() instead of exit() in fail_unless() so we exit immediately | |
251 | exit() will call atexit handlers, which may try to | |
252 | clean up things or wait for things to get cleaned up, | |
253 | which we don't want or need. We just want to stop | |
254 | and let the parent know about the failure as quickly | |
255 | as possible in case fork() is used. | |
256 | Fixes timeouts on assert failures in checks where | |
257 | an exit handler waits for things to stop, but they | |
258 | don't stop because they haven't been shut down, | |
259 | and they haven't been shut down because there's no | |
260 | simple way to do so on failures. | |
261 | http://sourceforge.net/p/check/patches/50/ | |
262 | ||
263 | 2014-05-04 14:52:01 +0100 Tim-Philipp Müller <tim@centricular.com> | |
264 | ||
265 | * gst/gstvalue.c: | |
266 | value: init flag mask more correctly | |
267 | ||
268 | 2014-05-04 13:32:46 +0000 Руслан Ижбулатов <lrn1986@gmail.com> | |
269 | ||
270 | * plugins/elements/gstfilesrc.c: | |
271 | filesrc: g_memmove() is deprecated | |
272 | https://bugzilla.gnome.org/show_bug.cgi?id=712811 | |
273 | ||
274 | 2014-05-03 20:48:22 +0200 Sebastian Dröge <sebastian@centricular.com> | |
275 | ||
276 | * configure.ac: | |
277 | Back to development | |
278 | ||
0 | 279 | === release 1.3.1 === |
1 | 280 | |
2 | 2014-05-03 Sebastian Dröge <slomo@coaxion.net> | |
3 | ||
281 | 2014-05-03 17:41:41 +0200 Sebastian Dröge <sebastian@centricular.com> | |
282 | ||
283 | * ChangeLog: | |
284 | * NEWS: | |
285 | * RELEASE: | |
4 | 286 | * configure.ac: |
5 | releasing 1.3.1 | |
287 | * docs/plugins/gstreamer-plugins.hierarchy: | |
288 | * docs/plugins/inspect/plugin-coreelements.xml: | |
289 | * gstreamer.doap: | |
290 | * win32/common/config.h: | |
291 | * win32/common/gstenumtypes.c: | |
292 | * win32/common/gstenumtypes.h: | |
293 | * win32/common/gstversion.h: | |
294 | Release 1.3.1 | |
295 | ||
296 | 2014-05-03 17:34:08 +0200 Sebastian Dröge <sebastian@centricular.com> | |
297 | ||
298 | * po/af.po: | |
299 | * po/az.po: | |
300 | * po/be.po: | |
301 | * po/bg.po: | |
302 | * po/ca.po: | |
303 | * po/cs.po: | |
304 | * po/da.po: | |
305 | * po/de.po: | |
306 | * po/el.po: | |
307 | * po/en_GB.po: | |
308 | * po/eo.po: | |
309 | * po/es.po: | |
310 | * po/eu.po: | |
311 | * po/fi.po: | |
312 | * po/fr.po: | |
313 | * po/gl.po: | |
314 | * po/hr.po: | |
315 | * po/hu.po: | |
316 | * po/id.po: | |
317 | * po/it.po: | |
318 | * po/ja.po: | |
319 | * po/lt.po: | |
320 | * po/nb.po: | |
321 | * po/nl.po: | |
322 | * po/pl.po: | |
323 | * po/pt_BR.po: | |
324 | * po/ro.po: | |
325 | * po/ru.po: | |
326 | * po/rw.po: | |
327 | * po/sk.po: | |
328 | * po/sl.po: | |
329 | * po/sq.po: | |
330 | * po/sr.po: | |
331 | * po/sv.po: | |
332 | * po/tr.po: | |
333 | * po/uk.po: | |
334 | * po/vi.po: | |
335 | * po/zh_CN.po: | |
336 | * po/zh_TW.po: | |
337 | Update .po files | |
6 | 338 | |
7 | 339 | 2014-05-03 17:20:46 +0200 Sebastian Dröge <sebastian@centricular.com> |
8 | 340 |
0 | This is GStreamer 1.3.1 | |
0 | This is GStreamer 1.3.2 | |
1 | 1 | |
2 | 2 | Changes since 1.2: |
3 | 3 | |
44 | 44 | events and merge custom tags into them consistently. |
45 | 45 | • playbin/playsink has support for application provided audio and video |
46 | 46 | filters. |
47 | • GstDiscoverer has new and simplified API to get details about missing | |
48 | plugins and information to pass to the plugin installer. | |
47 | 49 | • The GL library was merged from gst-plugins-gl to gst-plugins-bad, |
48 | 50 | providing a generic infrastructure for handling GL inside GStreamer |
49 | 51 | pipelines and a plugin with some elements using these, especially |
61 | 63 | of the existing V4L2 elements and the corresponding |
62 | 64 | infrastructure. |
63 | 65 | The v4l2videodec element replaces the mfcdec element. |
66 | ∘ New downloadbuffer element that replaces the download | |
67 | buffering feature of queue2. Compared to queue2's code | |
68 | it is much simpler and only for this single use case. | |
69 | A noteworthy new feature is that it's downloading gaps | |
70 | in the already downloaded stream parts when nothing else | |
71 | is to be downloaded. | |
72 | This is now used by playbin when download buffering is | |
73 | enabled. | |
64 | 74 | ∘ rtpstreampay and rtpstreamdepay elements for transmitting |
65 | 75 | RTP packets over a stream API (e.g. TCP) according to |
66 | 76 | RFC 4571. |
77 | 87 | are available on OS X and iOS now. |
78 | 88 | |
79 | 89 | • Other changes: |
80 | ∘ gst-libav now uses libav 10, and gained support for H265/HEVC. | |
90 | ∘ gst-libav now uses libav 10.1, and gained support for H265/HEVC. | |
81 | 91 | ∘ Support for hardware codecs and special memory types has been |
82 | 92 | improved with bugfixes and feature additions in various plugins |
83 | 93 | and base classes. |
94 | 104 | reliable now and supports more HLS features like trick modes. |
95 | 105 | Also fragments are pushed downstream while they're downloaded |
96 | 106 | now instead of waiting for each fragment to finish. |
107 | ∘ dashdemux and mssdemux are now also pushing fragments downstream | |
108 | while they're downloaded instead of waiting for each fragment to | |
109 | finish. | |
97 | 110 | ∘ videoflip can automatically flip based on the orientation tag. |
98 | 111 | ∘ openjpeg supports the OpenJPEG2 API. |
99 | 112 | ∘ gst-rtsp-server supports SRTP and MIKEY now. |
106 | 119 | element. |
107 | 120 | • The mfcdec element was removed and replaced by v4l2videodec. |
108 | 121 | • osxvideosink is only available in OS X 10.6 or newer. |
109 |
0 | 0 | |
1 | Release notes for GStreamer 1.3.1 | |
1 | Release notes for GStreamer 1.3.2 | |
2 | 2 | |
3 | 3 | |
4 | The GStreamer team is pleased to announce the first release of the unstable | |
4 | The GStreamer team is pleased to announce the second release of the unstable | |
5 | 5 | 1.3 release series. The 1.3 release series is adding new features on top of |
6 | 6 | the 1.0 and 1.2 series and is part of the API and ABI-stable 1.x release |
7 | 7 | series of the GStreamer multimedia framework. The unstable 1.3 release series |
49 | 49 | |
50 | 50 | Bugs fixed in this release |
51 | 51 | |
52 | * 729440 : docs: DeviceMonitor missing in generated doc | |
53 | * 710621 : utils: Uses non-literal as format string | |
54 | 52 | * 726423 : playbin/decodebin: aggregate buffering messages |
55 | * 726425 : Add new API to notify minimum buffering needed downstream | |
56 | * 679115 : Windows: Make the GStreamer DLLs/data relocatable | |
57 | * 721655 : basesrc activation order logs error in some cases where it should not | |
58 | * 702842 : basesrc: operate in time mode if do-timestamp is true | |
59 | * 705189 : debug-dot-dump: Add the presence/state of a GstTask | |
60 | * 708870 : " generic " is spelled wrong in GstBaseSrc's documentation | |
61 | * 709253 : caps: subset checks fail with duplicated values in lists | |
62 | * 709262 : GstStructure's documentation incorrectly warns that empty strings don't work in any GstStructure | |
63 | * 709831 : filesrc: Improve unit test coverage by setting property in the " wrong " state... | |
64 | * 710034 : parse: bison finds conflicts / ambiguities | |
65 | * 710342 : docs: various constructors are annotated as " transfer full " , but return floating references | |
66 | * 710442 : netclientclock: constify name parameter for gst_net_client_clock_new() | |
67 | * 710758 : gst-launch: assert if we can't get gst sample | |
68 | * 710876 : pwg: rename the " samplerate " variable to make example code compilable | |
69 | * 711138 : iterator: Don't hold mutex while calling filter functions of recursive filter iterators | |
70 | * 711269 : systemclock: Add method to set the default system clock | |
71 | * 711488 : gst-uninstalled: export gst-plugins-gl DYLD_LIBRARY_PATH | |
72 | * 712385 : netclock: added new round-trip limit property | |
73 | * 712679 : parse: prototype-mismatch | |
74 | * 719614 : docs: add missing docs and fix errors | |
75 | * 720029 : docs/etc: Fix typos | |
76 | * 720036 : info: return existing debug category when registering a category twice (regression) | |
77 | * 720100 : parse: redefinition of malloc - old grammar.y bugs crawl out of the woodwork | |
78 | * 720199 : basesrc: DTS becomes 0 in gst_base_src_do_sync() for first buffer | |
79 | * 720316 : parse: Fails to compile on CentOS due to redefinition of yyscan_t | |
80 | * 720337 : gstreamer-uninstalled: add gstreamer-vaapi to GST_PLUGIN_PATH | |
81 | * 721076 : appsink documentation missing gst_sample_unref | |
82 | * 721096 : pad: Pad BLOCKING probe callback issues | |
83 | * 722289 : capsfilter: Sending CAPS event downstream in pull mode | |
84 | * 722697 : pad: Setting pad offsets breaks the running time in QoS and other events | |
85 | * 722791 : basesrc: not respecting seqnum of eos from send_event | |
86 | * 722891 : multiqueue: Growing of multiqueue does not work correctly if all except one pad are not linked | |
87 | * 723229 : gst-uninstalled call print as function | |
88 | * 723236 : caps: fix gst_caps_get_features return | |
89 | * 723266 : outputselector: respect the 'negotiation-mode' property | |
90 | * 723997 : gstreamer/docs: add missing seqnum file for distribution | |
91 | * 724045 : gst-inspect: Compile error at gst-inspect.c:514:15 since 53d8460bfd | |
92 | * 724571 : In collectpads, the collected function is sometimes called incorrectly. | |
93 | * 724757 : basesrc: Ignores seek made when the last buffer is pushed | |
94 | * 725476 : adapter: Added interfaces for language bindings | |
95 | * 725478 : gstreamer: Ignore gcov intermediate files | |
96 | * 725862 : buffer: invert BUFFER_FLAG_TAG_MEMORY ? | |
97 | * 725917 : multiqueue: do not reset last push result when pushing events | |
98 | * 726461 : collectpads: should send the seek events to the peers of its sink pads, as they can be flushing | |
99 | * 727484 : gstpad: Don't print name of an unowned event | |
100 | * 727701 : debugutils: Handle caps field values being NULL | |
101 | * 727903 : structure: handle 0 denominator | |
102 | * 727945 : funnel: element doesn't forward eos stream | |
103 | * 727949 : bin: Make sure to post EOS message always after reaching the PLAYING state | |
104 | * 729335 : basesink: Should render buffers that arrived on time even if prepare() took some time | |
105 | * 727109 : buffer: Should not set TAG_MEMORY if memory has not been replaced | |
53 | * 680183 : queue2: when download buffering has holes, plug the holes | |
54 | * 727916 : bufferpool: Does not implement set_config() as documented | |
55 | * 728268 : Need a way to detect that pool haven't changed, is active, and does not need to be renegotiated | |
56 | * 729949 : core plugins and libgstbase now depend on gio | |
57 | * 729951 : base: keep new GstSparseFile helper API private | |
58 | * 730125 : c7d68da broke W32 builds | |
59 | * 730312 : Remove or fix reference to Mandrake | |
106 | 60 | |
107 | 61 | ==== Download ==== |
108 | 62 | |
139 | 93 | |
140 | 94 | Contributors to this release |
141 | 95 | |
142 | * Alessandro Decina | |
143 | * Antoine Jacoutot | |
144 | * Antonio Ospite | |
145 | * Arnaud Vrac | |
146 | * Brendan Long | |
147 | * Carlos Rafael Giani | |
148 | * Chun-wei Fan | |
149 | * David Svensson Fors | |
150 | 96 | * Edward Hervey |
151 | * Erik Andresen | |
152 | * Fabian Kirsch | |
153 | * Felipe Ortiz | |
154 | * George Kiagiadakis | |
155 | * Haakon Sporsheim | |
156 | * Havard Graff | |
157 | * Jan Alexander Steffens (heftig) | |
158 | * Jan Schmidt | |
159 | * Jose Antonio Santos Cadenas | |
160 | * Linus Svensson | |
161 | * Luis de Bethencourt | |
162 | * Mark Nauwelaerts | |
163 | * Mathieu Duponchelle | |
164 | * Matthieu Bouron | |
165 | * Nicola Murino | |
166 | 97 | * Nicolas Dufresne |
167 | * Olivier Crête | |
168 | * Pedro Côrte-Real | |
169 | * Per x Johansson | |
170 | * Philip Withnall | |
171 | * Philippe Normand | |
172 | * Reynaldo H. Verdejo Pinochet | |
173 | 98 | * Sebastian Dröge |
174 | * Sebastian Rasmussen | |
175 | * Showayb Zahda | |
176 | * Srimanta Panda | |
177 | * Stefan Sauer | |
178 | * Stewart Brodie | |
179 | * Stian Selnes | |
180 | 99 | * Thiago Santos |
181 | * Thibault Saunier | |
182 | 100 | * Tim-Philipp Müller |
183 | * Todd Agulnick | |
184 | * Vincent Penquerc'h | |
185 | * Víctor Manuel Jáquez Leal | |
186 | * William Jon McCann | |
187 | * William Manley | |
188 | 101 | * Wim Taymans |
189 | * Xavi Artigas | |
190 | * YanpingZhang | |
102 | * Руслан Ижбулатов | |
191 | 103 | ⏎ |
0 | 0 | #! /bin/sh |
1 | 1 | # Guess values for system-dependent variables and create Makefiles. |
2 | # Generated by GNU Autoconf 2.69 for GStreamer 1.3.1. | |
2 | # Generated by GNU Autoconf 2.69 for GStreamer 1.3.2. | |
3 | 3 | # |
4 | 4 | # Report bugs to <http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer>. |
5 | 5 | # |
590 | 590 | # Identity of this package. |
591 | 591 | PACKAGE_NAME='GStreamer' |
592 | 592 | PACKAGE_TARNAME='gstreamer' |
593 | PACKAGE_VERSION='1.3.1' | |
594 | PACKAGE_STRING='GStreamer 1.3.1' | |
593 | PACKAGE_VERSION='1.3.2' | |
594 | PACKAGE_STRING='GStreamer 1.3.2' | |
595 | 595 | PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer' |
596 | 596 | PACKAGE_URL='' |
597 | 597 | |
1637 | 1637 | # Omit some internal or obsolete options to make the list less imposing. |
1638 | 1638 | # This message is too long to be a string in the A/UX 3.1 sh. |
1639 | 1639 | cat <<_ACEOF |
1640 | \`configure' configures GStreamer 1.3.1 to adapt to many kinds of systems. | |
1640 | \`configure' configures GStreamer 1.3.2 to adapt to many kinds of systems. | |
1641 | 1641 | |
1642 | 1642 | Usage: $0 [OPTION]... [VAR=VALUE]... |
1643 | 1643 | |
1708 | 1708 | |
1709 | 1709 | if test -n "$ac_init_help"; then |
1710 | 1710 | case $ac_init_help in |
1711 | short | recursive ) echo "Configuration of GStreamer 1.3.1:";; | |
1711 | short | recursive ) echo "Configuration of GStreamer 1.3.2:";; | |
1712 | 1712 | esac |
1713 | 1713 | cat <<\_ACEOF |
1714 | 1714 | |
1890 | 1890 | test -n "$ac_init_help" && exit $ac_status |
1891 | 1891 | if $ac_init_version; then |
1892 | 1892 | cat <<\_ACEOF |
1893 | GStreamer configure 1.3.1 | |
1893 | GStreamer configure 1.3.2 | |
1894 | 1894 | generated by GNU Autoconf 2.69 |
1895 | 1895 | |
1896 | 1896 | Copyright (C) 2012 Free Software Foundation, Inc. |
2663 | 2663 | This file contains any messages produced by compilers while |
2664 | 2664 | running configure, to aid debugging if configure makes a mistake. |
2665 | 2665 | |
2666 | It was created by GStreamer $as_me 1.3.1, which was | |
2666 | It was created by GStreamer $as_me 1.3.2, which was | |
2667 | 2667 | generated by GNU Autoconf 2.69. Invocation command line was |
2668 | 2668 | |
2669 | 2669 | $ $0 $@ |
3644 | 3644 | |
3645 | 3645 | # Define the identity of the package. |
3646 | 3646 | PACKAGE='gstreamer' |
3647 | VERSION='1.3.1' | |
3647 | VERSION='1.3.2' | |
3648 | 3648 | |
3649 | 3649 | |
3650 | 3650 | cat >>confdefs.h <<_ACEOF |
3855 | 3855 | |
3856 | 3856 | |
3857 | 3857 | |
3858 | PACKAGE_VERSION_MAJOR=$(echo 1.3.1 | cut -d'.' -f1) | |
3859 | PACKAGE_VERSION_MINOR=$(echo 1.3.1 | cut -d'.' -f2) | |
3860 | PACKAGE_VERSION_MICRO=$(echo 1.3.1 | cut -d'.' -f3) | |
3858 | PACKAGE_VERSION_MAJOR=$(echo 1.3.2 | cut -d'.' -f1) | |
3859 | PACKAGE_VERSION_MINOR=$(echo 1.3.2 | cut -d'.' -f2) | |
3860 | PACKAGE_VERSION_MICRO=$(echo 1.3.2 | cut -d'.' -f3) | |
3861 | 3861 | |
3862 | 3862 | |
3863 | 3863 | |
3868 | 3868 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking nano version" >&5 |
3869 | 3869 | $as_echo_n "checking nano version... " >&6; } |
3870 | 3870 | |
3871 | NANO=$(echo 1.3.1 | cut -d'.' -f4) | |
3871 | NANO=$(echo 1.3.2 | cut -d'.' -f4) | |
3872 | 3872 | |
3873 | 3873 | if test x"$NANO" = x || test "x$NANO" = "x0" ; then |
3874 | 3874 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: 0 (release)" >&5 |
8526 | 8526 | done |
8527 | 8527 | |
8528 | 8528 | |
8529 | GST_CURRENT=301 | |
8529 | GST_CURRENT=302 | |
8530 | 8530 | GST_REVISION=0 |
8531 | GST_AGE=301 | |
8532 | GST_LIBVERSION=301:0:301 | |
8531 | GST_AGE=302 | |
8532 | GST_LIBVERSION=302:0:302 | |
8533 | 8533 | |
8534 | 8534 | |
8535 | 8535 | |
27563 | 27563 | # report actual input values of CONFIG_FILES etc. instead of their |
27564 | 27564 | # values after options handling. |
27565 | 27565 | ac_log=" |
27566 | This file was extended by GStreamer $as_me 1.3.1, which was | |
27566 | This file was extended by GStreamer $as_me 1.3.2, which was | |
27567 | 27567 | generated by GNU Autoconf 2.69. Invocation command line was |
27568 | 27568 | |
27569 | 27569 | CONFIG_FILES = $CONFIG_FILES |
27629 | 27629 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
27630 | 27630 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
27631 | 27631 | ac_cs_version="\\ |
27632 | GStreamer config.status 1.3.1 | |
27632 | GStreamer config.status 1.3.2 | |
27633 | 27633 | configured by $0, generated by GNU Autoconf 2.69, |
27634 | 27634 | with options \\"\$ac_cs_config\\" |
27635 | 27635 |
3 | 3 | dnl when going to/from release please set the nano (fourth number) right ! |
4 | 4 | dnl releases only do Wall, git and prerelease does Werror too |
5 | 5 | dnl |
6 | AC_INIT([GStreamer],[1.3.1],[http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer],[gstreamer]) | |
6 | AC_INIT([GStreamer],[1.3.2],[http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer],[gstreamer]) | |
7 | 7 | AG_GST_INIT |
8 | 8 | |
9 | 9 | dnl initialize automake (we require GNU make) |
63 | 63 | dnl 1.10.9 (who knows) => 1009 |
64 | 64 | dnl |
65 | 65 | dnl sets GST_LT_LDFLAGS |
66 | AS_LIBTOOL(GST, 301, 0, 301) | |
66 | AS_LIBTOOL(GST, 302, 0, 302) | |
67 | 67 | |
68 | 68 | dnl *** autotools stuff **** |
69 | 69 |
133 | 133 | |
134 | 134 | Compatibility of caps |
135 | 135 | --------------------- |
136 | Pads can be linked when the caps of both caps are compatible. This is | |
136 | Pads can be linked when the caps of both pads are compatible. This is | |
137 | 137 | the case when their intersection is not empty. |
138 | 138 | |
139 | 139 | For checking if a pad actually supports a fixed caps an intersection is |
112 | 112 | |
113 | 113 | <answer> |
114 | 114 | <para> |
115 | Yes, we currently provide precompiled packages for Red Hat, Debian and Linux Mandrake. </para> | |
116 | ||
117 | <para>We provide RPMS for Red Hat and Fedora Core through our <ulink url="http://gstreamer.freedesktop.org/pkg/">Apt for rpm page.</ulink> We usually support the last 2-3 releases of Red Hat. (RH9 and FC1) | |
115 | Yes we currently provide <ulink url="http://gstreamer.freedesktop.org/pkg/">precompiled packages for Windows, OS/X, Android and iOS</ulink>. | |
118 | 116 | </para> |
119 | <para>GStreamer is already in Debian experimental, so if you are a debian user you should be able to get the Debian packages from there.</para> | |
120 | <para>GStreamer is also in Mandrake Cooker so if you are using a recent release of Linux Mandrake you should be able to get GStreamer from there. To learn howto get packages from Mandrake cooker <ulink url="http://www.mandrakelinux.com/en/cookerdevel.php3">the Mandrake cooker page has more info</ulink> | |
121 | </para> | |
122 | <para>For other RPM based distributions we recommend getting the source tarball and doing 'rpm -ta gstreamer-0.X.X' to create rpms. We keep our SPEC file constantly up to date so you should always be able to build GStreamer rpms from a tarball. The SPEC file is aimed at Red Hat however, so there might be some need for you to edit the Requirements list if your distribution name these packages differently.</para> | |
123 | </answer> | |
117 | <para> | |
118 | We currently do not provide packages for Linux distributions, but | |
119 | rather rely on the distributions for that. GStreamer packages should | |
120 | be available for all major (and minor) distributions. | |
121 | </para> | |
122 | </answer> | |
124 | 123 | </qandaentry> |
125 | 124 | |
126 | 125 | <qandaentry> |
307 | 307 | |
308 | 308 | gst_buffer_pool_config_get_params |
309 | 309 | gst_buffer_pool_config_set_params |
310 | gst_buffer_pool_config_validate_params | |
310 | 311 | gst_buffer_pool_config_get_allocator |
311 | 312 | gst_buffer_pool_config_set_allocator |
312 | 313 |
73 | 73 | </tr> |
74 | 74 | <tr> |
75 | 75 | <td class="function_type"> |
76 | <a class="link" href="GstAllocator.html#GstAllocationParams" title="struct GstAllocationParams"><span class="returnvalue">GstAllocationParams</span></a> * | |
76 | <a class="link" href="GstAllocator.html#GstAllocationParams"><span class="returnvalue">GstAllocationParams</span></a> * | |
77 | 77 | </td> |
78 | 78 | <td class="function_name"> |
79 | 79 | <a class="link" href="GstAllocator.html#gst-allocation-params-copy" title="gst_allocation_params_copy ()">gst_allocation_params_copy</a> <span class="c_punctuation">()</span> |
114 | 114 | </tbody> |
115 | 115 | </table></div> |
116 | 116 | </div> |
117 | <div class="refsect1"> | |
117 | <a name="GstAllocationParams"></a><div class="refsect1"> | |
118 | 118 | <a name="GstAllocator.other"></a><h2>Types and Values</h2> |
119 | 119 | <div class="informaltable"><table width="100%" border="0"> |
120 | 120 | <colgroup> |
140 | 140 | </tr> |
141 | 141 | <tr> |
142 | 142 | <td class="datatype_keyword">struct</td> |
143 | <td class="function_name"><a class="link" href="GstAllocator.html#GstAllocationParams" title="struct GstAllocationParams">GstAllocationParams</a></td> | |
143 | <td class="function_name"><a class="link" href="GstAllocator.html#GstAllocationParams-struct" title="struct GstAllocationParams">GstAllocationParams</a></td> | |
144 | 144 | </tr> |
145 | 145 | <tr> |
146 | 146 | <td class="define_keyword">#define</td> |
151 | 151 | </div> |
152 | 152 | <div class="refsect1"> |
153 | 153 | <a name="GstAllocator.object-hierarchy"></a><h2>Object Hierarchy</h2> |
154 | <pre class="screen"> <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a> | |
154 | <pre class="screen"> GBoxed | |
155 | <span class="lineart">╰──</span> GstAllocationParams | |
156 | <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a> | |
155 | 157 | <span class="lineart">╰──</span> <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a> |
156 | 158 | <span class="lineart">╰──</span> <a class="link" href="GstObject.html" title="GstObject">GstObject</a> |
157 | 159 | <span class="lineart">╰──</span> GstAllocator |
185 | 187 | is NULL, the |
186 | 188 | default allocator will be returned.</p> |
187 | 189 | <div class="refsect3"> |
188 | <a name="id-1.3.4.8.2.5"></a><h4>Parameters</h4> | |
190 | <a name="id-1.3.4.9.2.5"></a><h4>Parameters</h4> | |
189 | 191 | <div class="informaltable"><table width="100%" border="0"> |
190 | 192 | <colgroup> |
191 | 193 | <col width="150px" class="parameters_name"> |
200 | 202 | </table></div> |
201 | 203 | </div> |
202 | 204 | <div class="refsect3"> |
203 | <a name="id-1.3.4.8.2.6"></a><h4>Returns</h4> | |
205 | <a name="id-1.3.4.9.2.6"></a><h4>Returns</h4> | |
204 | 206 | <p> a <a class="link" href="GstAllocator.html" title="GstAllocator"><span class="type">GstAllocator</span></a> or NULL when the allocator with <em class="parameter"><code>name</code></em> |
205 | 207 | was not |
206 | 208 | registered. Use <a class="link" href="GstObject.html#gst-object-unref" title="gst_object_unref ()"><code class="function">gst_object_unref()</code></a> to release the allocator after usage. </p> |
219 | 221 | <em class="parameter"><code>allocator</code></em> |
220 | 222 | .</p> |
221 | 223 | <div class="refsect3"> |
222 | <a name="id-1.3.4.8.3.5"></a><h4>Parameters</h4> | |
224 | <a name="id-1.3.4.9.3.5"></a><h4>Parameters</h4> | |
223 | 225 | <div class="informaltable"><table width="100%" border="0"> |
224 | 226 | <colgroup> |
225 | 227 | <col width="150px" class="parameters_name"> |
249 | 251 | <p>Set the default allocator. This function takes ownership of <em class="parameter"><code>allocator</code></em> |
250 | 252 | .</p> |
251 | 253 | <div class="refsect3"> |
252 | <a name="id-1.3.4.8.4.5"></a><h4>Parameters</h4> | |
254 | <a name="id-1.3.4.9.4.5"></a><h4>Parameters</h4> | |
253 | 255 | <div class="informaltable"><table width="100%" border="0"> |
254 | 256 | <colgroup> |
255 | 257 | <col width="150px" class="parameters_name"> |
268 | 270 | <div class="refsect2"> |
269 | 271 | <a name="gst-allocation-params-init"></a><h3>gst_allocation_params_init ()</h3> |
270 | 272 | <pre class="programlisting"><span class="returnvalue">void</span> |
271 | gst_allocation_params_init (<em class="parameter"><code><a class="link" href="GstAllocator.html#GstAllocationParams" title="struct GstAllocationParams"><span class="type">GstAllocationParams</span></a> *params</code></em>);</pre> | |
273 | gst_allocation_params_init (<em class="parameter"><code><a class="link" href="GstAllocator.html#GstAllocationParams"><span class="type">GstAllocationParams</span></a> *params</code></em>);</pre> | |
272 | 274 | <p>Initialize <em class="parameter"><code>params</code></em> |
273 | 275 | to its default values</p> |
274 | 276 | <div class="refsect3"> |
275 | <a name="id-1.3.4.8.5.5"></a><h4>Parameters</h4> | |
277 | <a name="id-1.3.4.9.5.5"></a><h4>Parameters</h4> | |
276 | 278 | <div class="informaltable"><table width="100%" border="0"> |
277 | 279 | <colgroup> |
278 | 280 | <col width="150px" class="parameters_name"> |
281 | 283 | </colgroup> |
282 | 284 | <tbody><tr> |
283 | 285 | <td class="parameter_name"><p>params</p></td> |
284 | <td class="parameter_description"><p>a <a class="link" href="GstAllocator.html#GstAllocationParams" title="struct GstAllocationParams"><span class="type">GstAllocationParams</span></a></p></td> | |
286 | <td class="parameter_description"><p>a <a class="link" href="GstAllocator.html#GstAllocationParams"><span class="type">GstAllocationParams</span></a></p></td> | |
285 | 287 | <td class="parameter_annotations"> </td> |
286 | 288 | </tr></tbody> |
287 | 289 | </table></div> |
290 | 292 | <hr> |
291 | 293 | <div class="refsect2"> |
292 | 294 | <a name="gst-allocation-params-copy"></a><h3>gst_allocation_params_copy ()</h3> |
293 | <pre class="programlisting"><a class="link" href="GstAllocator.html#GstAllocationParams" title="struct GstAllocationParams"><span class="returnvalue">GstAllocationParams</span></a> * | |
294 | gst_allocation_params_copy (<em class="parameter"><code>const <a class="link" href="GstAllocator.html#GstAllocationParams" title="struct GstAllocationParams"><span class="type">GstAllocationParams</span></a> *params</code></em>);</pre> | |
295 | <pre class="programlisting"><a class="link" href="GstAllocator.html#GstAllocationParams"><span class="returnvalue">GstAllocationParams</span></a> * | |
296 | gst_allocation_params_copy (<em class="parameter"><code>const <a class="link" href="GstAllocator.html#GstAllocationParams"><span class="type">GstAllocationParams</span></a> *params</code></em>);</pre> | |
295 | 297 | <p>Create a copy of <em class="parameter"><code>params</code></em> |
296 | 298 | .</p> |
297 | 299 | <p>Free-function: gst_allocation_params_free</p> |
298 | 300 | <div class="refsect3"> |
299 | <a name="id-1.3.4.8.6.6"></a><h4>Parameters</h4> | |
301 | <a name="id-1.3.4.9.6.6"></a><h4>Parameters</h4> | |
300 | 302 | <div class="informaltable"><table width="100%" border="0"> |
301 | 303 | <colgroup> |
302 | 304 | <col width="150px" class="parameters_name"> |
305 | 307 | </colgroup> |
306 | 308 | <tbody><tr> |
307 | 309 | <td class="parameter_name"><p>params</p></td> |
308 | <td class="parameter_description"><p> a <a class="link" href="GstAllocator.html#GstAllocationParams" title="struct GstAllocationParams"><span class="type">GstAllocationParams</span></a>. </p></td> | |
310 | <td class="parameter_description"><p> a <a class="link" href="GstAllocator.html#GstAllocationParams"><span class="type">GstAllocationParams</span></a>. </p></td> | |
309 | 311 | <td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td> |
310 | 312 | </tr></tbody> |
311 | 313 | </table></div> |
312 | 314 | </div> |
313 | 315 | <div class="refsect3"> |
314 | <a name="id-1.3.4.8.6.7"></a><h4>Returns</h4> | |
315 | <p> a new #<a class="link" href="GstAllocator.html#GstAllocationParams" title="struct GstAllocationParams"><span class="type">GstAllocationParams</span></a>, free with | |
316 | <a name="id-1.3.4.9.6.7"></a><h4>Returns</h4> | |
317 | <p> a new #<a class="link" href="GstAllocator.html#GstAllocationParams"><span class="type">GstAllocationParams</span></a>, free with | |
316 | 318 | <a class="link" href="GstAllocator.html#gst-allocation-params-free" title="gst_allocation_params_free ()"><code class="function">gst_allocation_params_free()</code></a>. </p> |
317 | 319 | <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> |
318 | 320 | </div> |
321 | 323 | <div class="refsect2"> |
322 | 324 | <a name="gst-allocation-params-free"></a><h3>gst_allocation_params_free ()</h3> |
323 | 325 | <pre class="programlisting"><span class="returnvalue">void</span> |
324 | gst_allocation_params_free (<em class="parameter"><code><a class="link" href="GstAllocator.html#GstAllocationParams" title="struct GstAllocationParams"><span class="type">GstAllocationParams</span></a> *params</code></em>);</pre> | |
326 | gst_allocation_params_free (<em class="parameter"><code><a class="link" href="GstAllocator.html#GstAllocationParams"><span class="type">GstAllocationParams</span></a> *params</code></em>);</pre> | |
325 | 327 | <p>Free <em class="parameter"><code>params</code></em> |
326 | 328 | </p> |
327 | 329 | <div class="refsect3"> |
328 | <a name="id-1.3.4.8.7.5"></a><h4>Parameters</h4> | |
330 | <a name="id-1.3.4.9.7.5"></a><h4>Parameters</h4> | |
329 | 331 | <div class="informaltable"><table width="100%" border="0"> |
330 | 332 | <colgroup> |
331 | 333 | <col width="150px" class="parameters_name"> |
334 | 336 | </colgroup> |
335 | 337 | <tbody><tr> |
336 | 338 | <td class="parameter_name"><p>params</p></td> |
337 | <td class="parameter_description"><p> a <a class="link" href="GstAllocator.html#GstAllocationParams" title="struct GstAllocationParams"><span class="type">GstAllocationParams</span></a>. </p></td> | |
339 | <td class="parameter_description"><p> a <a class="link" href="GstAllocator.html#GstAllocationParams"><span class="type">GstAllocationParams</span></a>. </p></td> | |
338 | 340 | <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for input. Default is transfer none."><span class="acronym">in</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td> |
339 | 341 | </tr></tbody> |
340 | 342 | </table></div> |
346 | 348 | <pre class="programlisting"><a class="link" href="GstMemory.html" title="GstMemory"><span class="returnvalue">GstMemory</span></a> * |
347 | 349 | gst_allocator_alloc (<em class="parameter"><code><a class="link" href="GstAllocator.html" title="GstAllocator"><span class="type">GstAllocator</span></a> *allocator</code></em>, |
348 | 350 | <em class="parameter"><code><span class="type">gsize</span> size</code></em>, |
349 | <em class="parameter"><code><a class="link" href="GstAllocator.html#GstAllocationParams" title="struct GstAllocationParams"><span class="type">GstAllocationParams</span></a> *params</code></em>);</pre> | |
351 | <em class="parameter"><code><a class="link" href="GstAllocator.html#GstAllocationParams"><span class="type">GstAllocationParams</span></a> *params</code></em>);</pre> | |
350 | 352 | <p>Use <em class="parameter"><code>allocator</code></em> |
351 | 353 | to allocate a new memory block with memory that is at least |
352 | 354 | <em class="parameter"><code>size</code></em> |
365 | 367 | the amount of bytes to align to. For example, to align to 8 bytes, |
366 | 368 | use an alignment of 7.</p> |
367 | 369 | <div class="refsect3"> |
368 | <a name="id-1.3.4.8.8.9"></a><h4>Parameters</h4> | |
370 | <a name="id-1.3.4.9.8.9"></a><h4>Parameters</h4> | |
369 | 371 | <div class="informaltable"><table width="100%" border="0"> |
370 | 372 | <colgroup> |
371 | 373 | <col width="150px" class="parameters_name"> |
392 | 394 | </table></div> |
393 | 395 | </div> |
394 | 396 | <div class="refsect3"> |
395 | <a name="id-1.3.4.8.8.10"></a><h4>Returns</h4> | |
397 | <a name="id-1.3.4.9.8.10"></a><h4>Returns</h4> | |
396 | 398 | <p> a new <a class="link" href="GstMemory.html" title="GstMemory"><span class="type">GstMemory</span></a>. </p> |
397 | 399 | <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> |
398 | 400 | </div> |
406 | 408 | <p>Free <em class="parameter"><code>memory</code></em> |
407 | 409 | that was previously allocated with <a class="link" href="GstAllocator.html#gst-allocator-alloc" title="gst_allocator_alloc ()"><code class="function">gst_allocator_alloc()</code></a>.</p> |
408 | 410 | <div class="refsect3"> |
409 | <a name="id-1.3.4.8.9.5"></a><h4>Parameters</h4> | |
411 | <a name="id-1.3.4.9.9.5"></a><h4>Parameters</h4> | |
410 | 412 | <div class="informaltable"><table width="100%" border="0"> |
411 | 413 | <colgroup> |
412 | 414 | <col width="150px" class="parameters_name"> |
445 | 447 | contains |
446 | 448 | <a class="link" href="GstMemory.html#GST-MEMORY-FLAG-ZERO-PREFIXED:CAPS"><span class="type">GST_MEMORY_FLAG_ZERO_PREFIXED</span></a> and <a class="link" href="GstMemory.html#GST-MEMORY-FLAG-ZERO-PADDED:CAPS"><span class="type">GST_MEMORY_FLAG_ZERO_PADDED</span></a> respectively.</p> |
447 | 449 | <div class="refsect3"> |
448 | <a name="id-1.3.4.8.10.6"></a><h4>Parameters</h4> | |
450 | <a name="id-1.3.4.9.10.6"></a><h4>Parameters</h4> | |
449 | 451 | <div class="informaltable"><table width="100%" border="0"> |
450 | 452 | <colgroup> |
451 | 453 | <col width="150px" class="parameters_name"> |
496 | 498 | </table></div> |
497 | 499 | </div> |
498 | 500 | <div class="refsect3"> |
499 | <a name="id-1.3.4.8.10.7"></a><h4>Returns</h4> | |
501 | <a name="id-1.3.4.9.10.7"></a><h4>Returns</h4> | |
500 | 502 | <p> a new <a class="link" href="GstMemory.html" title="GstMemory"><span class="type">GstMemory</span></a>. </p> |
501 | 503 | <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> |
502 | 504 | </div> |
525 | 527 | </pre> |
526 | 528 | <p>The <a class="link" href="GstAllocator.html" title="GstAllocator"><span class="type">GstAllocator</span></a> is used to create new memory.</p> |
527 | 529 | <div class="refsect3"> |
528 | <a name="id-1.3.4.9.3.5"></a><h4>Members</h4> | |
530 | <a name="id-1.3.4.10.3.5"></a><h4>Members</h4> | |
529 | 531 | <div class="informaltable"><table width="100%" border="0"> |
530 | 532 | <colgroup> |
531 | 533 | <col width="300px" class="struct_members_name"> |
575 | 577 | </pre> |
576 | 578 | <p>The <a class="link" href="GstAllocator.html" title="GstAllocator"><span class="type">GstAllocator</span></a> is used to create new memory.</p> |
577 | 579 | <div class="refsect3"> |
578 | <a name="id-1.3.4.9.4.5"></a><h4>Members</h4> | |
580 | <a name="id-1.3.4.10.4.5"></a><h4>Members</h4> | |
579 | 581 | <div class="informaltable"><table width="100%" border="0"> |
580 | 582 | <colgroup> |
581 | 583 | <col width="300px" class="struct_members_name"> |
607 | 609 | <a name="GstAllocatorFlags"></a><h3>enum GstAllocatorFlags</h3> |
608 | 610 | <p>Flags for allocators.</p> |
609 | 611 | <div class="refsect3"> |
610 | <a name="id-1.3.4.9.5.4"></a><h4>Members</h4> | |
612 | <a name="id-1.3.4.10.5.4"></a><h4>Members</h4> | |
611 | 613 | <div class="informaltable"><table width="100%" border="0"> |
612 | 614 | <colgroup> |
613 | 615 | <col width="300px" class="enum_members_name"> |
635 | 637 | </div> |
636 | 638 | <hr> |
637 | 639 | <div class="refsect2"> |
638 | <a name="GstAllocationParams"></a><h3>struct GstAllocationParams</h3> | |
640 | <a name="GstAllocationParams-struct"></a><h3>struct GstAllocationParams</h3> | |
639 | 641 | <pre class="programlisting">struct GstAllocationParams { |
640 | 642 | GstMemoryFlags flags; |
641 | 643 | gsize align; |
645 | 647 | </pre> |
646 | 648 | <p>Parameters to control the allocation of memory</p> |
647 | 649 | <div class="refsect3"> |
648 | <a name="id-1.3.4.9.6.5"></a><h4>Members</h4> | |
650 | <a name="id-1.3.4.10.6.5"></a><h4>Members</h4> | |
649 | 651 | <div class="informaltable"><table width="100%" border="0"> |
650 | 652 | <colgroup> |
651 | 653 | <col width="300px" class="struct_members_name"> |
654 | 656 | </colgroup> |
655 | 657 | <tbody> |
656 | 658 | <tr> |
657 | <td class="struct_member_name"><p><a class="link" href="GstMemory.html#GstMemoryFlags" title="enum GstMemoryFlags"><span class="type">GstMemoryFlags</span></a> <em class="structfield"><code><a name="GstAllocationParams.flags"></a>flags</code></em>;</p></td> | |
659 | <td class="struct_member_name"><p><a class="link" href="GstMemory.html#GstMemoryFlags" title="enum GstMemoryFlags"><span class="type">GstMemoryFlags</span></a> <em class="structfield"><code><a name="GstAllocationParams-struct.flags"></a>flags</code></em>;</p></td> | |
658 | 660 | <td class="struct_member_description"><p>flags to control allocation</p></td> |
659 | 661 | <td class="struct_member_annotations"> </td> |
660 | 662 | </tr> |
661 | 663 | <tr> |
662 | <td class="struct_member_name"><p><span class="type">gsize</span> <em class="structfield"><code><a name="GstAllocationParams.align"></a>align</code></em>;</p></td> | |
664 | <td class="struct_member_name"><p><span class="type">gsize</span> <em class="structfield"><code><a name="GstAllocationParams-struct.align"></a>align</code></em>;</p></td> | |
663 | 665 | <td class="struct_member_description"><p>the desired alignment of the memory</p></td> |
664 | 666 | <td class="struct_member_annotations"> </td> |
665 | 667 | </tr> |
666 | 668 | <tr> |
667 | <td class="struct_member_name"><p><span class="type">gsize</span> <em class="structfield"><code><a name="GstAllocationParams.prefix"></a>prefix</code></em>;</p></td> | |
669 | <td class="struct_member_name"><p><span class="type">gsize</span> <em class="structfield"><code><a name="GstAllocationParams-struct.prefix"></a>prefix</code></em>;</p></td> | |
668 | 670 | <td class="struct_member_description"><p>the desired prefix</p></td> |
669 | 671 | <td class="struct_member_annotations"> </td> |
670 | 672 | </tr> |
671 | 673 | <tr> |
672 | <td class="struct_member_name"><p><span class="type">gsize</span> <em class="structfield"><code><a name="GstAllocationParams.padding"></a>padding</code></em>;</p></td> | |
674 | <td class="struct_member_name"><p><span class="type">gsize</span> <em class="structfield"><code><a name="GstAllocationParams-struct.padding"></a>padding</code></em>;</p></td> | |
673 | 675 | <td class="struct_member_description"><p>the desired padding</p></td> |
674 | 676 | <td class="struct_member_annotations"> </td> |
675 | 677 | </tr> |
1060 | 1060 | <pre class="programlisting"><a class="link" href="GstBuffer.html" title="GstBuffer"><span class="returnvalue">GstBuffer</span></a> * |
1061 | 1061 | gst_buffer_new_allocate (<em class="parameter"><code><a class="link" href="GstAllocator.html" title="GstAllocator"><span class="type">GstAllocator</span></a> *allocator</code></em>, |
1062 | 1062 | <em class="parameter"><code><span class="type">gsize</span> size</code></em>, |
1063 | <em class="parameter"><code><a class="link" href="GstAllocator.html#GstAllocationParams" title="struct GstAllocationParams"><span class="type">GstAllocationParams</span></a> *params</code></em>);</pre> | |
1063 | <em class="parameter"><code><a class="link" href="GstAllocator.html#GstAllocationParams"><span class="type">GstAllocationParams</span></a> *params</code></em>);</pre> | |
1064 | 1064 | <p>Tries to create a newly allocated buffer with data of the given size and |
1065 | 1065 | extra parameters from <em class="parameter"><code>allocator</code></em> |
1066 | 1066 | . If the requested amount of memory can't be |
67 | 67 | </td> |
68 | 68 | <td class="function_name"> |
69 | 69 | <a class="link" href="GstBufferPool.html#gst-buffer-pool-config-set-params" title="gst_buffer_pool_config_set_params ()">gst_buffer_pool_config_set_params</a> <span class="c_punctuation">()</span> |
70 | </td> | |
71 | </tr> | |
72 | <tr> | |
73 | <td class="function_type"> | |
74 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> | |
75 | </td> | |
76 | <td class="function_name"> | |
77 | <a class="link" href="GstBufferPool.html#gst-buffer-pool-config-validate-params" title="gst_buffer_pool_config_validate_params ()">gst_buffer_pool_config_validate_params</a> <span class="c_punctuation">()</span> | |
70 | 78 | </td> |
71 | 79 | </tr> |
72 | 80 | <tr> |
394 | 402 | </div> |
395 | 403 | <hr> |
396 | 404 | <div class="refsect2"> |
405 | <a name="gst-buffer-pool-config-validate-params"></a><h3>gst_buffer_pool_config_validate_params ()</h3> | |
406 | <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> | |
407 | gst_buffer_pool_config_validate_params | |
408 | (<em class="parameter"><code><a class="link" href="GstStructure.html" title="GstStructure"><span class="type">GstStructure</span></a> *config</code></em>, | |
409 | <em class="parameter"><code><a class="link" href="GstCaps.html" title="GstCaps"><span class="type">GstCaps</span></a> *caps</code></em>, | |
410 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> size</code></em>, | |
411 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> min_buffers</code></em>, | |
412 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> max_buffers</code></em>);</pre> | |
413 | <p>Validate that changes made to <em class="parameter"><code>config</code></em> | |
414 | are still valid in the context of the | |
415 | expected parameters. This function is a helper that can be used to validate | |
416 | changes made by a pool to a config when <a class="link" href="GstBufferPool.html#gst-buffer-pool-set-config" title="gst_buffer_pool_set_config ()"><code class="function">gst_buffer_pool_set_config()</code></a> | |
417 | returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>. This expects that <em class="parameter"><code>caps</code></em> | |
418 | and <em class="parameter"><code>size</code></em> | |
419 | haven't changed, and that | |
420 | <em class="parameter"><code>min_buffers</code></em> | |
421 | aren't lower then what we initially expected. This does not check | |
422 | if options or allocator parameters.</p> | |
423 | <div class="refsect3"> | |
424 | <a name="id-1.3.9.8.6.5"></a><h4>Parameters</h4> | |
425 | <div class="informaltable"><table width="100%" border="0"> | |
426 | <colgroup> | |
427 | <col width="150px" class="parameters_name"> | |
428 | <col class="parameters_description"> | |
429 | <col width="200px" class="parameters_annotations"> | |
430 | </colgroup> | |
431 | <tbody> | |
432 | <tr> | |
433 | <td class="parameter_name"><p>config</p></td> | |
434 | <td class="parameter_description"><p> a <a class="link" href="GstBufferPool.html" title="GstBufferPool"><span class="type">GstBufferPool</span></a> configuration. </p></td> | |
435 | <td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td> | |
436 | </tr> | |
437 | <tr> | |
438 | <td class="parameter_name"><p>caps</p></td> | |
439 | <td class="parameter_description"><p> the excepted caps of buffers. </p></td> | |
440 | <td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td> | |
441 | </tr> | |
442 | <tr> | |
443 | <td class="parameter_name"><p>size</p></td> | |
444 | <td class="parameter_description"><p>the expected size of each buffer, not including prefix and padding</p></td> | |
445 | <td class="parameter_annotations"> </td> | |
446 | </tr> | |
447 | <tr> | |
448 | <td class="parameter_name"><p>min_buffers</p></td> | |
449 | <td class="parameter_description"><p>the expected minimum amount of buffers to allocate.</p></td> | |
450 | <td class="parameter_annotations"> </td> | |
451 | </tr> | |
452 | <tr> | |
453 | <td class="parameter_name"><p>max_buffers</p></td> | |
454 | <td class="parameter_description"><p>the expect maximum amount of buffers to allocate or 0 for unlimited.</p></td> | |
455 | <td class="parameter_annotations"> </td> | |
456 | </tr> | |
457 | </tbody> | |
458 | </table></div> | |
459 | </div> | |
460 | <div class="refsect3"> | |
461 | <a name="id-1.3.9.8.6.6"></a><h4>Returns</h4> | |
462 | <p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, if the parameters are valid in this context.</p> | |
463 | <p></p> | |
464 | </div> | |
465 | <p class="since">Since 1.4</p> | |
466 | </div> | |
467 | <hr> | |
468 | <div class="refsect2"> | |
397 | 469 | <a name="gst-buffer-pool-config-get-allocator"></a><h3>gst_buffer_pool_config_get_allocator ()</h3> |
398 | 470 | <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> |
399 | 471 | gst_buffer_pool_config_get_allocator (<em class="parameter"><code><a class="link" href="GstStructure.html" title="GstStructure"><span class="type">GstStructure</span></a> *config</code></em>, |
400 | 472 | <em class="parameter"><code><a class="link" href="GstAllocator.html" title="GstAllocator"><span class="type">GstAllocator</span></a> **allocator</code></em>, |
401 | <em class="parameter"><code><a class="link" href="GstAllocator.html#GstAllocationParams" title="struct GstAllocationParams"><span class="type">GstAllocationParams</span></a> *params</code></em>);</pre> | |
473 | <em class="parameter"><code><a class="link" href="GstAllocator.html#GstAllocationParams"><span class="type">GstAllocationParams</span></a> *params</code></em>);</pre> | |
402 | 474 | <p>Get the <em class="parameter"><code>allocator</code></em> |
403 | 475 | and <em class="parameter"><code>params</code></em> |
404 | 476 | from <em class="parameter"><code>config</code></em> |
405 | 477 | .</p> |
406 | 478 | <div class="refsect3"> |
407 | <a name="id-1.3.9.8.6.5"></a><h4>Parameters</h4> | |
479 | <a name="id-1.3.9.8.7.5"></a><h4>Parameters</h4> | |
408 | 480 | <div class="informaltable"><table width="100%" border="0"> |
409 | 481 | <colgroup> |
410 | 482 | <col width="150px" class="parameters_name"> |
424 | 496 | </tr> |
425 | 497 | <tr> |
426 | 498 | <td class="parameter_name"><p>params</p></td> |
427 | <td class="parameter_description"><p><a class="link" href="GstAllocator.html#GstAllocationParams" title="struct GstAllocationParams"><span class="type">GstAllocationParams</span></a></p></td> | |
428 | <td class="parameter_annotations"> </td> | |
429 | </tr> | |
430 | </tbody> | |
431 | </table></div> | |
432 | </div> | |
433 | <div class="refsect3"> | |
434 | <a name="id-1.3.9.8.6.6"></a><h4>Returns</h4> | |
499 | <td class="parameter_description"><p><a class="link" href="GstAllocator.html#GstAllocationParams"><span class="type">GstAllocationParams</span></a></p></td> | |
500 | <td class="parameter_annotations"> </td> | |
501 | </tr> | |
502 | </tbody> | |
503 | </table></div> | |
504 | </div> | |
505 | <div class="refsect3"> | |
506 | <a name="id-1.3.9.8.7.6"></a><h4>Returns</h4> | |
435 | 507 | <p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, if the values are set. </p> |
436 | 508 | <p></p> |
437 | 509 | </div> |
442 | 514 | <pre class="programlisting"><span class="returnvalue">void</span> |
443 | 515 | gst_buffer_pool_config_set_allocator (<em class="parameter"><code><a class="link" href="GstStructure.html" title="GstStructure"><span class="type">GstStructure</span></a> *config</code></em>, |
444 | 516 | <em class="parameter"><code><a class="link" href="GstAllocator.html" title="GstAllocator"><span class="type">GstAllocator</span></a> *allocator</code></em>, |
445 | <em class="parameter"><code>const <a class="link" href="GstAllocator.html#GstAllocationParams" title="struct GstAllocationParams"><span class="type">GstAllocationParams</span></a> *params</code></em>);</pre> | |
517 | <em class="parameter"><code>const <a class="link" href="GstAllocator.html#GstAllocationParams"><span class="type">GstAllocationParams</span></a> *params</code></em>);</pre> | |
446 | 518 | <p>Set the <em class="parameter"><code>allocator</code></em> |
447 | 519 | and <em class="parameter"><code>params</code></em> |
448 | 520 | on <em class="parameter"><code>config</code></em> |
456 | 528 | to perform its allocation. When <em class="parameter"><code>param</code></em> |
457 | 529 | is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the pool will use the |
458 | 530 | provided <em class="parameter"><code>allocator</code></em> |
459 | with its default <a class="link" href="GstAllocator.html#GstAllocationParams" title="struct GstAllocationParams"><span class="type">GstAllocationParams</span></a>.</p> | |
531 | with its default <a class="link" href="GstAllocator.html#GstAllocationParams"><span class="type">GstAllocationParams</span></a>.</p> | |
460 | 532 | <p>A call to <a class="link" href="GstBufferPool.html#gst-buffer-pool-set-config" title="gst_buffer_pool_set_config ()"><code class="function">gst_buffer_pool_set_config()</code></a> can update the allocator and params |
461 | 533 | with the values that it is able to do. Some pools are, for example, not able |
462 | 534 | to operate with different allocators or cannot allocate with the values |
464 | 536 | . Use <a class="link" href="GstBufferPool.html#gst-buffer-pool-get-config" title="gst_buffer_pool_get_config ()"><code class="function">gst_buffer_pool_get_config()</code></a> to get the currently |
465 | 537 | used values.</p> |
466 | 538 | <div class="refsect3"> |
467 | <a name="id-1.3.9.8.7.7"></a><h4>Parameters</h4> | |
539 | <a name="id-1.3.9.8.8.7"></a><h4>Parameters</h4> | |
468 | 540 | <div class="informaltable"><table width="100%" border="0"> |
469 | 541 | <colgroup> |
470 | 542 | <col width="150px" class="parameters_name"> |
484 | 556 | </tr> |
485 | 557 | <tr> |
486 | 558 | <td class="parameter_name"><p>params</p></td> |
487 | <td class="parameter_description"><p><a class="link" href="GstAllocator.html#GstAllocationParams" title="struct GstAllocationParams"><span class="type">GstAllocationParams</span></a></p></td> | |
559 | <td class="parameter_description"><p><a class="link" href="GstAllocator.html#GstAllocationParams"><span class="type">GstAllocationParams</span></a></p></td> | |
488 | 560 | <td class="parameter_annotations"> </td> |
489 | 561 | </tr> |
490 | 562 | </tbody> |
500 | 572 | <em class="parameter"><code>config</code></em> |
501 | 573 | structure.</p> |
502 | 574 | <div class="refsect3"> |
503 | <a name="id-1.3.9.8.8.5"></a><h4>Parameters</h4> | |
575 | <a name="id-1.3.9.8.9.5"></a><h4>Parameters</h4> | |
504 | 576 | <div class="informaltable"><table width="100%" border="0"> |
505 | 577 | <colgroup> |
506 | 578 | <col width="150px" class="parameters_name"> |
515 | 587 | </table></div> |
516 | 588 | </div> |
517 | 589 | <div class="refsect3"> |
518 | <a name="id-1.3.9.8.8.6"></a><h4>Returns</h4> | |
590 | <a name="id-1.3.9.8.9.6"></a><h4>Returns</h4> | |
519 | 591 | <p> the options array size as a <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>.</p> |
520 | 592 | <p></p> |
521 | 593 | </div> |
533 | 605 | <p>The supported options by <em class="parameter"><code>pool</code></em> |
534 | 606 | can be retrieved with <a class="link" href="GstBufferPool.html#gst-buffer-pool-get-options" title="gst_buffer_pool_get_options ()"><code class="function">gst_buffer_pool_get_options()</code></a>.</p> |
535 | 607 | <div class="refsect3"> |
536 | <a name="id-1.3.9.8.9.6"></a><h4>Parameters</h4> | |
608 | <a name="id-1.3.9.8.10.6"></a><h4>Parameters</h4> | |
537 | 609 | <div class="informaltable"><table width="100%" border="0"> |
538 | 610 | <colgroup> |
539 | 611 | <col width="150px" class="parameters_name"> |
566 | 638 | of the options API |
567 | 639 | array.</p> |
568 | 640 | <div class="refsect3"> |
569 | <a name="id-1.3.9.8.10.5"></a><h4>Parameters</h4> | |
641 | <a name="id-1.3.9.8.11.5"></a><h4>Parameters</h4> | |
570 | 642 | <div class="informaltable"><table width="100%" border="0"> |
571 | 643 | <colgroup> |
572 | 644 | <col width="150px" class="parameters_name"> |
588 | 660 | </table></div> |
589 | 661 | </div> |
590 | 662 | <div class="refsect3"> |
591 | <a name="id-1.3.9.8.10.6"></a><h4>Returns</h4> | |
663 | <a name="id-1.3.9.8.11.6"></a><h4>Returns</h4> | |
592 | 664 | <p> a <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> of the option at <em class="parameter"><code>index</code></em> |
593 | 665 | .</p> |
594 | 666 | <p></p> |
604 | 676 | contains <em class="parameter"><code>option</code></em> |
605 | 677 | .</p> |
606 | 678 | <div class="refsect3"> |
607 | <a name="id-1.3.9.8.11.5"></a><h4>Parameters</h4> | |
679 | <a name="id-1.3.9.8.12.5"></a><h4>Parameters</h4> | |
608 | 680 | <div class="informaltable"><table width="100%" border="0"> |
609 | 681 | <colgroup> |
610 | 682 | <col width="150px" class="parameters_name"> |
626 | 698 | </table></div> |
627 | 699 | </div> |
628 | 700 | <div class="refsect3"> |
629 | <a name="id-1.3.9.8.11.6"></a><h4>Returns</h4> | |
701 | <a name="id-1.3.9.8.12.6"></a><h4>Returns</h4> | |
630 | 702 | <p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the options array contains <em class="parameter"><code>option</code></em> |
631 | 703 | .</p> |
632 | 704 | <p></p> |
642 | 714 | . An option would typically be enabled with |
643 | 715 | <a class="link" href="GstBufferPool.html#gst-buffer-pool-config-add-option" title="gst_buffer_pool_config_add_option ()"><code class="function">gst_buffer_pool_config_add_option()</code></a>.</p> |
644 | 716 | <div class="refsect3"> |
645 | <a name="id-1.3.9.8.12.5"></a><h4>Parameters</h4> | |
717 | <a name="id-1.3.9.8.13.5"></a><h4>Parameters</h4> | |
646 | 718 | <div class="informaltable"><table width="100%" border="0"> |
647 | 719 | <colgroup> |
648 | 720 | <col width="150px" class="parameters_name"> |
657 | 729 | </table></div> |
658 | 730 | </div> |
659 | 731 | <div class="refsect3"> |
660 | <a name="id-1.3.9.8.12.6"></a><h4>Returns</h4> | |
732 | <a name="id-1.3.9.8.13.6"></a><h4>Returns</h4> | |
661 | 733 | <p> a <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> terminated array |
662 | 734 | of strings. </p> |
663 | 735 | <p><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> |
672 | 744 | <p>Check if the bufferpool supports <em class="parameter"><code>option</code></em> |
673 | 745 | .</p> |
674 | 746 | <div class="refsect3"> |
675 | <a name="id-1.3.9.8.13.5"></a><h4>Parameters</h4> | |
747 | <a name="id-1.3.9.8.14.5"></a><h4>Parameters</h4> | |
676 | 748 | <div class="informaltable"><table width="100%" border="0"> |
677 | 749 | <colgroup> |
678 | 750 | <col width="150px" class="parameters_name"> |
694 | 766 | </table></div> |
695 | 767 | </div> |
696 | 768 | <div class="refsect3"> |
697 | <a name="id-1.3.9.8.13.6"></a><h4>Returns</h4> | |
769 | <a name="id-1.3.9.8.14.6"></a><h4>Returns</h4> | |
698 | 770 | <p> a <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> terminated array of strings.</p> |
699 | 771 | <p></p> |
700 | 772 | </div> |
708 | 780 | can either be modified and used for the <a class="link" href="GstBufferPool.html#gst-buffer-pool-set-config" title="gst_buffer_pool_set_config ()"><code class="function">gst_buffer_pool_set_config()</code></a> call |
709 | 781 | or it must be freed after usage.</p> |
710 | 782 | <div class="refsect3"> |
711 | <a name="id-1.3.9.8.14.5"></a><h4>Parameters</h4> | |
783 | <a name="id-1.3.9.8.15.5"></a><h4>Parameters</h4> | |
712 | 784 | <div class="informaltable"><table width="100%" border="0"> |
713 | 785 | <colgroup> |
714 | 786 | <col width="150px" class="parameters_name"> |
723 | 795 | </table></div> |
724 | 796 | </div> |
725 | 797 | <div class="refsect3"> |
726 | <a name="id-1.3.9.8.14.6"></a><h4>Returns</h4> | |
798 | <a name="id-1.3.9.8.15.6"></a><h4>Returns</h4> | |
727 | 799 | <p> a copy of the current configuration of <em class="parameter"><code>pool</code></em> |
728 | 800 | . use |
729 | 801 | <a class="link" href="GstStructure.html#gst-structure-free" title="gst_structure_free ()"><code class="function">gst_structure_free()</code></a> after usage or <a class="link" href="GstBufferPool.html#gst-buffer-pool-set-config" title="gst_buffer_pool_set_config ()"><code class="function">gst_buffer_pool_set_config()</code></a>. </p> |
736 | 808 | <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> |
737 | 809 | gst_buffer_pool_set_config (<em class="parameter"><code><a class="link" href="GstBufferPool.html" title="GstBufferPool"><span class="type">GstBufferPool</span></a> *pool</code></em>, |
738 | 810 | <em class="parameter"><code><a class="link" href="GstStructure.html" title="GstStructure"><span class="type">GstStructure</span></a> *config</code></em>);</pre> |
739 | <p>Set the configuration of the pool. The pool must be inactive and all buffers | |
740 | allocated form this pool must be returned or else this function will do | |
741 | nothing and return FALSE.</p> | |
811 | <p>Set the configuration of the pool. If the pool is already configured, and | |
812 | the configuration haven't change, this function will return <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>. If the | |
813 | pool is active, this function will try deactivating it. Buffers allocated | |
814 | form this pool must be returned or else this function will do nothing and | |
815 | return FALSE.</p> | |
742 | 816 | <p><em class="parameter"><code>config</code></em> |
743 | 817 | is a <a class="link" href="GstStructure.html" title="GstStructure"><span class="type">GstStructure</span></a> that contains the configuration parameters for |
744 | 818 | the pool. A default and mandatory set of parameters can be configured with |
751 | 825 | <p>This function takes ownership of <em class="parameter"><code>config</code></em> |
752 | 826 | .</p> |
753 | 827 | <div class="refsect3"> |
754 | <a name="id-1.3.9.8.15.8"></a><h4>Parameters</h4> | |
828 | <a name="id-1.3.9.8.16.8"></a><h4>Parameters</h4> | |
755 | 829 | <div class="informaltable"><table width="100%" border="0"> |
756 | 830 | <colgroup> |
757 | 831 | <col width="150px" class="parameters_name"> |
773 | 847 | </table></div> |
774 | 848 | </div> |
775 | 849 | <div class="refsect3"> |
776 | <a name="id-1.3.9.8.15.9"></a><h4>Returns</h4> | |
850 | <a name="id-1.3.9.8.16.9"></a><h4>Returns</h4> | |
777 | 851 | <p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> when the configuration could be set.</p> |
778 | 852 | <p></p> |
779 | 853 | </div> |
793 | 867 | buffers. When there are outstanding buffers, they will be freed as soon as |
794 | 868 | they are all returned to the pool.</p> |
795 | 869 | <div class="refsect3"> |
796 | <a name="id-1.3.9.8.16.7"></a><h4>Parameters</h4> | |
870 | <a name="id-1.3.9.8.17.7"></a><h4>Parameters</h4> | |
797 | 871 | <div class="informaltable"><table width="100%" border="0"> |
798 | 872 | <colgroup> |
799 | 873 | <col width="150px" class="parameters_name"> |
815 | 889 | </table></div> |
816 | 890 | </div> |
817 | 891 | <div class="refsect3"> |
818 | <a name="id-1.3.9.8.16.8"></a><h4>Returns</h4> | |
892 | <a name="id-1.3.9.8.17.8"></a><h4>Returns</h4> | |
819 | 893 | <p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> when the pool was not configured or when preallocation of the |
820 | 894 | buffers failed.</p> |
821 | 895 | <p></p> |
830 | 904 | is active. A pool can be activated with the |
831 | 905 | <a class="link" href="GstBufferPool.html#gst-buffer-pool-set-active" title="gst_buffer_pool_set_active ()"><code class="function">gst_buffer_pool_set_active()</code></a> call.</p> |
832 | 906 | <div class="refsect3"> |
833 | <a name="id-1.3.9.8.17.5"></a><h4>Parameters</h4> | |
907 | <a name="id-1.3.9.8.18.5"></a><h4>Parameters</h4> | |
834 | 908 | <div class="informaltable"><table width="100%" border="0"> |
835 | 909 | <colgroup> |
836 | 910 | <col width="150px" class="parameters_name"> |
845 | 919 | </table></div> |
846 | 920 | </div> |
847 | 921 | <div class="refsect3"> |
848 | <a name="id-1.3.9.8.17.6"></a><h4>Returns</h4> | |
922 | <a name="id-1.3.9.8.18.6"></a><h4>Returns</h4> | |
849 | 923 | <p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> when the pool is active.</p> |
850 | 924 | <p></p> |
851 | 925 | </div> |
865 | 939 | can be <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> or contain optional parameters to influence the |
866 | 940 | allocation.</p> |
867 | 941 | <div class="refsect3"> |
868 | <a name="id-1.3.9.8.18.6"></a><h4>Parameters</h4> | |
942 | <a name="id-1.3.9.8.19.6"></a><h4>Parameters</h4> | |
869 | 943 | <div class="informaltable"><table width="100%" border="0"> |
870 | 944 | <colgroup> |
871 | 945 | <col width="150px" class="parameters_name"> |
892 | 966 | </table></div> |
893 | 967 | </div> |
894 | 968 | <div class="refsect3"> |
895 | <a name="id-1.3.9.8.18.7"></a><h4>Returns</h4> | |
969 | <a name="id-1.3.9.8.19.7"></a><h4>Returns</h4> | |
896 | 970 | <p> a <a class="link" href="GstPad.html#GstFlowReturn" title="enum GstFlowReturn"><span class="type">GstFlowReturn</span></a> such as <a class="link" href="GstPad.html#GST-FLOW-FLUSHING:CAPS"><code class="literal">GST_FLOW_FLUSHING</code></a> when the pool is |
897 | 971 | inactive.</p> |
898 | 972 | <p></p> |
914 | 988 | |
915 | 989 | disappears.</p> |
916 | 990 | <div class="refsect3"> |
917 | <a name="id-1.3.9.8.19.6"></a><h4>Parameters</h4> | |
991 | <a name="id-1.3.9.8.20.6"></a><h4>Parameters</h4> | |
918 | 992 | <div class="informaltable"><table width="100%" border="0"> |
919 | 993 | <colgroup> |
920 | 994 | <col width="150px" class="parameters_name"> |
802 | 802 | and <a class="link" href="GstElement.html#gst-element-remove-pad" title="gst_element_remove_pad ()"><code class="function">gst_element_remove_pad()</code></a>.</p> |
803 | 803 | <p>An existing pad of an element can be retrieved by name with |
804 | 804 | <a class="link" href="GstElement.html#gst-element-get-static-pad" title="gst_element_get_static_pad ()"><code class="function">gst_element_get_static_pad()</code></a>. A new dynamic pad can be created using |
805 | <a class="link" href="GstElement.html#gst-element-request-pad" title="gst_element_request_pad ()"><code class="function">gst_element_request_pad()</code></a> with a <a class="link" href="GstPadTemplate.html" title="GstPadTemplate"><span class="type">GstPadTemplate</span></a> or | |
806 | <a class="link" href="GstElement.html#gst-element-get-request-pad" title="gst_element_get_request_pad ()"><code class="function">gst_element_get_request_pad()</code></a> with the template name such as "src_%u". | |
805 | <a class="link" href="GstElement.html#gst-element-request-pad" title="gst_element_request_pad ()"><code class="function">gst_element_request_pad()</code></a> with a <a class="link" href="GstPadTemplate.html" title="GstPadTemplate"><span class="type">GstPadTemplate</span></a>. | |
807 | 806 | An iterator of all pads can be retrieved with <a class="link" href="GstElement.html#gst-element-iterate-pads" title="gst_element_iterate_pads ()"><code class="function">gst_element_iterate_pads()</code></a>.</p> |
808 | 807 | <p>Elements can be linked through their pads. |
809 | 808 | If the link is straightforward, use the <a class="link" href="GstElement.html#gst-element-link" title="gst_element_link ()"><code class="function">gst_element_link()</code></a> |
2029 | 2028 | gst_element_release_request_pad (<em class="parameter"><code><a class="link" href="GstElement.html" title="GstElement"><span class="type">GstElement</span></a> *element</code></em>, |
2030 | 2029 | <em class="parameter"><code><a class="link" href="GstPad.html" title="GstPad"><span class="type">GstPad</span></a> *pad</code></em>);</pre> |
2031 | 2030 | <p>Makes the element free the previously requested pad as obtained |
2032 | with <a class="link" href="GstElement.html#gst-element-get-request-pad" title="gst_element_get_request_pad ()"><code class="function">gst_element_get_request_pad()</code></a>.</p> | |
2031 | with <a class="link" href="GstElement.html#gst-element-request-pad" title="gst_element_request_pad ()"><code class="function">gst_element_request_pad()</code></a>.</p> | |
2033 | 2032 | <p>This does not unref the pad. If the pad was created by using |
2034 | <a class="link" href="GstElement.html#gst-element-get-request-pad" title="gst_element_get_request_pad ()"><code class="function">gst_element_get_request_pad()</code></a>, <a class="link" href="GstElement.html#gst-element-release-request-pad" title="gst_element_release_request_pad ()"><code class="function">gst_element_release_request_pad()</code></a> needs to be | |
2033 | <a class="link" href="GstElement.html#gst-element-request-pad" title="gst_element_request_pad ()"><code class="function">gst_element_request_pad()</code></a>, <a class="link" href="GstElement.html#gst-element-release-request-pad" title="gst_element_release_request_pad ()"><code class="function">gst_element_release_request_pad()</code></a> needs to be | |
2035 | 2034 | followed by <a class="link" href="GstObject.html#gst-object-unref" title="gst_object_unref ()"><code class="function">gst_object_unref()</code></a> to free the <em class="parameter"><code>pad</code></em> |
2036 | 2035 | .</p> |
2037 | 2036 | <p>MT safe.</p> |
2071 | 2070 | referenced elsewhere using <a class="link" href="GstObject.html#gst-object-unparent" title="gst_object_unparent ()"><code class="function">gst_object_unparent()</code></a>.</p> |
2072 | 2071 | <p>This function is used by plugin developers and should not be used |
2073 | 2072 | by applications. Pads that were dynamically requested from elements |
2074 | with <a class="link" href="GstElement.html#gst-element-get-request-pad" title="gst_element_get_request_pad ()"><code class="function">gst_element_get_request_pad()</code></a> should be released with the | |
2073 | with <a class="link" href="GstElement.html#gst-element-request-pad" title="gst_element_request_pad ()"><code class="function">gst_element_request_pad()</code></a> should be released with the | |
2075 | 2074 | <a class="link" href="GstElement.html#gst-element-release-request-pad" title="gst_element_release_request_pad ()"><code class="function">gst_element_release_request_pad()</code></a> function instead.</p> |
2076 | 2075 | <p>Pads are not automatically deactivated so elements should perform the needed |
2077 | 2076 | steps to deactivate the pad in case this pad is removed in the PAUSED or |
687 | 687 | <td class="enum_member_name"><p><a name="GST-PAD-REQUEST:CAPS"></a>GST_PAD_REQUEST</p></td> |
688 | 688 | <td class="enum_member_description"> |
689 | 689 | <p>the pad is only available on request with |
690 | <a class="link" href="GstElement.html#gst-element-get-request-pad" title="gst_element_get_request_pad ()"><code class="function">gst_element_get_request_pad()</code></a>.</p> | |
690 | <a class="link" href="GstElement.html#gst-element-request-pad" title="gst_element_request_pad ()"><code class="function">gst_element_request_pad()</code></a>.</p> | |
691 | 691 | </td> |
692 | 692 | <td class="enum_member_annotations"> </td> |
693 | 693 | </tr> |
3510 | 3510 | <pre class="programlisting"><span class="returnvalue">void</span> |
3511 | 3511 | gst_query_add_allocation_param (<em class="parameter"><code><a class="link" href="GstQuery.html" title="GstQuery"><span class="type">GstQuery</span></a> *query</code></em>, |
3512 | 3512 | <em class="parameter"><code><a class="link" href="GstAllocator.html" title="GstAllocator"><span class="type">GstAllocator</span></a> *allocator</code></em>, |
3513 | <em class="parameter"><code>const <a class="link" href="GstAllocator.html#GstAllocationParams" title="struct GstAllocationParams"><span class="type">GstAllocationParams</span></a> *params</code></em>);</pre> | |
3513 | <em class="parameter"><code>const <a class="link" href="GstAllocator.html#GstAllocationParams"><span class="type">GstAllocationParams</span></a> *params</code></em>);</pre> | |
3514 | 3514 | <p>Add <em class="parameter"><code>allocator</code></em> |
3515 | 3515 | and its <em class="parameter"><code>params</code></em> |
3516 | 3516 | as a supported memory allocator.</p> |
3535 | 3535 | </tr> |
3536 | 3536 | <tr> |
3537 | 3537 | <td class="parameter_name"><p>params</p></td> |
3538 | <td class="parameter_description"><p> a <a class="link" href="GstAllocator.html#GstAllocationParams" title="struct GstAllocationParams"><span class="type">GstAllocationParams</span></a>. </p></td> | |
3538 | <td class="parameter_description"><p> a <a class="link" href="GstAllocator.html#GstAllocationParams"><span class="type">GstAllocationParams</span></a>. </p></td> | |
3539 | 3539 | <td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> |
3540 | 3540 | </tr> |
3541 | 3541 | </tbody> |
3581 | 3581 | gst_query_parse_nth_allocation_param (<em class="parameter"><code><a class="link" href="GstQuery.html" title="GstQuery"><span class="type">GstQuery</span></a> *query</code></em>, |
3582 | 3582 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> index</code></em>, |
3583 | 3583 | <em class="parameter"><code><a class="link" href="GstAllocator.html" title="GstAllocator"><span class="type">GstAllocator</span></a> **allocator</code></em>, |
3584 | <em class="parameter"><code><a class="link" href="GstAllocator.html#GstAllocationParams" title="struct GstAllocationParams"><span class="type">GstAllocationParams</span></a> *params</code></em>);</pre> | |
3584 | <em class="parameter"><code><a class="link" href="GstAllocator.html#GstAllocationParams"><span class="type">GstAllocationParams</span></a> *params</code></em>);</pre> | |
3585 | 3585 | <p>Parse an available query and get the allocator and its params |
3586 | 3586 | at <em class="parameter"><code>index</code></em> |
3587 | 3587 | of the allocator array.</p> |
3625 | 3625 | gst_query_set_nth_allocation_param (<em class="parameter"><code><a class="link" href="GstQuery.html" title="GstQuery"><span class="type">GstQuery</span></a> *query</code></em>, |
3626 | 3626 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> index</code></em>, |
3627 | 3627 | <em class="parameter"><code><a class="link" href="GstAllocator.html" title="GstAllocator"><span class="type">GstAllocator</span></a> *allocator</code></em>, |
3628 | <em class="parameter"><code>const <a class="link" href="GstAllocator.html#GstAllocationParams" title="struct GstAllocationParams"><span class="type">GstAllocationParams</span></a> *params</code></em>);</pre> | |
3628 | <em class="parameter"><code>const <a class="link" href="GstAllocator.html#GstAllocationParams"><span class="type">GstAllocationParams</span></a> *params</code></em>);</pre> | |
3629 | 3629 | <p>Parse an available query and get the allocator and its params |
3630 | 3630 | at <em class="parameter"><code>index</code></em> |
3631 | 3631 | of the allocator array.</p> |
61 | 61 | <a name="api-index-full"></a>API Index</h1></div></div></div> |
62 | 62 | <a name="idx"></a><a name="idxA"></a><h3 class="title">A</h3> |
63 | 63 | <dt> |
64 | <a class="link" href="GstAllocator.html#GstAllocationParams" title="struct GstAllocationParams">GstAllocationParams</a>, struct in <a class="link" href="GstAllocator.html" title="GstAllocator">GstAllocator</a> | |
64 | <a class="link" href="GstAllocator.html#GstAllocationParams-struct" title="struct GstAllocationParams">GstAllocationParams</a>, struct in <a class="link" href="GstAllocator.html" title="GstAllocator">GstAllocator</a> | |
65 | 65 | </dt> |
66 | 66 | <dd></dd> |
67 | 67 | <dt> |
598 | 598 | </dt> |
599 | 599 | <dd></dd> |
600 | 600 | <dt> |
601 | <a class="link" href="GstBufferPool.html#gst-buffer-pool-config-validate-params" title="gst_buffer_pool_config_validate_params ()">gst_buffer_pool_config_validate_params</a>, function in <a class="link" href="GstBufferPool.html" title="GstBufferPool">GstBufferPool</a> | |
602 | </dt> | |
603 | <dd></dd> | |
604 | <dt> | |
601 | 605 | <a class="link" href="GstBufferPool.html#gst-buffer-pool-get-config" title="gst_buffer_pool_get_config ()">gst_buffer_pool_get_config</a>, function in <a class="link" href="GstBufferPool.html" title="GstBufferPool">GstBufferPool</a> |
602 | 606 | </dt> |
603 | 607 | <dd></dd> |
1780 | 1784 | </dt> |
1781 | 1785 | <dd></dd> |
1782 | 1786 | <dt> |
1787 | <a class="link" href="gstreamer-GstInfo.html#GST-DEBUG-BIN-TO-DOT-FILE-WITH-TS:CAPS" title="GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS()">GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS</a>, macro in <a class="link" href="gstreamer-GstInfo.html" title="GstInfo">GstInfo</a> | |
1788 | </dt> | |
1789 | <dd></dd> | |
1790 | <dt> | |
1783 | 1791 | <a class="link" href="gstreamer-GstInfo.html#gst-debug-bin-to-dot-file-with-ts" title="gst_debug_bin_to_dot_file_with_ts ()">gst_debug_bin_to_dot_file_with_ts</a>, function in <a class="link" href="gstreamer-GstInfo.html" title="GstInfo">GstInfo</a> |
1784 | 1792 | </dt> |
1785 | 1793 | <dd></dd> |
1786 | 1794 | <dt> |
1787 | <a class="link" href="gstreamer-GstInfo.html#GST-DEBUG-BIN-TO-DOT-FILE-WITH-TS:CAPS" title="GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS()">GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS</a>, macro in <a class="link" href="gstreamer-GstInfo.html" title="GstInfo">GstInfo</a> | |
1788 | </dt> | |
1789 | <dd></dd> | |
1790 | <dt> | |
1791 | 1795 | <a class="link" href="gstreamer-GstInfo.html#GST-DEBUG-CATEGORY:CAPS" title="GST_DEBUG_CATEGORY()">GST_DEBUG_CATEGORY</a>, macro in <a class="link" href="gstreamer-GstInfo.html" title="GstInfo">GstInfo</a> |
1792 | 1796 | </dt> |
1793 | 1797 | <dd></dd> |
1956 | 1960 | </dt> |
1957 | 1961 | <dd></dd> |
1958 | 1962 | <dt> |
1963 | <a class="link" href="gstreamer-GstDevice.html#GST-DEVICE:CAPS" title="GST_DEVICE()">GST_DEVICE</a>, macro in <a class="link" href="gstreamer-GstDevice.html" title="GstDevice">GstDevice</a> | |
1964 | </dt> | |
1965 | <dd></dd> | |
1966 | <dt> | |
1959 | 1967 | <a class="link" href="gstreamer-GstDevice.html#GstDevice" title="struct GstDevice">GstDevice</a>, struct in <a class="link" href="gstreamer-GstDevice.html" title="GstDevice">GstDevice</a> |
1960 | 1968 | </dt> |
1961 | 1969 | <dd></dd> |
1962 | 1970 | <dt> |
1963 | <a class="link" href="gstreamer-GstDevice.html#GST-DEVICE:CAPS" title="GST_DEVICE()">GST_DEVICE</a>, macro in <a class="link" href="gstreamer-GstDevice.html" title="GstDevice">GstDevice</a> | |
1964 | </dt> | |
1965 | <dd></dd> | |
1966 | <dt> | |
1967 | 1971 | <a class="link" href="gstreamer-GstDevice.html#GstDeviceClass" title="struct GstDeviceClass">GstDeviceClass</a>, struct in <a class="link" href="gstreamer-GstDevice.html" title="GstDevice">GstDevice</a> |
1968 | 1972 | </dt> |
1969 | 1973 | <dd></dd> |
2489 | 2493 | </dt> |
2490 | 2494 | <dd></dd> |
2491 | 2495 | <dt> |
2496 | <a class="link" href="GstElement.html#gst-element-is-locked-state" title="gst_element_is_locked_state ()">gst_element_is_locked_state</a>, function in <a class="link" href="GstElement.html" title="GstElement">GstElement</a> | |
2497 | </dt> | |
2498 | <dd></dd> | |
2499 | <dt> | |
2492 | 2500 | <a class="link" href="GstElement.html#GST-ELEMENT-IS-LOCKED-STATE:CAPS" title="GST_ELEMENT_IS_LOCKED_STATE()">GST_ELEMENT_IS_LOCKED_STATE</a>, macro in <a class="link" href="GstElement.html" title="GstElement">GstElement</a> |
2493 | 2501 | </dt> |
2494 | 2502 | <dd></dd> |
2495 | 2503 | <dt> |
2496 | <a class="link" href="GstElement.html#gst-element-is-locked-state" title="gst_element_is_locked_state ()">gst_element_is_locked_state</a>, function in <a class="link" href="GstElement.html" title="GstElement">GstElement</a> | |
2497 | </dt> | |
2498 | <dd></dd> | |
2499 | <dt> | |
2500 | 2504 | <a class="link" href="GstElement.html#gst-element-iterate-pads" title="gst_element_iterate_pads ()">gst_element_iterate_pads</a>, function in <a class="link" href="GstElement.html" title="GstElement">GstElement</a> |
2501 | 2505 | </dt> |
2502 | 2506 | <dd></dd> |
4645 | 4649 | </dt> |
4646 | 4650 | <dd></dd> |
4647 | 4651 | <dt> |
4652 | <a class="link" href="GstPad.html#GST-PAD-IS-LINKED:CAPS" title="GST_PAD_IS_LINKED()">GST_PAD_IS_LINKED</a>, macro in <a class="link" href="GstPad.html" title="GstPad">GstPad</a> | |
4653 | </dt> | |
4654 | <dd></dd> | |
4655 | <dt> | |
4648 | 4656 | <a class="link" href="GstPad.html#gst-pad-is-linked" title="gst_pad_is_linked ()">gst_pad_is_linked</a>, function in <a class="link" href="GstPad.html" title="GstPad">GstPad</a> |
4649 | 4657 | </dt> |
4650 | 4658 | <dd></dd> |
4651 | 4659 | <dt> |
4652 | <a class="link" href="GstPad.html#GST-PAD-IS-LINKED:CAPS" title="GST_PAD_IS_LINKED()">GST_PAD_IS_LINKED</a>, macro in <a class="link" href="GstPad.html" title="GstPad">GstPad</a> | |
4653 | </dt> | |
4654 | <dd></dd> | |
4655 | <dt> | |
4656 | 4660 | <a class="link" href="GstPad.html#GST-PAD-IS-PROXY-ALLOCATION:CAPS" title="GST_PAD_IS_PROXY_ALLOCATION()">GST_PAD_IS_PROXY_ALLOCATION</a>, macro in <a class="link" href="GstPad.html" title="GstPad">GstPad</a> |
4657 | 4661 | </dt> |
4658 | 4662 | <dd></dd> |
4729 | 4733 | </dt> |
4730 | 4734 | <dd></dd> |
4731 | 4735 | <dt> |
4736 | <a class="link" href="GstPad.html#gst-pad-needs-reconfigure" title="gst_pad_needs_reconfigure ()">gst_pad_needs_reconfigure</a>, function in <a class="link" href="GstPad.html" title="GstPad">GstPad</a> | |
4737 | </dt> | |
4738 | <dd></dd> | |
4739 | <dt> | |
4732 | 4740 | <a class="link" href="GstPad.html#GST-PAD-NEEDS-RECONFIGURE:CAPS" title="GST_PAD_NEEDS_RECONFIGURE()">GST_PAD_NEEDS_RECONFIGURE</a>, macro in <a class="link" href="GstPad.html" title="GstPad">GstPad</a> |
4733 | </dt> | |
4734 | <dd></dd> | |
4735 | <dt> | |
4736 | <a class="link" href="GstPad.html#gst-pad-needs-reconfigure" title="gst_pad_needs_reconfigure ()">gst_pad_needs_reconfigure</a>, function in <a class="link" href="GstPad.html" title="GstPad">GstPad</a> | |
4737 | 4741 | </dt> |
4738 | 4742 | <dd></dd> |
4739 | 4743 | <dt> |
104 | 104 | <keyword type="struct" name="GstAllocator" link="GstAllocator.html#GstAllocator-struct"/> |
105 | 105 | <keyword type="struct" name="struct GstAllocatorClass" link="GstAllocator.html#GstAllocatorClass"/> |
106 | 106 | <keyword type="enum" name="enum GstAllocatorFlags" link="GstAllocator.html#GstAllocatorFlags"/> |
107 | <keyword type="struct" name="struct GstAllocationParams" link="GstAllocator.html#GstAllocationParams"/> | |
107 | <keyword type="struct" name="struct GstAllocationParams" link="GstAllocator.html#GstAllocationParams-struct"/> | |
108 | 108 | <keyword type="macro" name="GST_ALLOCATOR_SYSMEM" link="GstAllocator.html#GST-ALLOCATOR-SYSMEM:CAPS"/> |
109 | 109 | <keyword type="function" name="gst_atomic_queue_new ()" link="gstreamer-GstAtomicQueue.html#gst-atomic-queue-new"/> |
110 | 110 | <keyword type="function" name="gst_atomic_queue_ref ()" link="gstreamer-GstAtomicQueue.html#gst-atomic-queue-ref"/> |
235 | 235 | <keyword type="function" name="gst_buffer_pool_new ()" link="GstBufferPool.html#gst-buffer-pool-new"/> |
236 | 236 | <keyword type="function" name="gst_buffer_pool_config_get_params ()" link="GstBufferPool.html#gst-buffer-pool-config-get-params"/> |
237 | 237 | <keyword type="function" name="gst_buffer_pool_config_set_params ()" link="GstBufferPool.html#gst-buffer-pool-config-set-params"/> |
238 | <keyword type="function" name="gst_buffer_pool_config_validate_params ()" link="GstBufferPool.html#gst-buffer-pool-config-validate-params" since="1.4"/> | |
238 | 239 | <keyword type="function" name="gst_buffer_pool_config_get_allocator ()" link="GstBufferPool.html#gst-buffer-pool-config-get-allocator"/> |
239 | 240 | <keyword type="function" name="gst_buffer_pool_config_set_allocator ()" link="GstBufferPool.html#gst-buffer-pool-config-set-allocator"/> |
240 | 241 | <keyword type="function" name="gst_buffer_pool_config_n_options ()" link="GstBufferPool.html#gst-buffer-pool-config-n-options"/> |
103 | 103 | <hr> |
104 | 104 | <div class="refsect2"> |
105 | 105 | <a name="GST-VERSION-MICRO:CAPS"></a><h3>GST_VERSION_MICRO</h3> |
106 | <pre class="programlisting">#define GST_VERSION_MICRO (1) | |
106 | <pre class="programlisting">#define GST_VERSION_MICRO (2) | |
107 | 107 | </pre> |
108 | 108 | <p>The micro version of GStreamer at compile time:</p> |
109 | 109 | </div> |
65 | 65 | <span class="lineart">├──</span> <a class="link" href="GstSegment.html" title="GstSegment">GstSegment</a> |
66 | 66 | <span class="lineart">├──</span> <a class="link" href="GstTagList.html" title="GstTagList">GstTagList</a> |
67 | 67 | <span class="lineart">├──</span> <a class="link" href="GstDateTime.html" title="GstDateTime">GstDateTime</a> |
68 | <span class="lineart">├──</span> <a class="link" href="GstAllocator.html#GstAllocationParams">GstAllocationParams</a> | |
68 | 69 | <span class="lineart">├──</span> <a class="link" href="GstContext.html" title="GstContext">GstContext</a> |
69 | 70 | <span class="lineart">├──</span> <a class="link" href="gstreamer-GstParse.html#GstParseContext">GstParseContext</a> |
70 | 71 | <span class="lineart">├──</span> <a class="link" href="GstMemory.html" title="GstMemory">GstMemory</a> |
14 | 14 | <div> |
15 | 15 | <div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">GStreamer 1.0 Core Reference Manual</p></th></tr></table></div> |
16 | 16 | <div><p class="releaseinfo"> |
17 | for GStreamer Core 1.0 (1.3.1) | |
17 | for GStreamer Core 1.0 (1.3.2) | |
18 | 18 | The latest version of this documentation can be found on-line at |
19 | 19 | <a class="ulink" href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/" target="_top">http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/</a>. |
20 | 20 | </p></div> |
21 | 21 | <ANCHOR id="gstreamer-Gst.other_details" href="gstreamer-1.0/gstreamer-Gst.html#gstreamer-Gst.other_details"> |
22 | 22 | <ANCHOR id="GstAllocator" href="gstreamer-1.0/GstAllocator.html"> |
23 | 23 | <ANCHOR id="GstAllocator.functions" href="gstreamer-1.0/GstAllocator.html#GstAllocator.functions"> |
24 | <ANCHOR id="GstAllocationParams" href="gstreamer-1.0/GstAllocator.html#GstAllocationParams"> | |
24 | 25 | <ANCHOR id="GstAllocator.other" href="gstreamer-1.0/GstAllocator.html#GstAllocator.other"> |
25 | 26 | <ANCHOR id="GstAllocator.object-hierarchy" href="gstreamer-1.0/GstAllocator.html#GstAllocator.object-hierarchy"> |
26 | 27 | <ANCHOR id="GstAllocator.includes" href="gstreamer-1.0/GstAllocator.html#GstAllocator.includes"> |
40 | 41 | <ANCHOR id="GstAllocator-struct" href="gstreamer-1.0/GstAllocator.html#GstAllocator-struct"> |
41 | 42 | <ANCHOR id="GstAllocatorClass" href="gstreamer-1.0/GstAllocator.html#GstAllocatorClass"> |
42 | 43 | <ANCHOR id="GstAllocatorFlags" href="gstreamer-1.0/GstAllocator.html#GstAllocatorFlags"> |
43 | <ANCHOR id="GstAllocationParams" href="gstreamer-1.0/GstAllocator.html#GstAllocationParams"> | |
44 | <ANCHOR id="GstAllocationParams-struct" href="gstreamer-1.0/GstAllocator.html#GstAllocationParams-struct"> | |
44 | 45 | <ANCHOR id="GST-ALLOCATOR-SYSMEM:CAPS" href="gstreamer-1.0/GstAllocator.html#GST-ALLOCATOR-SYSMEM:CAPS"> |
45 | 46 | <ANCHOR id="GstAllocator.see-also" href="gstreamer-1.0/GstAllocator.html#GstAllocator.see-also"> |
46 | 47 | <ANCHOR id="gstreamer-GstAtomicQueue" href="gstreamer-1.0/gstreamer-GstAtomicQueue.html"> |
217 | 218 | <ANCHOR id="gst-buffer-pool-new" href="gstreamer-1.0/GstBufferPool.html#gst-buffer-pool-new"> |
218 | 219 | <ANCHOR id="gst-buffer-pool-config-get-params" href="gstreamer-1.0/GstBufferPool.html#gst-buffer-pool-config-get-params"> |
219 | 220 | <ANCHOR id="gst-buffer-pool-config-set-params" href="gstreamer-1.0/GstBufferPool.html#gst-buffer-pool-config-set-params"> |
221 | <ANCHOR id="gst-buffer-pool-config-validate-params" href="gstreamer-1.0/GstBufferPool.html#gst-buffer-pool-config-validate-params"> | |
220 | 222 | <ANCHOR id="gst-buffer-pool-config-get-allocator" href="gstreamer-1.0/GstBufferPool.html#gst-buffer-pool-config-get-allocator"> |
221 | 223 | <ANCHOR id="gst-buffer-pool-config-set-allocator" href="gstreamer-1.0/GstBufferPool.html#gst-buffer-pool-config-set-allocator"> |
222 | 224 | <ANCHOR id="gst-buffer-pool-config-n-options" href="gstreamer-1.0/GstBufferPool.html#gst-buffer-pool-config-n-options"> |
763 | 763 | <TITLE>GstPushSrc</TITLE> |
764 | 764 | <INCLUDE>gst/base/gstpushsrc.h</INCLUDE> |
765 | 765 | GstPushSrc |
766 | <SUBSECTION Standard> | |
767 | 766 | GstPushSrcClass |
767 | <SUBSECTION Standard> | |
768 | 768 | GST_PUSH_SRC |
769 | 769 | GST_IS_PUSH_SRC |
770 | 770 | GST_TYPE_PUSH_SRC |
2 | 2 | % base classes |
3 | 3 | |
4 | 4 | #include <gst/base/gstadapter.h> |
5 | #include <gst/base/gstbaseparse.h> | |
5 | 6 | #include <gst/base/gstbasesrc.h> |
6 | 7 | #include <gst/base/gstbasesink.h> |
7 | 8 | #include <gst/base/gstbasetransform.h> |
9 | 10 | #include <gst/base/gstpushsrc.h> |
10 | 11 | |
11 | 12 | gst_adapter_get_type |
13 | gst_base_parse_get_type | |
12 | 14 | gst_base_src_get_type |
13 | 15 | gst_base_sink_get_type |
14 | 16 | gst_base_transform_get_type |
0 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
1 | <html> | |
2 | <head> | |
3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
4 | <title>GStreamer 1.0 Library Reference Manual: GstBaseParse</title> | |
5 | <meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> | |
6 | <link rel="home" href="index.html" title="GStreamer 1.0 Library Reference Manual"> | |
7 | <link rel="up" href="gstreamer-base.html" title="GStreamer Base and Utillity Classes"> | |
8 | <link rel="prev" href="gstreamer-base.html" title="GStreamer Base and Utillity Classes"> | |
9 | <link rel="next" href="GstBaseSrc.html" title="GstBaseSrc"> | |
10 | <meta name="generator" content="GTK-Doc V1.20 (XML mode)"> | |
11 | <link rel="stylesheet" href="style.css" type="text/css"> | |
12 | </head> | |
13 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> | |
14 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle"> | |
15 | <td width="100%" align="left" class="shortcuts"> | |
16 | <a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> | |
17 | <a href="#GstBaseParse.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> | |
18 | <a href="#GstBaseParse.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties"> <span class="dim">|</span> | |
19 | <a href="#GstBaseParse.properties" class="shortcut">Properties</a></span> | |
20 | </td> | |
21 | <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> | |
22 | <td><a accesskey="u" href="gstreamer-base.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> | |
23 | <td><a accesskey="p" href="gstreamer-base.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> | |
24 | <td><a accesskey="n" href="GstBaseSrc.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> | |
25 | </tr></table> | |
26 | <div class="refentry"> | |
27 | <a name="GstBaseParse"></a><div class="titlepage"></div> | |
28 | <div class="refnamediv"><table width="100%"><tr> | |
29 | <td valign="top"> | |
30 | <h2><span class="refentrytitle"><a name="GstBaseParse.top_of_page"></a>GstBaseParse</span></h2> | |
31 | <p>GstBaseParse — Base class for stream parsers</p> | |
32 | </td> | |
33 | <td class="gallery_image" valign="top" align="right"></td> | |
34 | </tr></table></div> | |
35 | <div class="refsect1"> | |
36 | <a name="GstBaseParse.functions"></a><h2>Functions</h2> | |
37 | <div class="informaltable"><table width="100%" border="0"> | |
38 | <colgroup> | |
39 | <col width="150px" class="functions_return"> | |
40 | <col class="functions_name"> | |
41 | </colgroup> | |
42 | <tbody> | |
43 | <tr> | |
44 | <td class="function_type"> | |
45 | <span class="returnvalue">void</span> | |
46 | </td> | |
47 | <td class="function_name"> | |
48 | <a class="link" href="GstBaseParse.html#gst-base-parse-set-duration" title="gst_base_parse_set_duration ()">gst_base_parse_set_duration</a> <span class="c_punctuation">()</span> | |
49 | </td> | |
50 | </tr> | |
51 | <tr> | |
52 | <td class="function_type"> | |
53 | <span class="returnvalue">void</span> | |
54 | </td> | |
55 | <td class="function_name"> | |
56 | <a class="link" href="GstBaseParse.html#gst-base-parse-set-average-bitrate" title="gst_base_parse_set_average_bitrate ()">gst_base_parse_set_average_bitrate</a> <span class="c_punctuation">()</span> | |
57 | </td> | |
58 | </tr> | |
59 | <tr> | |
60 | <td class="function_type"> | |
61 | <span class="returnvalue">void</span> | |
62 | </td> | |
63 | <td class="function_name"> | |
64 | <a class="link" href="GstBaseParse.html#gst-base-parse-set-min-frame-size" title="gst_base_parse_set_min_frame_size ()">gst_base_parse_set_min_frame_size</a> <span class="c_punctuation">()</span> | |
65 | </td> | |
66 | </tr> | |
67 | <tr> | |
68 | <td class="function_type"> | |
69 | <span class="returnvalue">void</span> | |
70 | </td> | |
71 | <td class="function_name"> | |
72 | <a class="link" href="GstBaseParse.html#gst-base-parse-set-passthrough" title="gst_base_parse_set_passthrough ()">gst_base_parse_set_passthrough</a> <span class="c_punctuation">()</span> | |
73 | </td> | |
74 | </tr> | |
75 | <tr> | |
76 | <td class="function_type"> | |
77 | <span class="returnvalue">void</span> | |
78 | </td> | |
79 | <td class="function_name"> | |
80 | <a class="link" href="GstBaseParse.html#gst-base-parse-set-syncable" title="gst_base_parse_set_syncable ()">gst_base_parse_set_syncable</a> <span class="c_punctuation">()</span> | |
81 | </td> | |
82 | </tr> | |
83 | <tr> | |
84 | <td class="function_type"> | |
85 | <span class="returnvalue">void</span> | |
86 | </td> | |
87 | <td class="function_name"> | |
88 | <a class="link" href="GstBaseParse.html#gst-base-parse-set-has-timing-info" title="gst_base_parse_set_has_timing_info ()">gst_base_parse_set_has_timing_info</a> <span class="c_punctuation">()</span> | |
89 | </td> | |
90 | </tr> | |
91 | <tr> | |
92 | <td class="function_type"> | |
93 | <span class="returnvalue">void</span> | |
94 | </td> | |
95 | <td class="function_name"> | |
96 | <a class="link" href="GstBaseParse.html#gst-base-parse-set-frame-rate" title="gst_base_parse_set_frame_rate ()">gst_base_parse_set_frame_rate</a> <span class="c_punctuation">()</span> | |
97 | </td> | |
98 | </tr> | |
99 | <tr> | |
100 | <td class="function_type"> | |
101 | <span class="returnvalue">void</span> | |
102 | </td> | |
103 | <td class="function_name"> | |
104 | <a class="link" href="GstBaseParse.html#gst-base-parse-set-latency" title="gst_base_parse_set_latency ()">gst_base_parse_set_latency</a> <span class="c_punctuation">()</span> | |
105 | </td> | |
106 | </tr> | |
107 | <tr> | |
108 | <td class="function_type"> | |
109 | <span class="returnvalue">void</span> | |
110 | </td> | |
111 | <td class="function_name"> | |
112 | <a class="link" href="GstBaseParse.html#gst-base-parse-set-infer-ts" title="gst_base_parse_set_infer_ts ()">gst_base_parse_set_infer_ts</a> <span class="c_punctuation">()</span> | |
113 | </td> | |
114 | </tr> | |
115 | <tr> | |
116 | <td class="function_type"> | |
117 | <span class="returnvalue">void</span> | |
118 | </td> | |
119 | <td class="function_name"> | |
120 | <a class="link" href="GstBaseParse.html#gst-base-parse-set-pts-interpolation" title="gst_base_parse_set_pts_interpolation ()">gst_base_parse_set_pts_interpolation</a> <span class="c_punctuation">()</span> | |
121 | </td> | |
122 | </tr> | |
123 | <tr> | |
124 | <td class="function_type"> | |
125 | <span class="returnvalue">void</span> | |
126 | </td> | |
127 | <td class="function_name"> | |
128 | <a class="link" href="GstBaseParse.html#gst-base-parse-set-ts-at-offset" title="gst_base_parse_set_ts_at_offset ()">gst_base_parse_set_ts_at_offset</a> <span class="c_punctuation">()</span> | |
129 | </td> | |
130 | </tr> | |
131 | <tr> | |
132 | <td class="function_type"> | |
133 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> | |
134 | </td> | |
135 | <td class="function_name"> | |
136 | <a class="link" href="GstBaseParse.html#gst-base-parse-convert-default" title="gst_base_parse_convert_default ()">gst_base_parse_convert_default</a> <span class="c_punctuation">()</span> | |
137 | </td> | |
138 | </tr> | |
139 | <tr> | |
140 | <td class="function_type"> | |
141 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> | |
142 | </td> | |
143 | <td class="function_name"> | |
144 | <a class="link" href="GstBaseParse.html#gst-base-parse-add-index-entry" title="gst_base_parse_add_index_entry ()">gst_base_parse_add_index_entry</a> <span class="c_punctuation">()</span> | |
145 | </td> | |
146 | </tr> | |
147 | <tr> | |
148 | <td class="function_type"> | |
149 | <a class="link" href="GstBaseParse.html#GstBaseParseFrame" title="GstBaseParseFrame"><span class="returnvalue">GstBaseParseFrame</span></a> * | |
150 | </td> | |
151 | <td class="function_name"> | |
152 | <a class="link" href="GstBaseParse.html#gst-base-parse-frame-new" title="gst_base_parse_frame_new ()">gst_base_parse_frame_new</a> <span class="c_punctuation">()</span> | |
153 | </td> | |
154 | </tr> | |
155 | <tr> | |
156 | <td class="function_type"> | |
157 | <span class="returnvalue">void</span> | |
158 | </td> | |
159 | <td class="function_name"> | |
160 | <a class="link" href="GstBaseParse.html#gst-base-parse-frame-init" title="gst_base_parse_frame_init ()">gst_base_parse_frame_init</a> <span class="c_punctuation">()</span> | |
161 | </td> | |
162 | </tr> | |
163 | <tr> | |
164 | <td class="function_type"> | |
165 | <span class="returnvalue">void</span> | |
166 | </td> | |
167 | <td class="function_name"> | |
168 | <a class="link" href="GstBaseParse.html#gst-base-parse-frame-free" title="gst_base_parse_frame_free ()">gst_base_parse_frame_free</a> <span class="c_punctuation">()</span> | |
169 | </td> | |
170 | </tr> | |
171 | <tr> | |
172 | <td class="function_type"> | |
173 | <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> | |
174 | </td> | |
175 | <td class="function_name"> | |
176 | <a class="link" href="GstBaseParse.html#gst-base-parse-push-frame" title="gst_base_parse_push_frame ()">gst_base_parse_push_frame</a> <span class="c_punctuation">()</span> | |
177 | </td> | |
178 | </tr> | |
179 | <tr> | |
180 | <td class="function_type"> | |
181 | <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> | |
182 | </td> | |
183 | <td class="function_name"> | |
184 | <a class="link" href="GstBaseParse.html#gst-base-parse-finish-frame" title="gst_base_parse_finish_frame ()">gst_base_parse_finish_frame</a> <span class="c_punctuation">()</span> | |
185 | </td> | |
186 | </tr> | |
187 | <tr> | |
188 | <td class="define_keyword">#define</td> | |
189 | <td class="function_name"> | |
190 | <a class="link" href="GstBaseParse.html#GST-BASE-PARSE-DRAINING:CAPS" title="GST_BASE_PARSE_DRAINING()">GST_BASE_PARSE_DRAINING</a><span class="c_punctuation">()</span> | |
191 | </td> | |
192 | </tr> | |
193 | <tr> | |
194 | <td class="define_keyword">#define</td> | |
195 | <td class="function_name"><a class="link" href="GstBaseParse.html#GST-BASE-PARSE-FLAG-DRAINING:CAPS" title="GST_BASE_PARSE_FLAG_DRAINING">GST_BASE_PARSE_FLAG_DRAINING</a></td> | |
196 | </tr> | |
197 | <tr> | |
198 | <td class="define_keyword">#define</td> | |
199 | <td class="function_name"><a class="link" href="GstBaseParse.html#GST-BASE-PARSE-FLAG-LOST-SYNC:CAPS" title="GST_BASE_PARSE_FLAG_LOST_SYNC">GST_BASE_PARSE_FLAG_LOST_SYNC</a></td> | |
200 | </tr> | |
201 | <tr> | |
202 | <td class="define_keyword">#define</td> | |
203 | <td class="function_name"> | |
204 | <a class="link" href="GstBaseParse.html#GST-BASE-PARSE-LOST-SYNC:CAPS" title="GST_BASE_PARSE_LOST_SYNC()">GST_BASE_PARSE_LOST_SYNC</a><span class="c_punctuation">()</span> | |
205 | </td> | |
206 | </tr> | |
207 | <tr> | |
208 | <td class="define_keyword">#define</td> | |
209 | <td class="function_name"> | |
210 | <a class="link" href="GstBaseParse.html#GST-BASE-PARSE-SINK-PAD:CAPS" title="GST_BASE_PARSE_SINK_PAD()">GST_BASE_PARSE_SINK_PAD</a><span class="c_punctuation">()</span> | |
211 | </td> | |
212 | </tr> | |
213 | <tr> | |
214 | <td class="define_keyword">#define</td> | |
215 | <td class="function_name"> | |
216 | <a class="link" href="GstBaseParse.html#GST-BASE-PARSE-SRC-PAD:CAPS" title="GST_BASE_PARSE_SRC_PAD()">GST_BASE_PARSE_SRC_PAD</a><span class="c_punctuation">()</span> | |
217 | </td> | |
218 | </tr> | |
219 | </tbody> | |
220 | </table></div> | |
221 | </div> | |
222 | <div class="refsect1"> | |
223 | <a name="GstBaseParse.properties"></a><h2>Properties</h2> | |
224 | <div class="informaltable"><table border="0"> | |
225 | <colgroup> | |
226 | <col width="150px" class="properties_type"> | |
227 | <col width="300px" class="properties_name"> | |
228 | <col width="200px" class="properties_flags"> | |
229 | </colgroup> | |
230 | <tbody><tr> | |
231 | <td class="property_type"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td> | |
232 | <td class="property_name"><a class="link" href="GstBaseParse.html#GstBaseParse--disable-passthrough" title="The “disable-passthrough” property">disable-passthrough</a></td> | |
233 | <td class="property_flags">Read / Write</td> | |
234 | </tr></tbody> | |
235 | </table></div> | |
236 | </div> | |
237 | <div class="refsect1"> | |
238 | <a name="GstBaseParse.other"></a><h2>Types and Values</h2> | |
239 | <div class="informaltable"><table width="100%" border="0"> | |
240 | <colgroup> | |
241 | <col width="150px" class="name"> | |
242 | <col class="description"> | |
243 | </colgroup> | |
244 | <tbody> | |
245 | <tr> | |
246 | <td class="datatype_keyword">struct</td> | |
247 | <td class="function_name"><a class="link" href="GstBaseParse.html#GstBaseParse-struct" title="struct GstBaseParse">GstBaseParse</a></td> | |
248 | </tr> | |
249 | <tr> | |
250 | <td class="datatype_keyword">struct</td> | |
251 | <td class="function_name"><a class="link" href="GstBaseParse.html#GstBaseParseClass" title="struct GstBaseParseClass">GstBaseParseClass</a></td> | |
252 | </tr> | |
253 | <tr> | |
254 | <td class="datatype_keyword"> </td> | |
255 | <td class="function_name"><a class="link" href="GstBaseParse.html#GstBaseParseFrame" title="GstBaseParseFrame">GstBaseParseFrame</a></td> | |
256 | </tr> | |
257 | <tr> | |
258 | <td class="datatype_keyword">enum</td> | |
259 | <td class="function_name"><a class="link" href="GstBaseParse.html#GstBaseParseFrameFlags" title="enum GstBaseParseFrameFlags">GstBaseParseFrameFlags</a></td> | |
260 | </tr> | |
261 | <tr> | |
262 | <td class="define_keyword">#define</td> | |
263 | <td class="function_name"><a class="link" href="GstBaseParse.html#GST-BASE-PARSE-FLOW-DROPPED:CAPS" title="GST_BASE_PARSE_FLOW_DROPPED">GST_BASE_PARSE_FLOW_DROPPED</a></td> | |
264 | </tr> | |
265 | </tbody> | |
266 | </table></div> | |
267 | </div> | |
268 | <div class="refsect1"> | |
269 | <a name="GstBaseParse.object-hierarchy"></a><h2>Object Hierarchy</h2> | |
270 | <pre class="screen"> <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a> | |
271 | <span class="lineart">╰──</span> <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a> | |
272 | <span class="lineart">╰──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstObject.html">GstObject</a> | |
273 | <span class="lineart">╰──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html">GstElement</a> | |
274 | <span class="lineart">╰──</span> GstBaseParse | |
275 | </pre> | |
276 | </div> | |
277 | <div class="refsect1"> | |
278 | <a name="GstBaseParse.includes"></a><h2>Includes</h2> | |
279 | <pre class="synopsis">#include <gst/base/gstbaseparse.h> | |
280 | </pre> | |
281 | </div> | |
282 | <div class="refsect1"> | |
283 | <a name="GstBaseParse.description"></a><h2>Description</h2> | |
284 | <p>This base class is for parser elements that process data and splits it | |
285 | into separate audio/video/whatever frames.</p> | |
286 | <p>It provides for:</p> | |
287 | <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> | |
288 | <li class="listitem"><p>provides one sink pad and one source pad</p></li> | |
289 | <li class="listitem"><p>handles state changes</p></li> | |
290 | <li class="listitem"><p>can operate in pull mode or push mode</p></li> | |
291 | <li class="listitem"><p>handles seeking in both modes</p></li> | |
292 | <li class="listitem"><p>handles events (SEGMENT/EOS/FLUSH)</p></li> | |
293 | <li class="listitem"><p> | |
294 | handles queries (POSITION/DURATION/SEEKING/FORMAT/CONVERT) | |
295 | </p></li> | |
296 | <li class="listitem"><p>handles flushing</p></li> | |
297 | </ul></div> | |
298 | <p>The purpose of this base class is to provide the basic functionality of | |
299 | a parser and share a lot of rather complex code.</p> | |
300 | <p>Description of the parsing mechanism:</p> | |
301 | <div class="orderedlist"><ol class="orderedlist" type="1"> | |
302 | <li class="listitem"><div class="itemizedlist"> | |
303 | <p class="title"><b>Set-up phase</b></p> | |
304 | <ul class="itemizedlist" style="list-style-type: disc; "> | |
305 | <li class="listitem"><p> | |
306 | GstBaseParse calls <em class="parameter"><code>start</code></em> to inform subclass that data processing is | |
307 | about to start now. | |
308 | </p></li> | |
309 | <li class="listitem"><p> | |
310 | GstBaseParse class calls <em class="parameter"><code>set_sink_caps</code></em> to inform the subclass about | |
311 | incoming sinkpad caps. Subclass could already set the srcpad caps | |
312 | accordingly, but this might be delayed until calling | |
313 | <a class="link" href="GstBaseParse.html#gst-base-parse-finish-frame" title="gst_base_parse_finish_frame ()"><code class="function">gst_base_parse_finish_frame()</code></a> with a non-queued frame. | |
314 | </p></li> | |
315 | <li class="listitem"><p> | |
316 | At least at this point subclass needs to tell the GstBaseParse class | |
317 | how big data chunks it wants to receive (min_frame_size). It can do | |
318 | this with <a class="link" href="GstBaseParse.html#gst-base-parse-set-min-frame-size" title="gst_base_parse_set_min_frame_size ()"><code class="function">gst_base_parse_set_min_frame_size()</code></a>. | |
319 | </p></li> | |
320 | <li class="listitem"><p> | |
321 | GstBaseParse class sets up appropriate data passing mode (pull/push) | |
322 | and starts to process the data. | |
323 | </p></li> | |
324 | </ul> | |
325 | </div></li> | |
326 | <li class="listitem"><div class="itemizedlist"> | |
327 | <p class="title"><b>Parsing phase</b></p> | |
328 | <ul class="itemizedlist" style="list-style-type: disc; "> | |
329 | <li class="listitem"><p> | |
330 | GstBaseParse gathers at least min_frame_size bytes of data either | |
331 | by pulling it from upstream or collecting buffers in an internal | |
332 | <a class="link" href="GstAdapter.html" title="GstAdapter"><span class="type">GstAdapter</span></a>. | |
333 | </p></li> | |
334 | <li class="listitem"> | |
335 | <p> | |
336 | A buffer of (at least) min_frame_size bytes is passed to subclass with | |
337 | <em class="parameter"><code>handle_frame</code></em>. Subclass checks the contents and can optionally | |
338 | return GST_FLOW_OK along with an amount of data to be skipped to find | |
339 | a valid frame (which will result in a subsequent DISCONT). | |
340 | If, otherwise, the buffer does not hold a complete frame, | |
341 | <em class="parameter"><code>handle_frame</code></em> can merely return and will be called again when additional | |
342 | data is available. In push mode this amounts to an | |
343 | additional input buffer (thus minimal additional latency), in pull mode | |
344 | this amounts to some arbitrary reasonable buffer size increase. | |
345 | Of course, <a class="link" href="GstBaseParse.html#gst-base-parse-set-min-frame-size" title="gst_base_parse_set_min_frame_size ()"><code class="function">gst_base_parse_set_min_frame_size()</code></a> could also be used if a | |
346 | very specific known amount of additional data is required. | |
347 | If, however, the buffer holds a complete valid frame, it can pass | |
348 | the size of this frame to <a class="link" href="GstBaseParse.html#gst-base-parse-finish-frame" title="gst_base_parse_finish_frame ()"><code class="function">gst_base_parse_finish_frame()</code></a>. | |
349 | If acting as a converter, it can also merely indicate consumed input data | |
350 | while simultaneously providing custom output data. | |
351 | Note that baseclass performs some processing (such as tracking | |
352 | overall consumed data rate versus duration) for each finished frame, | |
353 | but other state is only updated upon each call to <em class="parameter"><code>handle_frame</code></em> | |
354 | (such as tracking upstream input timestamp). | |
355 | </p> | |
356 | <p> | |
357 | Subclass is also responsible for setting the buffer metadata | |
358 | (e.g. buffer timestamp and duration, or keyframe if applicable). | |
359 | (although the latter can also be done by GstBaseParse if it is | |
360 | appropriately configured, see below). Frame is provided with | |
361 | timestamp derived from upstream (as much as generally possible), | |
362 | duration obtained from configuration (see below), and offset | |
363 | if meaningful (in pull mode). | |
364 | </p> | |
365 | <p> | |
366 | Note that <em class="parameter"><code>check_valid_frame</code></em> might receive any small | |
367 | amount of input data when leftover data is being drained (e.g. at EOS). | |
368 | </p> | |
369 | </li> | |
370 | <li class="listitem"><p> | |
371 | As part of finish frame processing, | |
372 | just prior to actually pushing the buffer in question, | |
373 | it is passed to <em class="parameter"><code>pre_push_frame</code></em> which gives subclass yet one | |
374 | last chance to examine buffer metadata, or to send some custom (tag) | |
375 | events, or to perform custom (segment) filtering. | |
376 | </p></li> | |
377 | <li class="listitem"><p> | |
378 | During the parsing process GstBaseParseClass will handle both srcpad | |
379 | and sinkpad events. They will be passed to subclass if <em class="parameter"><code>event</code></em> or | |
380 | <em class="parameter"><code>src_event</code></em> callbacks have been provided. | |
381 | </p></li> | |
382 | </ul> | |
383 | </div></li> | |
384 | <li class="listitem"><div class="itemizedlist"> | |
385 | <p class="title"><b>Shutdown phase</b></p> | |
386 | <ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p> | |
387 | GstBaseParse class calls <em class="parameter"><code>stop</code></em> to inform the subclass that data | |
388 | parsing will be stopped. | |
389 | </p></li></ul> | |
390 | </div></li> | |
391 | </ol></div> | |
392 | <p>Subclass is responsible for providing pad template caps for | |
393 | source and sink pads. The pads need to be named "sink" and "src". It also | |
394 | needs to set the fixed caps on srcpad, when the format is ensured (e.g. | |
395 | when base class calls subclass' <em class="parameter"><code>set_sink_caps</code></em> | |
396 | function).</p> | |
397 | <p>This base class uses <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstFormat.html#GST-FORMAT-DEFAULT:CAPS"><span class="type">GST_FORMAT_DEFAULT</span></a> as a meaning of frames. So, | |
398 | subclass conversion routine needs to know that conversion from | |
399 | <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstFormat.html#GST-FORMAT-TIME:CAPS"><span class="type">GST_FORMAT_TIME</span></a> to <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstFormat.html#GST-FORMAT-DEFAULT:CAPS"><span class="type">GST_FORMAT_DEFAULT</span></a> must return the | |
400 | frame number that can be found from the given byte position.</p> | |
401 | <p>GstBaseParse uses subclasses conversion methods also for seeking (or | |
402 | otherwise uses its own default one, see also below).</p> | |
403 | <p>Subclass <em class="parameter"><code>start</code></em> | |
404 | and <em class="parameter"><code>stop</code></em> | |
405 | functions will be called to inform the beginning | |
406 | and end of data processing.</p> | |
407 | <p>Things that subclass need to take care of:</p> | |
408 | <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> | |
409 | <li class="listitem"><p>Provide pad templates</p></li> | |
410 | <li class="listitem"><p> | |
411 | Fixate the source pad caps when appropriate | |
412 | </p></li> | |
413 | <li class="listitem"><p> | |
414 | Inform base class how big data chunks should be retrieved. This is | |
415 | done with <a class="link" href="GstBaseParse.html#gst-base-parse-set-min-frame-size" title="gst_base_parse_set_min_frame_size ()"><code class="function">gst_base_parse_set_min_frame_size()</code></a> function. | |
416 | </p></li> | |
417 | <li class="listitem"><p> | |
418 | Examine data chunks passed to subclass with <em class="parameter"><code>handle_frame</code></em> and pass | |
419 | proper frame(s) to <a class="link" href="GstBaseParse.html#gst-base-parse-finish-frame" title="gst_base_parse_finish_frame ()"><code class="function">gst_base_parse_finish_frame()</code></a>, and setting src pad | |
420 | caps and timestamps on frame. | |
421 | </p></li> | |
422 | <li class="listitem"><p>Provide conversion functions</p></li> | |
423 | <li class="listitem"><p> | |
424 | Update the duration information with <a class="link" href="GstBaseParse.html#gst-base-parse-set-duration" title="gst_base_parse_set_duration ()"><code class="function">gst_base_parse_set_duration()</code></a> | |
425 | </p></li> | |
426 | <li class="listitem"><p> | |
427 | Optionally passthrough using <a class="link" href="GstBaseParse.html#gst-base-parse-set-passthrough" title="gst_base_parse_set_passthrough ()"><code class="function">gst_base_parse_set_passthrough()</code></a> | |
428 | </p></li> | |
429 | <li class="listitem"><p> | |
430 | Configure various baseparse parameters using | |
431 | <a class="link" href="GstBaseParse.html#gst-base-parse-set-average-bitrate" title="gst_base_parse_set_average_bitrate ()"><code class="function">gst_base_parse_set_average_bitrate()</code></a>, <a class="link" href="GstBaseParse.html#gst-base-parse-set-syncable" title="gst_base_parse_set_syncable ()"><code class="function">gst_base_parse_set_syncable()</code></a> | |
432 | and <a class="link" href="GstBaseParse.html#gst-base-parse-set-frame-rate" title="gst_base_parse_set_frame_rate ()"><code class="function">gst_base_parse_set_frame_rate()</code></a>. | |
433 | </p></li> | |
434 | <li class="listitem"><p> | |
435 | In particular, if subclass is unable to determine a duration, but | |
436 | parsing (or specs) yields a frames per seconds rate, then this can be | |
437 | provided to GstBaseParse to enable it to cater for | |
438 | buffer time metadata (which will be taken from upstream as much as | |
439 | possible). Internally keeping track of frame durations and respective | |
440 | sizes that have been pushed provides GstBaseParse with an estimated | |
441 | bitrate. A default <em class="parameter"><code>convert</code></em> (used if not overridden) will then use these | |
442 | rates to perform obvious conversions. These rates are also used to | |
443 | update (estimated) duration at regular frame intervals. | |
444 | </p></li> | |
445 | </ul></div> | |
446 | </div> | |
447 | <div class="refsect1"> | |
448 | <a name="GstBaseParse.functions_details"></a><h2>Functions</h2> | |
449 | <div class="refsect2"> | |
450 | <a name="gst-base-parse-set-duration"></a><h3>gst_base_parse_set_duration ()</h3> | |
451 | <pre class="programlisting"><span class="returnvalue">void</span> | |
452 | gst_base_parse_set_duration (<em class="parameter"><code><a class="link" href="GstBaseParse.html" title="GstBaseParse"><span class="type">GstBaseParse</span></a> *parse</code></em>, | |
453 | <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstFormat.html#GstFormat"><span class="type">GstFormat</span></a> fmt</code></em>, | |
454 | <em class="parameter"><code><span class="type">gint64</span> duration</code></em>, | |
455 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> interval</code></em>);</pre> | |
456 | <p>Sets the duration of the currently playing media. Subclass can use this | |
457 | when it is able to determine duration and/or notices a change in the media | |
458 | duration. Alternatively, if <em class="parameter"><code>interval</code></em> | |
459 | is non-zero (default), then stream | |
460 | duration is determined based on estimated bitrate, and updated every <em class="parameter"><code>interval</code></em> | |
461 | ||
462 | frames.</p> | |
463 | <div class="refsect3"> | |
464 | <a name="id-1.2.4.3.9.2.5"></a><h4>Parameters</h4> | |
465 | <div class="informaltable"><table width="100%" border="0"> | |
466 | <colgroup> | |
467 | <col width="150px" class="parameters_name"> | |
468 | <col class="parameters_description"> | |
469 | <col width="200px" class="parameters_annotations"> | |
470 | </colgroup> | |
471 | <tbody> | |
472 | <tr> | |
473 | <td class="parameter_name"><p>parse</p></td> | |
474 | <td class="parameter_description"><p><a class="link" href="GstBaseParse.html" title="GstBaseParse"><span class="type">GstBaseParse</span></a>.</p></td> | |
475 | <td class="parameter_annotations"> </td> | |
476 | </tr> | |
477 | <tr> | |
478 | <td class="parameter_name"><p>fmt</p></td> | |
479 | <td class="parameter_description"><p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstFormat.html#GstFormat"><span class="type">GstFormat</span></a>.</p></td> | |
480 | <td class="parameter_annotations"> </td> | |
481 | </tr> | |
482 | <tr> | |
483 | <td class="parameter_name"><p>duration</p></td> | |
484 | <td class="parameter_description"><p>duration value.</p></td> | |
485 | <td class="parameter_annotations"> </td> | |
486 | </tr> | |
487 | <tr> | |
488 | <td class="parameter_name"><p>interval</p></td> | |
489 | <td class="parameter_description"><p>how often to update the duration estimate based on bitrate, or 0.</p></td> | |
490 | <td class="parameter_annotations"> </td> | |
491 | </tr> | |
492 | </tbody> | |
493 | </table></div> | |
494 | </div> | |
495 | </div> | |
496 | <hr> | |
497 | <div class="refsect2"> | |
498 | <a name="gst-base-parse-set-average-bitrate"></a><h3>gst_base_parse_set_average_bitrate ()</h3> | |
499 | <pre class="programlisting"><span class="returnvalue">void</span> | |
500 | gst_base_parse_set_average_bitrate (<em class="parameter"><code><a class="link" href="GstBaseParse.html" title="GstBaseParse"><span class="type">GstBaseParse</span></a> *parse</code></em>, | |
501 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> bitrate</code></em>);</pre> | |
502 | <p>Optionally sets the average bitrate detected in media (if non-zero), | |
503 | e.g. based on metadata, as it will be posted to the application.</p> | |
504 | <p>By default, announced average bitrate is estimated. The average bitrate | |
505 | is used to estimate the total duration of the stream and to estimate | |
506 | a seek position, if there's no index and the format is syncable | |
507 | (see <a class="link" href="GstBaseParse.html#gst-base-parse-set-syncable" title="gst_base_parse_set_syncable ()"><code class="function">gst_base_parse_set_syncable()</code></a>).</p> | |
508 | <div class="refsect3"> | |
509 | <a name="id-1.2.4.3.9.3.6"></a><h4>Parameters</h4> | |
510 | <div class="informaltable"><table width="100%" border="0"> | |
511 | <colgroup> | |
512 | <col width="150px" class="parameters_name"> | |
513 | <col class="parameters_description"> | |
514 | <col width="200px" class="parameters_annotations"> | |
515 | </colgroup> | |
516 | <tbody> | |
517 | <tr> | |
518 | <td class="parameter_name"><p>parse</p></td> | |
519 | <td class="parameter_description"><p><a class="link" href="GstBaseParse.html" title="GstBaseParse"><span class="type">GstBaseParse</span></a>.</p></td> | |
520 | <td class="parameter_annotations"> </td> | |
521 | </tr> | |
522 | <tr> | |
523 | <td class="parameter_name"><p>bitrate</p></td> | |
524 | <td class="parameter_description"><p>average bitrate in bits/second</p></td> | |
525 | <td class="parameter_annotations"> </td> | |
526 | </tr> | |
527 | </tbody> | |
528 | </table></div> | |
529 | </div> | |
530 | </div> | |
531 | <hr> | |
532 | <div class="refsect2"> | |
533 | <a name="gst-base-parse-set-min-frame-size"></a><h3>gst_base_parse_set_min_frame_size ()</h3> | |
534 | <pre class="programlisting"><span class="returnvalue">void</span> | |
535 | gst_base_parse_set_min_frame_size (<em class="parameter"><code><a class="link" href="GstBaseParse.html" title="GstBaseParse"><span class="type">GstBaseParse</span></a> *parse</code></em>, | |
536 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> min_size</code></em>);</pre> | |
537 | <p>Subclass can use this function to tell the base class that it needs to | |
538 | give at least <span class="type">min_size</span> buffers.</p> | |
539 | <div class="refsect3"> | |
540 | <a name="id-1.2.4.3.9.4.5"></a><h4>Parameters</h4> | |
541 | <div class="informaltable"><table width="100%" border="0"> | |
542 | <colgroup> | |
543 | <col width="150px" class="parameters_name"> | |
544 | <col class="parameters_description"> | |
545 | <col width="200px" class="parameters_annotations"> | |
546 | </colgroup> | |
547 | <tbody> | |
548 | <tr> | |
549 | <td class="parameter_name"><p>parse</p></td> | |
550 | <td class="parameter_description"><p><a class="link" href="GstBaseParse.html" title="GstBaseParse"><span class="type">GstBaseParse</span></a>.</p></td> | |
551 | <td class="parameter_annotations"> </td> | |
552 | </tr> | |
553 | <tr> | |
554 | <td class="parameter_name"><p>min_size</p></td> | |
555 | <td class="parameter_description"><p>Minimum size of the data that this base class should give to | |
556 | subclass.</p></td> | |
557 | <td class="parameter_annotations"> </td> | |
558 | </tr> | |
559 | </tbody> | |
560 | </table></div> | |
561 | </div> | |
562 | </div> | |
563 | <hr> | |
564 | <div class="refsect2"> | |
565 | <a name="gst-base-parse-set-passthrough"></a><h3>gst_base_parse_set_passthrough ()</h3> | |
566 | <pre class="programlisting"><span class="returnvalue">void</span> | |
567 | gst_base_parse_set_passthrough (<em class="parameter"><code><a class="link" href="GstBaseParse.html" title="GstBaseParse"><span class="type">GstBaseParse</span></a> *parse</code></em>, | |
568 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> passthrough</code></em>);</pre> | |
569 | <p>Set if the nature of the format or configuration does not allow (much) | |
570 | parsing, and the parser should operate in passthrough mode (which only | |
571 | applies when operating in push mode). That is, incoming buffers are | |
572 | pushed through unmodified, i.e. no <em class="parameter"><code>check_valid_frame</code></em> | |
573 | or <em class="parameter"><code>parse_frame</code></em> | |
574 | ||
575 | callbacks will be invoked, but <em class="parameter"><code>pre_push_frame</code></em> | |
576 | will still be invoked, | |
577 | so subclass can perform as much or as little is appropriate for | |
578 | passthrough semantics in <em class="parameter"><code>pre_push_frame</code></em> | |
579 | .</p> | |
580 | <div class="refsect3"> | |
581 | <a name="id-1.2.4.3.9.5.5"></a><h4>Parameters</h4> | |
582 | <div class="informaltable"><table width="100%" border="0"> | |
583 | <colgroup> | |
584 | <col width="150px" class="parameters_name"> | |
585 | <col class="parameters_description"> | |
586 | <col width="200px" class="parameters_annotations"> | |
587 | </colgroup> | |
588 | <tbody> | |
589 | <tr> | |
590 | <td class="parameter_name"><p>parse</p></td> | |
591 | <td class="parameter_description"><p>a <a class="link" href="GstBaseParse.html" title="GstBaseParse"><span class="type">GstBaseParse</span></a></p></td> | |
592 | <td class="parameter_annotations"> </td> | |
593 | </tr> | |
594 | <tr> | |
595 | <td class="parameter_name"><p>passthrough</p></td> | |
596 | <td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if parser should run in passthrough mode</p></td> | |
597 | <td class="parameter_annotations"> </td> | |
598 | </tr> | |
599 | </tbody> | |
600 | </table></div> | |
601 | </div> | |
602 | </div> | |
603 | <hr> | |
604 | <div class="refsect2"> | |
605 | <a name="gst-base-parse-set-syncable"></a><h3>gst_base_parse_set_syncable ()</h3> | |
606 | <pre class="programlisting"><span class="returnvalue">void</span> | |
607 | gst_base_parse_set_syncable (<em class="parameter"><code><a class="link" href="GstBaseParse.html" title="GstBaseParse"><span class="type">GstBaseParse</span></a> *parse</code></em>, | |
608 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> syncable</code></em>);</pre> | |
609 | <p>Set if frame starts can be identified. This is set by default and | |
610 | determines whether seeking based on bitrate averages | |
611 | is possible for a format/stream.</p> | |
612 | <div class="refsect3"> | |
613 | <a name="id-1.2.4.3.9.6.5"></a><h4>Parameters</h4> | |
614 | <div class="informaltable"><table width="100%" border="0"> | |
615 | <colgroup> | |
616 | <col width="150px" class="parameters_name"> | |
617 | <col class="parameters_description"> | |
618 | <col width="200px" class="parameters_annotations"> | |
619 | </colgroup> | |
620 | <tbody> | |
621 | <tr> | |
622 | <td class="parameter_name"><p>parse</p></td> | |
623 | <td class="parameter_description"><p>a <a class="link" href="GstBaseParse.html" title="GstBaseParse"><span class="type">GstBaseParse</span></a></p></td> | |
624 | <td class="parameter_annotations"> </td> | |
625 | </tr> | |
626 | <tr> | |
627 | <td class="parameter_name"><p>syncable</p></td> | |
628 | <td class="parameter_description"><p>set if frame starts can be identified</p></td> | |
629 | <td class="parameter_annotations"> </td> | |
630 | </tr> | |
631 | </tbody> | |
632 | </table></div> | |
633 | </div> | |
634 | </div> | |
635 | <hr> | |
636 | <div class="refsect2"> | |
637 | <a name="gst-base-parse-set-has-timing-info"></a><h3>gst_base_parse_set_has_timing_info ()</h3> | |
638 | <pre class="programlisting"><span class="returnvalue">void</span> | |
639 | gst_base_parse_set_has_timing_info (<em class="parameter"><code><a class="link" href="GstBaseParse.html" title="GstBaseParse"><span class="type">GstBaseParse</span></a> *parse</code></em>, | |
640 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> has_timing</code></em>);</pre> | |
641 | <p>Set if frames carry timing information which the subclass can (generally) | |
642 | parse and provide. In particular, intrinsic (rather than estimated) time | |
643 | can be obtained following a seek.</p> | |
644 | <div class="refsect3"> | |
645 | <a name="id-1.2.4.3.9.7.5"></a><h4>Parameters</h4> | |
646 | <div class="informaltable"><table width="100%" border="0"> | |
647 | <colgroup> | |
648 | <col width="150px" class="parameters_name"> | |
649 | <col class="parameters_description"> | |
650 | <col width="200px" class="parameters_annotations"> | |
651 | </colgroup> | |
652 | <tbody> | |
653 | <tr> | |
654 | <td class="parameter_name"><p>parse</p></td> | |
655 | <td class="parameter_description"><p>a <a class="link" href="GstBaseParse.html" title="GstBaseParse"><span class="type">GstBaseParse</span></a></p></td> | |
656 | <td class="parameter_annotations"> </td> | |
657 | </tr> | |
658 | <tr> | |
659 | <td class="parameter_name"><p>has_timing</p></td> | |
660 | <td class="parameter_description"><p>whether frames carry timing information</p></td> | |
661 | <td class="parameter_annotations"> </td> | |
662 | </tr> | |
663 | </tbody> | |
664 | </table></div> | |
665 | </div> | |
666 | </div> | |
667 | <hr> | |
668 | <div class="refsect2"> | |
669 | <a name="gst-base-parse-set-frame-rate"></a><h3>gst_base_parse_set_frame_rate ()</h3> | |
670 | <pre class="programlisting"><span class="returnvalue">void</span> | |
671 | gst_base_parse_set_frame_rate (<em class="parameter"><code><a class="link" href="GstBaseParse.html" title="GstBaseParse"><span class="type">GstBaseParse</span></a> *parse</code></em>, | |
672 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> fps_num</code></em>, | |
673 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> fps_den</code></em>, | |
674 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> lead_in</code></em>, | |
675 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> lead_out</code></em>);</pre> | |
676 | <p>If frames per second is configured, parser can take care of buffer duration | |
677 | and timestamping. When performing segment clipping, or seeking to a specific | |
678 | location, a corresponding decoder might need an initial <em class="parameter"><code>lead_in</code></em> | |
679 | and a | |
680 | following <em class="parameter"><code>lead_out</code></em> | |
681 | number of frames to ensure the desired segment is | |
682 | entirely filled upon decoding.</p> | |
683 | <div class="refsect3"> | |
684 | <a name="id-1.2.4.3.9.8.5"></a><h4>Parameters</h4> | |
685 | <div class="informaltable"><table width="100%" border="0"> | |
686 | <colgroup> | |
687 | <col width="150px" class="parameters_name"> | |
688 | <col class="parameters_description"> | |
689 | <col width="200px" class="parameters_annotations"> | |
690 | </colgroup> | |
691 | <tbody> | |
692 | <tr> | |
693 | <td class="parameter_name"><p>parse</p></td> | |
694 | <td class="parameter_description"><p>the <a class="link" href="GstBaseParse.html" title="GstBaseParse"><span class="type">GstBaseParse</span></a> to set</p></td> | |
695 | <td class="parameter_annotations"> </td> | |
696 | </tr> | |
697 | <tr> | |
698 | <td class="parameter_name"><p>fps_num</p></td> | |
699 | <td class="parameter_description"><p>frames per second (numerator).</p></td> | |
700 | <td class="parameter_annotations"> </td> | |
701 | </tr> | |
702 | <tr> | |
703 | <td class="parameter_name"><p>fps_den</p></td> | |
704 | <td class="parameter_description"><p>frames per second (denominator).</p></td> | |
705 | <td class="parameter_annotations"> </td> | |
706 | </tr> | |
707 | <tr> | |
708 | <td class="parameter_name"><p>lead_in</p></td> | |
709 | <td class="parameter_description"><p>frames needed before a segment for subsequent decode</p></td> | |
710 | <td class="parameter_annotations"> </td> | |
711 | </tr> | |
712 | <tr> | |
713 | <td class="parameter_name"><p>lead_out</p></td> | |
714 | <td class="parameter_description"><p>frames needed after a segment</p></td> | |
715 | <td class="parameter_annotations"> </td> | |
716 | </tr> | |
717 | </tbody> | |
718 | </table></div> | |
719 | </div> | |
720 | </div> | |
721 | <hr> | |
722 | <div class="refsect2"> | |
723 | <a name="gst-base-parse-set-latency"></a><h3>gst_base_parse_set_latency ()</h3> | |
724 | <pre class="programlisting"><span class="returnvalue">void</span> | |
725 | gst_base_parse_set_latency (<em class="parameter"><code><a class="link" href="GstBaseParse.html" title="GstBaseParse"><span class="type">GstBaseParse</span></a> *parse</code></em>, | |
726 | <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> min_latency</code></em>, | |
727 | <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> max_latency</code></em>);</pre> | |
728 | <p>Sets the minimum and maximum (which may likely be equal) latency introduced | |
729 | by the parsing process. If there is such a latency, which depends on the | |
730 | particular parsing of the format, it typically corresponds to 1 frame duration.</p> | |
731 | <div class="refsect3"> | |
732 | <a name="id-1.2.4.3.9.9.5"></a><h4>Parameters</h4> | |
733 | <div class="informaltable"><table width="100%" border="0"> | |
734 | <colgroup> | |
735 | <col width="150px" class="parameters_name"> | |
736 | <col class="parameters_description"> | |
737 | <col width="200px" class="parameters_annotations"> | |
738 | </colgroup> | |
739 | <tbody> | |
740 | <tr> | |
741 | <td class="parameter_name"><p>parse</p></td> | |
742 | <td class="parameter_description"><p>a <a class="link" href="GstBaseParse.html" title="GstBaseParse"><span class="type">GstBaseParse</span></a></p></td> | |
743 | <td class="parameter_annotations"> </td> | |
744 | </tr> | |
745 | <tr> | |
746 | <td class="parameter_name"><p>min_latency</p></td> | |
747 | <td class="parameter_description"><p>minimum parse latency</p></td> | |
748 | <td class="parameter_annotations"> </td> | |
749 | </tr> | |
750 | <tr> | |
751 | <td class="parameter_name"><p>max_latency</p></td> | |
752 | <td class="parameter_description"><p>maximum parse latency</p></td> | |
753 | <td class="parameter_annotations"> </td> | |
754 | </tr> | |
755 | </tbody> | |
756 | </table></div> | |
757 | </div> | |
758 | </div> | |
759 | <hr> | |
760 | <div class="refsect2"> | |
761 | <a name="gst-base-parse-set-infer-ts"></a><h3>gst_base_parse_set_infer_ts ()</h3> | |
762 | <pre class="programlisting"><span class="returnvalue">void</span> | |
763 | gst_base_parse_set_infer_ts (<em class="parameter"><code><a class="link" href="GstBaseParse.html" title="GstBaseParse"><span class="type">GstBaseParse</span></a> *parse</code></em>, | |
764 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> infer_ts</code></em>);</pre> | |
765 | <p>By default, the base class might try to infer PTS from DTS and vice | |
766 | versa. While this is generally correct for audio data, it may not | |
767 | be otherwise. Sub-classes implementing such formats should disable | |
768 | timestamp inferring.</p> | |
769 | <div class="refsect3"> | |
770 | <a name="id-1.2.4.3.9.10.5"></a><h4>Parameters</h4> | |
771 | <div class="informaltable"><table width="100%" border="0"> | |
772 | <colgroup> | |
773 | <col width="150px" class="parameters_name"> | |
774 | <col class="parameters_description"> | |
775 | <col width="200px" class="parameters_annotations"> | |
776 | </colgroup> | |
777 | <tbody> | |
778 | <tr> | |
779 | <td class="parameter_name"><p>parse</p></td> | |
780 | <td class="parameter_description"><p>a <a class="link" href="GstBaseParse.html" title="GstBaseParse"><span class="type">GstBaseParse</span></a></p></td> | |
781 | <td class="parameter_annotations"> </td> | |
782 | </tr> | |
783 | <tr> | |
784 | <td class="parameter_name"><p>infer_ts</p></td> | |
785 | <td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if parser should infer DTS/PTS from each other</p></td> | |
786 | <td class="parameter_annotations"> </td> | |
787 | </tr> | |
788 | </tbody> | |
789 | </table></div> | |
790 | </div> | |
791 | </div> | |
792 | <hr> | |
793 | <div class="refsect2"> | |
794 | <a name="gst-base-parse-set-pts-interpolation"></a><h3>gst_base_parse_set_pts_interpolation ()</h3> | |
795 | <pre class="programlisting"><span class="returnvalue">void</span> | |
796 | gst_base_parse_set_pts_interpolation (<em class="parameter"><code><a class="link" href="GstBaseParse.html" title="GstBaseParse"><span class="type">GstBaseParse</span></a> *parse</code></em>, | |
797 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> pts_interpolate</code></em>);</pre> | |
798 | <p>By default, the base class will guess PTS timestamps using a simple | |
799 | interpolation (previous timestamp + duration), which is incorrect for | |
800 | data streams with reordering, where PTS can go backward. Sub-classes | |
801 | implementing such formats should disable PTS interpolation.</p> | |
802 | <div class="refsect3"> | |
803 | <a name="id-1.2.4.3.9.11.5"></a><h4>Parameters</h4> | |
804 | <div class="informaltable"><table width="100%" border="0"> | |
805 | <colgroup> | |
806 | <col width="150px" class="parameters_name"> | |
807 | <col class="parameters_description"> | |
808 | <col width="200px" class="parameters_annotations"> | |
809 | </colgroup> | |
810 | <tbody> | |
811 | <tr> | |
812 | <td class="parameter_name"><p>parse</p></td> | |
813 | <td class="parameter_description"><p>a <a class="link" href="GstBaseParse.html" title="GstBaseParse"><span class="type">GstBaseParse</span></a></p></td> | |
814 | <td class="parameter_annotations"> </td> | |
815 | </tr> | |
816 | <tr> | |
817 | <td class="parameter_name"><p>pts_interpolate</p></td> | |
818 | <td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if parser should interpolate PTS timestamps</p></td> | |
819 | <td class="parameter_annotations"> </td> | |
820 | </tr> | |
821 | </tbody> | |
822 | </table></div> | |
823 | </div> | |
824 | </div> | |
825 | <hr> | |
826 | <div class="refsect2"> | |
827 | <a name="gst-base-parse-set-ts-at-offset"></a><h3>gst_base_parse_set_ts_at_offset ()</h3> | |
828 | <pre class="programlisting"><span class="returnvalue">void</span> | |
829 | gst_base_parse_set_ts_at_offset (<em class="parameter"><code><a class="link" href="GstBaseParse.html" title="GstBaseParse"><span class="type">GstBaseParse</span></a> *parse</code></em>, | |
830 | <em class="parameter"><code><span class="type">gsize</span> offset</code></em>);</pre> | |
831 | <p>This function should only be called from a <em class="parameter"><code>handle_frame</code></em> | |
832 | implementation.</p> | |
833 | <p>GstBaseParse creates initial timestamps for frames by using the last | |
834 | timestamp seen in the stream before the frame starts. In certain | |
835 | cases, the correct timestamps will occur in the stream after the | |
836 | start of the frame, but before the start of the actual picture data. | |
837 | This function can be used to set the timestamps based on the offset | |
838 | into the frame data that the picture starts.</p> | |
839 | <div class="refsect3"> | |
840 | <a name="id-1.2.4.3.9.12.6"></a><h4>Parameters</h4> | |
841 | <div class="informaltable"><table width="100%" border="0"> | |
842 | <colgroup> | |
843 | <col width="150px" class="parameters_name"> | |
844 | <col class="parameters_description"> | |
845 | <col width="200px" class="parameters_annotations"> | |
846 | </colgroup> | |
847 | <tbody> | |
848 | <tr> | |
849 | <td class="parameter_name"><p>parse</p></td> | |
850 | <td class="parameter_description"><p>a <a class="link" href="GstBaseParse.html" title="GstBaseParse"><span class="type">GstBaseParse</span></a></p></td> | |
851 | <td class="parameter_annotations"> </td> | |
852 | </tr> | |
853 | <tr> | |
854 | <td class="parameter_name"><p>offset</p></td> | |
855 | <td class="parameter_description"><p>offset into current buffer</p></td> | |
856 | <td class="parameter_annotations"> </td> | |
857 | </tr> | |
858 | </tbody> | |
859 | </table></div> | |
860 | </div> | |
861 | <p class="since">Since 1.2</p> | |
862 | </div> | |
863 | <hr> | |
864 | <div class="refsect2"> | |
865 | <a name="gst-base-parse-convert-default"></a><h3>gst_base_parse_convert_default ()</h3> | |
866 | <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> | |
867 | gst_base_parse_convert_default (<em class="parameter"><code><a class="link" href="GstBaseParse.html" title="GstBaseParse"><span class="type">GstBaseParse</span></a> *parse</code></em>, | |
868 | <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstFormat.html#GstFormat"><span class="type">GstFormat</span></a> src_format</code></em>, | |
869 | <em class="parameter"><code><span class="type">gint64</span> src_value</code></em>, | |
870 | <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstFormat.html#GstFormat"><span class="type">GstFormat</span></a> dest_format</code></em>, | |
871 | <em class="parameter"><code><span class="type">gint64</span> *dest_value</code></em>);</pre> | |
872 | <p>Default implementation of "convert" vmethod in <a class="link" href="GstBaseParse.html" title="GstBaseParse"><span class="type">GstBaseParse</span></a> class.</p> | |
873 | <div class="refsect3"> | |
874 | <a name="id-1.2.4.3.9.13.5"></a><h4>Parameters</h4> | |
875 | <div class="informaltable"><table width="100%" border="0"> | |
876 | <colgroup> | |
877 | <col width="150px" class="parameters_name"> | |
878 | <col class="parameters_description"> | |
879 | <col width="200px" class="parameters_annotations"> | |
880 | </colgroup> | |
881 | <tbody> | |
882 | <tr> | |
883 | <td class="parameter_name"><p>parse</p></td> | |
884 | <td class="parameter_description"><p><a class="link" href="GstBaseParse.html" title="GstBaseParse"><span class="type">GstBaseParse</span></a>.</p></td> | |
885 | <td class="parameter_annotations"> </td> | |
886 | </tr> | |
887 | <tr> | |
888 | <td class="parameter_name"><p>src_format</p></td> | |
889 | <td class="parameter_description"><p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstFormat.html#GstFormat"><span class="type">GstFormat</span></a> describing the source format.</p></td> | |
890 | <td class="parameter_annotations"> </td> | |
891 | </tr> | |
892 | <tr> | |
893 | <td class="parameter_name"><p>src_value</p></td> | |
894 | <td class="parameter_description"><p>Source value to be converted.</p></td> | |
895 | <td class="parameter_annotations"> </td> | |
896 | </tr> | |
897 | <tr> | |
898 | <td class="parameter_name"><p>dest_format</p></td> | |
899 | <td class="parameter_description"><p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstFormat.html#GstFormat"><span class="type">GstFormat</span></a> defining the converted format.</p></td> | |
900 | <td class="parameter_annotations"> </td> | |
901 | </tr> | |
902 | <tr> | |
903 | <td class="parameter_name"><p>dest_value</p></td> | |
904 | <td class="parameter_description"><p>Pointer where the conversion result will be put.</p></td> | |
905 | <td class="parameter_annotations"> </td> | |
906 | </tr> | |
907 | </tbody> | |
908 | </table></div> | |
909 | </div> | |
910 | <div class="refsect3"> | |
911 | <a name="id-1.2.4.3.9.13.6"></a><h4>Returns</h4> | |
912 | <p> TRUE if conversion was successful.</p> | |
913 | <p></p> | |
914 | </div> | |
915 | </div> | |
916 | <hr> | |
917 | <div class="refsect2"> | |
918 | <a name="gst-base-parse-add-index-entry"></a><h3>gst_base_parse_add_index_entry ()</h3> | |
919 | <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> | |
920 | gst_base_parse_add_index_entry (<em class="parameter"><code><a class="link" href="GstBaseParse.html" title="GstBaseParse"><span class="type">GstBaseParse</span></a> *parse</code></em>, | |
921 | <em class="parameter"><code><span class="type">guint64</span> offset</code></em>, | |
922 | <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> ts</code></em>, | |
923 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> key</code></em>, | |
924 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> force</code></em>);</pre> | |
925 | <p>Adds an entry to the index associating <em class="parameter"><code>offset</code></em> | |
926 | to <em class="parameter"><code>ts</code></em> | |
927 | . It is recommended | |
928 | to only add keyframe entries. <em class="parameter"><code>force</code></em> | |
929 | allows to bypass checks, such as | |
930 | whether the stream is (upstream) seekable, another entry is already "close" | |
931 | to the new entry, etc.</p> | |
932 | <div class="refsect3"> | |
933 | <a name="id-1.2.4.3.9.14.5"></a><h4>Parameters</h4> | |
934 | <div class="informaltable"><table width="100%" border="0"> | |
935 | <colgroup> | |
936 | <col width="150px" class="parameters_name"> | |
937 | <col class="parameters_description"> | |
938 | <col width="200px" class="parameters_annotations"> | |
939 | </colgroup> | |
940 | <tbody> | |
941 | <tr> | |
942 | <td class="parameter_name"><p>parse</p></td> | |
943 | <td class="parameter_description"><p><a class="link" href="GstBaseParse.html" title="GstBaseParse"><span class="type">GstBaseParse</span></a>.</p></td> | |
944 | <td class="parameter_annotations"> </td> | |
945 | </tr> | |
946 | <tr> | |
947 | <td class="parameter_name"><p>offset</p></td> | |
948 | <td class="parameter_description"><p>offset of entry</p></td> | |
949 | <td class="parameter_annotations"> </td> | |
950 | </tr> | |
951 | <tr> | |
952 | <td class="parameter_name"><p>ts</p></td> | |
953 | <td class="parameter_description"><p>timestamp associated with offset</p></td> | |
954 | <td class="parameter_annotations"> </td> | |
955 | </tr> | |
956 | <tr> | |
957 | <td class="parameter_name"><p>key</p></td> | |
958 | <td class="parameter_description"><p>whether entry refers to keyframe</p></td> | |
959 | <td class="parameter_annotations"> </td> | |
960 | </tr> | |
961 | <tr> | |
962 | <td class="parameter_name"><p>force</p></td> | |
963 | <td class="parameter_description"><p>add entry disregarding sanity checks</p></td> | |
964 | <td class="parameter_annotations"> </td> | |
965 | </tr> | |
966 | </tbody> | |
967 | </table></div> | |
968 | </div> | |
969 | <div class="refsect3"> | |
970 | <a name="id-1.2.4.3.9.14.6"></a><h4>Returns</h4> | |
971 | <p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> indicating whether entry was added</p> | |
972 | <p></p> | |
973 | </div> | |
974 | </div> | |
975 | <hr> | |
976 | <div class="refsect2"> | |
977 | <a name="gst-base-parse-frame-new"></a><h3>gst_base_parse_frame_new ()</h3> | |
978 | <pre class="programlisting"><a class="link" href="GstBaseParse.html#GstBaseParseFrame" title="GstBaseParseFrame"><span class="returnvalue">GstBaseParseFrame</span></a> * | |
979 | gst_base_parse_frame_new (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="type">GstBuffer</span></a> *buffer</code></em>, | |
980 | <em class="parameter"><code><a class="link" href="GstBaseParse.html#GstBaseParseFrameFlags" title="enum GstBaseParseFrameFlags"><span class="type">GstBaseParseFrameFlags</span></a> flags</code></em>, | |
981 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> overhead</code></em>);</pre> | |
982 | <p>Allocates a new <a class="link" href="GstBaseParse.html#GstBaseParseFrame" title="GstBaseParseFrame"><span class="type">GstBaseParseFrame</span></a>. This function is mainly for bindings, | |
983 | elements written in C should usually allocate the frame on the stack and | |
984 | then use <a class="link" href="GstBaseParse.html#gst-base-parse-frame-init" title="gst_base_parse_frame_init ()"><code class="function">gst_base_parse_frame_init()</code></a> to initialise it.</p> | |
985 | <div class="refsect3"> | |
986 | <a name="id-1.2.4.3.9.15.5"></a><h4>Parameters</h4> | |
987 | <div class="informaltable"><table width="100%" border="0"> | |
988 | <colgroup> | |
989 | <col width="150px" class="parameters_name"> | |
990 | <col class="parameters_description"> | |
991 | <col width="200px" class="parameters_annotations"> | |
992 | </colgroup> | |
993 | <tbody> | |
994 | <tr> | |
995 | <td class="parameter_name"><p>buffer</p></td> | |
996 | <td class="parameter_description"><p> a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="type">GstBuffer</span></a>. </p></td> | |
997 | <td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td> | |
998 | </tr> | |
999 | <tr> | |
1000 | <td class="parameter_name"><p>flags</p></td> | |
1001 | <td class="parameter_description"><p>the flags</p></td> | |
1002 | <td class="parameter_annotations"> </td> | |
1003 | </tr> | |
1004 | <tr> | |
1005 | <td class="parameter_name"><p>overhead</p></td> | |
1006 | <td class="parameter_description"><p>number of bytes in this frame which should be counted as | |
1007 | metadata overhead, ie. not used to calculate the average bitrate. | |
1008 | Set to -1 to mark the entire frame as metadata. If in doubt, set to 0.</p></td> | |
1009 | <td class="parameter_annotations"> </td> | |
1010 | </tr> | |
1011 | </tbody> | |
1012 | </table></div> | |
1013 | </div> | |
1014 | <div class="refsect3"> | |
1015 | <a name="id-1.2.4.3.9.15.6"></a><h4>Returns</h4> | |
1016 | <p> a newly-allocated <a class="link" href="GstBaseParse.html#GstBaseParseFrame" title="GstBaseParseFrame"><span class="type">GstBaseParseFrame</span></a>. Free with | |
1017 | <a class="link" href="GstBaseParse.html#gst-base-parse-frame-free" title="gst_base_parse_frame_free ()"><code class="function">gst_base_parse_frame_free()</code></a> when no longer needed.</p> | |
1018 | <p></p> | |
1019 | </div> | |
1020 | </div> | |
1021 | <hr> | |
1022 | <div class="refsect2"> | |
1023 | <a name="gst-base-parse-frame-init"></a><h3>gst_base_parse_frame_init ()</h3> | |
1024 | <pre class="programlisting"><span class="returnvalue">void</span> | |
1025 | gst_base_parse_frame_init (<em class="parameter"><code><a class="link" href="GstBaseParse.html#GstBaseParseFrame" title="GstBaseParseFrame"><span class="type">GstBaseParseFrame</span></a> *frame</code></em>);</pre> | |
1026 | <p>Sets a <a class="link" href="GstBaseParse.html#GstBaseParseFrame" title="GstBaseParseFrame"><span class="type">GstBaseParseFrame</span></a> to initial state. Currently this means | |
1027 | all public fields are zero-ed and a private flag is set to make | |
1028 | sure <a class="link" href="GstBaseParse.html#gst-base-parse-frame-free" title="gst_base_parse_frame_free ()"><code class="function">gst_base_parse_frame_free()</code></a> only frees the contents but not | |
1029 | the actual frame. Use this function to initialise a <a class="link" href="GstBaseParse.html#GstBaseParseFrame" title="GstBaseParseFrame"><span class="type">GstBaseParseFrame</span></a> | |
1030 | allocated on the stack.</p> | |
1031 | <div class="refsect3"> | |
1032 | <a name="id-1.2.4.3.9.16.5"></a><h4>Parameters</h4> | |
1033 | <div class="informaltable"><table width="100%" border="0"> | |
1034 | <colgroup> | |
1035 | <col width="150px" class="parameters_name"> | |
1036 | <col class="parameters_description"> | |
1037 | <col width="200px" class="parameters_annotations"> | |
1038 | </colgroup> | |
1039 | <tbody><tr> | |
1040 | <td class="parameter_name"><p>frame</p></td> | |
1041 | <td class="parameter_description"><p><a class="link" href="GstBaseParse.html#GstBaseParseFrame" title="GstBaseParseFrame"><span class="type">GstBaseParseFrame</span></a>.</p></td> | |
1042 | <td class="parameter_annotations"> </td> | |
1043 | </tr></tbody> | |
1044 | </table></div> | |
1045 | </div> | |
1046 | </div> | |
1047 | <hr> | |
1048 | <div class="refsect2"> | |
1049 | <a name="gst-base-parse-frame-free"></a><h3>gst_base_parse_frame_free ()</h3> | |
1050 | <pre class="programlisting"><span class="returnvalue">void</span> | |
1051 | gst_base_parse_frame_free (<em class="parameter"><code><a class="link" href="GstBaseParse.html#GstBaseParseFrame" title="GstBaseParseFrame"><span class="type">GstBaseParseFrame</span></a> *frame</code></em>);</pre> | |
1052 | </div> | |
1053 | <hr> | |
1054 | <div class="refsect2"> | |
1055 | <a name="gst-base-parse-push-frame"></a><h3>gst_base_parse_push_frame ()</h3> | |
1056 | <pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> | |
1057 | gst_base_parse_push_frame (<em class="parameter"><code><a class="link" href="GstBaseParse.html" title="GstBaseParse"><span class="type">GstBaseParse</span></a> *parse</code></em>, | |
1058 | <em class="parameter"><code><a class="link" href="GstBaseParse.html#GstBaseParseFrame" title="GstBaseParseFrame"><span class="type">GstBaseParseFrame</span></a> *frame</code></em>);</pre> | |
1059 | <p>Pushes the frame's buffer downstream, sends any pending events and | |
1060 | does some timestamp and segment handling. Takes ownership of | |
1061 | frame's buffer, though caller retains ownership of <em class="parameter"><code>frame</code></em> | |
1062 | .</p> | |
1063 | <p>This must be called with sinkpad STREAM_LOCK held.</p> | |
1064 | <div class="refsect3"> | |
1065 | <a name="id-1.2.4.3.9.18.6"></a><h4>Parameters</h4> | |
1066 | <div class="informaltable"><table width="100%" border="0"> | |
1067 | <colgroup> | |
1068 | <col width="150px" class="parameters_name"> | |
1069 | <col class="parameters_description"> | |
1070 | <col width="200px" class="parameters_annotations"> | |
1071 | </colgroup> | |
1072 | <tbody> | |
1073 | <tr> | |
1074 | <td class="parameter_name"><p>parse</p></td> | |
1075 | <td class="parameter_description"><p><a class="link" href="GstBaseParse.html" title="GstBaseParse"><span class="type">GstBaseParse</span></a>.</p></td> | |
1076 | <td class="parameter_annotations"> </td> | |
1077 | </tr> | |
1078 | <tr> | |
1079 | <td class="parameter_name"><p>frame</p></td> | |
1080 | <td class="parameter_description"><p> a <a class="link" href="GstBaseParse.html#GstBaseParseFrame" title="GstBaseParseFrame"><span class="type">GstBaseParseFrame</span></a>. </p></td> | |
1081 | <td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td> | |
1082 | </tr> | |
1083 | </tbody> | |
1084 | </table></div> | |
1085 | </div> | |
1086 | <div class="refsect3"> | |
1087 | <a name="id-1.2.4.3.9.18.7"></a><h4>Returns</h4> | |
1088 | <p> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GstFlowReturn"><span class="type">GstFlowReturn</span></a></p> | |
1089 | <p></p> | |
1090 | </div> | |
1091 | </div> | |
1092 | <hr> | |
1093 | <div class="refsect2"> | |
1094 | <a name="gst-base-parse-finish-frame"></a><h3>gst_base_parse_finish_frame ()</h3> | |
1095 | <pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> | |
1096 | gst_base_parse_finish_frame (<em class="parameter"><code><a class="link" href="GstBaseParse.html" title="GstBaseParse"><span class="type">GstBaseParse</span></a> *parse</code></em>, | |
1097 | <em class="parameter"><code><a class="link" href="GstBaseParse.html#GstBaseParseFrame" title="GstBaseParseFrame"><span class="type">GstBaseParseFrame</span></a> *frame</code></em>, | |
1098 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> size</code></em>);</pre> | |
1099 | <p>Collects parsed data and pushes this downstream. | |
1100 | Source pad caps must be set when this is called.</p> | |
1101 | <p>If <em class="parameter"><code>frame</code></em> | |
1102 | 's out_buffer is set, that will be used as subsequent frame data. | |
1103 | Otherwise, <em class="parameter"><code>size</code></em> | |
1104 | samples will be taken from the input and used for output, | |
1105 | and the output's metadata (timestamps etc) will be taken as (optionally) | |
1106 | set by the subclass on <em class="parameter"><code>frame</code></em> | |
1107 | 's (input) buffer (which is otherwise | |
1108 | ignored for any but the above purpose/information).</p> | |
1109 | <p>Note that the latter buffer is invalidated by this call, whereas the | |
1110 | caller retains ownership of <em class="parameter"><code>frame</code></em> | |
1111 | .</p> | |
1112 | <div class="refsect3"> | |
1113 | <a name="id-1.2.4.3.9.19.7"></a><h4>Parameters</h4> | |
1114 | <div class="informaltable"><table width="100%" border="0"> | |
1115 | <colgroup> | |
1116 | <col width="150px" class="parameters_name"> | |
1117 | <col class="parameters_description"> | |
1118 | <col width="200px" class="parameters_annotations"> | |
1119 | </colgroup> | |
1120 | <tbody> | |
1121 | <tr> | |
1122 | <td class="parameter_name"><p>parse</p></td> | |
1123 | <td class="parameter_description"><p>a <a class="link" href="GstBaseParse.html" title="GstBaseParse"><span class="type">GstBaseParse</span></a></p></td> | |
1124 | <td class="parameter_annotations"> </td> | |
1125 | </tr> | |
1126 | <tr> | |
1127 | <td class="parameter_name"><p>frame</p></td> | |
1128 | <td class="parameter_description"><p>a <a class="link" href="GstBaseParse.html#GstBaseParseFrame" title="GstBaseParseFrame"><span class="type">GstBaseParseFrame</span></a></p></td> | |
1129 | <td class="parameter_annotations"> </td> | |
1130 | </tr> | |
1131 | <tr> | |
1132 | <td class="parameter_name"><p>size</p></td> | |
1133 | <td class="parameter_description"><p>consumed input data represented by frame</p></td> | |
1134 | <td class="parameter_annotations"> </td> | |
1135 | </tr> | |
1136 | </tbody> | |
1137 | </table></div> | |
1138 | </div> | |
1139 | <div class="refsect3"> | |
1140 | <a name="id-1.2.4.3.9.19.8"></a><h4>Returns</h4> | |
1141 | <p> a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GstFlowReturn"><span class="type">GstFlowReturn</span></a> that should be escalated to caller (of caller)</p> | |
1142 | <p></p> | |
1143 | </div> | |
1144 | </div> | |
1145 | <hr> | |
1146 | <div class="refsect2"> | |
1147 | <a name="GST-BASE-PARSE-DRAINING:CAPS"></a><h3>GST_BASE_PARSE_DRAINING()</h3> | |
1148 | <pre class="programlisting">#define GST_BASE_PARSE_DRAINING(parse) (!!(GST_BASE_PARSE_CAST(parse)->flags & GST_BASE_PARSE_FLAG_DRAINING)) | |
1149 | </pre> | |
1150 | <p>Obtains current drain status (ie. whether EOS has been received and | |
1151 | the parser is now processing the frames at the end of the stream)</p> | |
1152 | <div class="refsect3"> | |
1153 | <a name="id-1.2.4.3.9.20.5"></a><h4>Parameters</h4> | |
1154 | <div class="informaltable"><table width="100%" border="0"> | |
1155 | <colgroup> | |
1156 | <col width="150px" class="parameters_name"> | |
1157 | <col class="parameters_description"> | |
1158 | <col width="200px" class="parameters_annotations"> | |
1159 | </colgroup> | |
1160 | <tbody><tr> | |
1161 | <td class="parameter_name"><p>parse</p></td> | |
1162 | <td class="parameter_description"><p>base parse instance</p></td> | |
1163 | <td class="parameter_annotations"> </td> | |
1164 | </tr></tbody> | |
1165 | </table></div> | |
1166 | </div> | |
1167 | </div> | |
1168 | <hr> | |
1169 | <div class="refsect2"> | |
1170 | <a name="GST-BASE-PARSE-FLAG-DRAINING:CAPS"></a><h3>GST_BASE_PARSE_FLAG_DRAINING</h3> | |
1171 | <pre class="programlisting">#define GST_BASE_PARSE_FLAG_DRAINING (1 << 1) | |
1172 | </pre> | |
1173 | </div> | |
1174 | <hr> | |
1175 | <div class="refsect2"> | |
1176 | <a name="GST-BASE-PARSE-FLAG-LOST-SYNC:CAPS"></a><h3>GST_BASE_PARSE_FLAG_LOST_SYNC</h3> | |
1177 | <pre class="programlisting">#define GST_BASE_PARSE_FLAG_LOST_SYNC (1 << 0) | |
1178 | </pre> | |
1179 | </div> | |
1180 | <hr> | |
1181 | <div class="refsect2"> | |
1182 | <a name="GST-BASE-PARSE-LOST-SYNC:CAPS"></a><h3>GST_BASE_PARSE_LOST_SYNC()</h3> | |
1183 | <pre class="programlisting">#define GST_BASE_PARSE_LOST_SYNC(parse) (!!(GST_BASE_PARSE_CAST(parse)->flags & GST_BASE_PARSE_FLAG_LOST_SYNC)) | |
1184 | </pre> | |
1185 | <p>Obtains current sync status.</p> | |
1186 | <div class="refsect3"> | |
1187 | <a name="id-1.2.4.3.9.23.5"></a><h4>Parameters</h4> | |
1188 | <div class="informaltable"><table width="100%" border="0"> | |
1189 | <colgroup> | |
1190 | <col width="150px" class="parameters_name"> | |
1191 | <col class="parameters_description"> | |
1192 | <col width="200px" class="parameters_annotations"> | |
1193 | </colgroup> | |
1194 | <tbody><tr> | |
1195 | <td class="parameter_name"><p>parse</p></td> | |
1196 | <td class="parameter_description"><p>base parse instance</p></td> | |
1197 | <td class="parameter_annotations"> </td> | |
1198 | </tr></tbody> | |
1199 | </table></div> | |
1200 | </div> | |
1201 | </div> | |
1202 | <hr> | |
1203 | <div class="refsect2"> | |
1204 | <a name="GST-BASE-PARSE-SINK-PAD:CAPS"></a><h3>GST_BASE_PARSE_SINK_PAD()</h3> | |
1205 | <pre class="programlisting">#define GST_BASE_PARSE_SINK_PAD(obj) (GST_BASE_PARSE_CAST (obj)->sinkpad) | |
1206 | </pre> | |
1207 | <p>Gives the pointer to the sink <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html"><span class="type">GstPad</span></a> object of the element.</p> | |
1208 | <div class="refsect3"> | |
1209 | <a name="id-1.2.4.3.9.24.5"></a><h4>Parameters</h4> | |
1210 | <div class="informaltable"><table width="100%" border="0"> | |
1211 | <colgroup> | |
1212 | <col width="150px" class="parameters_name"> | |
1213 | <col class="parameters_description"> | |
1214 | <col width="200px" class="parameters_annotations"> | |
1215 | </colgroup> | |
1216 | <tbody><tr> | |
1217 | <td class="parameter_name"><p>obj</p></td> | |
1218 | <td class="parameter_description"><p>base parse instance</p></td> | |
1219 | <td class="parameter_annotations"> </td> | |
1220 | </tr></tbody> | |
1221 | </table></div> | |
1222 | </div> | |
1223 | </div> | |
1224 | <hr> | |
1225 | <div class="refsect2"> | |
1226 | <a name="GST-BASE-PARSE-SRC-PAD:CAPS"></a><h3>GST_BASE_PARSE_SRC_PAD()</h3> | |
1227 | <pre class="programlisting">#define GST_BASE_PARSE_SRC_PAD(obj) (GST_BASE_PARSE_CAST (obj)->srcpad) | |
1228 | </pre> | |
1229 | <p>Gives the pointer to the source <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html"><span class="type">GstPad</span></a> object of the element.</p> | |
1230 | <div class="refsect3"> | |
1231 | <a name="id-1.2.4.3.9.25.5"></a><h4>Parameters</h4> | |
1232 | <div class="informaltable"><table width="100%" border="0"> | |
1233 | <colgroup> | |
1234 | <col width="150px" class="parameters_name"> | |
1235 | <col class="parameters_description"> | |
1236 | <col width="200px" class="parameters_annotations"> | |
1237 | </colgroup> | |
1238 | <tbody><tr> | |
1239 | <td class="parameter_name"><p>obj</p></td> | |
1240 | <td class="parameter_description"><p>base parse instance</p></td> | |
1241 | <td class="parameter_annotations"> </td> | |
1242 | </tr></tbody> | |
1243 | </table></div> | |
1244 | </div> | |
1245 | </div> | |
1246 | </div> | |
1247 | <div class="refsect1"> | |
1248 | <a name="GstBaseParse.other_details"></a><h2>Types and Values</h2> | |
1249 | <div class="refsect2"> | |
1250 | <a name="GstBaseParse-struct"></a><h3>struct GstBaseParse</h3> | |
1251 | <pre class="programlisting">struct GstBaseParse;</pre> | |
1252 | <p>The opaque <a class="link" href="GstBaseParse.html" title="GstBaseParse"><span class="type">GstBaseParse</span></a> data structure.</p> | |
1253 | <div class="refsect3"> | |
1254 | <a name="id-1.2.4.3.10.2.5"></a><h4>Members</h4> | |
1255 | <div class="informaltable"><table width="100%" border="0"> | |
1256 | <colgroup> | |
1257 | <col width="300px" class="struct_members_name"> | |
1258 | <col class="struct_members_description"> | |
1259 | <col width="200px" class="struct_members_annotations"> | |
1260 | </colgroup> | |
1261 | <tbody></tbody> | |
1262 | </table></div> | |
1263 | </div> | |
1264 | </div> | |
1265 | <hr> | |
1266 | <div class="refsect2"> | |
1267 | <a name="GstBaseParseClass"></a><h3>struct GstBaseParseClass</h3> | |
1268 | <pre class="programlisting">struct GstBaseParseClass { | |
1269 | GstElementClass parent_class; | |
1270 | ||
1271 | /* virtual methods for subclasses */ | |
1272 | ||
1273 | gboolean (*start) (GstBaseParse * parse); | |
1274 | ||
1275 | gboolean (*stop) (GstBaseParse * parse); | |
1276 | ||
1277 | gboolean (*set_sink_caps) (GstBaseParse * parse, | |
1278 | GstCaps * caps); | |
1279 | ||
1280 | GstFlowReturn (*handle_frame) (GstBaseParse * parse, | |
1281 | GstBaseParseFrame * frame, | |
1282 | gint * skipsize); | |
1283 | ||
1284 | GstFlowReturn (*pre_push_frame) (GstBaseParse * parse, | |
1285 | GstBaseParseFrame * frame); | |
1286 | ||
1287 | gboolean (*convert) (GstBaseParse * parse, | |
1288 | GstFormat src_format, | |
1289 | gint64 src_value, | |
1290 | GstFormat dest_format, | |
1291 | gint64 * dest_value); | |
1292 | ||
1293 | gboolean (*sink_event) (GstBaseParse * parse, | |
1294 | GstEvent * event); | |
1295 | ||
1296 | gboolean (*src_event) (GstBaseParse * parse, | |
1297 | GstEvent * event); | |
1298 | ||
1299 | GstCaps * (*get_sink_caps) (GstBaseParse * parse, | |
1300 | GstCaps * filter); | |
1301 | ||
1302 | GstFlowReturn (*detect) (GstBaseParse * parse, | |
1303 | GstBuffer * buffer); | |
1304 | ||
1305 | gboolean (*sink_query) (GstBaseParse * parse, | |
1306 | GstQuery * query); | |
1307 | ||
1308 | gboolean (*src_query) (GstBaseParse * parse, | |
1309 | GstQuery * query); | |
1310 | }; | |
1311 | </pre> | |
1312 | <p>Subclasses can override any of the available virtual methods or not, as | |
1313 | needed. At minimum <em class="parameter"><code>check_valid_frame</code></em> | |
1314 | and <em class="parameter"><code>parse_frame</code></em> | |
1315 | needs to be | |
1316 | overridden.</p> | |
1317 | <div class="refsect3"> | |
1318 | <a name="id-1.2.4.3.10.3.5"></a><h4>Members</h4> | |
1319 | <div class="informaltable"><table width="100%" border="0"> | |
1320 | <colgroup> | |
1321 | <col width="300px" class="struct_members_name"> | |
1322 | <col class="struct_members_description"> | |
1323 | <col width="200px" class="struct_members_annotations"> | |
1324 | </colgroup> | |
1325 | <tbody> | |
1326 | <tr> | |
1327 | <td class="struct_member_name"><p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html#GstElementClass"><span class="type">GstElementClass</span></a> <em class="structfield"><code><a name="GstBaseParseClass.parent-class"></a>parent_class</code></em>;</p></td> | |
1328 | <td class="struct_member_description"><p>the parent class</p></td> | |
1329 | <td class="struct_member_annotations"> </td> | |
1330 | </tr> | |
1331 | <tr> | |
1332 | <td class="struct_member_name"><p><em class="structfield"><code><a name="GstBaseParseClass.start"></a>start</code></em> ()</p></td> | |
1333 | <td class="struct_member_description"><p>Optional. | |
1334 | Called when the element starts processing. | |
1335 | Allows opening external resources.</p></td> | |
1336 | <td class="struct_member_annotations"> </td> | |
1337 | </tr> | |
1338 | <tr> | |
1339 | <td class="struct_member_name"><p><em class="structfield"><code><a name="GstBaseParseClass.stop"></a>stop</code></em> ()</p></td> | |
1340 | <td class="struct_member_description"><p>Optional. | |
1341 | Called when the element stops processing. | |
1342 | Allows closing external resources.</p></td> | |
1343 | <td class="struct_member_annotations"> </td> | |
1344 | </tr> | |
1345 | <tr> | |
1346 | <td class="struct_member_name"><p><em class="structfield"><code><a name="GstBaseParseClass.set-sink-caps"></a>set_sink_caps</code></em> ()</p></td> | |
1347 | <td class="struct_member_description"><p>allows the subclass to be notified of the actual caps set.</p></td> | |
1348 | <td class="struct_member_annotations"> </td> | |
1349 | </tr> | |
1350 | <tr> | |
1351 | <td class="struct_member_name"><p><em class="structfield"><code><a name="GstBaseParseClass.handle-frame"></a>handle_frame</code></em> ()</p></td> | |
1352 | <td class="struct_member_description"><p>Parses the input data into valid frames as defined by subclass | |
1353 | which should be passed to <a class="link" href="GstBaseParse.html#gst-base-parse-finish-frame" title="gst_base_parse_finish_frame ()"><code class="function">gst_base_parse_finish_frame()</code></a>. | |
1354 | The frame's input buffer is guaranteed writable, | |
1355 | whereas the input frame ownership is held by caller | |
1356 | (so subclass should make a copy if it needs to hang on). | |
1357 | Input buffer (data) is provided by baseclass with as much | |
1358 | metadata set as possible by baseclass according to upstream | |
1359 | information and/or subclass settings, | |
1360 | though subclass may still set buffer timestamp and duration | |
1361 | if desired.</p></td> | |
1362 | <td class="struct_member_annotations"> </td> | |
1363 | </tr> | |
1364 | <tr> | |
1365 | <td class="struct_member_name"><p><em class="structfield"><code><a name="GstBaseParseClass.pre-push-frame"></a>pre_push_frame</code></em> ()</p></td> | |
1366 | <td class="struct_member_description"><p>Optional. | |
1367 | Called just prior to pushing a frame (after any pending | |
1368 | events have been sent) to give subclass a chance to perform | |
1369 | additional actions at this time (e.g. tag sending) or to | |
1370 | decide whether this buffer should be dropped or not | |
1371 | (e.g. custom segment clipping).</p></td> | |
1372 | <td class="struct_member_annotations"> </td> | |
1373 | </tr> | |
1374 | <tr> | |
1375 | <td class="struct_member_name"><p><em class="structfield"><code><a name="GstBaseParseClass.convert"></a>convert</code></em> ()</p></td> | |
1376 | <td class="struct_member_description"><p>Optional. | |
1377 | Convert between formats.</p></td> | |
1378 | <td class="struct_member_annotations"> </td> | |
1379 | </tr> | |
1380 | <tr> | |
1381 | <td class="struct_member_name"><p><em class="structfield"><code><a name="GstBaseParseClass.sink-event"></a>sink_event</code></em> ()</p></td> | |
1382 | <td class="struct_member_description"><p>Optional. | |
1383 | Event handler on the sink pad. This function should chain | |
1384 | up to the parent implementation to let the default handler | |
1385 | run.</p></td> | |
1386 | <td class="struct_member_annotations"> </td> | |
1387 | </tr> | |
1388 | <tr> | |
1389 | <td class="struct_member_name"><p><em class="structfield"><code><a name="GstBaseParseClass.src-event"></a>src_event</code></em> ()</p></td> | |
1390 | <td class="struct_member_description"><p>Optional. | |
1391 | Event handler on the source pad. Should chain up to the | |
1392 | parent to let the default handler run.</p></td> | |
1393 | <td class="struct_member_annotations"> </td> | |
1394 | </tr> | |
1395 | <tr> | |
1396 | <td class="struct_member_name"><p><em class="structfield"><code><a name="GstBaseParseClass.get-sink-caps"></a>get_sink_caps</code></em> ()</p></td> | |
1397 | <td class="struct_member_description"><p>allows the subclass to do its own sink get caps if needed.</p></td> | |
1398 | <td class="struct_member_annotations"> </td> | |
1399 | </tr> | |
1400 | <tr> | |
1401 | <td class="struct_member_name"><p><em class="structfield"><code><a name="GstBaseParseClass.detect"></a>detect</code></em> ()</p></td> | |
1402 | <td class="struct_member_description"><p>Optional. | |
1403 | Called until it doesn't return GST_FLOW_OK anymore for | |
1404 | the first buffers. Can be used by the subclass to detect | |
1405 | the stream format.</p></td> | |
1406 | <td class="struct_member_annotations"> </td> | |
1407 | </tr> | |
1408 | <tr> | |
1409 | <td class="struct_member_name"><p><em class="structfield"><code><a name="GstBaseParseClass.sink-query"></a>sink_query</code></em> ()</p></td> | |
1410 | <td class="struct_member_description"><p>Optional. | |
1411 | Query handler on the sink pad. This function should chain | |
1412 | up to the parent implementation to let the default handler | |
1413 | run (Since 1.2)</p></td> | |
1414 | <td class="struct_member_annotations"> </td> | |
1415 | </tr> | |
1416 | <tr> | |
1417 | <td class="struct_member_name"><p><em class="structfield"><code><a name="GstBaseParseClass.src-query"></a>src_query</code></em> ()</p></td> | |
1418 | <td class="struct_member_description"><p>Optional. | |
1419 | Query handler on the source pad. Should chain up to the | |
1420 | parent to let the default handler run (Since 1.2)</p></td> | |
1421 | <td class="struct_member_annotations"> </td> | |
1422 | </tr> | |
1423 | </tbody> | |
1424 | </table></div> | |
1425 | </div> | |
1426 | </div> | |
1427 | <hr> | |
1428 | <div class="refsect2"> | |
1429 | <a name="GstBaseParseFrame"></a><h3>GstBaseParseFrame</h3> | |
1430 | <pre class="programlisting">typedef struct { | |
1431 | GstBuffer * buffer; | |
1432 | GstBuffer * out_buffer; | |
1433 | guint flags; | |
1434 | guint64 offset; | |
1435 | gint overhead; | |
1436 | } GstBaseParseFrame; | |
1437 | </pre> | |
1438 | <p>Frame (context) data passed to each frame parsing virtual methods. In | |
1439 | addition to providing the data to be checked for a valid frame or an already | |
1440 | identified frame, it conveys additional metadata or control information | |
1441 | from and to the subclass w.r.t. the particular frame in question (rather | |
1442 | than global parameters). Some of these may apply to each parsing stage, others | |
1443 | only to some a particular one. These parameters are effectively zeroed at start | |
1444 | of each frame's processing, i.e. parsing virtual method invocation sequence.</p> | |
1445 | <div class="refsect3"> | |
1446 | <a name="id-1.2.4.3.10.4.5"></a><h4>Members</h4> | |
1447 | <div class="informaltable"><table width="100%" border="0"> | |
1448 | <colgroup> | |
1449 | <col width="300px" class="struct_members_name"> | |
1450 | <col class="struct_members_description"> | |
1451 | <col width="200px" class="struct_members_annotations"> | |
1452 | </colgroup> | |
1453 | <tbody> | |
1454 | <tr> | |
1455 | <td class="struct_member_name"><p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="type">GstBuffer</span></a> *<em class="structfield"><code><a name="GstBaseParseFrame.buffer"></a>buffer</code></em>;</p></td> | |
1456 | <td class="struct_member_description"><p>input data to be parsed for frames.</p></td> | |
1457 | <td class="struct_member_annotations"> </td> | |
1458 | </tr> | |
1459 | <tr> | |
1460 | <td class="struct_member_name"><p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="type">GstBuffer</span></a> *<em class="structfield"><code><a name="GstBaseParseFrame.out-buffer"></a>out_buffer</code></em>;</p></td> | |
1461 | <td class="struct_member_description"><p>output data.</p></td> | |
1462 | <td class="struct_member_annotations"> </td> | |
1463 | </tr> | |
1464 | <tr> | |
1465 | <td class="struct_member_name"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="GstBaseParseFrame.flags"></a>flags</code></em>;</p></td> | |
1466 | <td class="struct_member_description"><p>a combination of input and output <a class="link" href="GstBaseParse.html#GstBaseParseFrameFlags" title="enum GstBaseParseFrameFlags"><span class="type">GstBaseParseFrameFlags</span></a> that | |
1467 | convey additional context to subclass or allow subclass to tune | |
1468 | subsequent <a class="link" href="GstBaseParse.html" title="GstBaseParse"><span class="type">GstBaseParse</span></a> actions.</p></td> | |
1469 | <td class="struct_member_annotations"> </td> | |
1470 | </tr> | |
1471 | <tr> | |
1472 | <td class="struct_member_name"><p><span class="type">guint64</span> <em class="structfield"><code><a name="GstBaseParseFrame.offset"></a>offset</code></em>;</p></td> | |
1473 | <td class="struct_member_description"><p>media specific offset of input frame | |
1474 | Note that a converter may have a different one on the frame's buffer.</p></td> | |
1475 | <td class="struct_member_annotations"> </td> | |
1476 | </tr> | |
1477 | <tr> | |
1478 | <td class="struct_member_name"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> <em class="structfield"><code><a name="GstBaseParseFrame.overhead"></a>overhead</code></em>;</p></td> | |
1479 | <td class="struct_member_description"><p>subclass can set this to indicates the metadata overhead | |
1480 | for the given frame, which is then used to enable more accurate bitrate | |
1481 | computations. If this is -1, it is assumed that this frame should be | |
1482 | skipped in bitrate calculation.</p></td> | |
1483 | <td class="struct_member_annotations"> </td> | |
1484 | </tr> | |
1485 | </tbody> | |
1486 | </table></div> | |
1487 | </div> | |
1488 | </div> | |
1489 | <hr> | |
1490 | <div class="refsect2"> | |
1491 | <a name="GstBaseParseFrameFlags"></a><h3>enum GstBaseParseFrameFlags</h3> | |
1492 | <p>Flags to be used in a <a class="link" href="GstBaseParse.html#GstBaseParseFrame" title="GstBaseParseFrame"><span class="type">GstBaseParseFrame</span></a>.</p> | |
1493 | <div class="refsect3"> | |
1494 | <a name="id-1.2.4.3.10.5.4"></a><h4>Members</h4> | |
1495 | <div class="informaltable"><table width="100%" border="0"> | |
1496 | <colgroup> | |
1497 | <col width="300px" class="enum_members_name"> | |
1498 | <col class="enum_members_description"> | |
1499 | <col width="200px" class="enum_members_annotations"> | |
1500 | </colgroup> | |
1501 | <tbody> | |
1502 | <tr> | |
1503 | <td class="enum_member_name"><p><a name="GST-BASE-PARSE-FRAME-FLAG-NONE:CAPS"></a>GST_BASE_PARSE_FRAME_FLAG_NONE</p></td> | |
1504 | <td class="enum_member_description"> | |
1505 | <p>no flag</p> | |
1506 | </td> | |
1507 | <td class="enum_member_annotations"> </td> | |
1508 | </tr> | |
1509 | <tr> | |
1510 | <td class="enum_member_name"><p><a name="GST-BASE-PARSE-FRAME-FLAG-NEW-FRAME:CAPS"></a>GST_BASE_PARSE_FRAME_FLAG_NEW_FRAME</p></td> | |
1511 | <td class="enum_member_description"> | |
1512 | <p>set by baseclass if current frame | |
1513 | is passed for processing to the subclass for the first time | |
1514 | (and not set on subsequent calls with same data).</p> | |
1515 | </td> | |
1516 | <td class="enum_member_annotations"> </td> | |
1517 | </tr> | |
1518 | <tr> | |
1519 | <td class="enum_member_name"><p><a name="GST-BASE-PARSE-FRAME-FLAG-NO-FRAME:CAPS"></a>GST_BASE_PARSE_FRAME_FLAG_NO_FRAME</p></td> | |
1520 | <td class="enum_member_description"> | |
1521 | <p>set to indicate this buffer should not be | |
1522 | counted as frame, e.g. if this frame is dependent on a previous one. | |
1523 | As it is not counted as a frame, bitrate increases but frame to time | |
1524 | conversions are maintained.</p> | |
1525 | </td> | |
1526 | <td class="enum_member_annotations"> </td> | |
1527 | </tr> | |
1528 | <tr> | |
1529 | <td class="enum_member_name"><p><a name="GST-BASE-PARSE-FRAME-FLAG-CLIP:CAPS"></a>GST_BASE_PARSE_FRAME_FLAG_CLIP</p></td> | |
1530 | <td class="enum_member_description"> | |
1531 | <p><em class="parameter"><code>pre_push_frame</code></em> | |
1532 | can set this to indicate | |
1533 | that regular segment clipping can still be performed (as opposed to | |
1534 | any custom one having been done).</p> | |
1535 | </td> | |
1536 | <td class="enum_member_annotations"> </td> | |
1537 | </tr> | |
1538 | <tr> | |
1539 | <td class="enum_member_name"><p><a name="GST-BASE-PARSE-FRAME-FLAG-DROP:CAPS"></a>GST_BASE_PARSE_FRAME_FLAG_DROP</p></td> | |
1540 | <td class="enum_member_description"> | |
1541 | <p>indicates to <em class="parameter"><code>finish_frame</code></em> | |
1542 | that the | |
1543 | the frame should be dropped (and might be handled internally by subclass)</p> | |
1544 | </td> | |
1545 | <td class="enum_member_annotations"> </td> | |
1546 | </tr> | |
1547 | <tr> | |
1548 | <td class="enum_member_name"><p><a name="GST-BASE-PARSE-FRAME-FLAG-QUEUE:CAPS"></a>GST_BASE_PARSE_FRAME_FLAG_QUEUE</p></td> | |
1549 | <td class="enum_member_description"> | |
1550 | <p>indicates to <em class="parameter"><code>finish_frame</code></em> | |
1551 | that the | |
1552 | the frame should be queued for now and processed fully later | |
1553 | when the first non-queued frame is finished</p> | |
1554 | </td> | |
1555 | <td class="enum_member_annotations"> </td> | |
1556 | </tr> | |
1557 | </tbody> | |
1558 | </table></div> | |
1559 | </div> | |
1560 | </div> | |
1561 | <hr> | |
1562 | <div class="refsect2"> | |
1563 | <a name="GST-BASE-PARSE-FLOW-DROPPED:CAPS"></a><h3>GST_BASE_PARSE_FLOW_DROPPED</h3> | |
1564 | <pre class="programlisting">#define GST_BASE_PARSE_FLOW_DROPPED GST_FLOW_CUSTOM_SUCCESS | |
1565 | </pre> | |
1566 | <p>A <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GstFlowReturn"><span class="type">GstFlowReturn</span></a> that can be returned from parse_frame to | |
1567 | indicate that no output buffer was generated, or from pre_push_frame to | |
1568 | to forego pushing buffer.</p> | |
1569 | </div> | |
1570 | </div> | |
1571 | <div class="refsect1"> | |
1572 | <a name="GstBaseParse.property-details"></a><h2>Property Details</h2> | |
1573 | <div class="refsect2"> | |
1574 | <a name="GstBaseParse--disable-passthrough"></a><h3>The <code class="literal">“disable-passthrough”</code> property</h3> | |
1575 | <pre class="programlisting"> “disable-passthrough” <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre> | |
1576 | <p>If set to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><span class="type">TRUE</span></a>, baseparse will unconditionally force parsing of the | |
1577 | incoming data. This can be required in the rare cases where the incoming | |
1578 | side-data (caps, pts, dts, ...) is not trusted by the user and wants to | |
1579 | force validation and parsing of the incoming data. | |
1580 | If set to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><span class="type">FALSE</span></a>, decision of whether to parse the data or not is up to | |
1581 | the implementation (standard behaviour).</p> | |
1582 | <p>Flags: Read / Write</p> | |
1583 | <p>Default value: FALSE</p> | |
1584 | </div> | |
1585 | </div> | |
1586 | <div class="refsect1"> | |
1587 | <a name="GstBaseParse.see-also"></a><h2>See Also</h2> | |
1588 | <p><a class="link" href="GstBaseTransform.html" title="GstBaseTransform"><span class="type">GstBaseTransform</span></a></p> | |
1589 | </div> | |
1590 | </div> | |
1591 | <div class="footer"> | |
1592 | <hr> | |
1593 | Generated by GTK-Doc V1.20</div> | |
1594 | </body> | |
1595 | </html>⏎ |
5 | 5 | <meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> |
6 | 6 | <link rel="home" href="index.html" title="GStreamer 1.0 Library Reference Manual"> |
7 | 7 | <link rel="up" href="gstreamer-base.html" title="GStreamer Base and Utillity Classes"> |
8 | <link rel="prev" href="gstreamer-libs-GstBaseParse.html" title="GstBaseParse"> | |
8 | <link rel="prev" href="GstBaseParse.html" title="GstBaseParse"> | |
9 | 9 | <link rel="next" href="GstBaseSink.html" title="GstBaseSink"> |
10 | 10 | <meta name="generator" content="GTK-Doc V1.20 (XML mode)"> |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
20 | 20 | </td> |
21 | 21 | <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> |
22 | 22 | <td><a accesskey="u" href="gstreamer-base.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> |
23 | <td><a accesskey="p" href="gstreamer-libs-GstBaseParse.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> | |
23 | <td><a accesskey="p" href="GstBaseParse.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> | |
24 | 24 | <td><a accesskey="n" href="GstBaseSink.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> |
25 | 25 | </tr></table> |
26 | 26 | <div class="refentry"> |
38 | 38 | <col width="150px" class="name"> |
39 | 39 | <col class="description"> |
40 | 40 | </colgroup> |
41 | <tbody><tr> | |
41 | <tbody> | |
42 | <tr> | |
42 | 43 | <td class="datatype_keyword">struct</td> |
43 | 44 | <td class="function_name"><a class="link" href="GstPushSrc.html#GstPushSrc-struct" title="struct GstPushSrc">GstPushSrc</a></td> |
44 | </tr></tbody> | |
45 | </tr> | |
46 | <tr> | |
47 | <td class="datatype_keyword">struct</td> | |
48 | <td class="function_name"><a class="link" href="GstPushSrc.html#GstPushSrcClass" title="struct GstPushSrcClass">GstPushSrcClass</a></td> | |
49 | </tr> | |
50 | </tbody> | |
45 | 51 | </table></div> |
46 | 52 | </div> |
47 | 53 | <div class="refsect1"> |
87 | 93 | <pre class="programlisting">struct GstPushSrc;</pre> |
88 | 94 | <p>The opaque <a class="link" href="GstPushSrc.html" title="GstPushSrc"><span class="type">GstPushSrc</span></a> data structure.</p> |
89 | 95 | </div> |
96 | <hr> | |
97 | <div class="refsect2"> | |
98 | <a name="GstPushSrcClass"></a><h3>struct GstPushSrcClass</h3> | |
99 | <pre class="programlisting">struct GstPushSrcClass { | |
100 | GstBaseSrcClass parent_class; | |
101 | ||
102 | /* ask the subclass to create a buffer, the default implementation | |
103 | * uses alloc and fill */ | |
104 | GstFlowReturn (*create) (GstPushSrc *src, GstBuffer **buf); | |
105 | /* allocate memory for a buffer */ | |
106 | GstFlowReturn (*alloc) (GstPushSrc *src, GstBuffer **buf); | |
107 | /* ask the subclass to fill a buffer */ | |
108 | GstFlowReturn (*fill) (GstPushSrc *src, GstBuffer *buf); | |
109 | }; | |
110 | </pre> | |
111 | </div> | |
90 | 112 | </div> |
91 | 113 | <div class="refsect1"> |
92 | 114 | <a name="GstPushSrc.see-also"></a><h2>See Also</h2> |
224 | 224 | <dd></dd> |
225 | 225 | <a name="idxB"></a><h3 class="title">B</h3> |
226 | 226 | <dt> |
227 | <a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParse" title="struct GstBaseParse">GstBaseParse</a>, struct in <a class="link" href="gstreamer-libs-GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
228 | </dt> | |
229 | <dd></dd> | |
230 | <dt> | |
231 | <a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParseClass" title="struct GstBaseParseClass">GstBaseParseClass</a>, struct in <a class="link" href="gstreamer-libs-GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
232 | </dt> | |
233 | <dd></dd> | |
234 | <dt> | |
235 | <a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParseFrame" title="GstBaseParseFrame">GstBaseParseFrame</a>, struct in <a class="link" href="gstreamer-libs-GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
236 | </dt> | |
237 | <dd></dd> | |
238 | <dt> | |
239 | <a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParseFrameFlags" title="enum GstBaseParseFrameFlags">GstBaseParseFrameFlags</a>, enum in <a class="link" href="gstreamer-libs-GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
227 | <a class="link" href="GstBaseParse.html#GstBaseParse-struct" title="struct GstBaseParse">GstBaseParse</a>, struct in <a class="link" href="GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
228 | </dt> | |
229 | <dd></dd> | |
230 | <dt> | |
231 | <a class="link" href="GstBaseParse.html#GstBaseParse--disable-passthrough" title="The “disable-passthrough” property">GstBaseParse:disable-passthrough</a>, object property in <a class="link" href="GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
232 | </dt> | |
233 | <dd></dd> | |
234 | <dt> | |
235 | <a class="link" href="GstBaseParse.html#GstBaseParseClass" title="struct GstBaseParseClass">GstBaseParseClass</a>, struct in <a class="link" href="GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
236 | </dt> | |
237 | <dd></dd> | |
238 | <dt> | |
239 | <a class="link" href="GstBaseParse.html#GstBaseParseFrame" title="GstBaseParseFrame">GstBaseParseFrame</a>, struct in <a class="link" href="GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
240 | </dt> | |
241 | <dd></dd> | |
242 | <dt> | |
243 | <a class="link" href="GstBaseParse.html#GstBaseParseFrameFlags" title="enum GstBaseParseFrameFlags">GstBaseParseFrameFlags</a>, enum in <a class="link" href="GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
240 | 244 | </dt> |
241 | 245 | <dd></dd> |
242 | 246 | <dt> |
332 | 336 | </dt> |
333 | 337 | <dd></dd> |
334 | 338 | <dt> |
335 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-add-index-entry" title="gst_base_parse_add_index_entry ()">gst_base_parse_add_index_entry</a>, function in <a class="link" href="gstreamer-libs-GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
336 | </dt> | |
337 | <dd></dd> | |
338 | <dt> | |
339 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-convert-default" title="gst_base_parse_convert_default ()">gst_base_parse_convert_default</a>, function in <a class="link" href="gstreamer-libs-GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
340 | </dt> | |
341 | <dd></dd> | |
342 | <dt> | |
343 | <a class="link" href="gstreamer-libs-GstBaseParse.html#GST-BASE-PARSE-DRAINING:CAPS" title="GST_BASE_PARSE_DRAINING()">GST_BASE_PARSE_DRAINING</a>, macro in <a class="link" href="gstreamer-libs-GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
344 | </dt> | |
345 | <dd></dd> | |
346 | <dt> | |
347 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-finish-frame" title="gst_base_parse_finish_frame ()">gst_base_parse_finish_frame</a>, function in <a class="link" href="gstreamer-libs-GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
348 | </dt> | |
349 | <dd></dd> | |
350 | <dt> | |
351 | <a class="link" href="gstreamer-libs-GstBaseParse.html#GST-BASE-PARSE-FLAG-DRAINING:CAPS" title="GST_BASE_PARSE_FLAG_DRAINING">GST_BASE_PARSE_FLAG_DRAINING</a>, macro in <a class="link" href="gstreamer-libs-GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
352 | </dt> | |
353 | <dd></dd> | |
354 | <dt> | |
355 | <a class="link" href="gstreamer-libs-GstBaseParse.html#GST-BASE-PARSE-FLAG-LOST-SYNC:CAPS" title="GST_BASE_PARSE_FLAG_LOST_SYNC">GST_BASE_PARSE_FLAG_LOST_SYNC</a>, macro in <a class="link" href="gstreamer-libs-GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
356 | </dt> | |
357 | <dd></dd> | |
358 | <dt> | |
359 | <a class="link" href="gstreamer-libs-GstBaseParse.html#GST-BASE-PARSE-FLOW-DROPPED:CAPS" title="GST_BASE_PARSE_FLOW_DROPPED">GST_BASE_PARSE_FLOW_DROPPED</a>, macro in <a class="link" href="gstreamer-libs-GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
360 | </dt> | |
361 | <dd></dd> | |
362 | <dt> | |
363 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-frame-free" title="gst_base_parse_frame_free ()">gst_base_parse_frame_free</a>, function in <a class="link" href="gstreamer-libs-GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
364 | </dt> | |
365 | <dd></dd> | |
366 | <dt> | |
367 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-frame-init" title="gst_base_parse_frame_init ()">gst_base_parse_frame_init</a>, function in <a class="link" href="gstreamer-libs-GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
368 | </dt> | |
369 | <dd></dd> | |
370 | <dt> | |
371 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-frame-new" title="gst_base_parse_frame_new ()">gst_base_parse_frame_new</a>, function in <a class="link" href="gstreamer-libs-GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
372 | </dt> | |
373 | <dd></dd> | |
374 | <dt> | |
375 | <a class="link" href="gstreamer-libs-GstBaseParse.html#GST-BASE-PARSE-LOST-SYNC:CAPS" title="GST_BASE_PARSE_LOST_SYNC()">GST_BASE_PARSE_LOST_SYNC</a>, macro in <a class="link" href="gstreamer-libs-GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
376 | </dt> | |
377 | <dd></dd> | |
378 | <dt> | |
379 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-push-frame" title="gst_base_parse_push_frame ()">gst_base_parse_push_frame</a>, function in <a class="link" href="gstreamer-libs-GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
380 | </dt> | |
381 | <dd></dd> | |
382 | <dt> | |
383 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-average-bitrate" title="gst_base_parse_set_average_bitrate ()">gst_base_parse_set_average_bitrate</a>, function in <a class="link" href="gstreamer-libs-GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
384 | </dt> | |
385 | <dd></dd> | |
386 | <dt> | |
387 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-duration" title="gst_base_parse_set_duration ()">gst_base_parse_set_duration</a>, function in <a class="link" href="gstreamer-libs-GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
388 | </dt> | |
389 | <dd></dd> | |
390 | <dt> | |
391 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-frame-rate" title="gst_base_parse_set_frame_rate ()">gst_base_parse_set_frame_rate</a>, function in <a class="link" href="gstreamer-libs-GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
392 | </dt> | |
393 | <dd></dd> | |
394 | <dt> | |
395 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-has-timing-info" title="gst_base_parse_set_has_timing_info ()">gst_base_parse_set_has_timing_info</a>, function in <a class="link" href="gstreamer-libs-GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
396 | </dt> | |
397 | <dd></dd> | |
398 | <dt> | |
399 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-infer-ts" title="gst_base_parse_set_infer_ts ()">gst_base_parse_set_infer_ts</a>, function in <a class="link" href="gstreamer-libs-GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
400 | </dt> | |
401 | <dd></dd> | |
402 | <dt> | |
403 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-latency" title="gst_base_parse_set_latency ()">gst_base_parse_set_latency</a>, function in <a class="link" href="gstreamer-libs-GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
404 | </dt> | |
405 | <dd></dd> | |
406 | <dt> | |
407 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-min-frame-size" title="gst_base_parse_set_min_frame_size ()">gst_base_parse_set_min_frame_size</a>, function in <a class="link" href="gstreamer-libs-GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
408 | </dt> | |
409 | <dd></dd> | |
410 | <dt> | |
411 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-passthrough" title="gst_base_parse_set_passthrough ()">gst_base_parse_set_passthrough</a>, function in <a class="link" href="gstreamer-libs-GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
412 | </dt> | |
413 | <dd></dd> | |
414 | <dt> | |
415 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-pts-interpolation" title="gst_base_parse_set_pts_interpolation ()">gst_base_parse_set_pts_interpolation</a>, function in <a class="link" href="gstreamer-libs-GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
416 | </dt> | |
417 | <dd></dd> | |
418 | <dt> | |
419 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-syncable" title="gst_base_parse_set_syncable ()">gst_base_parse_set_syncable</a>, function in <a class="link" href="gstreamer-libs-GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
420 | </dt> | |
421 | <dd></dd> | |
422 | <dt> | |
423 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-ts-at-offset" title="gst_base_parse_set_ts_at_offset ()">gst_base_parse_set_ts_at_offset</a>, function in <a class="link" href="gstreamer-libs-GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
424 | </dt> | |
425 | <dd></dd> | |
426 | <dt> | |
427 | <a class="link" href="gstreamer-libs-GstBaseParse.html#GST-BASE-PARSE-SINK-PAD:CAPS" title="GST_BASE_PARSE_SINK_PAD()">GST_BASE_PARSE_SINK_PAD</a>, macro in <a class="link" href="gstreamer-libs-GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
428 | </dt> | |
429 | <dd></dd> | |
430 | <dt> | |
431 | <a class="link" href="gstreamer-libs-GstBaseParse.html#GST-BASE-PARSE-SRC-PAD:CAPS" title="GST_BASE_PARSE_SRC_PAD()">GST_BASE_PARSE_SRC_PAD</a>, macro in <a class="link" href="gstreamer-libs-GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
339 | <a class="link" href="GstBaseParse.html#gst-base-parse-add-index-entry" title="gst_base_parse_add_index_entry ()">gst_base_parse_add_index_entry</a>, function in <a class="link" href="GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
340 | </dt> | |
341 | <dd></dd> | |
342 | <dt> | |
343 | <a class="link" href="GstBaseParse.html#gst-base-parse-convert-default" title="gst_base_parse_convert_default ()">gst_base_parse_convert_default</a>, function in <a class="link" href="GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
344 | </dt> | |
345 | <dd></dd> | |
346 | <dt> | |
347 | <a class="link" href="GstBaseParse.html#GST-BASE-PARSE-DRAINING:CAPS" title="GST_BASE_PARSE_DRAINING()">GST_BASE_PARSE_DRAINING</a>, macro in <a class="link" href="GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
348 | </dt> | |
349 | <dd></dd> | |
350 | <dt> | |
351 | <a class="link" href="GstBaseParse.html#gst-base-parse-finish-frame" title="gst_base_parse_finish_frame ()">gst_base_parse_finish_frame</a>, function in <a class="link" href="GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
352 | </dt> | |
353 | <dd></dd> | |
354 | <dt> | |
355 | <a class="link" href="GstBaseParse.html#GST-BASE-PARSE-FLAG-DRAINING:CAPS" title="GST_BASE_PARSE_FLAG_DRAINING">GST_BASE_PARSE_FLAG_DRAINING</a>, macro in <a class="link" href="GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
356 | </dt> | |
357 | <dd></dd> | |
358 | <dt> | |
359 | <a class="link" href="GstBaseParse.html#GST-BASE-PARSE-FLAG-LOST-SYNC:CAPS" title="GST_BASE_PARSE_FLAG_LOST_SYNC">GST_BASE_PARSE_FLAG_LOST_SYNC</a>, macro in <a class="link" href="GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
360 | </dt> | |
361 | <dd></dd> | |
362 | <dt> | |
363 | <a class="link" href="GstBaseParse.html#GST-BASE-PARSE-FLOW-DROPPED:CAPS" title="GST_BASE_PARSE_FLOW_DROPPED">GST_BASE_PARSE_FLOW_DROPPED</a>, macro in <a class="link" href="GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
364 | </dt> | |
365 | <dd></dd> | |
366 | <dt> | |
367 | <a class="link" href="GstBaseParse.html#gst-base-parse-frame-free" title="gst_base_parse_frame_free ()">gst_base_parse_frame_free</a>, function in <a class="link" href="GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
368 | </dt> | |
369 | <dd></dd> | |
370 | <dt> | |
371 | <a class="link" href="GstBaseParse.html#gst-base-parse-frame-init" title="gst_base_parse_frame_init ()">gst_base_parse_frame_init</a>, function in <a class="link" href="GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
372 | </dt> | |
373 | <dd></dd> | |
374 | <dt> | |
375 | <a class="link" href="GstBaseParse.html#gst-base-parse-frame-new" title="gst_base_parse_frame_new ()">gst_base_parse_frame_new</a>, function in <a class="link" href="GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
376 | </dt> | |
377 | <dd></dd> | |
378 | <dt> | |
379 | <a class="link" href="GstBaseParse.html#GST-BASE-PARSE-LOST-SYNC:CAPS" title="GST_BASE_PARSE_LOST_SYNC()">GST_BASE_PARSE_LOST_SYNC</a>, macro in <a class="link" href="GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
380 | </dt> | |
381 | <dd></dd> | |
382 | <dt> | |
383 | <a class="link" href="GstBaseParse.html#gst-base-parse-push-frame" title="gst_base_parse_push_frame ()">gst_base_parse_push_frame</a>, function in <a class="link" href="GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
384 | </dt> | |
385 | <dd></dd> | |
386 | <dt> | |
387 | <a class="link" href="GstBaseParse.html#gst-base-parse-set-average-bitrate" title="gst_base_parse_set_average_bitrate ()">gst_base_parse_set_average_bitrate</a>, function in <a class="link" href="GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
388 | </dt> | |
389 | <dd></dd> | |
390 | <dt> | |
391 | <a class="link" href="GstBaseParse.html#gst-base-parse-set-duration" title="gst_base_parse_set_duration ()">gst_base_parse_set_duration</a>, function in <a class="link" href="GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
392 | </dt> | |
393 | <dd></dd> | |
394 | <dt> | |
395 | <a class="link" href="GstBaseParse.html#gst-base-parse-set-frame-rate" title="gst_base_parse_set_frame_rate ()">gst_base_parse_set_frame_rate</a>, function in <a class="link" href="GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
396 | </dt> | |
397 | <dd></dd> | |
398 | <dt> | |
399 | <a class="link" href="GstBaseParse.html#gst-base-parse-set-has-timing-info" title="gst_base_parse_set_has_timing_info ()">gst_base_parse_set_has_timing_info</a>, function in <a class="link" href="GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
400 | </dt> | |
401 | <dd></dd> | |
402 | <dt> | |
403 | <a class="link" href="GstBaseParse.html#gst-base-parse-set-infer-ts" title="gst_base_parse_set_infer_ts ()">gst_base_parse_set_infer_ts</a>, function in <a class="link" href="GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
404 | </dt> | |
405 | <dd></dd> | |
406 | <dt> | |
407 | <a class="link" href="GstBaseParse.html#gst-base-parse-set-latency" title="gst_base_parse_set_latency ()">gst_base_parse_set_latency</a>, function in <a class="link" href="GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
408 | </dt> | |
409 | <dd></dd> | |
410 | <dt> | |
411 | <a class="link" href="GstBaseParse.html#gst-base-parse-set-min-frame-size" title="gst_base_parse_set_min_frame_size ()">gst_base_parse_set_min_frame_size</a>, function in <a class="link" href="GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
412 | </dt> | |
413 | <dd></dd> | |
414 | <dt> | |
415 | <a class="link" href="GstBaseParse.html#gst-base-parse-set-passthrough" title="gst_base_parse_set_passthrough ()">gst_base_parse_set_passthrough</a>, function in <a class="link" href="GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
416 | </dt> | |
417 | <dd></dd> | |
418 | <dt> | |
419 | <a class="link" href="GstBaseParse.html#gst-base-parse-set-pts-interpolation" title="gst_base_parse_set_pts_interpolation ()">gst_base_parse_set_pts_interpolation</a>, function in <a class="link" href="GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
420 | </dt> | |
421 | <dd></dd> | |
422 | <dt> | |
423 | <a class="link" href="GstBaseParse.html#gst-base-parse-set-syncable" title="gst_base_parse_set_syncable ()">gst_base_parse_set_syncable</a>, function in <a class="link" href="GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
424 | </dt> | |
425 | <dd></dd> | |
426 | <dt> | |
427 | <a class="link" href="GstBaseParse.html#gst-base-parse-set-ts-at-offset" title="gst_base_parse_set_ts_at_offset ()">gst_base_parse_set_ts_at_offset</a>, function in <a class="link" href="GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
428 | </dt> | |
429 | <dd></dd> | |
430 | <dt> | |
431 | <a class="link" href="GstBaseParse.html#GST-BASE-PARSE-SINK-PAD:CAPS" title="GST_BASE_PARSE_SINK_PAD()">GST_BASE_PARSE_SINK_PAD</a>, macro in <a class="link" href="GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
432 | </dt> | |
433 | <dd></dd> | |
434 | <dt> | |
435 | <a class="link" href="GstBaseParse.html#GST-BASE-PARSE-SRC-PAD:CAPS" title="GST_BASE_PARSE_SRC_PAD()">GST_BASE_PARSE_SRC_PAD</a>, macro in <a class="link" href="GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
432 | 436 | </dt> |
433 | 437 | <dd></dd> |
434 | 438 | <dt> |
792 | 796 | </dt> |
793 | 797 | <dd></dd> |
794 | 798 | <dt> |
799 | <a class="link" href="gstreamer-libs-GstBitReader.html#gst-bit-reader-init" title="gst_bit_reader_init ()">gst_bit_reader_init</a>, function in <a class="link" href="gstreamer-libs-GstBitReader.html" title="GstBitReader">GstBitReader</a> | |
800 | </dt> | |
801 | <dd></dd> | |
802 | <dt> | |
795 | 803 | <a class="link" href="gstreamer-libs-GstBitReader.html#GST-BIT-READER-INIT:CAPS" title="GST_BIT_READER_INIT()">GST_BIT_READER_INIT</a>, macro in <a class="link" href="gstreamer-libs-GstBitReader.html" title="GstBitReader">GstBitReader</a> |
796 | 804 | </dt> |
797 | 805 | <dd></dd> |
798 | 806 | <dt> |
799 | <a class="link" href="gstreamer-libs-GstBitReader.html#gst-bit-reader-init" title="gst_bit_reader_init ()">gst_bit_reader_init</a>, function in <a class="link" href="gstreamer-libs-GstBitReader.html" title="GstBitReader">GstBitReader</a> | |
800 | </dt> | |
801 | <dd></dd> | |
802 | <dt> | |
803 | 807 | <a class="link" href="gstreamer-libs-GstBitReader.html#gst-bit-reader-new" title="gst_bit_reader_new ()">gst_bit_reader_new</a>, function in <a class="link" href="gstreamer-libs-GstBitReader.html" title="GstBitReader">GstBitReader</a> |
804 | 808 | </dt> |
805 | 809 | <dd></dd> |
1116 | 1120 | </dt> |
1117 | 1121 | <dd></dd> |
1118 | 1122 | <dt> |
1123 | <a class="link" href="gstreamer-libs-GstByteReader.html#GST-BYTE-READER-INIT:CAPS" title="GST_BYTE_READER_INIT()">GST_BYTE_READER_INIT</a>, macro in <a class="link" href="gstreamer-libs-GstByteReader.html" title="GstByteReader">GstByteReader</a> | |
1124 | </dt> | |
1125 | <dd></dd> | |
1126 | <dt> | |
1119 | 1127 | <a class="link" href="gstreamer-libs-GstByteReader.html#gst-byte-reader-init" title="gst_byte_reader_init ()">gst_byte_reader_init</a>, function in <a class="link" href="gstreamer-libs-GstByteReader.html" title="GstByteReader">GstByteReader</a> |
1120 | 1128 | </dt> |
1121 | 1129 | <dd></dd> |
1122 | 1130 | <dt> |
1123 | <a class="link" href="gstreamer-libs-GstByteReader.html#GST-BYTE-READER-INIT:CAPS" title="GST_BYTE_READER_INIT()">GST_BYTE_READER_INIT</a>, macro in <a class="link" href="gstreamer-libs-GstByteReader.html" title="GstByteReader">GstByteReader</a> | |
1124 | </dt> | |
1125 | <dd></dd> | |
1126 | <dt> | |
1127 | 1131 | <a class="link" href="gstreamer-libs-GstByteReader.html#gst-byte-reader-masked-scan-uint32" title="gst_byte_reader_masked_scan_uint32 ()">gst_byte_reader_masked_scan_uint32</a>, function in <a class="link" href="gstreamer-libs-GstByteReader.html" title="GstByteReader">GstByteReader</a> |
1128 | 1132 | </dt> |
1129 | 1133 | <dd></dd> |
2161 | 2165 | <a name="idxP"></a><h3 class="title">P</h3> |
2162 | 2166 | <dt> |
2163 | 2167 | <a class="link" href="GstPushSrc.html#GstPushSrc-struct" title="struct GstPushSrc">GstPushSrc</a>, struct in <a class="link" href="GstPushSrc.html" title="GstPushSrc">GstPushSrc</a> |
2168 | </dt> | |
2169 | <dd></dd> | |
2170 | <dt> | |
2171 | <a class="link" href="GstPushSrc.html#GstPushSrcClass" title="struct GstPushSrcClass">GstPushSrcClass</a>, struct in <a class="link" href="GstPushSrc.html" title="GstPushSrc">GstPushSrc</a> | |
2164 | 2172 | </dt> |
2165 | 2173 | <dd></dd> |
2166 | 2174 | <a name="idxQ"></a><h3 class="title">Q</h3> |
6 | 6 | <link rel="home" href="index.html" title="GStreamer 1.0 Library Reference Manual"> |
7 | 7 | <link rel="up" href="gstreamer-libs.html" title="Part I. GStreamer Libraries"> |
8 | 8 | <link rel="prev" href="gstreamer-libs.html" title="Part I. GStreamer Libraries"> |
9 | <link rel="next" href="gstreamer-libs-GstBaseParse.html" title="GstBaseParse"> | |
9 | <link rel="next" href="GstBaseParse.html" title="GstBaseParse"> | |
10 | 10 | <meta name="generator" content="GTK-Doc V1.20 (XML mode)"> |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
12 | 12 | </head> |
16 | 16 | <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> |
17 | 17 | <td><a accesskey="u" href="gstreamer-libs.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> |
18 | 18 | <td><a accesskey="p" href="gstreamer-libs.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> |
19 | <td><a accesskey="n" href="gstreamer-libs-GstBaseParse.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> | |
19 | <td><a accesskey="n" href="GstBaseParse.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> | |
20 | 20 | </tr></table> |
21 | 21 | <div class="chapter"> |
22 | 22 | <div class="titlepage"><div><div><h2 class="title"> |
23 | 23 | <a name="gstreamer-base"></a>GStreamer Base and Utillity Classes</h2></div></div></div> |
24 | 24 | <div class="toc"><dl class="toc"> |
25 | 25 | <dt> |
26 | <span class="refentrytitle"><a href="gstreamer-libs-GstBaseParse.html">GstBaseParse</a></span><span class="refpurpose"> — Base class for stream parsers</span> | |
26 | <span class="refentrytitle"><a href="GstBaseParse.html">GstBaseParse</a></span><span class="refpurpose"> — Base class for stream parsers</span> | |
27 | 27 | </dt> |
28 | 28 | <dt> |
29 | 29 | <span class="refentrytitle"><a href="GstBaseSrc.html">GstBaseSrc</a></span><span class="refpurpose"> — Base class for getrange based source elements</span> |
26 | 26 | <span class="lineart">├──</span> <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a> |
27 | 27 | <span class="lineart">│</span> <span class="lineart">╰──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstObject.html">GstObject</a> |
28 | 28 | <span class="lineart">│</span> <span class="lineart">├──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html">GstElement</a> |
29 | <span class="lineart">│</span> <span class="lineart">│</span> <span class="lineart">├──</span> <a class="link" href="GstBaseParse.html" title="GstBaseParse">GstBaseParse</a> | |
29 | 30 | <span class="lineart">│</span> <span class="lineart">│</span> <span class="lineart">├──</span> <a class="link" href="GstBaseSrc.html" title="GstBaseSrc">GstBaseSrc</a> |
30 | 31 | <span class="lineart">│</span> <span class="lineart">│</span> <span class="lineart">│</span> <span class="lineart">╰──</span> <a class="link" href="GstPushSrc.html" title="GstPushSrc">GstPushSrc</a> |
31 | 32 | <span class="lineart">│</span> <span class="lineart">│</span> <span class="lineart">├──</span> <a class="link" href="GstBaseSink.html" title="GstBaseSink">GstBaseSink</a> |
3 | 3 | <chapters> |
4 | 4 | <sub name="GStreamer Libraries" link="gstreamer-libs.html"> |
5 | 5 | <sub name="GStreamer Base and Utillity Classes" link="gstreamer-base.html"> |
6 | <sub name="GstBaseParse" link="gstreamer-libs-GstBaseParse.html"/> | |
6 | <sub name="GstBaseParse" link="GstBaseParse.html"/> | |
7 | 7 | <sub name="GstBaseSrc" link="GstBaseSrc.html"/> |
8 | 8 | <sub name="GstBaseSink" link="GstBaseSink.html"/> |
9 | 9 | <sub name="GstBaseTransform" link="GstBaseTransform.html"/> |
43 | 43 | <sub name="Annotation Glossary" link="annotation-glossary.html"/> |
44 | 44 | </chapters> |
45 | 45 | <functions> |
46 | <keyword type="function" name="gst_base_parse_set_duration ()" link="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-duration"/> | |
47 | <keyword type="function" name="gst_base_parse_set_average_bitrate ()" link="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-average-bitrate"/> | |
48 | <keyword type="function" name="gst_base_parse_set_min_frame_size ()" link="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-min-frame-size"/> | |
49 | <keyword type="function" name="gst_base_parse_set_passthrough ()" link="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-passthrough"/> | |
50 | <keyword type="function" name="gst_base_parse_set_syncable ()" link="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-syncable"/> | |
51 | <keyword type="function" name="gst_base_parse_set_has_timing_info ()" link="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-has-timing-info"/> | |
52 | <keyword type="function" name="gst_base_parse_set_frame_rate ()" link="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-frame-rate"/> | |
53 | <keyword type="function" name="gst_base_parse_set_latency ()" link="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-latency"/> | |
54 | <keyword type="function" name="gst_base_parse_set_infer_ts ()" link="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-infer-ts"/> | |
55 | <keyword type="function" name="gst_base_parse_set_pts_interpolation ()" link="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-pts-interpolation"/> | |
56 | <keyword type="function" name="gst_base_parse_set_ts_at_offset ()" link="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-ts-at-offset" since="1.2"/> | |
57 | <keyword type="function" name="gst_base_parse_convert_default ()" link="gstreamer-libs-GstBaseParse.html#gst-base-parse-convert-default"/> | |
58 | <keyword type="function" name="gst_base_parse_add_index_entry ()" link="gstreamer-libs-GstBaseParse.html#gst-base-parse-add-index-entry"/> | |
59 | <keyword type="function" name="gst_base_parse_frame_new ()" link="gstreamer-libs-GstBaseParse.html#gst-base-parse-frame-new"/> | |
60 | <keyword type="function" name="gst_base_parse_frame_init ()" link="gstreamer-libs-GstBaseParse.html#gst-base-parse-frame-init"/> | |
61 | <keyword type="function" name="gst_base_parse_frame_free ()" link="gstreamer-libs-GstBaseParse.html#gst-base-parse-frame-free"/> | |
62 | <keyword type="function" name="gst_base_parse_push_frame ()" link="gstreamer-libs-GstBaseParse.html#gst-base-parse-push-frame"/> | |
63 | <keyword type="function" name="gst_base_parse_finish_frame ()" link="gstreamer-libs-GstBaseParse.html#gst-base-parse-finish-frame"/> | |
64 | <keyword type="macro" name="GST_BASE_PARSE_DRAINING()" link="gstreamer-libs-GstBaseParse.html#GST-BASE-PARSE-DRAINING:CAPS"/> | |
65 | <keyword type="macro" name="GST_BASE_PARSE_FLAG_DRAINING" link="gstreamer-libs-GstBaseParse.html#GST-BASE-PARSE-FLAG-DRAINING:CAPS"/> | |
66 | <keyword type="macro" name="GST_BASE_PARSE_FLAG_LOST_SYNC" link="gstreamer-libs-GstBaseParse.html#GST-BASE-PARSE-FLAG-LOST-SYNC:CAPS"/> | |
67 | <keyword type="macro" name="GST_BASE_PARSE_LOST_SYNC()" link="gstreamer-libs-GstBaseParse.html#GST-BASE-PARSE-LOST-SYNC:CAPS"/> | |
68 | <keyword type="macro" name="GST_BASE_PARSE_SINK_PAD()" link="gstreamer-libs-GstBaseParse.html#GST-BASE-PARSE-SINK-PAD:CAPS"/> | |
69 | <keyword type="macro" name="GST_BASE_PARSE_SRC_PAD()" link="gstreamer-libs-GstBaseParse.html#GST-BASE-PARSE-SRC-PAD:CAPS"/> | |
70 | <keyword type="struct" name="struct GstBaseParse" link="gstreamer-libs-GstBaseParse.html#GstBaseParse"/> | |
71 | <keyword type="struct" name="struct GstBaseParseClass" link="gstreamer-libs-GstBaseParse.html#GstBaseParseClass"/> | |
72 | <keyword type="struct" name="GstBaseParseFrame" link="gstreamer-libs-GstBaseParse.html#GstBaseParseFrame"/> | |
73 | <keyword type="enum" name="enum GstBaseParseFrameFlags" link="gstreamer-libs-GstBaseParse.html#GstBaseParseFrameFlags"/> | |
74 | <keyword type="macro" name="GST_BASE_PARSE_FLOW_DROPPED" link="gstreamer-libs-GstBaseParse.html#GST-BASE-PARSE-FLOW-DROPPED:CAPS"/> | |
46 | <keyword type="function" name="gst_base_parse_set_duration ()" link="GstBaseParse.html#gst-base-parse-set-duration"/> | |
47 | <keyword type="function" name="gst_base_parse_set_average_bitrate ()" link="GstBaseParse.html#gst-base-parse-set-average-bitrate"/> | |
48 | <keyword type="function" name="gst_base_parse_set_min_frame_size ()" link="GstBaseParse.html#gst-base-parse-set-min-frame-size"/> | |
49 | <keyword type="function" name="gst_base_parse_set_passthrough ()" link="GstBaseParse.html#gst-base-parse-set-passthrough"/> | |
50 | <keyword type="function" name="gst_base_parse_set_syncable ()" link="GstBaseParse.html#gst-base-parse-set-syncable"/> | |
51 | <keyword type="function" name="gst_base_parse_set_has_timing_info ()" link="GstBaseParse.html#gst-base-parse-set-has-timing-info"/> | |
52 | <keyword type="function" name="gst_base_parse_set_frame_rate ()" link="GstBaseParse.html#gst-base-parse-set-frame-rate"/> | |
53 | <keyword type="function" name="gst_base_parse_set_latency ()" link="GstBaseParse.html#gst-base-parse-set-latency"/> | |
54 | <keyword type="function" name="gst_base_parse_set_infer_ts ()" link="GstBaseParse.html#gst-base-parse-set-infer-ts"/> | |
55 | <keyword type="function" name="gst_base_parse_set_pts_interpolation ()" link="GstBaseParse.html#gst-base-parse-set-pts-interpolation"/> | |
56 | <keyword type="function" name="gst_base_parse_set_ts_at_offset ()" link="GstBaseParse.html#gst-base-parse-set-ts-at-offset" since="1.2"/> | |
57 | <keyword type="function" name="gst_base_parse_convert_default ()" link="GstBaseParse.html#gst-base-parse-convert-default"/> | |
58 | <keyword type="function" name="gst_base_parse_add_index_entry ()" link="GstBaseParse.html#gst-base-parse-add-index-entry"/> | |
59 | <keyword type="function" name="gst_base_parse_frame_new ()" link="GstBaseParse.html#gst-base-parse-frame-new"/> | |
60 | <keyword type="function" name="gst_base_parse_frame_init ()" link="GstBaseParse.html#gst-base-parse-frame-init"/> | |
61 | <keyword type="function" name="gst_base_parse_frame_free ()" link="GstBaseParse.html#gst-base-parse-frame-free"/> | |
62 | <keyword type="function" name="gst_base_parse_push_frame ()" link="GstBaseParse.html#gst-base-parse-push-frame"/> | |
63 | <keyword type="function" name="gst_base_parse_finish_frame ()" link="GstBaseParse.html#gst-base-parse-finish-frame"/> | |
64 | <keyword type="macro" name="GST_BASE_PARSE_DRAINING()" link="GstBaseParse.html#GST-BASE-PARSE-DRAINING:CAPS"/> | |
65 | <keyword type="macro" name="GST_BASE_PARSE_FLAG_DRAINING" link="GstBaseParse.html#GST-BASE-PARSE-FLAG-DRAINING:CAPS"/> | |
66 | <keyword type="macro" name="GST_BASE_PARSE_FLAG_LOST_SYNC" link="GstBaseParse.html#GST-BASE-PARSE-FLAG-LOST-SYNC:CAPS"/> | |
67 | <keyword type="macro" name="GST_BASE_PARSE_LOST_SYNC()" link="GstBaseParse.html#GST-BASE-PARSE-LOST-SYNC:CAPS"/> | |
68 | <keyword type="macro" name="GST_BASE_PARSE_SINK_PAD()" link="GstBaseParse.html#GST-BASE-PARSE-SINK-PAD:CAPS"/> | |
69 | <keyword type="macro" name="GST_BASE_PARSE_SRC_PAD()" link="GstBaseParse.html#GST-BASE-PARSE-SRC-PAD:CAPS"/> | |
70 | <keyword type="struct" name="struct GstBaseParse" link="GstBaseParse.html#GstBaseParse-struct"/> | |
71 | <keyword type="struct" name="struct GstBaseParseClass" link="GstBaseParse.html#GstBaseParseClass"/> | |
72 | <keyword type="struct" name="GstBaseParseFrame" link="GstBaseParse.html#GstBaseParseFrame"/> | |
73 | <keyword type="enum" name="enum GstBaseParseFrameFlags" link="GstBaseParse.html#GstBaseParseFrameFlags"/> | |
74 | <keyword type="macro" name="GST_BASE_PARSE_FLOW_DROPPED" link="GstBaseParse.html#GST-BASE-PARSE-FLOW-DROPPED:CAPS"/> | |
75 | <keyword type="property" name="The “disable-passthrough” property" link="GstBaseParse.html#GstBaseParse--disable-passthrough"/> | |
75 | 76 | <keyword type="" name="Controlled shutdown of live sources in applications" link="GstBaseSrc.html#id-1.2.4.4.8.19"/> |
76 | 77 | <keyword type="function" name="gst_base_src_wait_playing ()" link="GstBaseSrc.html#gst-base-src-wait-playing"/> |
77 | 78 | <keyword type="function" name="gst_base_src_start_wait ()" link="GstBaseSrc.html#gst-base-src-start-wait"/> |
176 | 177 | <keyword type="macro" name="GST_BASE_TRANSFORM_FLOW_DROPPED" link="GstBaseTransform.html#GST-BASE-TRANSFORM-FLOW-DROPPED:CAPS"/> |
177 | 178 | <keyword type="property" name="The “qos” property" link="GstBaseTransform.html#GstBaseTransform--qos"/> |
178 | 179 | <keyword type="struct" name="struct GstPushSrc" link="GstPushSrc.html#GstPushSrc-struct"/> |
180 | <keyword type="struct" name="struct GstPushSrcClass" link="GstPushSrc.html#GstPushSrcClass"/> | |
179 | 181 | <keyword type="function" name="gst_adapter_new ()" link="GstAdapter.html#gst-adapter-new"/> |
180 | 182 | <keyword type="function" name="gst_adapter_clear ()" link="GstAdapter.html#gst-adapter-clear"/> |
181 | 183 | <keyword type="function" name="gst_adapter_push ()" link="GstAdapter.html#gst-adapter-push"/> |
0 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
1 | <html> | |
2 | <head> | |
3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
4 | <title>GStreamer 1.0 Library Reference Manual: GstBaseParse</title> | |
5 | <meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> | |
6 | <link rel="home" href="index.html" title="GStreamer 1.0 Library Reference Manual"> | |
7 | <link rel="up" href="gstreamer-base.html" title="GStreamer Base and Utillity Classes"> | |
8 | <link rel="prev" href="gstreamer-base.html" title="GStreamer Base and Utillity Classes"> | |
9 | <link rel="next" href="GstBaseSrc.html" title="GstBaseSrc"> | |
10 | <meta name="generator" content="GTK-Doc V1.20 (XML mode)"> | |
11 | <link rel="stylesheet" href="style.css" type="text/css"> | |
12 | </head> | |
13 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> | |
14 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle"> | |
15 | <td width="100%" align="left" class="shortcuts"> | |
16 | <a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> | |
17 | <a href="#gstreamer-libs-GstBaseParse.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> | |
18 | <a href="#gstreamer-libs-GstBaseParse.object-hierarchy" class="shortcut">Object Hierarchy</a></span> | |
19 | </td> | |
20 | <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> | |
21 | <td><a accesskey="u" href="gstreamer-base.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> | |
22 | <td><a accesskey="p" href="gstreamer-base.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> | |
23 | <td><a accesskey="n" href="GstBaseSrc.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> | |
24 | </tr></table> | |
25 | <div class="refentry"> | |
26 | <a name="gstreamer-libs-GstBaseParse"></a><div class="titlepage"></div> | |
27 | <div class="refnamediv"><table width="100%"><tr> | |
28 | <td valign="top"> | |
29 | <h2><span class="refentrytitle"><a name="gstreamer-libs-GstBaseParse.top_of_page"></a>GstBaseParse</span></h2> | |
30 | <p>GstBaseParse — Base class for stream parsers</p> | |
31 | </td> | |
32 | <td class="gallery_image" valign="top" align="right"></td> | |
33 | </tr></table></div> | |
34 | <div class="refsect1"> | |
35 | <a name="gstreamer-libs-GstBaseParse.functions"></a><h2>Functions</h2> | |
36 | <div class="informaltable"><table width="100%" border="0"> | |
37 | <colgroup> | |
38 | <col width="150px" class="functions_return"> | |
39 | <col class="functions_name"> | |
40 | </colgroup> | |
41 | <tbody> | |
42 | <tr> | |
43 | <td class="function_type"> | |
44 | <span class="returnvalue">void</span> | |
45 | </td> | |
46 | <td class="function_name"> | |
47 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-duration" title="gst_base_parse_set_duration ()">gst_base_parse_set_duration</a> <span class="c_punctuation">()</span> | |
48 | </td> | |
49 | </tr> | |
50 | <tr> | |
51 | <td class="function_type"> | |
52 | <span class="returnvalue">void</span> | |
53 | </td> | |
54 | <td class="function_name"> | |
55 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-average-bitrate" title="gst_base_parse_set_average_bitrate ()">gst_base_parse_set_average_bitrate</a> <span class="c_punctuation">()</span> | |
56 | </td> | |
57 | </tr> | |
58 | <tr> | |
59 | <td class="function_type"> | |
60 | <span class="returnvalue">void</span> | |
61 | </td> | |
62 | <td class="function_name"> | |
63 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-min-frame-size" title="gst_base_parse_set_min_frame_size ()">gst_base_parse_set_min_frame_size</a> <span class="c_punctuation">()</span> | |
64 | </td> | |
65 | </tr> | |
66 | <tr> | |
67 | <td class="function_type"> | |
68 | <span class="returnvalue">void</span> | |
69 | </td> | |
70 | <td class="function_name"> | |
71 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-passthrough" title="gst_base_parse_set_passthrough ()">gst_base_parse_set_passthrough</a> <span class="c_punctuation">()</span> | |
72 | </td> | |
73 | </tr> | |
74 | <tr> | |
75 | <td class="function_type"> | |
76 | <span class="returnvalue">void</span> | |
77 | </td> | |
78 | <td class="function_name"> | |
79 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-syncable" title="gst_base_parse_set_syncable ()">gst_base_parse_set_syncable</a> <span class="c_punctuation">()</span> | |
80 | </td> | |
81 | </tr> | |
82 | <tr> | |
83 | <td class="function_type"> | |
84 | <span class="returnvalue">void</span> | |
85 | </td> | |
86 | <td class="function_name"> | |
87 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-has-timing-info" title="gst_base_parse_set_has_timing_info ()">gst_base_parse_set_has_timing_info</a> <span class="c_punctuation">()</span> | |
88 | </td> | |
89 | </tr> | |
90 | <tr> | |
91 | <td class="function_type"> | |
92 | <span class="returnvalue">void</span> | |
93 | </td> | |
94 | <td class="function_name"> | |
95 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-frame-rate" title="gst_base_parse_set_frame_rate ()">gst_base_parse_set_frame_rate</a> <span class="c_punctuation">()</span> | |
96 | </td> | |
97 | </tr> | |
98 | <tr> | |
99 | <td class="function_type"> | |
100 | <span class="returnvalue">void</span> | |
101 | </td> | |
102 | <td class="function_name"> | |
103 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-latency" title="gst_base_parse_set_latency ()">gst_base_parse_set_latency</a> <span class="c_punctuation">()</span> | |
104 | </td> | |
105 | </tr> | |
106 | <tr> | |
107 | <td class="function_type"> | |
108 | <span class="returnvalue">void</span> | |
109 | </td> | |
110 | <td class="function_name"> | |
111 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-infer-ts" title="gst_base_parse_set_infer_ts ()">gst_base_parse_set_infer_ts</a> <span class="c_punctuation">()</span> | |
112 | </td> | |
113 | </tr> | |
114 | <tr> | |
115 | <td class="function_type"> | |
116 | <span class="returnvalue">void</span> | |
117 | </td> | |
118 | <td class="function_name"> | |
119 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-pts-interpolation" title="gst_base_parse_set_pts_interpolation ()">gst_base_parse_set_pts_interpolation</a> <span class="c_punctuation">()</span> | |
120 | </td> | |
121 | </tr> | |
122 | <tr> | |
123 | <td class="function_type"> | |
124 | <span class="returnvalue">void</span> | |
125 | </td> | |
126 | <td class="function_name"> | |
127 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-ts-at-offset" title="gst_base_parse_set_ts_at_offset ()">gst_base_parse_set_ts_at_offset</a> <span class="c_punctuation">()</span> | |
128 | </td> | |
129 | </tr> | |
130 | <tr> | |
131 | <td class="function_type"> | |
132 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> | |
133 | </td> | |
134 | <td class="function_name"> | |
135 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-convert-default" title="gst_base_parse_convert_default ()">gst_base_parse_convert_default</a> <span class="c_punctuation">()</span> | |
136 | </td> | |
137 | </tr> | |
138 | <tr> | |
139 | <td class="function_type"> | |
140 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> | |
141 | </td> | |
142 | <td class="function_name"> | |
143 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-add-index-entry" title="gst_base_parse_add_index_entry ()">gst_base_parse_add_index_entry</a> <span class="c_punctuation">()</span> | |
144 | </td> | |
145 | </tr> | |
146 | <tr> | |
147 | <td class="function_type"> | |
148 | <a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParseFrame" title="GstBaseParseFrame"><span class="returnvalue">GstBaseParseFrame</span></a> * | |
149 | </td> | |
150 | <td class="function_name"> | |
151 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-frame-new" title="gst_base_parse_frame_new ()">gst_base_parse_frame_new</a> <span class="c_punctuation">()</span> | |
152 | </td> | |
153 | </tr> | |
154 | <tr> | |
155 | <td class="function_type"> | |
156 | <span class="returnvalue">void</span> | |
157 | </td> | |
158 | <td class="function_name"> | |
159 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-frame-init" title="gst_base_parse_frame_init ()">gst_base_parse_frame_init</a> <span class="c_punctuation">()</span> | |
160 | </td> | |
161 | </tr> | |
162 | <tr> | |
163 | <td class="function_type"> | |
164 | <span class="returnvalue">void</span> | |
165 | </td> | |
166 | <td class="function_name"> | |
167 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-frame-free" title="gst_base_parse_frame_free ()">gst_base_parse_frame_free</a> <span class="c_punctuation">()</span> | |
168 | </td> | |
169 | </tr> | |
170 | <tr> | |
171 | <td class="function_type"> | |
172 | <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> | |
173 | </td> | |
174 | <td class="function_name"> | |
175 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-push-frame" title="gst_base_parse_push_frame ()">gst_base_parse_push_frame</a> <span class="c_punctuation">()</span> | |
176 | </td> | |
177 | </tr> | |
178 | <tr> | |
179 | <td class="function_type"> | |
180 | <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> | |
181 | </td> | |
182 | <td class="function_name"> | |
183 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-finish-frame" title="gst_base_parse_finish_frame ()">gst_base_parse_finish_frame</a> <span class="c_punctuation">()</span> | |
184 | </td> | |
185 | </tr> | |
186 | <tr> | |
187 | <td class="define_keyword">#define</td> | |
188 | <td class="function_name"> | |
189 | <a class="link" href="gstreamer-libs-GstBaseParse.html#GST-BASE-PARSE-DRAINING:CAPS" title="GST_BASE_PARSE_DRAINING()">GST_BASE_PARSE_DRAINING</a><span class="c_punctuation">()</span> | |
190 | </td> | |
191 | </tr> | |
192 | <tr> | |
193 | <td class="define_keyword">#define</td> | |
194 | <td class="function_name"><a class="link" href="gstreamer-libs-GstBaseParse.html#GST-BASE-PARSE-FLAG-DRAINING:CAPS" title="GST_BASE_PARSE_FLAG_DRAINING">GST_BASE_PARSE_FLAG_DRAINING</a></td> | |
195 | </tr> | |
196 | <tr> | |
197 | <td class="define_keyword">#define</td> | |
198 | <td class="function_name"><a class="link" href="gstreamer-libs-GstBaseParse.html#GST-BASE-PARSE-FLAG-LOST-SYNC:CAPS" title="GST_BASE_PARSE_FLAG_LOST_SYNC">GST_BASE_PARSE_FLAG_LOST_SYNC</a></td> | |
199 | </tr> | |
200 | <tr> | |
201 | <td class="define_keyword">#define</td> | |
202 | <td class="function_name"> | |
203 | <a class="link" href="gstreamer-libs-GstBaseParse.html#GST-BASE-PARSE-LOST-SYNC:CAPS" title="GST_BASE_PARSE_LOST_SYNC()">GST_BASE_PARSE_LOST_SYNC</a><span class="c_punctuation">()</span> | |
204 | </td> | |
205 | </tr> | |
206 | <tr> | |
207 | <td class="define_keyword">#define</td> | |
208 | <td class="function_name"> | |
209 | <a class="link" href="gstreamer-libs-GstBaseParse.html#GST-BASE-PARSE-SINK-PAD:CAPS" title="GST_BASE_PARSE_SINK_PAD()">GST_BASE_PARSE_SINK_PAD</a><span class="c_punctuation">()</span> | |
210 | </td> | |
211 | </tr> | |
212 | <tr> | |
213 | <td class="define_keyword">#define</td> | |
214 | <td class="function_name"> | |
215 | <a class="link" href="gstreamer-libs-GstBaseParse.html#GST-BASE-PARSE-SRC-PAD:CAPS" title="GST_BASE_PARSE_SRC_PAD()">GST_BASE_PARSE_SRC_PAD</a><span class="c_punctuation">()</span> | |
216 | </td> | |
217 | </tr> | |
218 | </tbody> | |
219 | </table></div> | |
220 | </div> | |
221 | <div class="refsect1"> | |
222 | <a name="gstreamer-libs-GstBaseParse.other"></a><h2>Types and Values</h2> | |
223 | <div class="informaltable"><table width="100%" border="0"> | |
224 | <colgroup> | |
225 | <col width="150px" class="name"> | |
226 | <col class="description"> | |
227 | </colgroup> | |
228 | <tbody> | |
229 | <tr> | |
230 | <td class="datatype_keyword">struct</td> | |
231 | <td class="function_name"><a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParse" title="struct GstBaseParse">GstBaseParse</a></td> | |
232 | </tr> | |
233 | <tr> | |
234 | <td class="datatype_keyword">struct</td> | |
235 | <td class="function_name"><a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParseClass" title="struct GstBaseParseClass">GstBaseParseClass</a></td> | |
236 | </tr> | |
237 | <tr> | |
238 | <td class="datatype_keyword"> </td> | |
239 | <td class="function_name"><a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParseFrame" title="GstBaseParseFrame">GstBaseParseFrame</a></td> | |
240 | </tr> | |
241 | <tr> | |
242 | <td class="datatype_keyword">enum</td> | |
243 | <td class="function_name"><a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParseFrameFlags" title="enum GstBaseParseFrameFlags">GstBaseParseFrameFlags</a></td> | |
244 | </tr> | |
245 | <tr> | |
246 | <td class="define_keyword">#define</td> | |
247 | <td class="function_name"><a class="link" href="gstreamer-libs-GstBaseParse.html#GST-BASE-PARSE-FLOW-DROPPED:CAPS" title="GST_BASE_PARSE_FLOW_DROPPED">GST_BASE_PARSE_FLOW_DROPPED</a></td> | |
248 | </tr> | |
249 | </tbody> | |
250 | </table></div> | |
251 | </div> | |
252 | <div class="refsect1"> | |
253 | <a name="gstreamer-libs-GstBaseParse.object-hierarchy"></a><h2>Object Hierarchy</h2> | |
254 | <pre class="screen"> | |
255 | </pre> | |
256 | </div> | |
257 | <div class="refsect1"> | |
258 | <a name="gstreamer-libs-GstBaseParse.includes"></a><h2>Includes</h2> | |
259 | <pre class="synopsis">#include <gst/base/gstbaseparse.h> | |
260 | </pre> | |
261 | </div> | |
262 | <div class="refsect1"> | |
263 | <a name="gstreamer-libs-GstBaseParse.description"></a><h2>Description</h2> | |
264 | <p>This base class is for parser elements that process data and splits it | |
265 | into separate audio/video/whatever frames.</p> | |
266 | <p>It provides for:</p> | |
267 | <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> | |
268 | <li class="listitem"><p>provides one sink pad and one source pad</p></li> | |
269 | <li class="listitem"><p>handles state changes</p></li> | |
270 | <li class="listitem"><p>can operate in pull mode or push mode</p></li> | |
271 | <li class="listitem"><p>handles seeking in both modes</p></li> | |
272 | <li class="listitem"><p>handles events (SEGMENT/EOS/FLUSH)</p></li> | |
273 | <li class="listitem"><p> | |
274 | handles queries (POSITION/DURATION/SEEKING/FORMAT/CONVERT) | |
275 | </p></li> | |
276 | <li class="listitem"><p>handles flushing</p></li> | |
277 | </ul></div> | |
278 | <p>The purpose of this base class is to provide the basic functionality of | |
279 | a parser and share a lot of rather complex code.</p> | |
280 | <p>Description of the parsing mechanism:</p> | |
281 | <div class="orderedlist"><ol class="orderedlist" type="1"> | |
282 | <li class="listitem"><div class="itemizedlist"> | |
283 | <p class="title"><b>Set-up phase</b></p> | |
284 | <ul class="itemizedlist" style="list-style-type: disc; "> | |
285 | <li class="listitem"><p> | |
286 | GstBaseParse calls <em class="parameter"><code>start</code></em> to inform subclass that data processing is | |
287 | about to start now. | |
288 | </p></li> | |
289 | <li class="listitem"><p> | |
290 | GstBaseParse class calls <em class="parameter"><code>set_sink_caps</code></em> to inform the subclass about | |
291 | incoming sinkpad caps. Subclass could already set the srcpad caps | |
292 | accordingly, but this might be delayed until calling | |
293 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-finish-frame" title="gst_base_parse_finish_frame ()"><code class="function">gst_base_parse_finish_frame()</code></a> with a non-queued frame. | |
294 | </p></li> | |
295 | <li class="listitem"><p> | |
296 | At least at this point subclass needs to tell the GstBaseParse class | |
297 | how big data chunks it wants to receive (min_frame_size). It can do | |
298 | this with <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-min-frame-size" title="gst_base_parse_set_min_frame_size ()"><code class="function">gst_base_parse_set_min_frame_size()</code></a>. | |
299 | </p></li> | |
300 | <li class="listitem"><p> | |
301 | GstBaseParse class sets up appropriate data passing mode (pull/push) | |
302 | and starts to process the data. | |
303 | </p></li> | |
304 | </ul> | |
305 | </div></li> | |
306 | <li class="listitem"><div class="itemizedlist"> | |
307 | <p class="title"><b>Parsing phase</b></p> | |
308 | <ul class="itemizedlist" style="list-style-type: disc; "> | |
309 | <li class="listitem"><p> | |
310 | GstBaseParse gathers at least min_frame_size bytes of data either | |
311 | by pulling it from upstream or collecting buffers in an internal | |
312 | <a class="link" href="GstAdapter.html" title="GstAdapter"><span class="type">GstAdapter</span></a>. | |
313 | </p></li> | |
314 | <li class="listitem"> | |
315 | <p> | |
316 | A buffer of (at least) min_frame_size bytes is passed to subclass with | |
317 | <em class="parameter"><code>handle_frame</code></em>. Subclass checks the contents and can optionally | |
318 | return GST_FLOW_OK along with an amount of data to be skipped to find | |
319 | a valid frame (which will result in a subsequent DISCONT). | |
320 | If, otherwise, the buffer does not hold a complete frame, | |
321 | <em class="parameter"><code>handle_frame</code></em> can merely return and will be called again when additional | |
322 | data is available. In push mode this amounts to an | |
323 | additional input buffer (thus minimal additional latency), in pull mode | |
324 | this amounts to some arbitrary reasonable buffer size increase. | |
325 | Of course, <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-min-frame-size" title="gst_base_parse_set_min_frame_size ()"><code class="function">gst_base_parse_set_min_frame_size()</code></a> could also be used if a | |
326 | very specific known amount of additional data is required. | |
327 | If, however, the buffer holds a complete valid frame, it can pass | |
328 | the size of this frame to <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-finish-frame" title="gst_base_parse_finish_frame ()"><code class="function">gst_base_parse_finish_frame()</code></a>. | |
329 | If acting as a converter, it can also merely indicate consumed input data | |
330 | while simultaneously providing custom output data. | |
331 | Note that baseclass performs some processing (such as tracking | |
332 | overall consumed data rate versus duration) for each finished frame, | |
333 | but other state is only updated upon each call to <em class="parameter"><code>handle_frame</code></em> | |
334 | (such as tracking upstream input timestamp). | |
335 | </p> | |
336 | <p> | |
337 | Subclass is also responsible for setting the buffer metadata | |
338 | (e.g. buffer timestamp and duration, or keyframe if applicable). | |
339 | (although the latter can also be done by GstBaseParse if it is | |
340 | appropriately configured, see below). Frame is provided with | |
341 | timestamp derived from upstream (as much as generally possible), | |
342 | duration obtained from configuration (see below), and offset | |
343 | if meaningful (in pull mode). | |
344 | </p> | |
345 | <p> | |
346 | Note that <em class="parameter"><code>check_valid_frame</code></em> might receive any small | |
347 | amount of input data when leftover data is being drained (e.g. at EOS). | |
348 | </p> | |
349 | </li> | |
350 | <li class="listitem"><p> | |
351 | As part of finish frame processing, | |
352 | just prior to actually pushing the buffer in question, | |
353 | it is passed to <em class="parameter"><code>pre_push_frame</code></em> which gives subclass yet one | |
354 | last chance to examine buffer metadata, or to send some custom (tag) | |
355 | events, or to perform custom (segment) filtering. | |
356 | </p></li> | |
357 | <li class="listitem"><p> | |
358 | During the parsing process GstBaseParseClass will handle both srcpad | |
359 | and sinkpad events. They will be passed to subclass if <em class="parameter"><code>event</code></em> or | |
360 | <em class="parameter"><code>src_event</code></em> callbacks have been provided. | |
361 | </p></li> | |
362 | </ul> | |
363 | </div></li> | |
364 | <li class="listitem"><div class="itemizedlist"> | |
365 | <p class="title"><b>Shutdown phase</b></p> | |
366 | <ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p> | |
367 | GstBaseParse class calls <em class="parameter"><code>stop</code></em> to inform the subclass that data | |
368 | parsing will be stopped. | |
369 | </p></li></ul> | |
370 | </div></li> | |
371 | </ol></div> | |
372 | <p>Subclass is responsible for providing pad template caps for | |
373 | source and sink pads. The pads need to be named "sink" and "src". It also | |
374 | needs to set the fixed caps on srcpad, when the format is ensured (e.g. | |
375 | when base class calls subclass' <em class="parameter"><code>set_sink_caps</code></em> | |
376 | function).</p> | |
377 | <p>This base class uses <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstFormat.html#GST-FORMAT-DEFAULT:CAPS"><span class="type">GST_FORMAT_DEFAULT</span></a> as a meaning of frames. So, | |
378 | subclass conversion routine needs to know that conversion from | |
379 | <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstFormat.html#GST-FORMAT-TIME:CAPS"><span class="type">GST_FORMAT_TIME</span></a> to <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstFormat.html#GST-FORMAT-DEFAULT:CAPS"><span class="type">GST_FORMAT_DEFAULT</span></a> must return the | |
380 | frame number that can be found from the given byte position.</p> | |
381 | <p>GstBaseParse uses subclasses conversion methods also for seeking (or | |
382 | otherwise uses its own default one, see also below).</p> | |
383 | <p>Subclass <em class="parameter"><code>start</code></em> | |
384 | and <em class="parameter"><code>stop</code></em> | |
385 | functions will be called to inform the beginning | |
386 | and end of data processing.</p> | |
387 | <p>Things that subclass need to take care of:</p> | |
388 | <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> | |
389 | <li class="listitem"><p>Provide pad templates</p></li> | |
390 | <li class="listitem"><p> | |
391 | Fixate the source pad caps when appropriate | |
392 | </p></li> | |
393 | <li class="listitem"><p> | |
394 | Inform base class how big data chunks should be retrieved. This is | |
395 | done with <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-min-frame-size" title="gst_base_parse_set_min_frame_size ()"><code class="function">gst_base_parse_set_min_frame_size()</code></a> function. | |
396 | </p></li> | |
397 | <li class="listitem"><p> | |
398 | Examine data chunks passed to subclass with <em class="parameter"><code>handle_frame</code></em> and pass | |
399 | proper frame(s) to <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-finish-frame" title="gst_base_parse_finish_frame ()"><code class="function">gst_base_parse_finish_frame()</code></a>, and setting src pad | |
400 | caps and timestamps on frame. | |
401 | </p></li> | |
402 | <li class="listitem"><p>Provide conversion functions</p></li> | |
403 | <li class="listitem"><p> | |
404 | Update the duration information with <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-duration" title="gst_base_parse_set_duration ()"><code class="function">gst_base_parse_set_duration()</code></a> | |
405 | </p></li> | |
406 | <li class="listitem"><p> | |
407 | Optionally passthrough using <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-passthrough" title="gst_base_parse_set_passthrough ()"><code class="function">gst_base_parse_set_passthrough()</code></a> | |
408 | </p></li> | |
409 | <li class="listitem"><p> | |
410 | Configure various baseparse parameters using | |
411 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-average-bitrate" title="gst_base_parse_set_average_bitrate ()"><code class="function">gst_base_parse_set_average_bitrate()</code></a>, <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-syncable" title="gst_base_parse_set_syncable ()"><code class="function">gst_base_parse_set_syncable()</code></a> | |
412 | and <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-frame-rate" title="gst_base_parse_set_frame_rate ()"><code class="function">gst_base_parse_set_frame_rate()</code></a>. | |
413 | </p></li> | |
414 | <li class="listitem"><p> | |
415 | In particular, if subclass is unable to determine a duration, but | |
416 | parsing (or specs) yields a frames per seconds rate, then this can be | |
417 | provided to GstBaseParse to enable it to cater for | |
418 | buffer time metadata (which will be taken from upstream as much as | |
419 | possible). Internally keeping track of frame durations and respective | |
420 | sizes that have been pushed provides GstBaseParse with an estimated | |
421 | bitrate. A default <em class="parameter"><code>convert</code></em> (used if not overridden) will then use these | |
422 | rates to perform obvious conversions. These rates are also used to | |
423 | update (estimated) duration at regular frame intervals. | |
424 | </p></li> | |
425 | </ul></div> | |
426 | </div> | |
427 | <div class="refsect1"> | |
428 | <a name="gstreamer-libs-GstBaseParse.functions_details"></a><h2>Functions</h2> | |
429 | <div class="refsect2"> | |
430 | <a name="gst-base-parse-set-duration"></a><h3>gst_base_parse_set_duration ()</h3> | |
431 | <pre class="programlisting"><span class="returnvalue">void</span> | |
432 | gst_base_parse_set_duration (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParse" title="struct GstBaseParse"><span class="type">GstBaseParse</span></a> *parse</code></em>, | |
433 | <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstFormat.html#GstFormat"><span class="type">GstFormat</span></a> fmt</code></em>, | |
434 | <em class="parameter"><code><span class="type">gint64</span> duration</code></em>, | |
435 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> interval</code></em>);</pre> | |
436 | <p>Sets the duration of the currently playing media. Subclass can use this | |
437 | when it is able to determine duration and/or notices a change in the media | |
438 | duration. Alternatively, if <em class="parameter"><code>interval</code></em> | |
439 | is non-zero (default), then stream | |
440 | duration is determined based on estimated bitrate, and updated every <em class="parameter"><code>interval</code></em> | |
441 | ||
442 | frames.</p> | |
443 | <div class="refsect3"> | |
444 | <a name="id-1.2.4.3.8.2.5"></a><h4>Parameters</h4> | |
445 | <div class="informaltable"><table width="100%" border="0"> | |
446 | <colgroup> | |
447 | <col width="150px" class="parameters_name"> | |
448 | <col class="parameters_description"> | |
449 | <col width="200px" class="parameters_annotations"> | |
450 | </colgroup> | |
451 | <tbody> | |
452 | <tr> | |
453 | <td class="parameter_name"><p>parse</p></td> | |
454 | <td class="parameter_description"><p><a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParse" title="struct GstBaseParse"><span class="type">GstBaseParse</span></a>.</p></td> | |
455 | <td class="parameter_annotations"> </td> | |
456 | </tr> | |
457 | <tr> | |
458 | <td class="parameter_name"><p>fmt</p></td> | |
459 | <td class="parameter_description"><p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstFormat.html#GstFormat"><span class="type">GstFormat</span></a>.</p></td> | |
460 | <td class="parameter_annotations"> </td> | |
461 | </tr> | |
462 | <tr> | |
463 | <td class="parameter_name"><p>duration</p></td> | |
464 | <td class="parameter_description"><p>duration value.</p></td> | |
465 | <td class="parameter_annotations"> </td> | |
466 | </tr> | |
467 | <tr> | |
468 | <td class="parameter_name"><p>interval</p></td> | |
469 | <td class="parameter_description"><p>how often to update the duration estimate based on bitrate, or 0.</p></td> | |
470 | <td class="parameter_annotations"> </td> | |
471 | </tr> | |
472 | </tbody> | |
473 | </table></div> | |
474 | </div> | |
475 | </div> | |
476 | <hr> | |
477 | <div class="refsect2"> | |
478 | <a name="gst-base-parse-set-average-bitrate"></a><h3>gst_base_parse_set_average_bitrate ()</h3> | |
479 | <pre class="programlisting"><span class="returnvalue">void</span> | |
480 | gst_base_parse_set_average_bitrate (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParse" title="struct GstBaseParse"><span class="type">GstBaseParse</span></a> *parse</code></em>, | |
481 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> bitrate</code></em>);</pre> | |
482 | <p>Optionally sets the average bitrate detected in media (if non-zero), | |
483 | e.g. based on metadata, as it will be posted to the application.</p> | |
484 | <p>By default, announced average bitrate is estimated. The average bitrate | |
485 | is used to estimate the total duration of the stream and to estimate | |
486 | a seek position, if there's no index and the format is syncable | |
487 | (see <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-set-syncable" title="gst_base_parse_set_syncable ()"><code class="function">gst_base_parse_set_syncable()</code></a>).</p> | |
488 | <div class="refsect3"> | |
489 | <a name="id-1.2.4.3.8.3.6"></a><h4>Parameters</h4> | |
490 | <div class="informaltable"><table width="100%" border="0"> | |
491 | <colgroup> | |
492 | <col width="150px" class="parameters_name"> | |
493 | <col class="parameters_description"> | |
494 | <col width="200px" class="parameters_annotations"> | |
495 | </colgroup> | |
496 | <tbody> | |
497 | <tr> | |
498 | <td class="parameter_name"><p>parse</p></td> | |
499 | <td class="parameter_description"><p><a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParse" title="struct GstBaseParse"><span class="type">GstBaseParse</span></a>.</p></td> | |
500 | <td class="parameter_annotations"> </td> | |
501 | </tr> | |
502 | <tr> | |
503 | <td class="parameter_name"><p>bitrate</p></td> | |
504 | <td class="parameter_description"><p>average bitrate in bits/second</p></td> | |
505 | <td class="parameter_annotations"> </td> | |
506 | </tr> | |
507 | </tbody> | |
508 | </table></div> | |
509 | </div> | |
510 | </div> | |
511 | <hr> | |
512 | <div class="refsect2"> | |
513 | <a name="gst-base-parse-set-min-frame-size"></a><h3>gst_base_parse_set_min_frame_size ()</h3> | |
514 | <pre class="programlisting"><span class="returnvalue">void</span> | |
515 | gst_base_parse_set_min_frame_size (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParse" title="struct GstBaseParse"><span class="type">GstBaseParse</span></a> *parse</code></em>, | |
516 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> min_size</code></em>);</pre> | |
517 | <p>Subclass can use this function to tell the base class that it needs to | |
518 | give at least <span class="type">min_size</span> buffers.</p> | |
519 | <div class="refsect3"> | |
520 | <a name="id-1.2.4.3.8.4.5"></a><h4>Parameters</h4> | |
521 | <div class="informaltable"><table width="100%" border="0"> | |
522 | <colgroup> | |
523 | <col width="150px" class="parameters_name"> | |
524 | <col class="parameters_description"> | |
525 | <col width="200px" class="parameters_annotations"> | |
526 | </colgroup> | |
527 | <tbody> | |
528 | <tr> | |
529 | <td class="parameter_name"><p>parse</p></td> | |
530 | <td class="parameter_description"><p><a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParse" title="struct GstBaseParse"><span class="type">GstBaseParse</span></a>.</p></td> | |
531 | <td class="parameter_annotations"> </td> | |
532 | </tr> | |
533 | <tr> | |
534 | <td class="parameter_name"><p>min_size</p></td> | |
535 | <td class="parameter_description"><p>Minimum size of the data that this base class should give to | |
536 | subclass.</p></td> | |
537 | <td class="parameter_annotations"> </td> | |
538 | </tr> | |
539 | </tbody> | |
540 | </table></div> | |
541 | </div> | |
542 | </div> | |
543 | <hr> | |
544 | <div class="refsect2"> | |
545 | <a name="gst-base-parse-set-passthrough"></a><h3>gst_base_parse_set_passthrough ()</h3> | |
546 | <pre class="programlisting"><span class="returnvalue">void</span> | |
547 | gst_base_parse_set_passthrough (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParse" title="struct GstBaseParse"><span class="type">GstBaseParse</span></a> *parse</code></em>, | |
548 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> passthrough</code></em>);</pre> | |
549 | <p>Set if the nature of the format or configuration does not allow (much) | |
550 | parsing, and the parser should operate in passthrough mode (which only | |
551 | applies when operating in push mode). That is, incoming buffers are | |
552 | pushed through unmodified, i.e. no <em class="parameter"><code>check_valid_frame</code></em> | |
553 | or <em class="parameter"><code>parse_frame</code></em> | |
554 | ||
555 | callbacks will be invoked, but <em class="parameter"><code>pre_push_frame</code></em> | |
556 | will still be invoked, | |
557 | so subclass can perform as much or as little is appropriate for | |
558 | passthrough semantics in <em class="parameter"><code>pre_push_frame</code></em> | |
559 | .</p> | |
560 | <div class="refsect3"> | |
561 | <a name="id-1.2.4.3.8.5.5"></a><h4>Parameters</h4> | |
562 | <div class="informaltable"><table width="100%" border="0"> | |
563 | <colgroup> | |
564 | <col width="150px" class="parameters_name"> | |
565 | <col class="parameters_description"> | |
566 | <col width="200px" class="parameters_annotations"> | |
567 | </colgroup> | |
568 | <tbody> | |
569 | <tr> | |
570 | <td class="parameter_name"><p>parse</p></td> | |
571 | <td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParse" title="struct GstBaseParse"><span class="type">GstBaseParse</span></a></p></td> | |
572 | <td class="parameter_annotations"> </td> | |
573 | </tr> | |
574 | <tr> | |
575 | <td class="parameter_name"><p>passthrough</p></td> | |
576 | <td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if parser should run in passthrough mode</p></td> | |
577 | <td class="parameter_annotations"> </td> | |
578 | </tr> | |
579 | </tbody> | |
580 | </table></div> | |
581 | </div> | |
582 | </div> | |
583 | <hr> | |
584 | <div class="refsect2"> | |
585 | <a name="gst-base-parse-set-syncable"></a><h3>gst_base_parse_set_syncable ()</h3> | |
586 | <pre class="programlisting"><span class="returnvalue">void</span> | |
587 | gst_base_parse_set_syncable (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParse" title="struct GstBaseParse"><span class="type">GstBaseParse</span></a> *parse</code></em>, | |
588 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> syncable</code></em>);</pre> | |
589 | <p>Set if frame starts can be identified. This is set by default and | |
590 | determines whether seeking based on bitrate averages | |
591 | is possible for a format/stream.</p> | |
592 | <div class="refsect3"> | |
593 | <a name="id-1.2.4.3.8.6.5"></a><h4>Parameters</h4> | |
594 | <div class="informaltable"><table width="100%" border="0"> | |
595 | <colgroup> | |
596 | <col width="150px" class="parameters_name"> | |
597 | <col class="parameters_description"> | |
598 | <col width="200px" class="parameters_annotations"> | |
599 | </colgroup> | |
600 | <tbody> | |
601 | <tr> | |
602 | <td class="parameter_name"><p>parse</p></td> | |
603 | <td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParse" title="struct GstBaseParse"><span class="type">GstBaseParse</span></a></p></td> | |
604 | <td class="parameter_annotations"> </td> | |
605 | </tr> | |
606 | <tr> | |
607 | <td class="parameter_name"><p>syncable</p></td> | |
608 | <td class="parameter_description"><p>set if frame starts can be identified</p></td> | |
609 | <td class="parameter_annotations"> </td> | |
610 | </tr> | |
611 | </tbody> | |
612 | </table></div> | |
613 | </div> | |
614 | </div> | |
615 | <hr> | |
616 | <div class="refsect2"> | |
617 | <a name="gst-base-parse-set-has-timing-info"></a><h3>gst_base_parse_set_has_timing_info ()</h3> | |
618 | <pre class="programlisting"><span class="returnvalue">void</span> | |
619 | gst_base_parse_set_has_timing_info (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParse" title="struct GstBaseParse"><span class="type">GstBaseParse</span></a> *parse</code></em>, | |
620 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> has_timing</code></em>);</pre> | |
621 | <p>Set if frames carry timing information which the subclass can (generally) | |
622 | parse and provide. In particular, intrinsic (rather than estimated) time | |
623 | can be obtained following a seek.</p> | |
624 | <div class="refsect3"> | |
625 | <a name="id-1.2.4.3.8.7.5"></a><h4>Parameters</h4> | |
626 | <div class="informaltable"><table width="100%" border="0"> | |
627 | <colgroup> | |
628 | <col width="150px" class="parameters_name"> | |
629 | <col class="parameters_description"> | |
630 | <col width="200px" class="parameters_annotations"> | |
631 | </colgroup> | |
632 | <tbody> | |
633 | <tr> | |
634 | <td class="parameter_name"><p>parse</p></td> | |
635 | <td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParse" title="struct GstBaseParse"><span class="type">GstBaseParse</span></a></p></td> | |
636 | <td class="parameter_annotations"> </td> | |
637 | </tr> | |
638 | <tr> | |
639 | <td class="parameter_name"><p>has_timing</p></td> | |
640 | <td class="parameter_description"><p>whether frames carry timing information</p></td> | |
641 | <td class="parameter_annotations"> </td> | |
642 | </tr> | |
643 | </tbody> | |
644 | </table></div> | |
645 | </div> | |
646 | </div> | |
647 | <hr> | |
648 | <div class="refsect2"> | |
649 | <a name="gst-base-parse-set-frame-rate"></a><h3>gst_base_parse_set_frame_rate ()</h3> | |
650 | <pre class="programlisting"><span class="returnvalue">void</span> | |
651 | gst_base_parse_set_frame_rate (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParse" title="struct GstBaseParse"><span class="type">GstBaseParse</span></a> *parse</code></em>, | |
652 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> fps_num</code></em>, | |
653 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> fps_den</code></em>, | |
654 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> lead_in</code></em>, | |
655 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> lead_out</code></em>);</pre> | |
656 | <p>If frames per second is configured, parser can take care of buffer duration | |
657 | and timestamping. When performing segment clipping, or seeking to a specific | |
658 | location, a corresponding decoder might need an initial <em class="parameter"><code>lead_in</code></em> | |
659 | and a | |
660 | following <em class="parameter"><code>lead_out</code></em> | |
661 | number of frames to ensure the desired segment is | |
662 | entirely filled upon decoding.</p> | |
663 | <div class="refsect3"> | |
664 | <a name="id-1.2.4.3.8.8.5"></a><h4>Parameters</h4> | |
665 | <div class="informaltable"><table width="100%" border="0"> | |
666 | <colgroup> | |
667 | <col width="150px" class="parameters_name"> | |
668 | <col class="parameters_description"> | |
669 | <col width="200px" class="parameters_annotations"> | |
670 | </colgroup> | |
671 | <tbody> | |
672 | <tr> | |
673 | <td class="parameter_name"><p>parse</p></td> | |
674 | <td class="parameter_description"><p>the <a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParse" title="struct GstBaseParse"><span class="type">GstBaseParse</span></a> to set</p></td> | |
675 | <td class="parameter_annotations"> </td> | |
676 | </tr> | |
677 | <tr> | |
678 | <td class="parameter_name"><p>fps_num</p></td> | |
679 | <td class="parameter_description"><p>frames per second (numerator).</p></td> | |
680 | <td class="parameter_annotations"> </td> | |
681 | </tr> | |
682 | <tr> | |
683 | <td class="parameter_name"><p>fps_den</p></td> | |
684 | <td class="parameter_description"><p>frames per second (denominator).</p></td> | |
685 | <td class="parameter_annotations"> </td> | |
686 | </tr> | |
687 | <tr> | |
688 | <td class="parameter_name"><p>lead_in</p></td> | |
689 | <td class="parameter_description"><p>frames needed before a segment for subsequent decode</p></td> | |
690 | <td class="parameter_annotations"> </td> | |
691 | </tr> | |
692 | <tr> | |
693 | <td class="parameter_name"><p>lead_out</p></td> | |
694 | <td class="parameter_description"><p>frames needed after a segment</p></td> | |
695 | <td class="parameter_annotations"> </td> | |
696 | </tr> | |
697 | </tbody> | |
698 | </table></div> | |
699 | </div> | |
700 | </div> | |
701 | <hr> | |
702 | <div class="refsect2"> | |
703 | <a name="gst-base-parse-set-latency"></a><h3>gst_base_parse_set_latency ()</h3> | |
704 | <pre class="programlisting"><span class="returnvalue">void</span> | |
705 | gst_base_parse_set_latency (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParse" title="struct GstBaseParse"><span class="type">GstBaseParse</span></a> *parse</code></em>, | |
706 | <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> min_latency</code></em>, | |
707 | <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> max_latency</code></em>);</pre> | |
708 | <p>Sets the minimum and maximum (which may likely be equal) latency introduced | |
709 | by the parsing process. If there is such a latency, which depends on the | |
710 | particular parsing of the format, it typically corresponds to 1 frame duration.</p> | |
711 | <div class="refsect3"> | |
712 | <a name="id-1.2.4.3.8.9.5"></a><h4>Parameters</h4> | |
713 | <div class="informaltable"><table width="100%" border="0"> | |
714 | <colgroup> | |
715 | <col width="150px" class="parameters_name"> | |
716 | <col class="parameters_description"> | |
717 | <col width="200px" class="parameters_annotations"> | |
718 | </colgroup> | |
719 | <tbody> | |
720 | <tr> | |
721 | <td class="parameter_name"><p>parse</p></td> | |
722 | <td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParse" title="struct GstBaseParse"><span class="type">GstBaseParse</span></a></p></td> | |
723 | <td class="parameter_annotations"> </td> | |
724 | </tr> | |
725 | <tr> | |
726 | <td class="parameter_name"><p>min_latency</p></td> | |
727 | <td class="parameter_description"><p>minimum parse latency</p></td> | |
728 | <td class="parameter_annotations"> </td> | |
729 | </tr> | |
730 | <tr> | |
731 | <td class="parameter_name"><p>max_latency</p></td> | |
732 | <td class="parameter_description"><p>maximum parse latency</p></td> | |
733 | <td class="parameter_annotations"> </td> | |
734 | </tr> | |
735 | </tbody> | |
736 | </table></div> | |
737 | </div> | |
738 | </div> | |
739 | <hr> | |
740 | <div class="refsect2"> | |
741 | <a name="gst-base-parse-set-infer-ts"></a><h3>gst_base_parse_set_infer_ts ()</h3> | |
742 | <pre class="programlisting"><span class="returnvalue">void</span> | |
743 | gst_base_parse_set_infer_ts (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParse" title="struct GstBaseParse"><span class="type">GstBaseParse</span></a> *parse</code></em>, | |
744 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> infer_ts</code></em>);</pre> | |
745 | <p>By default, the base class might try to infer PTS from DTS and vice | |
746 | versa. While this is generally correct for audio data, it may not | |
747 | be otherwise. Sub-classes implementing such formats should disable | |
748 | timestamp inferring.</p> | |
749 | <div class="refsect3"> | |
750 | <a name="id-1.2.4.3.8.10.5"></a><h4>Parameters</h4> | |
751 | <div class="informaltable"><table width="100%" border="0"> | |
752 | <colgroup> | |
753 | <col width="150px" class="parameters_name"> | |
754 | <col class="parameters_description"> | |
755 | <col width="200px" class="parameters_annotations"> | |
756 | </colgroup> | |
757 | <tbody> | |
758 | <tr> | |
759 | <td class="parameter_name"><p>parse</p></td> | |
760 | <td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParse" title="struct GstBaseParse"><span class="type">GstBaseParse</span></a></p></td> | |
761 | <td class="parameter_annotations"> </td> | |
762 | </tr> | |
763 | <tr> | |
764 | <td class="parameter_name"><p>infer_ts</p></td> | |
765 | <td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if parser should infer DTS/PTS from each other</p></td> | |
766 | <td class="parameter_annotations"> </td> | |
767 | </tr> | |
768 | </tbody> | |
769 | </table></div> | |
770 | </div> | |
771 | </div> | |
772 | <hr> | |
773 | <div class="refsect2"> | |
774 | <a name="gst-base-parse-set-pts-interpolation"></a><h3>gst_base_parse_set_pts_interpolation ()</h3> | |
775 | <pre class="programlisting"><span class="returnvalue">void</span> | |
776 | gst_base_parse_set_pts_interpolation (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParse" title="struct GstBaseParse"><span class="type">GstBaseParse</span></a> *parse</code></em>, | |
777 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> pts_interpolate</code></em>);</pre> | |
778 | <p>By default, the base class will guess PTS timestamps using a simple | |
779 | interpolation (previous timestamp + duration), which is incorrect for | |
780 | data streams with reordering, where PTS can go backward. Sub-classes | |
781 | implementing such formats should disable PTS interpolation.</p> | |
782 | <div class="refsect3"> | |
783 | <a name="id-1.2.4.3.8.11.5"></a><h4>Parameters</h4> | |
784 | <div class="informaltable"><table width="100%" border="0"> | |
785 | <colgroup> | |
786 | <col width="150px" class="parameters_name"> | |
787 | <col class="parameters_description"> | |
788 | <col width="200px" class="parameters_annotations"> | |
789 | </colgroup> | |
790 | <tbody> | |
791 | <tr> | |
792 | <td class="parameter_name"><p>parse</p></td> | |
793 | <td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParse" title="struct GstBaseParse"><span class="type">GstBaseParse</span></a></p></td> | |
794 | <td class="parameter_annotations"> </td> | |
795 | </tr> | |
796 | <tr> | |
797 | <td class="parameter_name"><p>pts_interpolate</p></td> | |
798 | <td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if parser should interpolate PTS timestamps</p></td> | |
799 | <td class="parameter_annotations"> </td> | |
800 | </tr> | |
801 | </tbody> | |
802 | </table></div> | |
803 | </div> | |
804 | </div> | |
805 | <hr> | |
806 | <div class="refsect2"> | |
807 | <a name="gst-base-parse-set-ts-at-offset"></a><h3>gst_base_parse_set_ts_at_offset ()</h3> | |
808 | <pre class="programlisting"><span class="returnvalue">void</span> | |
809 | gst_base_parse_set_ts_at_offset (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParse" title="struct GstBaseParse"><span class="type">GstBaseParse</span></a> *parse</code></em>, | |
810 | <em class="parameter"><code><span class="type">gsize</span> offset</code></em>);</pre> | |
811 | <p>This function should only be called from a <em class="parameter"><code>handle_frame</code></em> | |
812 | implementation.</p> | |
813 | <p>GstBaseParse creates initial timestamps for frames by using the last | |
814 | timestamp seen in the stream before the frame starts. In certain | |
815 | cases, the correct timestamps will occur in the stream after the | |
816 | start of the frame, but before the start of the actual picture data. | |
817 | This function can be used to set the timestamps based on the offset | |
818 | into the frame data that the picture starts.</p> | |
819 | <div class="refsect3"> | |
820 | <a name="id-1.2.4.3.8.12.6"></a><h4>Parameters</h4> | |
821 | <div class="informaltable"><table width="100%" border="0"> | |
822 | <colgroup> | |
823 | <col width="150px" class="parameters_name"> | |
824 | <col class="parameters_description"> | |
825 | <col width="200px" class="parameters_annotations"> | |
826 | </colgroup> | |
827 | <tbody> | |
828 | <tr> | |
829 | <td class="parameter_name"><p>parse</p></td> | |
830 | <td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParse" title="struct GstBaseParse"><span class="type">GstBaseParse</span></a></p></td> | |
831 | <td class="parameter_annotations"> </td> | |
832 | </tr> | |
833 | <tr> | |
834 | <td class="parameter_name"><p>offset</p></td> | |
835 | <td class="parameter_description"><p>offset into current buffer</p></td> | |
836 | <td class="parameter_annotations"> </td> | |
837 | </tr> | |
838 | </tbody> | |
839 | </table></div> | |
840 | </div> | |
841 | <p class="since">Since 1.2</p> | |
842 | </div> | |
843 | <hr> | |
844 | <div class="refsect2"> | |
845 | <a name="gst-base-parse-convert-default"></a><h3>gst_base_parse_convert_default ()</h3> | |
846 | <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> | |
847 | gst_base_parse_convert_default (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParse" title="struct GstBaseParse"><span class="type">GstBaseParse</span></a> *parse</code></em>, | |
848 | <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstFormat.html#GstFormat"><span class="type">GstFormat</span></a> src_format</code></em>, | |
849 | <em class="parameter"><code><span class="type">gint64</span> src_value</code></em>, | |
850 | <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstFormat.html#GstFormat"><span class="type">GstFormat</span></a> dest_format</code></em>, | |
851 | <em class="parameter"><code><span class="type">gint64</span> *dest_value</code></em>);</pre> | |
852 | <p>Default implementation of "convert" vmethod in <a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParse" title="struct GstBaseParse"><span class="type">GstBaseParse</span></a> class.</p> | |
853 | <div class="refsect3"> | |
854 | <a name="id-1.2.4.3.8.13.5"></a><h4>Parameters</h4> | |
855 | <div class="informaltable"><table width="100%" border="0"> | |
856 | <colgroup> | |
857 | <col width="150px" class="parameters_name"> | |
858 | <col class="parameters_description"> | |
859 | <col width="200px" class="parameters_annotations"> | |
860 | </colgroup> | |
861 | <tbody> | |
862 | <tr> | |
863 | <td class="parameter_name"><p>parse</p></td> | |
864 | <td class="parameter_description"><p><a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParse" title="struct GstBaseParse"><span class="type">GstBaseParse</span></a>.</p></td> | |
865 | <td class="parameter_annotations"> </td> | |
866 | </tr> | |
867 | <tr> | |
868 | <td class="parameter_name"><p>src_format</p></td> | |
869 | <td class="parameter_description"><p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstFormat.html#GstFormat"><span class="type">GstFormat</span></a> describing the source format.</p></td> | |
870 | <td class="parameter_annotations"> </td> | |
871 | </tr> | |
872 | <tr> | |
873 | <td class="parameter_name"><p>src_value</p></td> | |
874 | <td class="parameter_description"><p>Source value to be converted.</p></td> | |
875 | <td class="parameter_annotations"> </td> | |
876 | </tr> | |
877 | <tr> | |
878 | <td class="parameter_name"><p>dest_format</p></td> | |
879 | <td class="parameter_description"><p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstFormat.html#GstFormat"><span class="type">GstFormat</span></a> defining the converted format.</p></td> | |
880 | <td class="parameter_annotations"> </td> | |
881 | </tr> | |
882 | <tr> | |
883 | <td class="parameter_name"><p>dest_value</p></td> | |
884 | <td class="parameter_description"><p>Pointer where the conversion result will be put.</p></td> | |
885 | <td class="parameter_annotations"> </td> | |
886 | </tr> | |
887 | </tbody> | |
888 | </table></div> | |
889 | </div> | |
890 | <div class="refsect3"> | |
891 | <a name="id-1.2.4.3.8.13.6"></a><h4>Returns</h4> | |
892 | <p> TRUE if conversion was successful.</p> | |
893 | <p></p> | |
894 | </div> | |
895 | </div> | |
896 | <hr> | |
897 | <div class="refsect2"> | |
898 | <a name="gst-base-parse-add-index-entry"></a><h3>gst_base_parse_add_index_entry ()</h3> | |
899 | <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> | |
900 | gst_base_parse_add_index_entry (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParse" title="struct GstBaseParse"><span class="type">GstBaseParse</span></a> *parse</code></em>, | |
901 | <em class="parameter"><code><span class="type">guint64</span> offset</code></em>, | |
902 | <em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> ts</code></em>, | |
903 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> key</code></em>, | |
904 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> force</code></em>);</pre> | |
905 | <p>Adds an entry to the index associating <em class="parameter"><code>offset</code></em> | |
906 | to <em class="parameter"><code>ts</code></em> | |
907 | . It is recommended | |
908 | to only add keyframe entries. <em class="parameter"><code>force</code></em> | |
909 | allows to bypass checks, such as | |
910 | whether the stream is (upstream) seekable, another entry is already "close" | |
911 | to the new entry, etc.</p> | |
912 | <div class="refsect3"> | |
913 | <a name="id-1.2.4.3.8.14.5"></a><h4>Parameters</h4> | |
914 | <div class="informaltable"><table width="100%" border="0"> | |
915 | <colgroup> | |
916 | <col width="150px" class="parameters_name"> | |
917 | <col class="parameters_description"> | |
918 | <col width="200px" class="parameters_annotations"> | |
919 | </colgroup> | |
920 | <tbody> | |
921 | <tr> | |
922 | <td class="parameter_name"><p>parse</p></td> | |
923 | <td class="parameter_description"><p><a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParse" title="struct GstBaseParse"><span class="type">GstBaseParse</span></a>.</p></td> | |
924 | <td class="parameter_annotations"> </td> | |
925 | </tr> | |
926 | <tr> | |
927 | <td class="parameter_name"><p>offset</p></td> | |
928 | <td class="parameter_description"><p>offset of entry</p></td> | |
929 | <td class="parameter_annotations"> </td> | |
930 | </tr> | |
931 | <tr> | |
932 | <td class="parameter_name"><p>ts</p></td> | |
933 | <td class="parameter_description"><p>timestamp associated with offset</p></td> | |
934 | <td class="parameter_annotations"> </td> | |
935 | </tr> | |
936 | <tr> | |
937 | <td class="parameter_name"><p>key</p></td> | |
938 | <td class="parameter_description"><p>whether entry refers to keyframe</p></td> | |
939 | <td class="parameter_annotations"> </td> | |
940 | </tr> | |
941 | <tr> | |
942 | <td class="parameter_name"><p>force</p></td> | |
943 | <td class="parameter_description"><p>add entry disregarding sanity checks</p></td> | |
944 | <td class="parameter_annotations"> </td> | |
945 | </tr> | |
946 | </tbody> | |
947 | </table></div> | |
948 | </div> | |
949 | <div class="refsect3"> | |
950 | <a name="id-1.2.4.3.8.14.6"></a><h4>Returns</h4> | |
951 | <p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> indicating whether entry was added</p> | |
952 | <p></p> | |
953 | </div> | |
954 | </div> | |
955 | <hr> | |
956 | <div class="refsect2"> | |
957 | <a name="gst-base-parse-frame-new"></a><h3>gst_base_parse_frame_new ()</h3> | |
958 | <pre class="programlisting"><a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParseFrame" title="GstBaseParseFrame"><span class="returnvalue">GstBaseParseFrame</span></a> * | |
959 | gst_base_parse_frame_new (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="type">GstBuffer</span></a> *buffer</code></em>, | |
960 | <em class="parameter"><code><a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParseFrameFlags" title="enum GstBaseParseFrameFlags"><span class="type">GstBaseParseFrameFlags</span></a> flags</code></em>, | |
961 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> overhead</code></em>);</pre> | |
962 | <p>Allocates a new <a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParseFrame" title="GstBaseParseFrame"><span class="type">GstBaseParseFrame</span></a>. This function is mainly for bindings, | |
963 | elements written in C should usually allocate the frame on the stack and | |
964 | then use <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-frame-init" title="gst_base_parse_frame_init ()"><code class="function">gst_base_parse_frame_init()</code></a> to initialise it.</p> | |
965 | <div class="refsect3"> | |
966 | <a name="id-1.2.4.3.8.15.5"></a><h4>Parameters</h4> | |
967 | <div class="informaltable"><table width="100%" border="0"> | |
968 | <colgroup> | |
969 | <col width="150px" class="parameters_name"> | |
970 | <col class="parameters_description"> | |
971 | <col width="200px" class="parameters_annotations"> | |
972 | </colgroup> | |
973 | <tbody> | |
974 | <tr> | |
975 | <td class="parameter_name"><p>buffer</p></td> | |
976 | <td class="parameter_description"><p> a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="type">GstBuffer</span></a>. </p></td> | |
977 | <td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td> | |
978 | </tr> | |
979 | <tr> | |
980 | <td class="parameter_name"><p>flags</p></td> | |
981 | <td class="parameter_description"><p>the flags</p></td> | |
982 | <td class="parameter_annotations"> </td> | |
983 | </tr> | |
984 | <tr> | |
985 | <td class="parameter_name"><p>overhead</p></td> | |
986 | <td class="parameter_description"><p>number of bytes in this frame which should be counted as | |
987 | metadata overhead, ie. not used to calculate the average bitrate. | |
988 | Set to -1 to mark the entire frame as metadata. If in doubt, set to 0.</p></td> | |
989 | <td class="parameter_annotations"> </td> | |
990 | </tr> | |
991 | </tbody> | |
992 | </table></div> | |
993 | </div> | |
994 | <div class="refsect3"> | |
995 | <a name="id-1.2.4.3.8.15.6"></a><h4>Returns</h4> | |
996 | <p> a newly-allocated <a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParseFrame" title="GstBaseParseFrame"><span class="type">GstBaseParseFrame</span></a>. Free with | |
997 | <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-frame-free" title="gst_base_parse_frame_free ()"><code class="function">gst_base_parse_frame_free()</code></a> when no longer needed.</p> | |
998 | <p></p> | |
999 | </div> | |
1000 | </div> | |
1001 | <hr> | |
1002 | <div class="refsect2"> | |
1003 | <a name="gst-base-parse-frame-init"></a><h3>gst_base_parse_frame_init ()</h3> | |
1004 | <pre class="programlisting"><span class="returnvalue">void</span> | |
1005 | gst_base_parse_frame_init (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParseFrame" title="GstBaseParseFrame"><span class="type">GstBaseParseFrame</span></a> *frame</code></em>);</pre> | |
1006 | <p>Sets a <a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParseFrame" title="GstBaseParseFrame"><span class="type">GstBaseParseFrame</span></a> to initial state. Currently this means | |
1007 | all public fields are zero-ed and a private flag is set to make | |
1008 | sure <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-frame-free" title="gst_base_parse_frame_free ()"><code class="function">gst_base_parse_frame_free()</code></a> only frees the contents but not | |
1009 | the actual frame. Use this function to initialise a <a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParseFrame" title="GstBaseParseFrame"><span class="type">GstBaseParseFrame</span></a> | |
1010 | allocated on the stack.</p> | |
1011 | <div class="refsect3"> | |
1012 | <a name="id-1.2.4.3.8.16.5"></a><h4>Parameters</h4> | |
1013 | <div class="informaltable"><table width="100%" border="0"> | |
1014 | <colgroup> | |
1015 | <col width="150px" class="parameters_name"> | |
1016 | <col class="parameters_description"> | |
1017 | <col width="200px" class="parameters_annotations"> | |
1018 | </colgroup> | |
1019 | <tbody><tr> | |
1020 | <td class="parameter_name"><p>frame</p></td> | |
1021 | <td class="parameter_description"><p><a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParseFrame" title="GstBaseParseFrame"><span class="type">GstBaseParseFrame</span></a>.</p></td> | |
1022 | <td class="parameter_annotations"> </td> | |
1023 | </tr></tbody> | |
1024 | </table></div> | |
1025 | </div> | |
1026 | </div> | |
1027 | <hr> | |
1028 | <div class="refsect2"> | |
1029 | <a name="gst-base-parse-frame-free"></a><h3>gst_base_parse_frame_free ()</h3> | |
1030 | <pre class="programlisting"><span class="returnvalue">void</span> | |
1031 | gst_base_parse_frame_free (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParseFrame" title="GstBaseParseFrame"><span class="type">GstBaseParseFrame</span></a> *frame</code></em>);</pre> | |
1032 | </div> | |
1033 | <hr> | |
1034 | <div class="refsect2"> | |
1035 | <a name="gst-base-parse-push-frame"></a><h3>gst_base_parse_push_frame ()</h3> | |
1036 | <pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> | |
1037 | gst_base_parse_push_frame (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParse" title="struct GstBaseParse"><span class="type">GstBaseParse</span></a> *parse</code></em>, | |
1038 | <em class="parameter"><code><a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParseFrame" title="GstBaseParseFrame"><span class="type">GstBaseParseFrame</span></a> *frame</code></em>);</pre> | |
1039 | <p>Pushes the frame's buffer downstream, sends any pending events and | |
1040 | does some timestamp and segment handling. Takes ownership of | |
1041 | frame's buffer, though caller retains ownership of <em class="parameter"><code>frame</code></em> | |
1042 | .</p> | |
1043 | <p>This must be called with sinkpad STREAM_LOCK held.</p> | |
1044 | <div class="refsect3"> | |
1045 | <a name="id-1.2.4.3.8.18.6"></a><h4>Parameters</h4> | |
1046 | <div class="informaltable"><table width="100%" border="0"> | |
1047 | <colgroup> | |
1048 | <col width="150px" class="parameters_name"> | |
1049 | <col class="parameters_description"> | |
1050 | <col width="200px" class="parameters_annotations"> | |
1051 | </colgroup> | |
1052 | <tbody> | |
1053 | <tr> | |
1054 | <td class="parameter_name"><p>parse</p></td> | |
1055 | <td class="parameter_description"><p><a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParse" title="struct GstBaseParse"><span class="type">GstBaseParse</span></a>.</p></td> | |
1056 | <td class="parameter_annotations"> </td> | |
1057 | </tr> | |
1058 | <tr> | |
1059 | <td class="parameter_name"><p>frame</p></td> | |
1060 | <td class="parameter_description"><p> a <a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParseFrame" title="GstBaseParseFrame"><span class="type">GstBaseParseFrame</span></a>. </p></td> | |
1061 | <td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td> | |
1062 | </tr> | |
1063 | </tbody> | |
1064 | </table></div> | |
1065 | </div> | |
1066 | <div class="refsect3"> | |
1067 | <a name="id-1.2.4.3.8.18.7"></a><h4>Returns</h4> | |
1068 | <p> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GstFlowReturn"><span class="type">GstFlowReturn</span></a></p> | |
1069 | <p></p> | |
1070 | </div> | |
1071 | </div> | |
1072 | <hr> | |
1073 | <div class="refsect2"> | |
1074 | <a name="gst-base-parse-finish-frame"></a><h3>gst_base_parse_finish_frame ()</h3> | |
1075 | <pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> | |
1076 | gst_base_parse_finish_frame (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParse" title="struct GstBaseParse"><span class="type">GstBaseParse</span></a> *parse</code></em>, | |
1077 | <em class="parameter"><code><a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParseFrame" title="GstBaseParseFrame"><span class="type">GstBaseParseFrame</span></a> *frame</code></em>, | |
1078 | <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> size</code></em>);</pre> | |
1079 | <p>Collects parsed data and pushes this downstream. | |
1080 | Source pad caps must be set when this is called.</p> | |
1081 | <p>If <em class="parameter"><code>frame</code></em> | |
1082 | 's out_buffer is set, that will be used as subsequent frame data. | |
1083 | Otherwise, <em class="parameter"><code>size</code></em> | |
1084 | samples will be taken from the input and used for output, | |
1085 | and the output's metadata (timestamps etc) will be taken as (optionally) | |
1086 | set by the subclass on <em class="parameter"><code>frame</code></em> | |
1087 | 's (input) buffer (which is otherwise | |
1088 | ignored for any but the above purpose/information).</p> | |
1089 | <p>Note that the latter buffer is invalidated by this call, whereas the | |
1090 | caller retains ownership of <em class="parameter"><code>frame</code></em> | |
1091 | .</p> | |
1092 | <div class="refsect3"> | |
1093 | <a name="id-1.2.4.3.8.19.7"></a><h4>Parameters</h4> | |
1094 | <div class="informaltable"><table width="100%" border="0"> | |
1095 | <colgroup> | |
1096 | <col width="150px" class="parameters_name"> | |
1097 | <col class="parameters_description"> | |
1098 | <col width="200px" class="parameters_annotations"> | |
1099 | </colgroup> | |
1100 | <tbody> | |
1101 | <tr> | |
1102 | <td class="parameter_name"><p>parse</p></td> | |
1103 | <td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParse" title="struct GstBaseParse"><span class="type">GstBaseParse</span></a></p></td> | |
1104 | <td class="parameter_annotations"> </td> | |
1105 | </tr> | |
1106 | <tr> | |
1107 | <td class="parameter_name"><p>frame</p></td> | |
1108 | <td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParseFrame" title="GstBaseParseFrame"><span class="type">GstBaseParseFrame</span></a></p></td> | |
1109 | <td class="parameter_annotations"> </td> | |
1110 | </tr> | |
1111 | <tr> | |
1112 | <td class="parameter_name"><p>size</p></td> | |
1113 | <td class="parameter_description"><p>consumed input data represented by frame</p></td> | |
1114 | <td class="parameter_annotations"> </td> | |
1115 | </tr> | |
1116 | </tbody> | |
1117 | </table></div> | |
1118 | </div> | |
1119 | <div class="refsect3"> | |
1120 | <a name="id-1.2.4.3.8.19.8"></a><h4>Returns</h4> | |
1121 | <p> a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GstFlowReturn"><span class="type">GstFlowReturn</span></a> that should be escalated to caller (of caller)</p> | |
1122 | <p></p> | |
1123 | </div> | |
1124 | </div> | |
1125 | <hr> | |
1126 | <div class="refsect2"> | |
1127 | <a name="GST-BASE-PARSE-DRAINING:CAPS"></a><h3>GST_BASE_PARSE_DRAINING()</h3> | |
1128 | <pre class="programlisting">#define GST_BASE_PARSE_DRAINING(parse) (!!(GST_BASE_PARSE_CAST(parse)->flags & GST_BASE_PARSE_FLAG_DRAINING)) | |
1129 | </pre> | |
1130 | <p>Obtains current drain status (ie. whether EOS has been received and | |
1131 | the parser is now processing the frames at the end of the stream)</p> | |
1132 | <div class="refsect3"> | |
1133 | <a name="id-1.2.4.3.8.20.5"></a><h4>Parameters</h4> | |
1134 | <div class="informaltable"><table width="100%" border="0"> | |
1135 | <colgroup> | |
1136 | <col width="150px" class="parameters_name"> | |
1137 | <col class="parameters_description"> | |
1138 | <col width="200px" class="parameters_annotations"> | |
1139 | </colgroup> | |
1140 | <tbody><tr> | |
1141 | <td class="parameter_name"><p>parse</p></td> | |
1142 | <td class="parameter_description"><p>base parse instance</p></td> | |
1143 | <td class="parameter_annotations"> </td> | |
1144 | </tr></tbody> | |
1145 | </table></div> | |
1146 | </div> | |
1147 | </div> | |
1148 | <hr> | |
1149 | <div class="refsect2"> | |
1150 | <a name="GST-BASE-PARSE-FLAG-DRAINING:CAPS"></a><h3>GST_BASE_PARSE_FLAG_DRAINING</h3> | |
1151 | <pre class="programlisting">#define GST_BASE_PARSE_FLAG_DRAINING (1 << 1) | |
1152 | </pre> | |
1153 | </div> | |
1154 | <hr> | |
1155 | <div class="refsect2"> | |
1156 | <a name="GST-BASE-PARSE-FLAG-LOST-SYNC:CAPS"></a><h3>GST_BASE_PARSE_FLAG_LOST_SYNC</h3> | |
1157 | <pre class="programlisting">#define GST_BASE_PARSE_FLAG_LOST_SYNC (1 << 0) | |
1158 | </pre> | |
1159 | </div> | |
1160 | <hr> | |
1161 | <div class="refsect2"> | |
1162 | <a name="GST-BASE-PARSE-LOST-SYNC:CAPS"></a><h3>GST_BASE_PARSE_LOST_SYNC()</h3> | |
1163 | <pre class="programlisting">#define GST_BASE_PARSE_LOST_SYNC(parse) (!!(GST_BASE_PARSE_CAST(parse)->flags & GST_BASE_PARSE_FLAG_LOST_SYNC)) | |
1164 | </pre> | |
1165 | <p>Obtains current sync status.</p> | |
1166 | <div class="refsect3"> | |
1167 | <a name="id-1.2.4.3.8.23.5"></a><h4>Parameters</h4> | |
1168 | <div class="informaltable"><table width="100%" border="0"> | |
1169 | <colgroup> | |
1170 | <col width="150px" class="parameters_name"> | |
1171 | <col class="parameters_description"> | |
1172 | <col width="200px" class="parameters_annotations"> | |
1173 | </colgroup> | |
1174 | <tbody><tr> | |
1175 | <td class="parameter_name"><p>parse</p></td> | |
1176 | <td class="parameter_description"><p>base parse instance</p></td> | |
1177 | <td class="parameter_annotations"> </td> | |
1178 | </tr></tbody> | |
1179 | </table></div> | |
1180 | </div> | |
1181 | </div> | |
1182 | <hr> | |
1183 | <div class="refsect2"> | |
1184 | <a name="GST-BASE-PARSE-SINK-PAD:CAPS"></a><h3>GST_BASE_PARSE_SINK_PAD()</h3> | |
1185 | <pre class="programlisting">#define GST_BASE_PARSE_SINK_PAD(obj) (GST_BASE_PARSE_CAST (obj)->sinkpad) | |
1186 | </pre> | |
1187 | <p>Gives the pointer to the sink <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html"><span class="type">GstPad</span></a> object of the element.</p> | |
1188 | <div class="refsect3"> | |
1189 | <a name="id-1.2.4.3.8.24.5"></a><h4>Parameters</h4> | |
1190 | <div class="informaltable"><table width="100%" border="0"> | |
1191 | <colgroup> | |
1192 | <col width="150px" class="parameters_name"> | |
1193 | <col class="parameters_description"> | |
1194 | <col width="200px" class="parameters_annotations"> | |
1195 | </colgroup> | |
1196 | <tbody><tr> | |
1197 | <td class="parameter_name"><p>obj</p></td> | |
1198 | <td class="parameter_description"><p>base parse instance</p></td> | |
1199 | <td class="parameter_annotations"> </td> | |
1200 | </tr></tbody> | |
1201 | </table></div> | |
1202 | </div> | |
1203 | </div> | |
1204 | <hr> | |
1205 | <div class="refsect2"> | |
1206 | <a name="GST-BASE-PARSE-SRC-PAD:CAPS"></a><h3>GST_BASE_PARSE_SRC_PAD()</h3> | |
1207 | <pre class="programlisting">#define GST_BASE_PARSE_SRC_PAD(obj) (GST_BASE_PARSE_CAST (obj)->srcpad) | |
1208 | </pre> | |
1209 | <p>Gives the pointer to the source <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html"><span class="type">GstPad</span></a> object of the element.</p> | |
1210 | <div class="refsect3"> | |
1211 | <a name="id-1.2.4.3.8.25.5"></a><h4>Parameters</h4> | |
1212 | <div class="informaltable"><table width="100%" border="0"> | |
1213 | <colgroup> | |
1214 | <col width="150px" class="parameters_name"> | |
1215 | <col class="parameters_description"> | |
1216 | <col width="200px" class="parameters_annotations"> | |
1217 | </colgroup> | |
1218 | <tbody><tr> | |
1219 | <td class="parameter_name"><p>obj</p></td> | |
1220 | <td class="parameter_description"><p>base parse instance</p></td> | |
1221 | <td class="parameter_annotations"> </td> | |
1222 | </tr></tbody> | |
1223 | </table></div> | |
1224 | </div> | |
1225 | </div> | |
1226 | </div> | |
1227 | <div class="refsect1"> | |
1228 | <a name="gstreamer-libs-GstBaseParse.other_details"></a><h2>Types and Values</h2> | |
1229 | <div class="refsect2"> | |
1230 | <a name="GstBaseParse"></a><h3>struct GstBaseParse</h3> | |
1231 | <pre class="programlisting">struct GstBaseParse { | |
1232 | GstElement element; | |
1233 | }; | |
1234 | </pre> | |
1235 | <p>The opaque <a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParse" title="struct GstBaseParse"><span class="type">GstBaseParse</span></a> data structure.</p> | |
1236 | <div class="refsect3"> | |
1237 | <a name="id-1.2.4.3.9.2.5"></a><h4>Members</h4> | |
1238 | <div class="informaltable"><table width="100%" border="0"> | |
1239 | <colgroup> | |
1240 | <col width="300px" class="struct_members_name"> | |
1241 | <col class="struct_members_description"> | |
1242 | <col width="200px" class="struct_members_annotations"> | |
1243 | </colgroup> | |
1244 | <tbody><tr> | |
1245 | <td class="struct_member_name"><p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> <em class="structfield"><code><a name="GstBaseParse.element"></a>element</code></em>;</p></td> | |
1246 | <td class="struct_member_description"><p>the parent element.</p></td> | |
1247 | <td class="struct_member_annotations"> </td> | |
1248 | </tr></tbody> | |
1249 | </table></div> | |
1250 | </div> | |
1251 | </div> | |
1252 | <hr> | |
1253 | <div class="refsect2"> | |
1254 | <a name="GstBaseParseClass"></a><h3>struct GstBaseParseClass</h3> | |
1255 | <pre class="programlisting">struct GstBaseParseClass { | |
1256 | GstElementClass parent_class; | |
1257 | ||
1258 | /* virtual methods for subclasses */ | |
1259 | ||
1260 | gboolean (*start) (GstBaseParse * parse); | |
1261 | ||
1262 | gboolean (*stop) (GstBaseParse * parse); | |
1263 | ||
1264 | gboolean (*set_sink_caps) (GstBaseParse * parse, | |
1265 | GstCaps * caps); | |
1266 | ||
1267 | GstFlowReturn (*handle_frame) (GstBaseParse * parse, | |
1268 | GstBaseParseFrame * frame, | |
1269 | gint * skipsize); | |
1270 | ||
1271 | GstFlowReturn (*pre_push_frame) (GstBaseParse * parse, | |
1272 | GstBaseParseFrame * frame); | |
1273 | ||
1274 | gboolean (*convert) (GstBaseParse * parse, | |
1275 | GstFormat src_format, | |
1276 | gint64 src_value, | |
1277 | GstFormat dest_format, | |
1278 | gint64 * dest_value); | |
1279 | ||
1280 | gboolean (*sink_event) (GstBaseParse * parse, | |
1281 | GstEvent * event); | |
1282 | ||
1283 | gboolean (*src_event) (GstBaseParse * parse, | |
1284 | GstEvent * event); | |
1285 | ||
1286 | GstCaps * (*get_sink_caps) (GstBaseParse * parse, | |
1287 | GstCaps * filter); | |
1288 | ||
1289 | GstFlowReturn (*detect) (GstBaseParse * parse, | |
1290 | GstBuffer * buffer); | |
1291 | ||
1292 | gboolean (*sink_query) (GstBaseParse * parse, | |
1293 | GstQuery * query); | |
1294 | ||
1295 | gboolean (*src_query) (GstBaseParse * parse, | |
1296 | GstQuery * query); | |
1297 | }; | |
1298 | </pre> | |
1299 | <p>Subclasses can override any of the available virtual methods or not, as | |
1300 | needed. At minimum <em class="parameter"><code>check_valid_frame</code></em> | |
1301 | and <em class="parameter"><code>parse_frame</code></em> | |
1302 | needs to be | |
1303 | overridden.</p> | |
1304 | <div class="refsect3"> | |
1305 | <a name="id-1.2.4.3.9.3.5"></a><h4>Members</h4> | |
1306 | <div class="informaltable"><table width="100%" border="0"> | |
1307 | <colgroup> | |
1308 | <col width="300px" class="struct_members_name"> | |
1309 | <col class="struct_members_description"> | |
1310 | <col width="200px" class="struct_members_annotations"> | |
1311 | </colgroup> | |
1312 | <tbody> | |
1313 | <tr> | |
1314 | <td class="struct_member_name"><p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html#GstElementClass"><span class="type">GstElementClass</span></a> <em class="structfield"><code><a name="GstBaseParseClass.parent-class"></a>parent_class</code></em>;</p></td> | |
1315 | <td class="struct_member_description"><p>the parent class</p></td> | |
1316 | <td class="struct_member_annotations"> </td> | |
1317 | </tr> | |
1318 | <tr> | |
1319 | <td class="struct_member_name"><p><em class="structfield"><code><a name="GstBaseParseClass.start"></a>start</code></em> ()</p></td> | |
1320 | <td class="struct_member_description"><p>Optional. | |
1321 | Called when the element starts processing. | |
1322 | Allows opening external resources.</p></td> | |
1323 | <td class="struct_member_annotations"> </td> | |
1324 | </tr> | |
1325 | <tr> | |
1326 | <td class="struct_member_name"><p><em class="structfield"><code><a name="GstBaseParseClass.stop"></a>stop</code></em> ()</p></td> | |
1327 | <td class="struct_member_description"><p>Optional. | |
1328 | Called when the element stops processing. | |
1329 | Allows closing external resources.</p></td> | |
1330 | <td class="struct_member_annotations"> </td> | |
1331 | </tr> | |
1332 | <tr> | |
1333 | <td class="struct_member_name"><p><em class="structfield"><code><a name="GstBaseParseClass.set-sink-caps"></a>set_sink_caps</code></em> ()</p></td> | |
1334 | <td class="struct_member_description"><p>allows the subclass to be notified of the actual caps set.</p></td> | |
1335 | <td class="struct_member_annotations"> </td> | |
1336 | </tr> | |
1337 | <tr> | |
1338 | <td class="struct_member_name"><p><em class="structfield"><code><a name="GstBaseParseClass.handle-frame"></a>handle_frame</code></em> ()</p></td> | |
1339 | <td class="struct_member_description"><p>Parses the input data into valid frames as defined by subclass | |
1340 | which should be passed to <a class="link" href="gstreamer-libs-GstBaseParse.html#gst-base-parse-finish-frame" title="gst_base_parse_finish_frame ()"><code class="function">gst_base_parse_finish_frame()</code></a>. | |
1341 | The frame's input buffer is guaranteed writable, | |
1342 | whereas the input frame ownership is held by caller | |
1343 | (so subclass should make a copy if it needs to hang on). | |
1344 | Input buffer (data) is provided by baseclass with as much | |
1345 | metadata set as possible by baseclass according to upstream | |
1346 | information and/or subclass settings, | |
1347 | though subclass may still set buffer timestamp and duration | |
1348 | if desired.</p></td> | |
1349 | <td class="struct_member_annotations"> </td> | |
1350 | </tr> | |
1351 | <tr> | |
1352 | <td class="struct_member_name"><p><em class="structfield"><code><a name="GstBaseParseClass.pre-push-frame"></a>pre_push_frame</code></em> ()</p></td> | |
1353 | <td class="struct_member_description"><p>Optional. | |
1354 | Called just prior to pushing a frame (after any pending | |
1355 | events have been sent) to give subclass a chance to perform | |
1356 | additional actions at this time (e.g. tag sending) or to | |
1357 | decide whether this buffer should be dropped or not | |
1358 | (e.g. custom segment clipping).</p></td> | |
1359 | <td class="struct_member_annotations"> </td> | |
1360 | </tr> | |
1361 | <tr> | |
1362 | <td class="struct_member_name"><p><em class="structfield"><code><a name="GstBaseParseClass.convert"></a>convert</code></em> ()</p></td> | |
1363 | <td class="struct_member_description"><p>Optional. | |
1364 | Convert between formats.</p></td> | |
1365 | <td class="struct_member_annotations"> </td> | |
1366 | </tr> | |
1367 | <tr> | |
1368 | <td class="struct_member_name"><p><em class="structfield"><code><a name="GstBaseParseClass.sink-event"></a>sink_event</code></em> ()</p></td> | |
1369 | <td class="struct_member_description"><p>Optional. | |
1370 | Event handler on the sink pad. This function should chain | |
1371 | up to the parent implementation to let the default handler | |
1372 | run.</p></td> | |
1373 | <td class="struct_member_annotations"> </td> | |
1374 | </tr> | |
1375 | <tr> | |
1376 | <td class="struct_member_name"><p><em class="structfield"><code><a name="GstBaseParseClass.src-event"></a>src_event</code></em> ()</p></td> | |
1377 | <td class="struct_member_description"><p>Optional. | |
1378 | Event handler on the source pad. Should chain up to the | |
1379 | parent to let the default handler run.</p></td> | |
1380 | <td class="struct_member_annotations"> </td> | |
1381 | </tr> | |
1382 | <tr> | |
1383 | <td class="struct_member_name"><p><em class="structfield"><code><a name="GstBaseParseClass.get-sink-caps"></a>get_sink_caps</code></em> ()</p></td> | |
1384 | <td class="struct_member_description"><p>allows the subclass to do its own sink get caps if needed.</p></td> | |
1385 | <td class="struct_member_annotations"> </td> | |
1386 | </tr> | |
1387 | <tr> | |
1388 | <td class="struct_member_name"><p><em class="structfield"><code><a name="GstBaseParseClass.detect"></a>detect</code></em> ()</p></td> | |
1389 | <td class="struct_member_description"><p>Optional. | |
1390 | Called until it doesn't return GST_FLOW_OK anymore for | |
1391 | the first buffers. Can be used by the subclass to detect | |
1392 | the stream format.</p></td> | |
1393 | <td class="struct_member_annotations"> </td> | |
1394 | </tr> | |
1395 | <tr> | |
1396 | <td class="struct_member_name"><p><em class="structfield"><code><a name="GstBaseParseClass.sink-query"></a>sink_query</code></em> ()</p></td> | |
1397 | <td class="struct_member_description"><p>Optional. | |
1398 | Query handler on the sink pad. This function should chain | |
1399 | up to the parent implementation to let the default handler | |
1400 | run (Since 1.2)</p></td> | |
1401 | <td class="struct_member_annotations"> </td> | |
1402 | </tr> | |
1403 | <tr> | |
1404 | <td class="struct_member_name"><p><em class="structfield"><code><a name="GstBaseParseClass.src-query"></a>src_query</code></em> ()</p></td> | |
1405 | <td class="struct_member_description"><p>Optional. | |
1406 | Query handler on the source pad. Should chain up to the | |
1407 | parent to let the default handler run (Since 1.2)</p></td> | |
1408 | <td class="struct_member_annotations"> </td> | |
1409 | </tr> | |
1410 | </tbody> | |
1411 | </table></div> | |
1412 | </div> | |
1413 | </div> | |
1414 | <hr> | |
1415 | <div class="refsect2"> | |
1416 | <a name="GstBaseParseFrame"></a><h3>GstBaseParseFrame</h3> | |
1417 | <pre class="programlisting">typedef struct { | |
1418 | GstBuffer * buffer; | |
1419 | GstBuffer * out_buffer; | |
1420 | guint flags; | |
1421 | guint64 offset; | |
1422 | gint overhead; | |
1423 | } GstBaseParseFrame; | |
1424 | </pre> | |
1425 | <p>Frame (context) data passed to each frame parsing virtual methods. In | |
1426 | addition to providing the data to be checked for a valid frame or an already | |
1427 | identified frame, it conveys additional metadata or control information | |
1428 | from and to the subclass w.r.t. the particular frame in question (rather | |
1429 | than global parameters). Some of these may apply to each parsing stage, others | |
1430 | only to some a particular one. These parameters are effectively zeroed at start | |
1431 | of each frame's processing, i.e. parsing virtual method invocation sequence.</p> | |
1432 | <div class="refsect3"> | |
1433 | <a name="id-1.2.4.3.9.4.5"></a><h4>Members</h4> | |
1434 | <div class="informaltable"><table width="100%" border="0"> | |
1435 | <colgroup> | |
1436 | <col width="300px" class="struct_members_name"> | |
1437 | <col class="struct_members_description"> | |
1438 | <col width="200px" class="struct_members_annotations"> | |
1439 | </colgroup> | |
1440 | <tbody> | |
1441 | <tr> | |
1442 | <td class="struct_member_name"><p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="type">GstBuffer</span></a> *<em class="structfield"><code><a name="GstBaseParseFrame.buffer"></a>buffer</code></em>;</p></td> | |
1443 | <td class="struct_member_description"><p>input data to be parsed for frames.</p></td> | |
1444 | <td class="struct_member_annotations"> </td> | |
1445 | </tr> | |
1446 | <tr> | |
1447 | <td class="struct_member_name"><p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="type">GstBuffer</span></a> *<em class="structfield"><code><a name="GstBaseParseFrame.out-buffer"></a>out_buffer</code></em>;</p></td> | |
1448 | <td class="struct_member_description"><p>output data.</p></td> | |
1449 | <td class="struct_member_annotations"> </td> | |
1450 | </tr> | |
1451 | <tr> | |
1452 | <td class="struct_member_name"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="GstBaseParseFrame.flags"></a>flags</code></em>;</p></td> | |
1453 | <td class="struct_member_description"><p>a combination of input and output <a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParseFrameFlags" title="enum GstBaseParseFrameFlags"><span class="type">GstBaseParseFrameFlags</span></a> that | |
1454 | convey additional context to subclass or allow subclass to tune | |
1455 | subsequent <a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParse" title="struct GstBaseParse"><span class="type">GstBaseParse</span></a> actions.</p></td> | |
1456 | <td class="struct_member_annotations"> </td> | |
1457 | </tr> | |
1458 | <tr> | |
1459 | <td class="struct_member_name"><p><span class="type">guint64</span> <em class="structfield"><code><a name="GstBaseParseFrame.offset"></a>offset</code></em>;</p></td> | |
1460 | <td class="struct_member_description"><p>media specific offset of input frame | |
1461 | Note that a converter may have a different one on the frame's buffer.</p></td> | |
1462 | <td class="struct_member_annotations"> </td> | |
1463 | </tr> | |
1464 | <tr> | |
1465 | <td class="struct_member_name"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> <em class="structfield"><code><a name="GstBaseParseFrame.overhead"></a>overhead</code></em>;</p></td> | |
1466 | <td class="struct_member_description"><p>subclass can set this to indicates the metadata overhead | |
1467 | for the given frame, which is then used to enable more accurate bitrate | |
1468 | computations. If this is -1, it is assumed that this frame should be | |
1469 | skipped in bitrate calculation.</p></td> | |
1470 | <td class="struct_member_annotations"> </td> | |
1471 | </tr> | |
1472 | </tbody> | |
1473 | </table></div> | |
1474 | </div> | |
1475 | </div> | |
1476 | <hr> | |
1477 | <div class="refsect2"> | |
1478 | <a name="GstBaseParseFrameFlags"></a><h3>enum GstBaseParseFrameFlags</h3> | |
1479 | <p>Flags to be used in a <a class="link" href="gstreamer-libs-GstBaseParse.html#GstBaseParseFrame" title="GstBaseParseFrame"><span class="type">GstBaseParseFrame</span></a>.</p> | |
1480 | <div class="refsect3"> | |
1481 | <a name="id-1.2.4.3.9.5.4"></a><h4>Members</h4> | |
1482 | <div class="informaltable"><table width="100%" border="0"> | |
1483 | <colgroup> | |
1484 | <col width="300px" class="enum_members_name"> | |
1485 | <col class="enum_members_description"> | |
1486 | <col width="200px" class="enum_members_annotations"> | |
1487 | </colgroup> | |
1488 | <tbody> | |
1489 | <tr> | |
1490 | <td class="enum_member_name"><p><a name="GST-BASE-PARSE-FRAME-FLAG-NONE:CAPS"></a>GST_BASE_PARSE_FRAME_FLAG_NONE</p></td> | |
1491 | <td class="enum_member_description"> | |
1492 | <p>no flag</p> | |
1493 | </td> | |
1494 | <td class="enum_member_annotations"> </td> | |
1495 | </tr> | |
1496 | <tr> | |
1497 | <td class="enum_member_name"><p><a name="GST-BASE-PARSE-FRAME-FLAG-NEW-FRAME:CAPS"></a>GST_BASE_PARSE_FRAME_FLAG_NEW_FRAME</p></td> | |
1498 | <td class="enum_member_description"> | |
1499 | <p>set by baseclass if current frame | |
1500 | is passed for processing to the subclass for the first time | |
1501 | (and not set on subsequent calls with same data).</p> | |
1502 | </td> | |
1503 | <td class="enum_member_annotations"> </td> | |
1504 | </tr> | |
1505 | <tr> | |
1506 | <td class="enum_member_name"><p><a name="GST-BASE-PARSE-FRAME-FLAG-NO-FRAME:CAPS"></a>GST_BASE_PARSE_FRAME_FLAG_NO_FRAME</p></td> | |
1507 | <td class="enum_member_description"> | |
1508 | <p>set to indicate this buffer should not be | |
1509 | counted as frame, e.g. if this frame is dependent on a previous one. | |
1510 | As it is not counted as a frame, bitrate increases but frame to time | |
1511 | conversions are maintained.</p> | |
1512 | </td> | |
1513 | <td class="enum_member_annotations"> </td> | |
1514 | </tr> | |
1515 | <tr> | |
1516 | <td class="enum_member_name"><p><a name="GST-BASE-PARSE-FRAME-FLAG-CLIP:CAPS"></a>GST_BASE_PARSE_FRAME_FLAG_CLIP</p></td> | |
1517 | <td class="enum_member_description"> | |
1518 | <p><em class="parameter"><code>pre_push_frame</code></em> | |
1519 | can set this to indicate | |
1520 | that regular segment clipping can still be performed (as opposed to | |
1521 | any custom one having been done).</p> | |
1522 | </td> | |
1523 | <td class="enum_member_annotations"> </td> | |
1524 | </tr> | |
1525 | <tr> | |
1526 | <td class="enum_member_name"><p><a name="GST-BASE-PARSE-FRAME-FLAG-DROP:CAPS"></a>GST_BASE_PARSE_FRAME_FLAG_DROP</p></td> | |
1527 | <td class="enum_member_description"> | |
1528 | <p>indicates to <em class="parameter"><code>finish_frame</code></em> | |
1529 | that the | |
1530 | the frame should be dropped (and might be handled internally by subclass)</p> | |
1531 | </td> | |
1532 | <td class="enum_member_annotations"> </td> | |
1533 | </tr> | |
1534 | <tr> | |
1535 | <td class="enum_member_name"><p><a name="GST-BASE-PARSE-FRAME-FLAG-QUEUE:CAPS"></a>GST_BASE_PARSE_FRAME_FLAG_QUEUE</p></td> | |
1536 | <td class="enum_member_description"> | |
1537 | <p>indicates to <em class="parameter"><code>finish_frame</code></em> | |
1538 | that the | |
1539 | the frame should be queued for now and processed fully later | |
1540 | when the first non-queued frame is finished</p> | |
1541 | </td> | |
1542 | <td class="enum_member_annotations"> </td> | |
1543 | </tr> | |
1544 | </tbody> | |
1545 | </table></div> | |
1546 | </div> | |
1547 | </div> | |
1548 | <hr> | |
1549 | <div class="refsect2"> | |
1550 | <a name="GST-BASE-PARSE-FLOW-DROPPED:CAPS"></a><h3>GST_BASE_PARSE_FLOW_DROPPED</h3> | |
1551 | <pre class="programlisting">#define GST_BASE_PARSE_FLOW_DROPPED GST_FLOW_CUSTOM_SUCCESS | |
1552 | </pre> | |
1553 | <p>A <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GstFlowReturn"><span class="type">GstFlowReturn</span></a> that can be returned from parse_frame to | |
1554 | indicate that no output buffer was generated, or from pre_push_frame to | |
1555 | to forego pushing buffer.</p> | |
1556 | </div> | |
1557 | </div> | |
1558 | <div class="refsect1"> | |
1559 | <a name="gstreamer-libs-GstBaseParse.see-also"></a><h2>See Also</h2> | |
1560 | <p><a class="link" href="GstBaseTransform.html" title="GstBaseTransform"><span class="type">GstBaseTransform</span></a></p> | |
1561 | </div> | |
1562 | </div> | |
1563 | <div class="footer"> | |
1564 | <hr> | |
1565 | Generated by GTK-Doc V1.20</div> | |
1566 | </body> | |
1567 | </html>⏎ |
27 | 27 | <dt><span class="chapter"><a href="gstreamer-base.html">GStreamer Base and Utillity Classes</a></span></dt> |
28 | 28 | <dd><dl> |
29 | 29 | <dt> |
30 | <span class="refentrytitle"><a href="gstreamer-libs-GstBaseParse.html">GstBaseParse</a></span><span class="refpurpose"> — Base class for stream parsers</span> | |
30 | <span class="refentrytitle"><a href="GstBaseParse.html">GstBaseParse</a></span><span class="refpurpose"> — Base class for stream parsers</span> | |
31 | 31 | </dt> |
32 | 32 | <dt> |
33 | 33 | <span class="refentrytitle"><a href="GstBaseSrc.html">GstBaseSrc</a></span><span class="refpurpose"> — Base class for getrange based source elements</span> |
14 | 14 | <div> |
15 | 15 | <div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">GStreamer 1.0 Library Reference Manual</p></th></tr></table></div> |
16 | 16 | <div><p class="releaseinfo"> |
17 | for GStreamer Library 1.0 (1.3.1) | |
17 | for GStreamer Library 1.0 (1.3.2) | |
18 | 18 | The latest version of this documentation can be found on-line at |
19 | 19 | <a class="ulink" href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/" target="_top">http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/</a>. |
20 | 20 | </p></div> |
27 | 27 | <dt><span class="chapter"><a href="gstreamer-base.html">GStreamer Base and Utillity Classes</a></span></dt> |
28 | 28 | <dd><dl> |
29 | 29 | <dt> |
30 | <span class="refentrytitle"><a href="gstreamer-libs-GstBaseParse.html">GstBaseParse</a></span><span class="refpurpose"> — Base class for stream parsers</span> | |
30 | <span class="refentrytitle"><a href="GstBaseParse.html">GstBaseParse</a></span><span class="refpurpose"> — Base class for stream parsers</span> | |
31 | 31 | </dt> |
32 | 32 | <dt> |
33 | 33 | <span class="refentrytitle"><a href="GstBaseSrc.html">GstBaseSrc</a></span><span class="refpurpose"> — Base class for getrange based source elements</span> |
0 | 0 | <ONLINE href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/"> |
1 | <ANCHOR id="gstreamer-libs-GstBaseParse" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html"> | |
2 | <ANCHOR id="gstreamer-libs-GstBaseParse.functions" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#gstreamer-libs-GstBaseParse.functions"> | |
3 | <ANCHOR id="gstreamer-libs-GstBaseParse.other" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#gstreamer-libs-GstBaseParse.other"> | |
4 | <ANCHOR id="gstreamer-libs-GstBaseParse.object-hierarchy" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#gstreamer-libs-GstBaseParse.object-hierarchy"> | |
5 | <ANCHOR id="gstreamer-libs-GstBaseParse.includes" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#gstreamer-libs-GstBaseParse.includes"> | |
6 | <ANCHOR id="gstreamer-libs-GstBaseParse.description" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#gstreamer-libs-GstBaseParse.description"> | |
7 | <ANCHOR id="gstreamer-libs-GstBaseParse.functions_details" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#gstreamer-libs-GstBaseParse.functions_details"> | |
8 | <ANCHOR id="gst-base-parse-set-duration" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#gst-base-parse-set-duration"> | |
9 | <ANCHOR id="gst-base-parse-set-average-bitrate" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#gst-base-parse-set-average-bitrate"> | |
10 | <ANCHOR id="gst-base-parse-set-min-frame-size" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#gst-base-parse-set-min-frame-size"> | |
11 | <ANCHOR id="gst-base-parse-set-passthrough" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#gst-base-parse-set-passthrough"> | |
12 | <ANCHOR id="gst-base-parse-set-syncable" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#gst-base-parse-set-syncable"> | |
13 | <ANCHOR id="gst-base-parse-set-has-timing-info" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#gst-base-parse-set-has-timing-info"> | |
14 | <ANCHOR id="gst-base-parse-set-frame-rate" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#gst-base-parse-set-frame-rate"> | |
15 | <ANCHOR id="gst-base-parse-set-latency" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#gst-base-parse-set-latency"> | |
16 | <ANCHOR id="gst-base-parse-set-infer-ts" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#gst-base-parse-set-infer-ts"> | |
17 | <ANCHOR id="gst-base-parse-set-pts-interpolation" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#gst-base-parse-set-pts-interpolation"> | |
18 | <ANCHOR id="gst-base-parse-set-ts-at-offset" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#gst-base-parse-set-ts-at-offset"> | |
19 | <ANCHOR id="gst-base-parse-convert-default" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#gst-base-parse-convert-default"> | |
20 | <ANCHOR id="gst-base-parse-add-index-entry" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#gst-base-parse-add-index-entry"> | |
21 | <ANCHOR id="gst-base-parse-frame-new" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#gst-base-parse-frame-new"> | |
22 | <ANCHOR id="gst-base-parse-frame-init" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#gst-base-parse-frame-init"> | |
23 | <ANCHOR id="gst-base-parse-frame-free" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#gst-base-parse-frame-free"> | |
24 | <ANCHOR id="gst-base-parse-push-frame" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#gst-base-parse-push-frame"> | |
25 | <ANCHOR id="gst-base-parse-finish-frame" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#gst-base-parse-finish-frame"> | |
26 | <ANCHOR id="GST-BASE-PARSE-DRAINING:CAPS" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#GST-BASE-PARSE-DRAINING:CAPS"> | |
27 | <ANCHOR id="GST-BASE-PARSE-FLAG-DRAINING:CAPS" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#GST-BASE-PARSE-FLAG-DRAINING:CAPS"> | |
28 | <ANCHOR id="GST-BASE-PARSE-FLAG-LOST-SYNC:CAPS" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#GST-BASE-PARSE-FLAG-LOST-SYNC:CAPS"> | |
29 | <ANCHOR id="GST-BASE-PARSE-LOST-SYNC:CAPS" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#GST-BASE-PARSE-LOST-SYNC:CAPS"> | |
30 | <ANCHOR id="GST-BASE-PARSE-SINK-PAD:CAPS" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#GST-BASE-PARSE-SINK-PAD:CAPS"> | |
31 | <ANCHOR id="GST-BASE-PARSE-SRC-PAD:CAPS" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#GST-BASE-PARSE-SRC-PAD:CAPS"> | |
32 | <ANCHOR id="gstreamer-libs-GstBaseParse.other_details" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#gstreamer-libs-GstBaseParse.other_details"> | |
33 | <ANCHOR id="GstBaseParse" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#GstBaseParse"> | |
34 | <ANCHOR id="GstBaseParseClass" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#GstBaseParseClass"> | |
35 | <ANCHOR id="GstBaseParseFrame" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#GstBaseParseFrame"> | |
36 | <ANCHOR id="GstBaseParseFrameFlags" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#GstBaseParseFrameFlags"> | |
37 | <ANCHOR id="GST-BASE-PARSE-FLOW-DROPPED:CAPS" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#GST-BASE-PARSE-FLOW-DROPPED:CAPS"> | |
38 | <ANCHOR id="gstreamer-libs-GstBaseParse.see-also" href="gstreamer-libs-1.0/gstreamer-libs-GstBaseParse.html#gstreamer-libs-GstBaseParse.see-also"> | |
1 | <ANCHOR id="GstBaseParse" href="gstreamer-libs-1.0/GstBaseParse.html"> | |
2 | <ANCHOR id="GstBaseParse.functions" href="gstreamer-libs-1.0/GstBaseParse.html#GstBaseParse.functions"> | |
3 | <ANCHOR id="GstBaseParse.properties" href="gstreamer-libs-1.0/GstBaseParse.html#GstBaseParse.properties"> | |
4 | <ANCHOR id="GstBaseParse.other" href="gstreamer-libs-1.0/GstBaseParse.html#GstBaseParse.other"> | |
5 | <ANCHOR id="GstBaseParse.object-hierarchy" href="gstreamer-libs-1.0/GstBaseParse.html#GstBaseParse.object-hierarchy"> | |
6 | <ANCHOR id="GstBaseParse.includes" href="gstreamer-libs-1.0/GstBaseParse.html#GstBaseParse.includes"> | |
7 | <ANCHOR id="GstBaseParse.description" href="gstreamer-libs-1.0/GstBaseParse.html#GstBaseParse.description"> | |
8 | <ANCHOR id="GstBaseParse.functions_details" href="gstreamer-libs-1.0/GstBaseParse.html#GstBaseParse.functions_details"> | |
9 | <ANCHOR id="gst-base-parse-set-duration" href="gstreamer-libs-1.0/GstBaseParse.html#gst-base-parse-set-duration"> | |
10 | <ANCHOR id="gst-base-parse-set-average-bitrate" href="gstreamer-libs-1.0/GstBaseParse.html#gst-base-parse-set-average-bitrate"> | |
11 | <ANCHOR id="gst-base-parse-set-min-frame-size" href="gstreamer-libs-1.0/GstBaseParse.html#gst-base-parse-set-min-frame-size"> | |
12 | <ANCHOR id="gst-base-parse-set-passthrough" href="gstreamer-libs-1.0/GstBaseParse.html#gst-base-parse-set-passthrough"> | |
13 | <ANCHOR id="gst-base-parse-set-syncable" href="gstreamer-libs-1.0/GstBaseParse.html#gst-base-parse-set-syncable"> | |
14 | <ANCHOR id="gst-base-parse-set-has-timing-info" href="gstreamer-libs-1.0/GstBaseParse.html#gst-base-parse-set-has-timing-info"> | |
15 | <ANCHOR id="gst-base-parse-set-frame-rate" href="gstreamer-libs-1.0/GstBaseParse.html#gst-base-parse-set-frame-rate"> | |
16 | <ANCHOR id="gst-base-parse-set-latency" href="gstreamer-libs-1.0/GstBaseParse.html#gst-base-parse-set-latency"> | |
17 | <ANCHOR id="gst-base-parse-set-infer-ts" href="gstreamer-libs-1.0/GstBaseParse.html#gst-base-parse-set-infer-ts"> | |
18 | <ANCHOR id="gst-base-parse-set-pts-interpolation" href="gstreamer-libs-1.0/GstBaseParse.html#gst-base-parse-set-pts-interpolation"> | |
19 | <ANCHOR id="gst-base-parse-set-ts-at-offset" href="gstreamer-libs-1.0/GstBaseParse.html#gst-base-parse-set-ts-at-offset"> | |
20 | <ANCHOR id="gst-base-parse-convert-default" href="gstreamer-libs-1.0/GstBaseParse.html#gst-base-parse-convert-default"> | |
21 | <ANCHOR id="gst-base-parse-add-index-entry" href="gstreamer-libs-1.0/GstBaseParse.html#gst-base-parse-add-index-entry"> | |
22 | <ANCHOR id="gst-base-parse-frame-new" href="gstreamer-libs-1.0/GstBaseParse.html#gst-base-parse-frame-new"> | |
23 | <ANCHOR id="gst-base-parse-frame-init" href="gstreamer-libs-1.0/GstBaseParse.html#gst-base-parse-frame-init"> | |
24 | <ANCHOR id="gst-base-parse-frame-free" href="gstreamer-libs-1.0/GstBaseParse.html#gst-base-parse-frame-free"> | |
25 | <ANCHOR id="gst-base-parse-push-frame" href="gstreamer-libs-1.0/GstBaseParse.html#gst-base-parse-push-frame"> | |
26 | <ANCHOR id="gst-base-parse-finish-frame" href="gstreamer-libs-1.0/GstBaseParse.html#gst-base-parse-finish-frame"> | |
27 | <ANCHOR id="GST-BASE-PARSE-DRAINING:CAPS" href="gstreamer-libs-1.0/GstBaseParse.html#GST-BASE-PARSE-DRAINING:CAPS"> | |
28 | <ANCHOR id="GST-BASE-PARSE-FLAG-DRAINING:CAPS" href="gstreamer-libs-1.0/GstBaseParse.html#GST-BASE-PARSE-FLAG-DRAINING:CAPS"> | |
29 | <ANCHOR id="GST-BASE-PARSE-FLAG-LOST-SYNC:CAPS" href="gstreamer-libs-1.0/GstBaseParse.html#GST-BASE-PARSE-FLAG-LOST-SYNC:CAPS"> | |
30 | <ANCHOR id="GST-BASE-PARSE-LOST-SYNC:CAPS" href="gstreamer-libs-1.0/GstBaseParse.html#GST-BASE-PARSE-LOST-SYNC:CAPS"> | |
31 | <ANCHOR id="GST-BASE-PARSE-SINK-PAD:CAPS" href="gstreamer-libs-1.0/GstBaseParse.html#GST-BASE-PARSE-SINK-PAD:CAPS"> | |
32 | <ANCHOR id="GST-BASE-PARSE-SRC-PAD:CAPS" href="gstreamer-libs-1.0/GstBaseParse.html#GST-BASE-PARSE-SRC-PAD:CAPS"> | |
33 | <ANCHOR id="GstBaseParse.other_details" href="gstreamer-libs-1.0/GstBaseParse.html#GstBaseParse.other_details"> | |
34 | <ANCHOR id="GstBaseParse-struct" href="gstreamer-libs-1.0/GstBaseParse.html#GstBaseParse-struct"> | |
35 | <ANCHOR id="GstBaseParseClass" href="gstreamer-libs-1.0/GstBaseParse.html#GstBaseParseClass"> | |
36 | <ANCHOR id="GstBaseParseFrame" href="gstreamer-libs-1.0/GstBaseParse.html#GstBaseParseFrame"> | |
37 | <ANCHOR id="GstBaseParseFrameFlags" href="gstreamer-libs-1.0/GstBaseParse.html#GstBaseParseFrameFlags"> | |
38 | <ANCHOR id="GST-BASE-PARSE-FLOW-DROPPED:CAPS" href="gstreamer-libs-1.0/GstBaseParse.html#GST-BASE-PARSE-FLOW-DROPPED:CAPS"> | |
39 | <ANCHOR id="GstBaseParse.property-details" href="gstreamer-libs-1.0/GstBaseParse.html#GstBaseParse.property-details"> | |
40 | <ANCHOR id="GstBaseParse--disable-passthrough" href="gstreamer-libs-1.0/GstBaseParse.html#GstBaseParse--disable-passthrough"> | |
41 | <ANCHOR id="GstBaseParse.see-also" href="gstreamer-libs-1.0/GstBaseParse.html#GstBaseParse.see-also"> | |
39 | 42 | <ANCHOR id="GstBaseSrc" href="gstreamer-libs-1.0/GstBaseSrc.html"> |
40 | 43 | <ANCHOR id="GstBaseSrc.functions" href="gstreamer-libs-1.0/GstBaseSrc.html#GstBaseSrc.functions"> |
41 | 44 | <ANCHOR id="GstBaseSrc.properties" href="gstreamer-libs-1.0/GstBaseSrc.html#GstBaseSrc.properties"> |
177 | 180 | <ANCHOR id="GstPushSrc.functions_details" href="gstreamer-libs-1.0/GstPushSrc.html#GstPushSrc.functions_details"> |
178 | 181 | <ANCHOR id="GstPushSrc.other_details" href="gstreamer-libs-1.0/GstPushSrc.html#GstPushSrc.other_details"> |
179 | 182 | <ANCHOR id="GstPushSrc-struct" href="gstreamer-libs-1.0/GstPushSrc.html#GstPushSrc-struct"> |
183 | <ANCHOR id="GstPushSrcClass" href="gstreamer-libs-1.0/GstPushSrc.html#GstPushSrcClass"> | |
180 | 184 | <ANCHOR id="GstPushSrc.see-also" href="gstreamer-libs-1.0/GstPushSrc.html#GstPushSrc.see-also"> |
181 | 185 | <ANCHOR id="GstAdapter" href="gstreamer-libs-1.0/GstAdapter.html"> |
182 | 186 | <ANCHOR id="GstAdapter.functions" href="gstreamer-libs-1.0/GstAdapter.html#GstAdapter.functions"> |
54 | 54 | |
55 | 55 | EXTRA_HFILES = \ |
56 | 56 | $(top_srcdir)/plugins/elements/gstcapsfilter.h \ |
57 | $(top_srcdir)/plugins/elements/gstdownloadbuffer.h \ | |
57 | 58 | $(top_srcdir)/plugins/elements/gstfakesrc.h \ |
58 | 59 | $(top_srcdir)/plugins/elements/gstfakesink.h \ |
59 | 60 | $(top_srcdir)/plugins/elements/gstfdsink.h \ |
496 | 496 | # the registry won't have the element |
497 | 497 | EXTRA_HFILES = \ |
498 | 498 | $(top_srcdir)/plugins/elements/gstcapsfilter.h \ |
499 | $(top_srcdir)/plugins/elements/gstdownloadbuffer.h \ | |
499 | 500 | $(top_srcdir)/plugins/elements/gstfakesrc.h \ |
500 | 501 | $(top_srcdir)/plugins/elements/gstfakesink.h \ |
501 | 502 | $(top_srcdir)/plugins/elements/gstfdsink.h \ |
17 | 17 | <chapter> |
18 | 18 | <title>gstreamer Elements</title> |
19 | 19 | <xi:include href="xml/element-capsfilter.xml" /> |
20 | <xi:include href="xml/element-downloadbuffer.xml" /> | |
20 | 21 | <xi:include href="xml/element-fakesrc.xml" /> |
21 | 22 | <xi:include href="xml/element-fakesink.xml" /> |
22 | 23 | <xi:include href="xml/element-fdsink.xml" /> |
122 | 122 | GST_IS_CAPSFILTER_CLASS |
123 | 123 | <SUBSECTION Private> |
124 | 124 | gst_capsfilter_get_type |
125 | </SECTION> | |
126 | ||
127 | <SECTION> | |
128 | <FILE>element-downloadbuffer</FILE> | |
129 | <TITLE>downloadbuffer</TITLE> | |
130 | GstDownloadBuffer | |
131 | <SUBSECTION Standard> | |
132 | GstDownloadBufferSize | |
133 | GstDownloadBufferClass | |
134 | GST_DOWNLOAD_BUFFER_CAST | |
135 | GST_DOWNLOAD_BUFFER | |
136 | GST_DOWNLOAD_BUFFER_CLASS | |
137 | GST_IS_DOWNLOAD_BUFFER | |
138 | GST_IS_DOWNLOAD_BUFFER_CLASS | |
139 | GST_TYPE_DOWNLOAD_BUFFER | |
125 | 140 | </SECTION> |
126 | 141 | |
127 | 142 | <SECTION> |
997 | 997 | <DEFAULT></DEFAULT> |
998 | 998 | </ARG> |
999 | 999 | |
1000 | <ARG> | |
1001 | <NAME>GstDownloadBuffer::high-percent</NAME> | |
1002 | <TYPE>gint</TYPE> | |
1003 | <RANGE>[0,100]</RANGE> | |
1004 | <FLAGS>rw</FLAGS> | |
1005 | <NICK>High percent</NICK> | |
1006 | <BLURB>High threshold for buffering to finish. Only used if use-buffering is True.</BLURB> | |
1007 | <DEFAULT>99</DEFAULT> | |
1008 | </ARG> | |
1009 | ||
1010 | <ARG> | |
1011 | <NAME>GstDownloadBuffer::low-percent</NAME> | |
1012 | <TYPE>gint</TYPE> | |
1013 | <RANGE>[0,100]</RANGE> | |
1014 | <FLAGS>rw</FLAGS> | |
1015 | <NICK>Low percent</NICK> | |
1016 | <BLURB>Low threshold for buffering to start. Only used if use-buffering is True.</BLURB> | |
1017 | <DEFAULT>10</DEFAULT> | |
1018 | </ARG> | |
1019 | ||
1020 | <ARG> | |
1021 | <NAME>GstDownloadBuffer::max-size-bytes</NAME> | |
1022 | <TYPE>guint</TYPE> | |
1023 | <RANGE></RANGE> | |
1024 | <FLAGS>rw</FLAGS> | |
1025 | <NICK>Max. size (kB)</NICK> | |
1026 | <BLURB>Max. amount of data to buffer (bytes, 0=disable).</BLURB> | |
1027 | <DEFAULT>2097152</DEFAULT> | |
1028 | </ARG> | |
1029 | ||
1030 | <ARG> | |
1031 | <NAME>GstDownloadBuffer::max-size-time</NAME> | |
1032 | <TYPE>guint64</TYPE> | |
1033 | <RANGE></RANGE> | |
1034 | <FLAGS>rw</FLAGS> | |
1035 | <NICK>Max. size (ns)</NICK> | |
1036 | <BLURB>Max. amount of data to buffer (in ns, 0=disable).</BLURB> | |
1037 | <DEFAULT>2000000000</DEFAULT> | |
1038 | </ARG> | |
1039 | ||
1040 | <ARG> | |
1041 | <NAME>GstDownloadBuffer::temp-location</NAME> | |
1042 | <TYPE>gchar*</TYPE> | |
1043 | <RANGE></RANGE> | |
1044 | <FLAGS>r</FLAGS> | |
1045 | <NICK>Temporary File Location</NICK> | |
1046 | <BLURB>Location to store temporary files in (Only read this property, use temp-template to configure the name template).</BLURB> | |
1047 | <DEFAULT>NULL</DEFAULT> | |
1048 | </ARG> | |
1049 | ||
1050 | <ARG> | |
1051 | <NAME>GstDownloadBuffer::temp-remove</NAME> | |
1052 | <TYPE>gboolean</TYPE> | |
1053 | <RANGE></RANGE> | |
1054 | <FLAGS>rw</FLAGS> | |
1055 | <NICK>Remove the Temporary File</NICK> | |
1056 | <BLURB>Remove the temp-location after use.</BLURB> | |
1057 | <DEFAULT>TRUE</DEFAULT> | |
1058 | </ARG> | |
1059 | ||
1060 | <ARG> | |
1061 | <NAME>GstDownloadBuffer::temp-template</NAME> | |
1062 | <TYPE>gchar*</TYPE> | |
1063 | <RANGE></RANGE> | |
1064 | <FLAGS>rw</FLAGS> | |
1065 | <NICK>Temporary File Template</NICK> | |
1066 | <BLURB>File template to store temporary files in, should contain directory and XXXXXX. (NULL == disabled).</BLURB> | |
1067 | <DEFAULT>NULL</DEFAULT> | |
1068 | </ARG> | |
1069 |
21 | 21 | GstIdentity |
22 | 22 | GstBin |
23 | 23 | GstPipeline |
24 | GstDownloadBuffer | |
24 | 25 | GstFunnel |
25 | 26 | GstInputSelector |
26 | 27 | GstMultiQueue |
24 | 24 | <div class="toc"><dl class="toc"> |
25 | 25 | <dt> |
26 | 26 | <span class="refentrytitle"><a href="gstreamer-plugins-capsfilter.html">capsfilter</a></span><span class="refpurpose"> — Pass data without modification, limiting formats</span> |
27 | </dt> | |
28 | <dt> | |
29 | <span class="refentrytitle"><a href="gstreamer-plugins-downloadbuffer.html">downloadbuffer</a></span><span class="refpurpose"> — Download Buffer element</span> | |
27 | 30 | </dt> |
28 | 31 | <dt> |
29 | 32 | <span class="refentrytitle"><a href="gstreamer-plugins-fakesrc.html">fakesrc</a></span><span class="refpurpose"> — Push empty (no data) buffers around</span> |
3 | 3 | <chapters> |
4 | 4 | <sub name="gstreamer Elements" link="ch01.html"> |
5 | 5 | <sub name="capsfilter" link="gstreamer-plugins-capsfilter.html"/> |
6 | <sub name="downloadbuffer" link="gstreamer-plugins-downloadbuffer.html"/> | |
6 | 7 | <sub name="fakesrc" link="gstreamer-plugins-fakesrc.html"/> |
7 | 8 | <sub name="fakesink" link="gstreamer-plugins-fakesink.html"/> |
8 | 9 | <sub name="fdsink" link="gstreamer-plugins-fdsink.html"/> |
30 | 31 | <keyword type="" name="Element Pads" link="gstreamer-plugins-capsfilter.html#id-1.2.2.7.4.2"/> |
31 | 32 | <keyword type="struct" name="struct GstCapsFilter" link="gstreamer-plugins-capsfilter.html#GstCapsFilter-struct"/> |
32 | 33 | <keyword type="property" name="The “caps” property" link="gstreamer-plugins-capsfilter.html#GstCapsFilter--caps"/> |
33 | <keyword type="" name="Example launch line" link="gstreamer-plugins-fakesrc.html#id-1.2.3.8.4"/> | |
34 | <keyword type="" name="Element Information" link="gstreamer-plugins-fakesrc.html#id-1.2.3.8.5.1"/> | |
35 | <keyword type="" name="Element Pads" link="gstreamer-plugins-fakesrc.html#id-1.2.3.8.5.2"/> | |
34 | <keyword type="" name="Element Information" link="gstreamer-plugins-downloadbuffer.html#id-1.2.3.7.8.1"/> | |
35 | <keyword type="" name="Element Pads" link="gstreamer-plugins-downloadbuffer.html#id-1.2.3.7.8.2"/> | |
36 | <keyword type="struct" name="struct GstDownloadBuffer" link="gstreamer-plugins-downloadbuffer.html#GstDownloadBuffer-struct"/> | |
37 | <keyword type="property" name="The “high-percent” property" link="gstreamer-plugins-downloadbuffer.html#GstDownloadBuffer--high-percent"/> | |
38 | <keyword type="property" name="The “low-percent” property" link="gstreamer-plugins-downloadbuffer.html#GstDownloadBuffer--low-percent"/> | |
39 | <keyword type="property" name="The “max-size-bytes” property" link="gstreamer-plugins-downloadbuffer.html#GstDownloadBuffer--max-size-bytes"/> | |
40 | <keyword type="property" name="The “max-size-time” property" link="gstreamer-plugins-downloadbuffer.html#GstDownloadBuffer--max-size-time"/> | |
41 | <keyword type="property" name="The “temp-location” property" link="gstreamer-plugins-downloadbuffer.html#GstDownloadBuffer--temp-location"/> | |
42 | <keyword type="property" name="The “temp-remove” property" link="gstreamer-plugins-downloadbuffer.html#GstDownloadBuffer--temp-remove"/> | |
43 | <keyword type="property" name="The “temp-template” property" link="gstreamer-plugins-downloadbuffer.html#GstDownloadBuffer--temp-template"/> | |
44 | <keyword type="" name="Example launch line" link="gstreamer-plugins-fakesrc.html#id-1.2.4.8.4"/> | |
45 | <keyword type="" name="Element Information" link="gstreamer-plugins-fakesrc.html#id-1.2.4.8.5.1"/> | |
46 | <keyword type="" name="Element Pads" link="gstreamer-plugins-fakesrc.html#id-1.2.4.8.5.2"/> | |
36 | 47 | <keyword type="struct" name="struct GstFakeSrc" link="gstreamer-plugins-fakesrc.html#GstFakeSrc-struct"/> |
37 | 48 | <keyword type="enum" name="enum GstFakeSrcDataType" link="gstreamer-plugins-fakesrc.html#GstFakeSrcDataType"/> |
38 | 49 | <keyword type="enum" name="enum GstFakeSrcFillType" link="gstreamer-plugins-fakesrc.html#GstFakeSrcFillType"/> |
56 | 67 | <keyword type="property" name="The “sizetype” property" link="gstreamer-plugins-fakesrc.html#GstFakeSrc--sizetype"/> |
57 | 68 | <keyword type="property" name="The “sync” property" link="gstreamer-plugins-fakesrc.html#GstFakeSrc--sync"/> |
58 | 69 | <keyword type="signal" name="The “handoff” signal" link="gstreamer-plugins-fakesrc.html#GstFakeSrc-handoff"/> |
59 | <keyword type="" name="Example launch line" link="gstreamer-plugins-fakesink.html#id-1.2.4.8.3"/> | |
60 | <keyword type="" name="Element Information" link="gstreamer-plugins-fakesink.html#id-1.2.4.8.4.1"/> | |
61 | <keyword type="" name="Element Pads" link="gstreamer-plugins-fakesink.html#id-1.2.4.8.4.2"/> | |
70 | <keyword type="" name="Example launch line" link="gstreamer-plugins-fakesink.html#id-1.2.5.8.3"/> | |
71 | <keyword type="" name="Element Information" link="gstreamer-plugins-fakesink.html#id-1.2.5.8.4.1"/> | |
72 | <keyword type="" name="Element Pads" link="gstreamer-plugins-fakesink.html#id-1.2.5.8.4.2"/> | |
62 | 73 | <keyword type="struct" name="struct GstFakeSink" link="gstreamer-plugins-fakesink.html#GstFakeSink-struct"/> |
63 | 74 | <keyword type="enum" name="enum GstFakeSinkStateError" link="gstreamer-plugins-fakesink.html#GstFakeSinkStateError"/> |
64 | 75 | <keyword type="property" name="The “can-activate-pull” property" link="gstreamer-plugins-fakesink.html#GstFakeSink--can-activate-pull"/> |
71 | 82 | <keyword type="property" name="The “state-error” property" link="gstreamer-plugins-fakesink.html#GstFakeSink--state-error"/> |
72 | 83 | <keyword type="signal" name="The “handoff” signal" link="gstreamer-plugins-fakesink.html#GstFakeSink-handoff"/> |
73 | 84 | <keyword type="signal" name="The “preroll-handoff” signal" link="gstreamer-plugins-fakesink.html#GstFakeSink-preroll-handoff"/> |
74 | <keyword type="" name="Element Information" link="gstreamer-plugins-fdsink.html#id-1.2.5.8.3.2.1"/> | |
75 | <keyword type="" name="Element Pads" link="gstreamer-plugins-fdsink.html#id-1.2.5.8.3.2.2"/> | |
85 | <keyword type="" name="Element Information" link="gstreamer-plugins-fdsink.html#id-1.2.6.8.3.2.1"/> | |
86 | <keyword type="" name="Element Pads" link="gstreamer-plugins-fdsink.html#id-1.2.6.8.3.2.2"/> | |
76 | 87 | <keyword type="struct" name="struct GstFdSink" link="gstreamer-plugins-fdsink.html#GstFdSink-struct"/> |
77 | 88 | <keyword type="property" name="The “fd” property" link="gstreamer-plugins-fdsink.html#GstFdSink--fd"/> |
78 | <keyword type="" name="Example launch line" link="gstreamer-plugins-fdsrc.html#id-1.2.6.8.8"/> | |
79 | <keyword type="" name="Element Information" link="gstreamer-plugins-fdsrc.html#id-1.2.6.8.9.1"/> | |
80 | <keyword type="" name="Element Pads" link="gstreamer-plugins-fdsrc.html#id-1.2.6.8.9.2"/> | |
89 | <keyword type="" name="Example launch line" link="gstreamer-plugins-fdsrc.html#id-1.2.7.8.8"/> | |
90 | <keyword type="" name="Element Information" link="gstreamer-plugins-fdsrc.html#id-1.2.7.8.9.1"/> | |
91 | <keyword type="" name="Element Pads" link="gstreamer-plugins-fdsrc.html#id-1.2.7.8.9.2"/> | |
81 | 92 | <keyword type="struct" name="struct GstFdSrc" link="gstreamer-plugins-fdsrc.html#GstFdSrc-struct"/> |
82 | 93 | <keyword type="property" name="The “fd” property" link="gstreamer-plugins-fdsrc.html#GstFdSrc--fd"/> |
83 | 94 | <keyword type="property" name="The “timeout” property" link="gstreamer-plugins-fdsrc.html#GstFdSrc--timeout"/> |
84 | <keyword type="" name="Example launch line" link="gstreamer-plugins-filesrc.html#id-1.2.7.8.3"/> | |
85 | <keyword type="" name="Element Information" link="gstreamer-plugins-filesrc.html#id-1.2.7.8.4.1"/> | |
86 | <keyword type="" name="Element Pads" link="gstreamer-plugins-filesrc.html#id-1.2.7.8.4.2"/> | |
95 | <keyword type="" name="Example launch line" link="gstreamer-plugins-filesrc.html#id-1.2.8.8.3"/> | |
96 | <keyword type="" name="Element Information" link="gstreamer-plugins-filesrc.html#id-1.2.8.8.4.1"/> | |
97 | <keyword type="" name="Element Pads" link="gstreamer-plugins-filesrc.html#id-1.2.8.8.4.2"/> | |
87 | 98 | <keyword type="struct" name="struct GstFileSrc" link="gstreamer-plugins-filesrc.html#GstFileSrc-struct"/> |
88 | 99 | <keyword type="property" name="The “location” property" link="gstreamer-plugins-filesrc.html#GstFileSrc--location"/> |
89 | <keyword type="" name="Example launch line" link="gstreamer-plugins-filesink.html#id-1.2.8.8.3"/> | |
90 | <keyword type="" name="Element Information" link="gstreamer-plugins-filesink.html#id-1.2.8.8.4.1"/> | |
91 | <keyword type="" name="Element Pads" link="gstreamer-plugins-filesink.html#id-1.2.8.8.4.2"/> | |
100 | <keyword type="" name="Example launch line" link="gstreamer-plugins-filesink.html#id-1.2.9.8.3"/> | |
101 | <keyword type="" name="Element Information" link="gstreamer-plugins-filesink.html#id-1.2.9.8.4.1"/> | |
102 | <keyword type="" name="Element Pads" link="gstreamer-plugins-filesink.html#id-1.2.9.8.4.2"/> | |
92 | 103 | <keyword type="struct" name="struct GstFileSink" link="gstreamer-plugins-filesink.html#GstFileSink-struct"/> |
93 | 104 | <keyword type="property" name="The “append” property" link="gstreamer-plugins-filesink.html#GstFileSink--append"/> |
94 | 105 | <keyword type="property" name="The “buffer-mode” property" link="gstreamer-plugins-filesink.html#GstFileSink--buffer-mode"/> |
95 | 106 | <keyword type="property" name="The “buffer-size” property" link="gstreamer-plugins-filesink.html#GstFileSink--buffer-size"/> |
96 | 107 | <keyword type="property" name="The “location” property" link="gstreamer-plugins-filesink.html#GstFileSink--location"/> |
97 | <keyword type="" name="Element Information" link="gstreamer-plugins-funnel.html#id-1.2.9.6.3.2.1"/> | |
98 | <keyword type="" name="Element Pads" link="gstreamer-plugins-funnel.html#id-1.2.9.6.3.2.2"/> | |
108 | <keyword type="" name="Element Information" link="gstreamer-plugins-funnel.html#id-1.2.10.6.3.2.1"/> | |
109 | <keyword type="" name="Element Pads" link="gstreamer-plugins-funnel.html#id-1.2.10.6.3.2.2"/> | |
99 | 110 | <keyword type="struct" name="struct GstFunnel" link="gstreamer-plugins-funnel.html#GstFunnel-struct"/> |
100 | <keyword type="" name="Element Information" link="gstreamer-plugins-identity.html#id-1.2.10.8.2.1.1"/> | |
101 | <keyword type="" name="Element Pads" link="gstreamer-plugins-identity.html#id-1.2.10.8.2.1.2"/> | |
111 | <keyword type="" name="Element Information" link="gstreamer-plugins-identity.html#id-1.2.11.8.2.1.1"/> | |
112 | <keyword type="" name="Element Pads" link="gstreamer-plugins-identity.html#id-1.2.11.8.2.1.2"/> | |
102 | 113 | <keyword type="struct" name="struct GstIdentity" link="gstreamer-plugins-identity.html#GstIdentity-struct"/> |
103 | 114 | <keyword type="property" name="The “check-imperfect-offset” property" link="gstreamer-plugins-identity.html#GstIdentity--check-imperfect-offset"/> |
104 | 115 | <keyword type="property" name="The “check-imperfect-timestamp” property" link="gstreamer-plugins-identity.html#GstIdentity--check-imperfect-timestamp"/> |
113 | 124 | <keyword type="property" name="The “sleep-time” property" link="gstreamer-plugins-identity.html#GstIdentity--sleep-time"/> |
114 | 125 | <keyword type="property" name="The “sync” property" link="gstreamer-plugins-identity.html#GstIdentity--sync"/> |
115 | 126 | <keyword type="signal" name="The “handoff” signal" link="gstreamer-plugins-identity.html#GstIdentity-handoff"/> |
116 | <keyword type="" name="Element Information" link="gstreamer-plugins-input-selector.html#id-1.2.11.8.5.1"/> | |
117 | <keyword type="" name="Element Pads" link="gstreamer-plugins-input-selector.html#id-1.2.11.8.5.2"/> | |
127 | <keyword type="" name="Element Information" link="gstreamer-plugins-input-selector.html#id-1.2.12.8.5.1"/> | |
128 | <keyword type="" name="Element Pads" link="gstreamer-plugins-input-selector.html#id-1.2.12.8.5.2"/> | |
118 | 129 | <keyword type="struct" name="struct GstInputSelector" link="gstreamer-plugins-input-selector.html#GstInputSelector-struct"/> |
119 | 130 | <keyword type="enum" name="enum GstInputSelectorSyncMode" link="gstreamer-plugins-input-selector.html#GstInputSelectorSyncMode"/> |
120 | 131 | <keyword type="property" name="The “active-pad” property" link="gstreamer-plugins-input-selector.html#GstInputSelector--active-pad"/> |
123 | 134 | <keyword type="property" name="The “sync-mode” property" link="gstreamer-plugins-input-selector.html#GstInputSelector--sync-mode"/> |
124 | 135 | <keyword type="property" name="The “sync-streams” property" link="gstreamer-plugins-input-selector.html#GstInputSelector--sync-streams"/> |
125 | 136 | <keyword type="signal" name="The “block” signal" link="gstreamer-plugins-input-selector.html#GstInputSelector-block"/> |
126 | <keyword type="" name="" link="gstreamer-plugins-multiqueue.html#id-1.2.12.8.2"/> | |
127 | <keyword type="" name="Element Information" link="gstreamer-plugins-multiqueue.html#id-1.2.12.8.3.1"/> | |
128 | <keyword type="" name="Element Pads" link="gstreamer-plugins-multiqueue.html#id-1.2.12.8.3.2"/> | |
137 | <keyword type="" name="" link="gstreamer-plugins-multiqueue.html#id-1.2.13.8.2"/> | |
138 | <keyword type="" name="Element Information" link="gstreamer-plugins-multiqueue.html#id-1.2.13.8.3.1"/> | |
139 | <keyword type="" name="Element Pads" link="gstreamer-plugins-multiqueue.html#id-1.2.13.8.3.2"/> | |
129 | 140 | <keyword type="struct" name="struct GstMultiQueue" link="gstreamer-plugins-multiqueue.html#GstMultiQueue-struct"/> |
130 | 141 | <keyword type="property" name="The “extra-size-buffers” property" link="gstreamer-plugins-multiqueue.html#GstMultiQueue--extra-size-buffers"/> |
131 | 142 | <keyword type="property" name="The “extra-size-bytes” property" link="gstreamer-plugins-multiqueue.html#GstMultiQueue--extra-size-bytes"/> |
139 | 150 | <keyword type="property" name="The “use-buffering” property" link="gstreamer-plugins-multiqueue.html#GstMultiQueue--use-buffering"/> |
140 | 151 | <keyword type="signal" name="The “overrun” signal" link="gstreamer-plugins-multiqueue.html#GstMultiQueue-overrun"/> |
141 | 152 | <keyword type="signal" name="The “underrun” signal" link="gstreamer-plugins-multiqueue.html#GstMultiQueue-underrun"/> |
142 | <keyword type="" name="Element Information" link="gstreamer-plugins-output-selector.html#id-1.2.13.7.2.1.1"/> | |
143 | <keyword type="" name="Element Pads" link="gstreamer-plugins-output-selector.html#id-1.2.13.7.2.1.2"/> | |
153 | <keyword type="" name="Element Information" link="gstreamer-plugins-output-selector.html#id-1.2.14.7.2.1.1"/> | |
154 | <keyword type="" name="Element Pads" link="gstreamer-plugins-output-selector.html#id-1.2.14.7.2.1.2"/> | |
144 | 155 | <keyword type="struct" name="struct GstOutputSelector" link="gstreamer-plugins-output-selector.html#GstOutputSelector-struct"/> |
145 | 156 | <keyword type="enum" name="enum GstOutputSelectorPadNegotiationMode" link="gstreamer-plugins-output-selector.html#GstOutputSelectorPadNegotiationMode"/> |
146 | 157 | <keyword type="property" name="The “active-pad” property" link="gstreamer-plugins-output-selector.html#GstOutputSelector--active-pad"/> |
147 | 158 | <keyword type="property" name="The “pad-negotiation-mode” property" link="gstreamer-plugins-output-selector.html#GstOutputSelector--pad-negotiation-mode"/> |
148 | 159 | <keyword type="property" name="The “resend-latest” property" link="gstreamer-plugins-output-selector.html#GstOutputSelector--resend-latest"/> |
149 | <keyword type="" name="Element Information" link="gstreamer-plugins-queue.html#id-1.2.14.8.7.3.1"/> | |
150 | <keyword type="" name="Element Pads" link="gstreamer-plugins-queue.html#id-1.2.14.8.7.3.2"/> | |
160 | <keyword type="" name="Element Information" link="gstreamer-plugins-queue.html#id-1.2.15.8.7.3.1"/> | |
161 | <keyword type="" name="Element Pads" link="gstreamer-plugins-queue.html#id-1.2.15.8.7.3.2"/> | |
151 | 162 | <keyword type="struct" name="struct GstQueue" link="gstreamer-plugins-queue.html#GstQueue-struct"/> |
152 | 163 | <keyword type="enum" name="enum GstQueueLeaky" link="gstreamer-plugins-queue.html#GstQueueLeaky"/> |
153 | 164 | <keyword type="property" name="The “current-level-buffers” property" link="gstreamer-plugins-queue.html#GstQueue--current-level-buffers"/> |
166 | 177 | <keyword type="signal" name="The “pushing” signal" link="gstreamer-plugins-queue.html#GstQueue-pushing"/> |
167 | 178 | <keyword type="signal" name="The “running” signal" link="gstreamer-plugins-queue.html#GstQueue-running"/> |
168 | 179 | <keyword type="signal" name="The “underrun” signal" link="gstreamer-plugins-queue.html#GstQueue-underrun"/> |
169 | <keyword type="" name="Element Information" link="gstreamer-plugins-queue2.html#id-1.2.15.7.7.1.1"/> | |
170 | <keyword type="" name="Element Pads" link="gstreamer-plugins-queue2.html#id-1.2.15.7.7.1.2"/> | |
180 | <keyword type="" name="Element Information" link="gstreamer-plugins-queue2.html#id-1.2.16.7.7.1.1"/> | |
181 | <keyword type="" name="Element Pads" link="gstreamer-plugins-queue2.html#id-1.2.16.7.7.1.2"/> | |
171 | 182 | <keyword type="struct" name="struct GstQueue2" link="gstreamer-plugins-queue2.html#GstQueue2-struct"/> |
172 | 183 | <keyword type="property" name="The “current-level-buffers” property" link="gstreamer-plugins-queue2.html#GstQueue2--current-level-buffers"/> |
173 | 184 | <keyword type="property" name="The “current-level-bytes” property" link="gstreamer-plugins-queue2.html#GstQueue2--current-level-bytes"/> |
183 | 194 | <keyword type="property" name="The “temp-template” property" link="gstreamer-plugins-queue2.html#GstQueue2--temp-template"/> |
184 | 195 | <keyword type="property" name="The “use-buffering” property" link="gstreamer-plugins-queue2.html#GstQueue2--use-buffering"/> |
185 | 196 | <keyword type="property" name="The “use-rate-estimate” property" link="gstreamer-plugins-queue2.html#GstQueue2--use-rate-estimate"/> |
186 | <keyword type="" name="Example launch line" link="gstreamer-plugins-tee.html#id-1.2.16.7.4"/> | |
187 | <keyword type="" name="Element Information" link="gstreamer-plugins-tee.html#id-1.2.16.7.5.1"/> | |
188 | <keyword type="" name="Element Pads" link="gstreamer-plugins-tee.html#id-1.2.16.7.5.2"/> | |
197 | <keyword type="" name="Example launch line" link="gstreamer-plugins-tee.html#id-1.2.17.7.4"/> | |
198 | <keyword type="" name="Element Information" link="gstreamer-plugins-tee.html#id-1.2.17.7.5.1"/> | |
199 | <keyword type="" name="Element Pads" link="gstreamer-plugins-tee.html#id-1.2.17.7.5.2"/> | |
189 | 200 | <keyword type="struct" name="struct GstTee" link="gstreamer-plugins-tee.html#GstTee-struct"/> |
190 | 201 | <keyword type="enum" name="enum GstTeePullMode" link="gstreamer-plugins-tee.html#GstTeePullMode"/> |
191 | 202 | <keyword type="property" name="The “alloc-pad” property" link="gstreamer-plugins-tee.html#GstTee--alloc-pad"/> |
194 | 205 | <keyword type="property" name="The “num-src-pads” property" link="gstreamer-plugins-tee.html#GstTee--num-src-pads"/> |
195 | 206 | <keyword type="property" name="The “pull-mode” property" link="gstreamer-plugins-tee.html#GstTee--pull-mode"/> |
196 | 207 | <keyword type="property" name="The “silent” property" link="gstreamer-plugins-tee.html#GstTee--silent"/> |
197 | <keyword type="" name="Element Information" link="gstreamer-plugins-typefind.html#id-1.2.17.8.4.2.1"/> | |
198 | <keyword type="" name="Element Pads" link="gstreamer-plugins-typefind.html#id-1.2.17.8.4.2.2"/> | |
208 | <keyword type="" name="Element Information" link="gstreamer-plugins-typefind.html#id-1.2.18.8.4.2.1"/> | |
209 | <keyword type="" name="Element Pads" link="gstreamer-plugins-typefind.html#id-1.2.18.8.4.2.2"/> | |
199 | 210 | <keyword type="struct" name="struct GstTypeFindElement" link="gstreamer-plugins-typefind.html#GstTypeFindElement-struct"/> |
200 | 211 | <keyword type="property" name="The “caps” property" link="gstreamer-plugins-typefind.html#GstTypeFindElement--caps"/> |
201 | 212 | <keyword type="property" name="The “force-caps” property" link="gstreamer-plugins-typefind.html#GstTypeFindElement--force-caps"/> |
202 | 213 | <keyword type="property" name="The “minimum” property" link="gstreamer-plugins-typefind.html#GstTypeFindElement--minimum"/> |
203 | 214 | <keyword type="signal" name="The “have-type” signal" link="gstreamer-plugins-typefind.html#GstTypeFindElement-have-type"/> |
204 | <keyword type="" name="Element Information" link="gstreamer-plugins-valve.html#id-1.2.18.7.3.4.1"/> | |
205 | <keyword type="" name="Element Pads" link="gstreamer-plugins-valve.html#id-1.2.18.7.3.4.2"/> | |
215 | <keyword type="" name="Element Information" link="gstreamer-plugins-valve.html#id-1.2.19.7.3.4.1"/> | |
216 | <keyword type="" name="Element Pads" link="gstreamer-plugins-valve.html#id-1.2.19.7.3.4.2"/> | |
206 | 217 | <keyword type="struct" name="struct GstValve" link="gstreamer-plugins-valve.html#GstValve-struct"/> |
207 | 218 | <keyword type="property" name="The “drop” property" link="gstreamer-plugins-valve.html#GstValve--drop"/> |
208 | 219 | </functions> |
6 | 6 | <link rel="home" href="index.html" title="GStreamer Core Plugins 1.0 Plugins Reference Manual"> |
7 | 7 | <link rel="up" href="ch01.html" title="gstreamer Elements"> |
8 | 8 | <link rel="prev" href="ch01.html" title="gstreamer Elements"> |
9 | <link rel="next" href="gstreamer-plugins-fakesrc.html" title="fakesrc"> | |
9 | <link rel="next" href="gstreamer-plugins-downloadbuffer.html" title="downloadbuffer"> | |
10 | 10 | <meta name="generator" content="GTK-Doc V1.20 (XML mode)"> |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
12 | 12 | </head> |
21 | 21 | <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> |
22 | 22 | <td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> |
23 | 23 | <td><a accesskey="p" href="ch01.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> |
24 | <td><a accesskey="n" href="gstreamer-plugins-fakesrc.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> | |
24 | <td><a accesskey="n" href="gstreamer-plugins-downloadbuffer.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> | |
25 | 25 | </tr></table> |
26 | 26 | <div class="refentry"> |
27 | 27 | <a name="gstreamer-plugins-capsfilter"></a><div class="titlepage"></div> |
0 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
1 | <html> | |
2 | <head> | |
3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
4 | <title>GStreamer Core Plugins 1.0 Plugins Reference Manual: downloadbuffer</title> | |
5 | <meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> | |
6 | <link rel="home" href="index.html" title="GStreamer Core Plugins 1.0 Plugins Reference Manual"> | |
7 | <link rel="up" href="ch01.html" title="gstreamer Elements"> | |
8 | <link rel="prev" href="gstreamer-plugins-capsfilter.html" title="capsfilter"> | |
9 | <link rel="next" href="gstreamer-plugins-fakesrc.html" title="fakesrc"> | |
10 | <meta name="generator" content="GTK-Doc V1.20 (XML mode)"> | |
11 | <link rel="stylesheet" href="style.css" type="text/css"> | |
12 | </head> | |
13 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> | |
14 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle"> | |
15 | <td width="100%" align="left" class="shortcuts"> | |
16 | <a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> | |
17 | <a href="#gstreamer-plugins-downloadbuffer.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> | |
18 | <a href="#gstreamer-plugins-downloadbuffer.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties"> <span class="dim">|</span> | |
19 | <a href="#gstreamer-plugins-downloadbuffer.properties" class="shortcut">Properties</a></span> | |
20 | </td> | |
21 | <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> | |
22 | <td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> | |
23 | <td><a accesskey="p" href="gstreamer-plugins-capsfilter.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> | |
24 | <td><a accesskey="n" href="gstreamer-plugins-fakesrc.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> | |
25 | </tr></table> | |
26 | <div class="refentry"> | |
27 | <a name="gstreamer-plugins-downloadbuffer"></a><div class="titlepage"></div> | |
28 | <div class="refnamediv"><table width="100%"><tr> | |
29 | <td valign="top"> | |
30 | <h2><span class="refentrytitle"><a name="gstreamer-plugins-downloadbuffer.top_of_page"></a>downloadbuffer</span></h2> | |
31 | <p>downloadbuffer — Download Buffer element</p> | |
32 | </td> | |
33 | <td class="gallery_image" valign="top" align="right"></td> | |
34 | </tr></table></div> | |
35 | <div class="refsect1"> | |
36 | <a name="gstreamer-plugins-downloadbuffer.properties"></a><h2>Properties</h2> | |
37 | <div class="informaltable"><table border="0"> | |
38 | <colgroup> | |
39 | <col width="150px" class="properties_type"> | |
40 | <col width="300px" class="properties_name"> | |
41 | <col width="200px" class="properties_flags"> | |
42 | </colgroup> | |
43 | <tbody> | |
44 | <tr> | |
45 | <td class="property_type"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td> | |
46 | <td class="property_name"><a class="link" href="gstreamer-plugins-downloadbuffer.html#GstDownloadBuffer--high-percent" title="The “high-percent” property">high-percent</a></td> | |
47 | <td class="property_flags">Read / Write</td> | |
48 | </tr> | |
49 | <tr> | |
50 | <td class="property_type"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td> | |
51 | <td class="property_name"><a class="link" href="gstreamer-plugins-downloadbuffer.html#GstDownloadBuffer--low-percent" title="The “low-percent” property">low-percent</a></td> | |
52 | <td class="property_flags">Read / Write</td> | |
53 | </tr> | |
54 | <tr> | |
55 | <td class="property_type"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td> | |
56 | <td class="property_name"><a class="link" href="gstreamer-plugins-downloadbuffer.html#GstDownloadBuffer--max-size-bytes" title="The “max-size-bytes” property">max-size-bytes</a></td> | |
57 | <td class="property_flags">Read / Write</td> | |
58 | </tr> | |
59 | <tr> | |
60 | <td class="property_type"><span class="type">guint64</span></td> | |
61 | <td class="property_name"><a class="link" href="gstreamer-plugins-downloadbuffer.html#GstDownloadBuffer--max-size-time" title="The “max-size-time” property">max-size-time</a></td> | |
62 | <td class="property_flags">Read / Write</td> | |
63 | </tr> | |
64 | <tr> | |
65 | <td class="property_type"> | |
66 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td> | |
67 | <td class="property_name"><a class="link" href="gstreamer-plugins-downloadbuffer.html#GstDownloadBuffer--temp-location" title="The “temp-location” property">temp-location</a></td> | |
68 | <td class="property_flags">Read</td> | |
69 | </tr> | |
70 | <tr> | |
71 | <td class="property_type"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td> | |
72 | <td class="property_name"><a class="link" href="gstreamer-plugins-downloadbuffer.html#GstDownloadBuffer--temp-remove" title="The “temp-remove” property">temp-remove</a></td> | |
73 | <td class="property_flags">Read / Write</td> | |
74 | </tr> | |
75 | <tr> | |
76 | <td class="property_type"> | |
77 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td> | |
78 | <td class="property_name"><a class="link" href="gstreamer-plugins-downloadbuffer.html#GstDownloadBuffer--temp-template" title="The “temp-template” property">temp-template</a></td> | |
79 | <td class="property_flags">Read / Write</td> | |
80 | </tr> | |
81 | </tbody> | |
82 | </table></div> | |
83 | </div> | |
84 | <a name="GstDownloadBuffer"></a><div class="refsect1"> | |
85 | <a name="gstreamer-plugins-downloadbuffer.other"></a><h2>Types and Values</h2> | |
86 | <div class="informaltable"><table width="100%" border="0"> | |
87 | <colgroup> | |
88 | <col width="150px" class="name"> | |
89 | <col class="description"> | |
90 | </colgroup> | |
91 | <tbody><tr> | |
92 | <td class="datatype_keyword">struct</td> | |
93 | <td class="function_name"><a class="link" href="gstreamer-plugins-downloadbuffer.html#GstDownloadBuffer-struct" title="struct GstDownloadBuffer">GstDownloadBuffer</a></td> | |
94 | </tr></tbody> | |
95 | </table></div> | |
96 | </div> | |
97 | <div class="refsect1"> | |
98 | <a name="gstreamer-plugins-downloadbuffer.object-hierarchy"></a><h2>Object Hierarchy</h2> | |
99 | <pre class="screen"> <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a> | |
100 | <span class="lineart">╰──</span> <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a> | |
101 | <span class="lineart">╰──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstObject.html">GstObject</a> | |
102 | <span class="lineart">╰──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html">GstElement</a> | |
103 | <span class="lineart">╰──</span> GstDownloadBuffer | |
104 | </pre> | |
105 | </div> | |
106 | <div class="refsect1"> | |
107 | <a name="gstreamer-plugins-downloadbuffer.description"></a><h2>Description</h2> | |
108 | <p>The downloadbuffer element provides on-disk buffering and caching of, typically, | |
109 | a network file. temp-template should be set to a value such as | |
110 | /tmp/gstreamer-XXXXXX and the element will allocate a random free filename and | |
111 | buffer the data in the file.</p> | |
112 | <p>With max-size-bytes and max-size-time you can configure the buffering limits. | |
113 | The downloadbuffer element will try to read-ahead these amounts of data. When | |
114 | the amount of read-ahead data drops below low-percent of the configured max, | |
115 | the element will start emiting BUFFERING messages until high-percent of max is | |
116 | reached again.</p> | |
117 | <p>The downloadbuffer provides push and pull based scheduling on its source pad | |
118 | and will efficiently seek in the upstream element when needed.</p> | |
119 | <p>The temp-location property will be used to notify the application of the | |
120 | allocated filename.</p> | |
121 | <p>When the downloadbuffer has completely downloaded the media, it will | |
122 | post an application message named <code class="classname">"GstCacheDownloadComplete"</code> | |
123 | with the following information:</p> | |
124 | <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p> | |
125 | G_TYPE_STRING | |
126 | <code class="classname">"location"</code>: | |
127 | the location of the completely downloaded file. | |
128 | </p></li></ul></div> | |
129 | <div class="refsynopsisdiv"> | |
130 | <h2>Synopsis</h2> | |
131 | <div class="refsect2"> | |
132 | <a name="id-1.2.3.7.8.1"></a><h3>Element Information</h3> | |
133 | <div class="variablelist"><table border="0" class="variablelist"> | |
134 | <colgroup> | |
135 | <col align="left" valign="top"> | |
136 | <col> | |
137 | </colgroup> | |
138 | <tbody> | |
139 | <tr> | |
140 | <td><p><span class="term">plugin</span></p></td> | |
141 | <td> | |
142 | <a class="link" href="gstreamer-plugins-plugin-coreelements.html#plugin-coreelements">coreelements</a> | |
143 | </td> | |
144 | </tr> | |
145 | <tr> | |
146 | <td><p><span class="term">author</span></p></td> | |
147 | <td>Wim Taymans <wim.taymans@gmail.com></td> | |
148 | </tr> | |
149 | <tr> | |
150 | <td><p><span class="term">class</span></p></td> | |
151 | <td>Generic</td> | |
152 | </tr> | |
153 | </tbody> | |
154 | </table></div> | |
155 | </div> | |
156 | <hr> | |
157 | <div class="refsect2"> | |
158 | <a name="id-1.2.3.7.8.2"></a><h3>Element Pads</h3> | |
159 | <div class="variablelist"><table border="0" class="variablelist"> | |
160 | <colgroup> | |
161 | <col align="left" valign="top"> | |
162 | <col> | |
163 | </colgroup> | |
164 | <tbody> | |
165 | <tr> | |
166 | <td><p><span class="term">name</span></p></td> | |
167 | <td>sink</td> | |
168 | </tr> | |
169 | <tr> | |
170 | <td><p><span class="term">direction</span></p></td> | |
171 | <td>sink</td> | |
172 | </tr> | |
173 | <tr> | |
174 | <td><p><span class="term">presence</span></p></td> | |
175 | <td>always</td> | |
176 | </tr> | |
177 | <tr> | |
178 | <td><p><span class="term">details</span></p></td> | |
179 | <td>ANY</td> | |
180 | </tr> | |
181 | </tbody> | |
182 | </table></div> | |
183 | <div class="variablelist"><table border="0" class="variablelist"> | |
184 | <colgroup> | |
185 | <col align="left" valign="top"> | |
186 | <col> | |
187 | </colgroup> | |
188 | <tbody> | |
189 | <tr> | |
190 | <td><p><span class="term">name</span></p></td> | |
191 | <td>src</td> | |
192 | </tr> | |
193 | <tr> | |
194 | <td><p><span class="term">direction</span></p></td> | |
195 | <td>source</td> | |
196 | </tr> | |
197 | <tr> | |
198 | <td><p><span class="term">presence</span></p></td> | |
199 | <td>always</td> | |
200 | </tr> | |
201 | <tr> | |
202 | <td><p><span class="term">details</span></p></td> | |
203 | <td>ANY</td> | |
204 | </tr> | |
205 | </tbody> | |
206 | </table></div> | |
207 | </div> | |
208 | </div> | |
209 | <p> | |
210 | </p> | |
211 | </div> | |
212 | <div class="refsect1"> | |
213 | <a name="gstreamer-plugins-downloadbuffer.functions_details"></a><h2>Functions</h2> | |
214 | </div> | |
215 | <div class="refsect1"> | |
216 | <a name="gstreamer-plugins-downloadbuffer.other_details"></a><h2>Types and Values</h2> | |
217 | <div class="refsect2"> | |
218 | <a name="GstDownloadBuffer-struct"></a><h3>struct GstDownloadBuffer</h3> | |
219 | <pre class="programlisting">struct GstDownloadBuffer;</pre> | |
220 | <p> | |
221 | </p> | |
222 | </div> | |
223 | </div> | |
224 | <div class="refsect1"> | |
225 | <a name="gstreamer-plugins-downloadbuffer.property-details"></a><h2>Property Details</h2> | |
226 | <div class="refsect2"> | |
227 | <a name="GstDownloadBuffer--high-percent"></a><h3>The <code class="literal">“high-percent”</code> property</h3> | |
228 | <pre class="programlisting"> “high-percent” <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre> | |
229 | <p>High threshold for buffering to finish. Only used if use-buffering is True.</p> | |
230 | <p>Flags: Read / Write</p> | |
231 | <p>Allowed values: [0,100]</p> | |
232 | <p>Default value: 99</p> | |
233 | </div> | |
234 | <hr> | |
235 | <div class="refsect2"> | |
236 | <a name="GstDownloadBuffer--low-percent"></a><h3>The <code class="literal">“low-percent”</code> property</h3> | |
237 | <pre class="programlisting"> “low-percent” <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre> | |
238 | <p>Low threshold for buffering to start. Only used if use-buffering is True.</p> | |
239 | <p>Flags: Read / Write</p> | |
240 | <p>Allowed values: [0,100]</p> | |
241 | <p>Default value: 10</p> | |
242 | </div> | |
243 | <hr> | |
244 | <div class="refsect2"> | |
245 | <a name="GstDownloadBuffer--max-size-bytes"></a><h3>The <code class="literal">“max-size-bytes”</code> property</h3> | |
246 | <pre class="programlisting"> “max-size-bytes” <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre> | |
247 | <p>Max. amount of data to buffer (bytes, 0=disable).</p> | |
248 | <p>Flags: Read / Write</p> | |
249 | <p>Default value: 2097152</p> | |
250 | </div> | |
251 | <hr> | |
252 | <div class="refsect2"> | |
253 | <a name="GstDownloadBuffer--max-size-time"></a><h3>The <code class="literal">“max-size-time”</code> property</h3> | |
254 | <pre class="programlisting"> “max-size-time” <span class="type">guint64</span></pre> | |
255 | <p>Max. amount of data to buffer (in ns, 0=disable).</p> | |
256 | <p>Flags: Read / Write</p> | |
257 | <p>Default value: 2000000000</p> | |
258 | </div> | |
259 | <hr> | |
260 | <div class="refsect2"> | |
261 | <a name="GstDownloadBuffer--temp-location"></a><h3>The <code class="literal">“temp-location”</code> property</h3> | |
262 | <pre class="programlisting"> “temp-location” <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre> | |
263 | <p>Location to store temporary files in (Only read this property, use temp-template to configure the name template).</p> | |
264 | <p>Flags: Read</p> | |
265 | <p>Default value: NULL</p> | |
266 | </div> | |
267 | <hr> | |
268 | <div class="refsect2"> | |
269 | <a name="GstDownloadBuffer--temp-remove"></a><h3>The <code class="literal">“temp-remove”</code> property</h3> | |
270 | <pre class="programlisting"> “temp-remove” <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre> | |
271 | <p>When temp-template is set, remove the temporary file when going to READY.</p> | |
272 | <p>Flags: Read / Write</p> | |
273 | <p>Default value: TRUE</p> | |
274 | </div> | |
275 | <hr> | |
276 | <div class="refsect2"> | |
277 | <a name="GstDownloadBuffer--temp-template"></a><h3>The <code class="literal">“temp-template”</code> property</h3> | |
278 | <pre class="programlisting"> “temp-template” <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre> | |
279 | <p>File template to store temporary files in, should contain directory and XXXXXX. (NULL == disabled).</p> | |
280 | <p>Flags: Read / Write</p> | |
281 | <p>Default value: NULL</p> | |
282 | </div> | |
283 | </div> | |
284 | </div> | |
285 | <div class="footer"> | |
286 | <hr> | |
287 | Generated by GTK-Doc V1.20</div> | |
288 | </body> | |
289 | </html>⏎ |
141 | 141 | <a name="gstreamer-plugins-fakesink.description"></a><h2>Description</h2> |
142 | 142 | <p>Dummy sink that swallows everything.</p> |
143 | 143 | <div class="refsect2"> |
144 | <a name="id-1.2.4.8.3"></a><h3>Example launch line</h3> | |
144 | <a name="id-1.2.5.8.3"></a><h3>Example launch line</h3> | |
145 | 145 | <div class="informalexample"> |
146 | 146 | <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> |
147 | 147 | <tbody> |
157 | 157 | <div class="refsynopsisdiv"> |
158 | 158 | <h2>Synopsis</h2> |
159 | 159 | <div class="refsect2"> |
160 | <a name="id-1.2.4.8.4.1"></a><h3>Element Information</h3> | |
160 | <a name="id-1.2.5.8.4.1"></a><h3>Element Information</h3> | |
161 | 161 | <div class="variablelist"><table border="0" class="variablelist"> |
162 | 162 | <colgroup> |
163 | 163 | <col align="left" valign="top"> |
183 | 183 | </div> |
184 | 184 | <hr> |
185 | 185 | <div class="refsect2"> |
186 | <a name="id-1.2.4.8.4.2"></a><h3>Element Pads</h3> | |
186 | <a name="id-1.2.5.8.4.2"></a><h3>Element Pads</h3> | |
187 | 187 | <div class="variablelist"><table border="0" class="variablelist"> |
188 | 188 | <colgroup> |
189 | 189 | <col align="left" valign="top"> |
228 | 228 | <a name="GstFakeSinkStateError"></a><h3>enum GstFakeSinkStateError</h3> |
229 | 229 | <p>Possible state change errors for the state-error property.</p> |
230 | 230 | <div class="refsect3"> |
231 | <a name="id-1.2.4.10.3.4"></a><h4>Members</h4> | |
231 | <a name="id-1.2.5.10.3.4"></a><h4>Members</h4> | |
232 | 232 | <div class="informaltable"><table width="100%" border="0"> |
233 | 233 | <colgroup> |
234 | 234 | <col width="300px" class="enum_members_name"> |
368 | 368 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre> |
369 | 369 | <p>This signal gets emitted before unreffing the buffer.</p> |
370 | 370 | <div class="refsect3"> |
371 | <a name="id-1.2.4.12.2.5"></a><h4>Parameters</h4> | |
371 | <a name="id-1.2.5.12.2.5"></a><h4>Parameters</h4> | |
372 | 372 | <div class="informaltable"><table width="100%" border="0"> |
373 | 373 | <colgroup> |
374 | 374 | <col width="150px" class="parameters_name"> |
411 | 411 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre> |
412 | 412 | <p>This signal gets emitted before unreffing the buffer.</p> |
413 | 413 | <div class="refsect3"> |
414 | <a name="id-1.2.4.12.3.5"></a><h4>Parameters</h4> | |
414 | <a name="id-1.2.5.12.3.5"></a><h4>Parameters</h4> | |
415 | 415 | <div class="informaltable"><table width="100%" border="0"> |
416 | 416 | <colgroup> |
417 | 417 | <col width="150px" class="parameters_name"> |
5 | 5 | <meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> |
6 | 6 | <link rel="home" href="index.html" title="GStreamer Core Plugins 1.0 Plugins Reference Manual"> |
7 | 7 | <link rel="up" href="ch01.html" title="gstreamer Elements"> |
8 | <link rel="prev" href="gstreamer-plugins-capsfilter.html" title="capsfilter"> | |
8 | <link rel="prev" href="gstreamer-plugins-downloadbuffer.html" title="downloadbuffer"> | |
9 | 9 | <link rel="next" href="gstreamer-plugins-fakesink.html" title="fakesink"> |
10 | 10 | <meta name="generator" content="GTK-Doc V1.20 (XML mode)"> |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
21 | 21 | </td> |
22 | 22 | <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> |
23 | 23 | <td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> |
24 | <td><a accesskey="p" href="gstreamer-plugins-capsfilter.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> | |
24 | <td><a accesskey="p" href="gstreamer-plugins-downloadbuffer.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> | |
25 | 25 | <td><a accesskey="n" href="gstreamer-plugins-fakesink.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> |
26 | 26 | </tr></table> |
27 | 27 | <div class="refentry"> |
195 | 195 | <p>It is mostly used as a testing element, one trivial example for testing |
196 | 196 | basic <span class="application">GStreamer</span> core functionality is:</p> |
197 | 197 | <div class="refsect2"> |
198 | <a name="id-1.2.3.8.4"></a><h3>Example launch line</h3> | |
198 | <a name="id-1.2.4.8.4"></a><h3>Example launch line</h3> | |
199 | 199 | <div class="informalexample"> |
200 | 200 | <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> |
201 | 201 | <tbody> |
212 | 212 | <div class="refsynopsisdiv"> |
213 | 213 | <h2>Synopsis</h2> |
214 | 214 | <div class="refsect2"> |
215 | <a name="id-1.2.3.8.5.1"></a><h3>Element Information</h3> | |
215 | <a name="id-1.2.4.8.5.1"></a><h3>Element Information</h3> | |
216 | 216 | <div class="variablelist"><table border="0" class="variablelist"> |
217 | 217 | <colgroup> |
218 | 218 | <col align="left" valign="top"> |
238 | 238 | </div> |
239 | 239 | <hr> |
240 | 240 | <div class="refsect2"> |
241 | <a name="id-1.2.3.8.5.2"></a><h3>Element Pads</h3> | |
241 | <a name="id-1.2.4.8.5.2"></a><h3>Element Pads</h3> | |
242 | 242 | <div class="variablelist"><table border="0" class="variablelist"> |
243 | 243 | <colgroup> |
244 | 244 | <col align="left" valign="top"> |
283 | 283 | <a name="GstFakeSrcDataType"></a><h3>enum GstFakeSrcDataType</h3> |
284 | 284 | <p>The different ways buffers are allocated.</p> |
285 | 285 | <div class="refsect3"> |
286 | <a name="id-1.2.3.10.3.4"></a><h4>Members</h4> | |
286 | <a name="id-1.2.4.10.3.4"></a><h4>Members</h4> | |
287 | 287 | <div class="informaltable"><table width="100%" border="0"> |
288 | 288 | <colgroup> |
289 | 289 | <col width="300px" class="enum_members_name"> |
314 | 314 | <a name="GstFakeSrcFillType"></a><h3>enum GstFakeSrcFillType</h3> |
315 | 315 | <p>The different ways of filling the buffers.</p> |
316 | 316 | <div class="refsect3"> |
317 | <a name="id-1.2.3.10.4.4"></a><h4>Members</h4> | |
317 | <a name="id-1.2.4.10.4.4"></a><h4>Members</h4> | |
318 | 318 | <div class="informaltable"><table width="100%" border="0"> |
319 | 319 | <colgroup> |
320 | 320 | <col width="300px" class="enum_members_name"> |
366 | 366 | <a name="GstFakeSrcOutputType"></a><h3>enum GstFakeSrcOutputType</h3> |
367 | 367 | <p>The different output types. Unused currently.</p> |
368 | 368 | <div class="refsect3"> |
369 | <a name="id-1.2.3.10.5.4"></a><h4>Members</h4> | |
369 | <a name="id-1.2.4.10.5.4"></a><h4>Members</h4> | |
370 | 370 | <div class="informaltable"><table width="100%" border="0"> |
371 | 371 | <colgroup> |
372 | 372 | <col width="300px" class="enum_members_name"> |
439 | 439 | <a name="GstFakeSrcSizeType"></a><h3>enum GstFakeSrcSizeType</h3> |
440 | 440 | <p>The different size of the allocated buffers.</p> |
441 | 441 | <div class="refsect3"> |
442 | <a name="id-1.2.3.10.6.4"></a><h4>Members</h4> | |
442 | <a name="id-1.2.4.10.6.4"></a><h4>Members</h4> | |
443 | 443 | <div class="informaltable"><table width="100%" border="0"> |
444 | 444 | <colgroup> |
445 | 445 | <col width="300px" class="enum_members_name"> |
626 | 626 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre> |
627 | 627 | <p>This signal gets emitted before sending the buffer.</p> |
628 | 628 | <div class="refsect3"> |
629 | <a name="id-1.2.3.12.2.5"></a><h4>Parameters</h4> | |
629 | <a name="id-1.2.4.12.2.5"></a><h4>Parameters</h4> | |
630 | 630 | <div class="informaltable"><table width="100%" border="0"> |
631 | 631 | <colgroup> |
632 | 632 | <col width="150px" class="parameters_name"> |
86 | 86 | <div class="refsynopsisdiv"> |
87 | 87 | <h2>Synopsis</h2> |
88 | 88 | <div class="refsect2"> |
89 | <a name="id-1.2.5.8.3.2.1"></a><h3>Element Information</h3> | |
89 | <a name="id-1.2.6.8.3.2.1"></a><h3>Element Information</h3> | |
90 | 90 | <div class="variablelist"><table border="0" class="variablelist"> |
91 | 91 | <colgroup> |
92 | 92 | <col align="left" valign="top"> |
112 | 112 | </div> |
113 | 113 | <hr> |
114 | 114 | <div class="refsect2"> |
115 | <a name="id-1.2.5.8.3.2.2"></a><h3>Element Pads</h3> | |
115 | <a name="id-1.2.6.8.3.2.2"></a><h3>Element Pads</h3> | |
116 | 116 | <div class="variablelist"><table border="0" class="variablelist"> |
117 | 117 | <colgroup> |
118 | 118 | <col align="left" valign="top"> |
100 | 100 | expired when waiting for data. |
101 | 101 | </p></li></ul></div> |
102 | 102 | <div class="refsect2"> |
103 | <a name="id-1.2.6.8.8"></a><h3>Example launch line</h3> | |
103 | <a name="id-1.2.7.8.8"></a><h3>Example launch line</h3> | |
104 | 104 | <div class="informalexample"> |
105 | 105 | <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> |
106 | 106 | <tbody> |
117 | 117 | <div class="refsynopsisdiv"> |
118 | 118 | <h2>Synopsis</h2> |
119 | 119 | <div class="refsect2"> |
120 | <a name="id-1.2.6.8.9.1"></a><h3>Element Information</h3> | |
120 | <a name="id-1.2.7.8.9.1"></a><h3>Element Information</h3> | |
121 | 121 | <div class="variablelist"><table border="0" class="variablelist"> |
122 | 122 | <colgroup> |
123 | 123 | <col align="left" valign="top"> |
143 | 143 | </div> |
144 | 144 | <hr> |
145 | 145 | <div class="refsect2"> |
146 | <a name="id-1.2.6.8.9.2"></a><h3>Element Pads</h3> | |
146 | <a name="id-1.2.7.8.9.2"></a><h3>Element Pads</h3> | |
147 | 147 | <div class="variablelist"><table border="0" class="variablelist"> |
148 | 148 | <colgroup> |
149 | 149 | <col align="left" valign="top"> |
99 | 99 | <a name="gstreamer-plugins-filesink.description"></a><h2>Description</h2> |
100 | 100 | <p>Write incoming data to a file in the local file system.</p> |
101 | 101 | <div class="refsect2"> |
102 | <a name="id-1.2.8.8.3"></a><h3>Example launch line</h3> | |
102 | <a name="id-1.2.9.8.3"></a><h3>Example launch line</h3> | |
103 | 103 | <div class="informalexample"> |
104 | 104 | <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> |
105 | 105 | <tbody> |
115 | 115 | <div class="refsynopsisdiv"> |
116 | 116 | <h2>Synopsis</h2> |
117 | 117 | <div class="refsect2"> |
118 | <a name="id-1.2.8.8.4.1"></a><h3>Element Information</h3> | |
118 | <a name="id-1.2.9.8.4.1"></a><h3>Element Information</h3> | |
119 | 119 | <div class="variablelist"><table border="0" class="variablelist"> |
120 | 120 | <colgroup> |
121 | 121 | <col align="left" valign="top"> |
141 | 141 | </div> |
142 | 142 | <hr> |
143 | 143 | <div class="refsect2"> |
144 | <a name="id-1.2.8.8.4.2"></a><h3>Element Pads</h3> | |
144 | <a name="id-1.2.9.8.4.2"></a><h3>Element Pads</h3> | |
145 | 145 | <div class="variablelist"><table border="0" class="variablelist"> |
146 | 146 | <colgroup> |
147 | 147 | <col align="left" valign="top"> |
82 | 82 | <a name="gstreamer-plugins-filesrc.description"></a><h2>Description</h2> |
83 | 83 | <p>Read data from a file in the local file system.</p> |
84 | 84 | <div class="refsect2"> |
85 | <a name="id-1.2.7.8.3"></a><h3>Example launch line</h3> | |
85 | <a name="id-1.2.8.8.3"></a><h3>Example launch line</h3> | |
86 | 86 | <div class="informalexample"> |
87 | 87 | <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> |
88 | 88 | <tbody> |
98 | 98 | <div class="refsynopsisdiv"> |
99 | 99 | <h2>Synopsis</h2> |
100 | 100 | <div class="refsect2"> |
101 | <a name="id-1.2.7.8.4.1"></a><h3>Element Information</h3> | |
101 | <a name="id-1.2.8.8.4.1"></a><h3>Element Information</h3> | |
102 | 102 | <div class="variablelist"><table border="0" class="variablelist"> |
103 | 103 | <colgroup> |
104 | 104 | <col align="left" valign="top"> |
124 | 124 | </div> |
125 | 125 | <hr> |
126 | 126 | <div class="refsect2"> |
127 | <a name="id-1.2.7.8.4.2"></a><h3>Element Pads</h3> | |
127 | <a name="id-1.2.8.8.4.2"></a><h3>Element Pads</h3> | |
128 | 128 | <div class="variablelist"><table border="0" class="variablelist"> |
129 | 129 | <colgroup> |
130 | 130 | <col align="left" valign="top"> |
65 | 65 | <div class="refsynopsisdiv"> |
66 | 66 | <h2>Synopsis</h2> |
67 | 67 | <div class="refsect2"> |
68 | <a name="id-1.2.9.6.3.2.1"></a><h3>Element Information</h3> | |
68 | <a name="id-1.2.10.6.3.2.1"></a><h3>Element Information</h3> | |
69 | 69 | <div class="variablelist"><table border="0" class="variablelist"> |
70 | 70 | <colgroup> |
71 | 71 | <col align="left" valign="top"> |
91 | 91 | </div> |
92 | 92 | <hr> |
93 | 93 | <div class="refsect2"> |
94 | <a name="id-1.2.9.6.3.2.2"></a><h3>Element Pads</h3> | |
94 | <a name="id-1.2.10.6.3.2.2"></a><h3>Element Pads</h3> | |
95 | 95 | <div class="variablelist"><table border="0" class="variablelist"> |
96 | 96 | <colgroup> |
97 | 97 | <col align="left" valign="top"> |
151 | 151 | <div class="refsynopsisdiv"> |
152 | 152 | <h2>Synopsis</h2> |
153 | 153 | <div class="refsect2"> |
154 | <a name="id-1.2.10.8.2.1.1"></a><h3>Element Information</h3> | |
154 | <a name="id-1.2.11.8.2.1.1"></a><h3>Element Information</h3> | |
155 | 155 | <div class="variablelist"><table border="0" class="variablelist"> |
156 | 156 | <colgroup> |
157 | 157 | <col align="left" valign="top"> |
177 | 177 | </div> |
178 | 178 | <hr> |
179 | 179 | <div class="refsect2"> |
180 | <a name="id-1.2.10.8.2.1.2"></a><h3>Element Pads</h3> | |
180 | <a name="id-1.2.11.8.2.1.2"></a><h3>Element Pads</h3> | |
181 | 181 | <div class="variablelist"><table border="0" class="variablelist"> |
182 | 182 | <colgroup> |
183 | 183 | <col align="left" valign="top"> |
353 | 353 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre> |
354 | 354 | <p>This signal gets emitted before passing the buffer downstream.</p> |
355 | 355 | <div class="refsect3"> |
356 | <a name="id-1.2.10.12.2.5"></a><h4>Parameters</h4> | |
356 | <a name="id-1.2.11.12.2.5"></a><h4>Parameters</h4> | |
357 | 357 | <div class="informaltable"><table width="100%" border="0"> |
358 | 358 | <colgroup> |
359 | 359 | <col width="150px" class="parameters_name"> |
137 | 137 | <div class="refsynopsisdiv"> |
138 | 138 | <h2>Synopsis</h2> |
139 | 139 | <div class="refsect2"> |
140 | <a name="id-1.2.11.8.5.1"></a><h3>Element Information</h3> | |
140 | <a name="id-1.2.12.8.5.1"></a><h3>Element Information</h3> | |
141 | 141 | <div class="variablelist"><table border="0" class="variablelist"> |
142 | 142 | <colgroup> |
143 | 143 | <col align="left" valign="top"> |
163 | 163 | </div> |
164 | 164 | <hr> |
165 | 165 | <div class="refsect2"> |
166 | <a name="id-1.2.11.8.5.2"></a><h3>Element Pads</h3> | |
166 | <a name="id-1.2.12.8.5.2"></a><h3>Element Pads</h3> | |
167 | 167 | <div class="variablelist"><table border="0" class="variablelist"> |
168 | 168 | <colgroup> |
169 | 169 | <col align="left" valign="top"> |
233 | 233 | <a name="GstInputSelectorSyncMode"></a><h3>enum GstInputSelectorSyncMode</h3> |
234 | 234 | <p>The different ways that input-selector can behave when in sync-streams mode.</p> |
235 | 235 | <div class="refsect3"> |
236 | <a name="id-1.2.11.10.3.4"></a><h4>Members</h4> | |
236 | <a name="id-1.2.12.10.3.4"></a><h4>Members</h4> | |
237 | 237 | <div class="informaltable"><table width="100%" border="0"> |
238 | 238 | <colgroup> |
239 | 239 | <col width="300px" class="enum_members_name"> |
326 | 326 | the current switch segment, as a running time, or 0 if there is no current |
327 | 327 | active pad or the current active pad never received data.</p> |
328 | 328 | <div class="refsect3"> |
329 | <a name="id-1.2.11.12.2.5"></a><h4>Parameters</h4> | |
329 | <a name="id-1.2.12.12.2.5"></a><h4>Parameters</h4> | |
330 | 330 | <div class="informaltable"><table width="100%" border="0"> |
331 | 331 | <colgroup> |
332 | 332 | <col width="150px" class="parameters_name"> |
142 | 142 | <div class="refsect1"> |
143 | 143 | <a name="gstreamer-plugins-multiqueue.description"></a><h2>Description</h2> |
144 | 144 | <div class="refsect2"> |
145 | <a name="id-1.2.12.8.2"></a><p> | |
145 | <a name="id-1.2.13.8.2"></a><p> | |
146 | 146 | Multiqueue is similar to a normal <a class="link" href="gstreamer-plugins-queue.html#GstQueue"><span class="type">GstQueue</span></a> with the following additional |
147 | 147 | features: |
148 | 148 | </p> |
156 | 156 | 'sometimes' src pads (src%u). |
157 | 157 | </p> |
158 | 158 | <p> |
159 | When requesting a given sinkpad with <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html#gst-element-get-request-pad"><code class="function">gst_element_get_request_pad()</code></a>, | |
159 | When requesting a given sinkpad with <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html#gst-element-request-pad"><code class="function">gst_element_request_pad()</code></a>, | |
160 | 160 | the associated srcpad for that stream will be created. |
161 | 161 | Example: requesting sink1 will generate src1. |
162 | 162 | </p> |
227 | 227 | <div class="refsynopsisdiv"> |
228 | 228 | <h2>Synopsis</h2> |
229 | 229 | <div class="refsect2"> |
230 | <a name="id-1.2.12.8.3.1"></a><h3>Element Information</h3> | |
230 | <a name="id-1.2.13.8.3.1"></a><h3>Element Information</h3> | |
231 | 231 | <div class="variablelist"><table border="0" class="variablelist"> |
232 | 232 | <colgroup> |
233 | 233 | <col align="left" valign="top"> |
253 | 253 | </div> |
254 | 254 | <hr> |
255 | 255 | <div class="refsect2"> |
256 | <a name="id-1.2.12.8.3.2"></a><h3>Element Pads</h3> | |
256 | <a name="id-1.2.13.8.3.2"></a><h3>Element Pads</h3> | |
257 | 257 | <div class="variablelist"><table border="0" class="variablelist"> |
258 | 258 | <colgroup> |
259 | 259 | <col align="left" valign="top"> |
420 | 420 | GObject properties.</p> |
421 | 421 | <p>This can be used as an indicator of pre-roll.</p> |
422 | 422 | <div class="refsect3"> |
423 | <a name="id-1.2.12.12.2.6"></a><h4>Parameters</h4> | |
423 | <a name="id-1.2.13.12.2.6"></a><h4>Parameters</h4> | |
424 | 424 | <div class="informaltable"><table width="100%" border="0"> |
425 | 425 | <colgroup> |
426 | 426 | <col width="150px" class="parameters_name"> |
453 | 453 | no data in any of the queues inside the multiqueue instance (underrun).</p> |
454 | 454 | <p>This indicates either starvation or EOS from the upstream data sources.</p> |
455 | 455 | <div class="refsect3"> |
456 | <a name="id-1.2.12.12.3.6"></a><h4>Parameters</h4> | |
456 | <a name="id-1.2.13.12.3.6"></a><h4>Parameters</h4> | |
457 | 457 | <div class="informaltable"><table width="100%" border="0"> |
458 | 458 | <colgroup> |
459 | 459 | <col width="150px" class="parameters_name"> |
94 | 94 | <div class="refsynopsisdiv"> |
95 | 95 | <h2>Synopsis</h2> |
96 | 96 | <div class="refsect2"> |
97 | <a name="id-1.2.13.7.2.1.1"></a><h3>Element Information</h3> | |
97 | <a name="id-1.2.14.7.2.1.1"></a><h3>Element Information</h3> | |
98 | 98 | <div class="variablelist"><table border="0" class="variablelist"> |
99 | 99 | <colgroup> |
100 | 100 | <col align="left" valign="top"> |
120 | 120 | </div> |
121 | 121 | <hr> |
122 | 122 | <div class="refsect2"> |
123 | <a name="id-1.2.13.7.2.1.2"></a><h3>Element Pads</h3> | |
123 | <a name="id-1.2.14.7.2.1.2"></a><h3>Element Pads</h3> | |
124 | 124 | <div class="variablelist"><table border="0" class="variablelist"> |
125 | 125 | <colgroup> |
126 | 126 | <col align="left" valign="top"> |
190 | 190 | <a name="GstOutputSelectorPadNegotiationMode"></a><h3>enum GstOutputSelectorPadNegotiationMode</h3> |
191 | 191 | <p>To what output pad the input stream should be directed.</p> |
192 | 192 | <div class="refsect3"> |
193 | <a name="id-1.2.13.9.3.4"></a><h4>Members</h4> | |
193 | <a name="id-1.2.14.9.3.4"></a><h4>Members</h4> | |
194 | 194 | <div class="informaltable"><table width="100%" border="0"> |
195 | 195 | <colgroup> |
196 | 196 | <col width="300px" class="enum_members_name"> |
40 | 40 | </tr> |
41 | 41 | <tr> |
42 | 42 | <td><p><span class="term">version</span></p></td> |
43 | <td>1.3.1</td> | |
43 | <td>1.3.2</td> | |
44 | 44 | </tr> |
45 | 45 | <tr> |
46 | 46 | <td><p><span class="term">run-time license</span></p></td> |
68 | 68 | <tr> |
69 | 69 | <td><p><span class="term"><a class="link" href="gstreamer-plugins-capsfilter.html" title="capsfilter">capsfilter</a></span></p></td> |
70 | 70 | <td>Pass data without modification, limiting formats</td> |
71 | </tr> | |
72 | <tr> | |
73 | <td><p><span class="term"><a class="link" href="gstreamer-plugins-downloadbuffer.html" title="downloadbuffer">downloadbuffer</a></span></p></td> | |
74 | <td>Download Buffer element</td> | |
71 | 75 | </tr> |
72 | 76 | <tr> |
73 | 77 | <td><p><span class="term"><a class="link" href="gstreamer-plugins-fakesink.html" title="fakesink">fakesink</a></span></p></td> |
193 | 193 | <div class="refsynopsisdiv"> |
194 | 194 | <h2>Synopsis</h2> |
195 | 195 | <div class="refsect2"> |
196 | <a name="id-1.2.14.8.7.3.1"></a><h3>Element Information</h3> | |
196 | <a name="id-1.2.15.8.7.3.1"></a><h3>Element Information</h3> | |
197 | 197 | <div class="variablelist"><table border="0" class="variablelist"> |
198 | 198 | <colgroup> |
199 | 199 | <col align="left" valign="top"> |
219 | 219 | </div> |
220 | 220 | <hr> |
221 | 221 | <div class="refsect2"> |
222 | <a name="id-1.2.14.8.7.3.2"></a><h3>Element Pads</h3> | |
222 | <a name="id-1.2.15.8.7.3.2"></a><h3>Element Pads</h3> | |
223 | 223 | <div class="variablelist"><table border="0" class="variablelist"> |
224 | 224 | <colgroup> |
225 | 225 | <col align="left" valign="top"> |
288 | 288 | <a name="GstQueueLeaky"></a><h3>enum GstQueueLeaky</h3> |
289 | 289 | <p>Buffer dropping scheme to avoid the queue to block when full.</p> |
290 | 290 | <div class="refsect3"> |
291 | <a name="id-1.2.14.10.3.4"></a><h4>Members</h4> | |
291 | <a name="id-1.2.15.10.3.4"></a><h4>Members</h4> | |
292 | 292 | <div class="informaltable"><table width="100%" border="0"> |
293 | 293 | <colgroup> |
294 | 294 | <col width="300px" class="enum_members_name"> |
441 | 441 | size) is higher than the boundary values which can be set through the |
442 | 442 | GObject properties.</p> |
443 | 443 | <div class="refsect3"> |
444 | <a name="id-1.2.14.12.2.5"></a><h4>Parameters</h4> | |
444 | <a name="id-1.2.15.12.2.5"></a><h4>Parameters</h4> | |
445 | 445 | <div class="informaltable"><table width="100%" border="0"> |
446 | 446 | <colgroup> |
447 | 447 | <col width="150px" class="parameters_name"> |
473 | 473 | <p>Reports when the queue has enough data to start pushing data again on the |
474 | 474 | source pad.</p> |
475 | 475 | <div class="refsect3"> |
476 | <a name="id-1.2.14.12.3.5"></a><h4>Parameters</h4> | |
476 | <a name="id-1.2.15.12.3.5"></a><h4>Parameters</h4> | |
477 | 477 | <div class="informaltable"><table width="100%" border="0"> |
478 | 478 | <colgroup> |
479 | 479 | <col width="150px" class="parameters_name"> |
506 | 506 | together with the underrun signal to pause the pipeline on underrun and |
507 | 507 | wait for the queue to fill-up before resume playback.</p> |
508 | 508 | <div class="refsect3"> |
509 | <a name="id-1.2.14.12.4.5"></a><h4>Parameters</h4> | |
509 | <a name="id-1.2.15.12.4.5"></a><h4>Parameters</h4> | |
510 | 510 | <div class="informaltable"><table width="100%" border="0"> |
511 | 511 | <colgroup> |
512 | 512 | <col width="150px" class="parameters_name"> |
540 | 540 | size) is lower than the boundary values which can be set through the |
541 | 541 | GObject properties.</p> |
542 | 542 | <div class="refsect3"> |
543 | <a name="id-1.2.14.12.5.5"></a><h4>Parameters</h4> | |
543 | <a name="id-1.2.15.12.5.5"></a><h4>Parameters</h4> | |
544 | 544 | <div class="informaltable"><table width="100%" border="0"> |
545 | 545 | <colgroup> |
546 | 546 | <col width="150px" class="parameters_name"> |
160 | 160 | <div class="refsynopsisdiv"> |
161 | 161 | <h2>Synopsis</h2> |
162 | 162 | <div class="refsect2"> |
163 | <a name="id-1.2.15.7.7.1.1"></a><h3>Element Information</h3> | |
163 | <a name="id-1.2.16.7.7.1.1"></a><h3>Element Information</h3> | |
164 | 164 | <div class="variablelist"><table border="0" class="variablelist"> |
165 | 165 | <colgroup> |
166 | 166 | <col align="left" valign="top"> |
186 | 186 | </div> |
187 | 187 | <hr> |
188 | 188 | <div class="refsect2"> |
189 | <a name="id-1.2.15.7.7.1.2"></a><h3>Element Pads</h3> | |
189 | <a name="id-1.2.16.7.7.1.2"></a><h3>Element Pads</h3> | |
190 | 190 | <div class="variablelist"><table border="0" class="variablelist"> |
191 | 191 | <colgroup> |
192 | 192 | <col align="left" valign="top"> |
114 | 114 | provide separate threads for each branch. Otherwise a blocked dataflow in one |
115 | 115 | branch would stall the other branches.</p> |
116 | 116 | <div class="refsect2"> |
117 | <a name="id-1.2.16.7.4"></a><h3>Example launch line</h3> | |
117 | <a name="id-1.2.17.7.4"></a><h3>Example launch line</h3> | |
118 | 118 | <div class="informalexample"> |
119 | 119 | <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> |
120 | 120 | <tbody> |
131 | 131 | <div class="refsynopsisdiv"> |
132 | 132 | <h2>Synopsis</h2> |
133 | 133 | <div class="refsect2"> |
134 | <a name="id-1.2.16.7.5.1"></a><h3>Element Information</h3> | |
134 | <a name="id-1.2.17.7.5.1"></a><h3>Element Information</h3> | |
135 | 135 | <div class="variablelist"><table border="0" class="variablelist"> |
136 | 136 | <colgroup> |
137 | 137 | <col align="left" valign="top"> |
157 | 157 | </div> |
158 | 158 | <hr> |
159 | 159 | <div class="refsect2"> |
160 | <a name="id-1.2.16.7.5.2"></a><h3>Element Pads</h3> | |
160 | <a name="id-1.2.17.7.5.2"></a><h3>Element Pads</h3> | |
161 | 161 | <div class="variablelist"><table border="0" class="variablelist"> |
162 | 162 | <colgroup> |
163 | 163 | <col align="left" valign="top"> |
228 | 228 | |
229 | 229 | disables pull mode.</p> |
230 | 230 | <div class="refsect3"> |
231 | <a name="id-1.2.16.9.3.4"></a><h4>Members</h4> | |
231 | <a name="id-1.2.17.9.3.4"></a><h4>Members</h4> | |
232 | 232 | <div class="informaltable"><table width="100%" border="0"> |
233 | 233 | <colgroup> |
234 | 234 | <col width="300px" class="enum_members_name"> |
112 | 112 | <div class="refsynopsisdiv"> |
113 | 113 | <h2>Synopsis</h2> |
114 | 114 | <div class="refsect2"> |
115 | <a name="id-1.2.17.8.4.2.1"></a><h3>Element Information</h3> | |
115 | <a name="id-1.2.18.8.4.2.1"></a><h3>Element Information</h3> | |
116 | 116 | <div class="variablelist"><table border="0" class="variablelist"> |
117 | 117 | <colgroup> |
118 | 118 | <col align="left" valign="top"> |
138 | 138 | </div> |
139 | 139 | <hr> |
140 | 140 | <div class="refsect2"> |
141 | <a name="id-1.2.17.8.4.2.2"></a><h3>Element Pads</h3> | |
141 | <a name="id-1.2.18.8.4.2.2"></a><h3>Element Pads</h3> | |
142 | 142 | <div class="variablelist"><table border="0" class="variablelist"> |
143 | 143 | <colgroup> |
144 | 144 | <col align="left" valign="top"> |
240 | 240 | <p>This signal gets emitted when the type and its probability has |
241 | 241 | been found.</p> |
242 | 242 | <div class="refsect3"> |
243 | <a name="id-1.2.17.12.2.5"></a><h4>Parameters</h4> | |
243 | <a name="id-1.2.18.12.2.5"></a><h4>Parameters</h4> | |
244 | 244 | <div class="informaltable"><table width="100%" border="0"> |
245 | 245 | <colgroup> |
246 | 246 | <col width="150px" class="parameters_name"> |
79 | 79 | <div class="refsynopsisdiv"> |
80 | 80 | <h2>Synopsis</h2> |
81 | 81 | <div class="refsect2"> |
82 | <a name="id-1.2.18.7.3.4.1"></a><h3>Element Information</h3> | |
82 | <a name="id-1.2.19.7.3.4.1"></a><h3>Element Information</h3> | |
83 | 83 | <div class="variablelist"><table border="0" class="variablelist"> |
84 | 84 | <colgroup> |
85 | 85 | <col align="left" valign="top"> |
105 | 105 | </div> |
106 | 106 | <hr> |
107 | 107 | <div class="refsect2"> |
108 | <a name="id-1.2.18.7.3.4.2"></a><h3>Element Pads</h3> | |
108 | <a name="id-1.2.19.7.3.4.2"></a><h3>Element Pads</h3> | |
109 | 109 | <div class="variablelist"><table border="0" class="variablelist"> |
110 | 110 | <colgroup> |
111 | 111 | <col align="left" valign="top"> |
14 | 14 | <div> |
15 | 15 | <div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">GStreamer Core Plugins 1.0 Plugins Reference Manual</p></th></tr></table></div> |
16 | 16 | <div><p class="releaseinfo"> |
17 | for GStreamer Core Plugins 1.0 (1.3.1) | |
17 | for GStreamer Core Plugins 1.0 (1.3.2) | |
18 | 18 | The latest version of this documentation can be found on-line at |
19 | 19 | <a class="ulink" href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-plugins/html/" target="_top">http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-plugins/html/</a>. |
20 | 20 | </p></div> |
26 | 26 | <dd><dl> |
27 | 27 | <dt> |
28 | 28 | <span class="refentrytitle"><a href="gstreamer-plugins-capsfilter.html">capsfilter</a></span><span class="refpurpose"> — Pass data without modification, limiting formats</span> |
29 | </dt> | |
30 | <dt> | |
31 | <span class="refentrytitle"><a href="gstreamer-plugins-downloadbuffer.html">downloadbuffer</a></span><span class="refpurpose"> — Download Buffer element</span> | |
29 | 32 | </dt> |
30 | 33 | <dt> |
31 | 34 | <span class="refentrytitle"><a href="gstreamer-plugins-fakesrc.html">fakesrc</a></span><span class="refpurpose"> — Push empty (no data) buffers around</span> |
9 | 9 | <ANCHOR id="GstCapsFilter-struct" href="gstreamer-plugins-1.0/gstreamer-plugins-capsfilter.html#GstCapsFilter-struct"> |
10 | 10 | <ANCHOR id="gstreamer-plugins-capsfilter.property-details" href="gstreamer-plugins-1.0/gstreamer-plugins-capsfilter.html#gstreamer-plugins-capsfilter.property-details"> |
11 | 11 | <ANCHOR id="GstCapsFilter--caps" href="gstreamer-plugins-1.0/gstreamer-plugins-capsfilter.html#GstCapsFilter--caps"> |
12 | <ANCHOR id="gstreamer-plugins-downloadbuffer" href="gstreamer-plugins-1.0/gstreamer-plugins-downloadbuffer.html"> | |
13 | <ANCHOR id="gstreamer-plugins-downloadbuffer.properties" href="gstreamer-plugins-1.0/gstreamer-plugins-downloadbuffer.html#gstreamer-plugins-downloadbuffer.properties"> | |
14 | <ANCHOR id="GstDownloadBuffer" href="gstreamer-plugins-1.0/gstreamer-plugins-downloadbuffer.html#GstDownloadBuffer"> | |
15 | <ANCHOR id="gstreamer-plugins-downloadbuffer.other" href="gstreamer-plugins-1.0/gstreamer-plugins-downloadbuffer.html#gstreamer-plugins-downloadbuffer.other"> | |
16 | <ANCHOR id="gstreamer-plugins-downloadbuffer.object-hierarchy" href="gstreamer-plugins-1.0/gstreamer-plugins-downloadbuffer.html#gstreamer-plugins-downloadbuffer.object-hierarchy"> | |
17 | <ANCHOR id="gstreamer-plugins-downloadbuffer.description" href="gstreamer-plugins-1.0/gstreamer-plugins-downloadbuffer.html#gstreamer-plugins-downloadbuffer.description"> | |
18 | <ANCHOR id="gstreamer-plugins-downloadbuffer.functions_details" href="gstreamer-plugins-1.0/gstreamer-plugins-downloadbuffer.html#gstreamer-plugins-downloadbuffer.functions_details"> | |
19 | <ANCHOR id="gstreamer-plugins-downloadbuffer.other_details" href="gstreamer-plugins-1.0/gstreamer-plugins-downloadbuffer.html#gstreamer-plugins-downloadbuffer.other_details"> | |
20 | <ANCHOR id="GstDownloadBuffer-struct" href="gstreamer-plugins-1.0/gstreamer-plugins-downloadbuffer.html#GstDownloadBuffer-struct"> | |
21 | <ANCHOR id="gstreamer-plugins-downloadbuffer.property-details" href="gstreamer-plugins-1.0/gstreamer-plugins-downloadbuffer.html#gstreamer-plugins-downloadbuffer.property-details"> | |
22 | <ANCHOR id="GstDownloadBuffer--high-percent" href="gstreamer-plugins-1.0/gstreamer-plugins-downloadbuffer.html#GstDownloadBuffer--high-percent"> | |
23 | <ANCHOR id="GstDownloadBuffer--low-percent" href="gstreamer-plugins-1.0/gstreamer-plugins-downloadbuffer.html#GstDownloadBuffer--low-percent"> | |
24 | <ANCHOR id="GstDownloadBuffer--max-size-bytes" href="gstreamer-plugins-1.0/gstreamer-plugins-downloadbuffer.html#GstDownloadBuffer--max-size-bytes"> | |
25 | <ANCHOR id="GstDownloadBuffer--max-size-time" href="gstreamer-plugins-1.0/gstreamer-plugins-downloadbuffer.html#GstDownloadBuffer--max-size-time"> | |
26 | <ANCHOR id="GstDownloadBuffer--temp-location" href="gstreamer-plugins-1.0/gstreamer-plugins-downloadbuffer.html#GstDownloadBuffer--temp-location"> | |
27 | <ANCHOR id="GstDownloadBuffer--temp-remove" href="gstreamer-plugins-1.0/gstreamer-plugins-downloadbuffer.html#GstDownloadBuffer--temp-remove"> | |
28 | <ANCHOR id="GstDownloadBuffer--temp-template" href="gstreamer-plugins-1.0/gstreamer-plugins-downloadbuffer.html#GstDownloadBuffer--temp-template"> | |
12 | 29 | <ANCHOR id="gstreamer-plugins-fakesrc" href="gstreamer-plugins-1.0/gstreamer-plugins-fakesrc.html"> |
13 | 30 | <ANCHOR id="gstreamer-plugins-fakesrc.properties" href="gstreamer-plugins-1.0/gstreamer-plugins-fakesrc.html#gstreamer-plugins-fakesrc.properties"> |
14 | 31 | <ANCHOR id="gstreamer-plugins-fakesrc.signals" href="gstreamer-plugins-1.0/gstreamer-plugins-fakesrc.html#gstreamer-plugins-fakesrc.signals"> |
2 | 2 | <description>GStreamer core elements</description> |
3 | 3 | <filename>../../plugins/elements/.libs/libgstcoreelements.so</filename> |
4 | 4 | <basename>libgstcoreelements.so</basename> |
5 | <version>1.3.1</version> | |
5 | <version>1.3.2</version> | |
6 | 6 | <license>LGPL</license> |
7 | 7 | <source>gstreamer</source> |
8 | 8 | <package>GStreamer source release</package> |
30 | 30 | </pads> |
31 | 31 | </element> |
32 | 32 | <element> |
33 | <name>downloadbuffer</name> | |
34 | <longname>DownloadBuffer</longname> | |
35 | <class>Generic</class> | |
36 | <description>Download Buffer element</description> | |
37 | <author>Wim Taymans <wim.taymans@gmail.com></author> | |
38 | <pads> | |
39 | <caps> | |
40 | <name>sink</name> | |
41 | <direction>sink</direction> | |
42 | <presence>always</presence> | |
43 | <details>ANY</details> | |
44 | </caps> | |
45 | <caps> | |
46 | <name>src</name> | |
47 | <direction>source</direction> | |
48 | <presence>always</presence> | |
49 | <details>ANY</details> | |
50 | </caps> | |
51 | </pads> | |
52 | </element> | |
53 | <element> | |
33 | 54 | <name>fakesink</name> |
34 | 55 | <longname>Fake Sink</longname> |
35 | 56 | <class>Sink</class> |
574 | 574 | * @pool: a #GstBufferPool |
575 | 575 | * @config: (transfer full): a #GstStructure |
576 | 576 | * |
577 | * Set the configuration of the pool. The pool must be inactive and all buffers | |
578 | * allocated form this pool must be returned or else this function will do | |
579 | * nothing and return FALSE. | |
577 | * Set the configuration of the pool. If the pool is already configured, and | |
578 | * the configuration haven't change, this function will return %TRUE. If the | |
579 | * pool is active, this function will try deactivating it. Buffers allocated | |
580 | * form this pool must be returned or else this function will do nothing and | |
581 | * return FALSE. | |
580 | 582 | * |
581 | 583 | * @config is a #GstStructure that contains the configuration parameters for |
582 | 584 | * the pool. A default and mandatory set of parameters can be configured with |
604 | 606 | priv = pool->priv; |
605 | 607 | |
606 | 608 | GST_BUFFER_POOL_LOCK (pool); |
609 | ||
610 | /* nothing to do if config is unchanged */ | |
611 | if (priv->configured && gst_structure_is_equal (config, priv->config)) | |
612 | goto config_unchanged; | |
613 | ||
607 | 614 | /* can't change the settings when active */ |
608 | if (priv->active) | |
609 | goto was_active; | |
615 | if (priv->active) { | |
616 | GST_BUFFER_POOL_UNLOCK (pool); | |
617 | if (!gst_buffer_pool_set_active (pool, FALSE)) { | |
618 | GST_BUFFER_POOL_LOCK (pool); | |
619 | goto was_active; | |
620 | } | |
621 | GST_BUFFER_POOL_LOCK (pool); | |
622 | ||
623 | /* not likely but as we released the lock */ | |
624 | if (priv->active) | |
625 | goto was_active; | |
626 | } | |
610 | 627 | |
611 | 628 | /* we can't change when outstanding buffers */ |
612 | 629 | if (g_atomic_int_get (&priv->outstanding) != 0) |
620 | 637 | else |
621 | 638 | result = FALSE; |
622 | 639 | |
640 | /* save the config regardless of the result so user can read back the | |
641 | * modified config and evaluate if the changes are acceptable */ | |
642 | if (priv->config) | |
643 | gst_structure_free (priv->config); | |
644 | priv->config = config; | |
645 | ||
623 | 646 | if (result) { |
624 | if (priv->config) | |
625 | gst_structure_free (priv->config); | |
626 | priv->config = config; | |
627 | ||
628 | 647 | /* now we are configured */ |
629 | 648 | priv->configured = TRUE; |
630 | } else { | |
649 | } | |
650 | GST_BUFFER_POOL_UNLOCK (pool); | |
651 | ||
652 | return result; | |
653 | ||
654 | config_unchanged: | |
655 | { | |
631 | 656 | gst_structure_free (config); |
632 | } | |
633 | GST_BUFFER_POOL_UNLOCK (pool); | |
634 | ||
635 | return result; | |
636 | ||
657 | GST_BUFFER_POOL_UNLOCK (pool); | |
658 | return TRUE; | |
659 | } | |
637 | 660 | /* ERRORS */ |
638 | 661 | was_active: |
639 | 662 | { |
980 | 1003 | } |
981 | 1004 | } |
982 | 1005 | return TRUE; |
1006 | } | |
1007 | ||
1008 | /** | |
1009 | * gst_buffer_pool_config_validate_params: | |
1010 | * @config: (transfer none): a #GstBufferPool configuration | |
1011 | * @caps: (transfer none): the excepted caps of buffers | |
1012 | * @size: the expected size of each buffer, not including prefix and padding | |
1013 | * @min_buffers: the expected minimum amount of buffers to allocate. | |
1014 | * @max_buffers: the expect maximum amount of buffers to allocate or 0 for unlimited. | |
1015 | * | |
1016 | * Validate that changes made to @config are still valid in the context of the | |
1017 | * expected parameters. This function is a helper that can be used to validate | |
1018 | * changes made by a pool to a config when gst_buffer_pool_set_config() | |
1019 | * returns %FALSE. This expects that @caps and @size haven't changed, and that | |
1020 | * @min_buffers aren't lower then what we initially expected. This does not check | |
1021 | * if options or allocator parameters. | |
1022 | * | |
1023 | * Since: 1.4 | |
1024 | * | |
1025 | * Returns: %TRUE, if the parameters are valid in this context. | |
1026 | */ | |
1027 | gboolean | |
1028 | gst_buffer_pool_config_validate_params (GstStructure * config, GstCaps * caps, | |
1029 | guint size, guint min_buffers, G_GNUC_UNUSED guint max_buffers) | |
1030 | { | |
1031 | GstCaps *newcaps; | |
1032 | guint newsize, newmin; | |
1033 | gboolean ret = FALSE; | |
1034 | ||
1035 | g_return_val_if_fail (config != NULL, FALSE); | |
1036 | ||
1037 | gst_buffer_pool_config_get_params (config, &newcaps, &newsize, &newmin, NULL); | |
1038 | ||
1039 | if (gst_caps_is_equal (caps, newcaps) && (size == newsize) | |
1040 | && (newmin >= min_buffers)) | |
1041 | ret = TRUE; | |
1042 | ||
1043 | return ret; | |
983 | 1044 | } |
984 | 1045 | |
985 | 1046 | static GstFlowReturn |
200 | 200 | void gst_buffer_pool_config_add_option (GstStructure *config, const gchar *option); |
201 | 201 | const gchar * gst_buffer_pool_config_get_option (GstStructure *config, guint index); |
202 | 202 | gboolean gst_buffer_pool_config_has_option (GstStructure *config, const gchar *option); |
203 | gboolean gst_buffer_pool_config_validate_params (GstStructure *config, GstCaps *caps, | |
204 | guint size, guint min_buffers, guint max_buffers); | |
203 | 205 | |
204 | 206 | /* buffer management */ |
205 | 207 | GstFlowReturn gst_buffer_pool_acquire_buffer (GstBufferPool *pool, GstBuffer **buffer, |
2298 | 2298 | |
2299 | 2299 | if (!priv_gst_structure_parse_fields (s, &s, structure)) { |
2300 | 2300 | gst_structure_free (structure); |
2301 | if (features) | |
2302 | gst_caps_features_free (features); | |
2301 | 2303 | g_free (copy); |
2302 | 2304 | return FALSE; |
2303 | 2305 | } |
2304 | 2306 | |
2305 | 2307 | append: |
2306 | 2308 | gst_caps_append_structure_unchecked (caps, structure, features); |
2309 | features = NULL; | |
2307 | 2310 | if (*s == '\0') |
2308 | 2311 | break; |
2309 | 2312 | } while (TRUE); |
42 | 42 | * |
43 | 43 | * An existing pad of an element can be retrieved by name with |
44 | 44 | * gst_element_get_static_pad(). A new dynamic pad can be created using |
45 | * gst_element_request_pad() with a #GstPadTemplate or | |
46 | * gst_element_get_request_pad() with the template name such as "src_\%u". | |
45 | * gst_element_request_pad() with a #GstPadTemplate. | |
47 | 46 | * An iterator of all pads can be retrieved with gst_element_iterate_pads(). |
48 | 47 | * |
49 | 48 | * Elements can be linked through their pads. |
305 | 304 | * @pad: the #GstPad to release. |
306 | 305 | * |
307 | 306 | * Makes the element free the previously requested pad as obtained |
308 | * with gst_element_get_request_pad(). | |
307 | * with gst_element_request_pad(). | |
309 | 308 | * |
310 | 309 | * This does not unref the pad. If the pad was created by using |
311 | * gst_element_get_request_pad(), gst_element_release_request_pad() needs to be | |
310 | * gst_element_request_pad(), gst_element_release_request_pad() needs to be | |
312 | 311 | * followed by gst_object_unref() to free the @pad. |
313 | 312 | * |
314 | 313 | * MT safe. |
732 | 731 | * |
733 | 732 | * This function is used by plugin developers and should not be used |
734 | 733 | * by applications. Pads that were dynamically requested from elements |
735 | * with gst_element_get_request_pad() should be released with the | |
734 | * with gst_element_request_pad() should be released with the | |
736 | 735 | * gst_element_release_request_pad() function instead. |
737 | 736 | * |
738 | 737 | * Pads are not automatically deactivated so elements should perform the needed |
51 | 51 | * @GST_PAD_ALWAYS: the pad is always available |
52 | 52 | * @GST_PAD_SOMETIMES: the pad will become available depending on the media stream |
53 | 53 | * @GST_PAD_REQUEST: the pad is only available on request with |
54 | * gst_element_get_request_pad(). | |
54 | * gst_element_request_pad(). | |
55 | 55 | * |
56 | 56 | * Indicates when this pad will become available. |
57 | 57 | */ |
656 | 656 | #define CHECK_PLUGIN_DESC_FIELD(desc,field,fn) \ |
657 | 657 | if (G_UNLIKELY ((desc)->field == NULL || *(desc)->field == '\0')) { \ |
658 | 658 | g_warning ("Plugin description for '%s' has no valid %s field", fn, G_STRINGIFY (field)); \ |
659 | g_set_error (error, GST_PLUGIN_ERROR, GST_PLUGIN_ERROR_MODULE, \ | |
660 | "Plugin %s has invalid plugin description field '%s'", \ | |
661 | filename, G_STRINGIFY (field)); \ | |
659 | 662 | goto return_error; \ |
660 | 663 | } |
661 | 664 |
527 | 527 | gboolean |
528 | 528 | _gst_plugin_loader_client_run (void) |
529 | 529 | { |
530 | gboolean res = TRUE; | |
530 | 531 | GstPluginLoader *l; |
531 | 532 | |
532 | 533 | l = plugin_loader_new (NULL); |
543 | 544 | dup_fd = dup (0); /* STDIN */ |
544 | 545 | if (dup_fd == -1) { |
545 | 546 | GST_ERROR ("Failed to start. Could no dup STDIN, errno %d", errno); |
546 | return FALSE; | |
547 | res = FALSE; | |
548 | goto beach; | |
547 | 549 | } |
548 | 550 | l->fd_r.fd = dup_fd; |
549 | 551 | close (0); |
551 | 553 | dup_fd = dup (1); /* STDOUT */ |
552 | 554 | if (dup_fd == -1) { |
553 | 555 | GST_ERROR ("Failed to start. Could no dup STDOUT, errno %d", errno); |
554 | return FALSE; | |
556 | res = FALSE; | |
557 | goto beach; | |
555 | 558 | } |
556 | 559 | l->fd_w.fd = dup_fd; |
557 | 560 | close (1); |
577 | 580 | /* Loop, listening for incoming packets on the fd and writing responses */ |
578 | 581 | while (!l->rx_done && exchange_packets (l)); |
579 | 582 | |
583 | #ifndef G_OS_WIN32 | |
584 | beach: | |
585 | #endif | |
586 | ||
580 | 587 | plugin_loader_free (l); |
581 | 588 | |
582 | return TRUE; | |
589 | return res; | |
583 | 590 | } |
584 | 591 | |
585 | 592 | static void |
2529 | 2529 | { |
2530 | 2530 | gboolean ret = FALSE; |
2531 | 2531 | gchar *end; |
2532 | guint64 mask = -1; | |
2532 | guint64 mask = ~0; | |
2533 | 2533 | |
2534 | 2534 | errno = 0; |
2535 | 2535 | *to = g_ascii_strtoull (s, &end, 0); |
5839 | 5839 | return GST_VALUE_UNORDERED; |
5840 | 5840 | } |
5841 | 5841 | |
5842 | ||
5843 | /*********************** | |
5844 | * GstAllocationParams * | |
5845 | ***********************/ | |
5846 | static gint | |
5847 | gst_value_compare_allocation_params (const GValue * value1, | |
5848 | const GValue * value2) | |
5849 | { | |
5850 | GstAllocationParams *v1, *v2; | |
5851 | ||
5852 | v1 = value1->data[0].v_pointer; | |
5853 | v2 = value2->data[0].v_pointer; | |
5854 | ||
5855 | if (v1 == NULL && v1 == v2) | |
5856 | return GST_VALUE_EQUAL; | |
5857 | ||
5858 | if (v1 == NULL || v2 == NULL) | |
5859 | return GST_VALUE_UNORDERED; | |
5860 | ||
5861 | if (v1->flags == v2->flags && v1->align == v2->align && | |
5862 | v1->prefix == v2->prefix && v1->padding == v2->padding) | |
5863 | return GST_VALUE_EQUAL; | |
5864 | ||
5865 | return GST_VALUE_UNORDERED; | |
5866 | } | |
5867 | ||
5868 | ||
5869 | /************ | |
5870 | * GObject * | |
5871 | ************/ | |
5872 | ||
5873 | static gint | |
5874 | gst_value_compare_object (const GValue * value1, const GValue * value2) | |
5875 | { | |
5876 | gpointer v1, v2; | |
5877 | ||
5878 | v1 = value1->data[0].v_pointer; | |
5879 | v2 = value2->data[0].v_pointer; | |
5880 | ||
5881 | if (v1 == v2) | |
5882 | return GST_VALUE_EQUAL; | |
5883 | ||
5884 | return GST_VALUE_UNORDERED; | |
5885 | } | |
5886 | ||
5842 | 5887 | static void |
5843 | 5888 | gst_value_transform_object_string (const GValue * src_value, |
5844 | 5889 | GValue * dest_value) |
6235 | 6280 | }; |
6236 | 6281 | |
6237 | 6282 | gst_value.type = gst_bitmask_get_type (); |
6283 | gst_value_register (&gst_value); | |
6284 | } | |
6285 | ||
6286 | { | |
6287 | static GstValueTable gst_value = { | |
6288 | 0, | |
6289 | gst_value_compare_allocation_params, | |
6290 | NULL, | |
6291 | NULL, | |
6292 | }; | |
6293 | ||
6294 | gst_value.type = gst_allocation_params_get_type (); | |
6295 | gst_value_register (&gst_value); | |
6296 | } | |
6297 | ||
6298 | { | |
6299 | static GstValueTable gst_value = { | |
6300 | 0, | |
6301 | gst_value_compare_object, | |
6302 | NULL, | |
6303 | NULL, | |
6304 | }; | |
6305 | ||
6306 | gst_value.type = G_TYPE_OBJECT; | |
6238 | 6307 | gst_value_register (&gst_value); |
6239 | 6308 | } |
6240 | 6309 |
39 | 39 | |
40 | 40 | <release> |
41 | 41 | <Version> |
42 | <revision>1.3.2</revision> | |
43 | <branch>1.3</branch> | |
44 | <name></name> | |
45 | <created>2014-05-21</created> | |
46 | <file-release rdf:resource="http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.3.2.tar.xz" /> | |
47 | </Version> | |
48 | </release> | |
49 | ||
50 | <release> | |
51 | <Version> | |
42 | 52 | <revision>1.3.1</revision> |
43 | 53 | <branch>1.3</branch> |
44 | 54 | <name></name> |
3 | 3 | %define _glib2 2.32.0 |
4 | 4 | |
5 | 5 | Name: %{gstreamer} |
6 | Version: 1.3.1 | |
6 | Version: 1.3.2 | |
7 | 7 | Release: 1 |
8 | 8 | Summary: GStreamer streaming media framework runtime |
9 | 9 |
3054 | 3054 | config = gst_buffer_pool_get_config (pool); |
3055 | 3055 | gst_buffer_pool_config_set_params (config, outcaps, size, min, max); |
3056 | 3056 | gst_buffer_pool_config_set_allocator (config, allocator, ¶ms); |
3057 | gst_buffer_pool_set_config (pool, config); | |
3057 | ||
3058 | /* buffer pool may have to do some changes */ | |
3059 | if (!gst_buffer_pool_set_config (pool, config)) { | |
3060 | config = gst_buffer_pool_get_config (pool); | |
3061 | ||
3062 | /* If change are not acceptable, fallback to generic pool */ | |
3063 | if (!gst_buffer_pool_config_validate_params (config, outcaps, size, min, | |
3064 | max)) { | |
3065 | GST_DEBUG_OBJECT (basesrc, "unsuported pool, making new pool"); | |
3066 | ||
3067 | gst_object_unref (pool); | |
3068 | pool = gst_buffer_pool_new (); | |
3069 | gst_buffer_pool_config_set_params (config, outcaps, size, min, max); | |
3070 | gst_buffer_pool_config_set_allocator (config, allocator, ¶ms); | |
3071 | } | |
3072 | ||
3073 | if (!gst_buffer_pool_set_config (pool, config)) | |
3074 | goto config_failed; | |
3075 | } | |
3058 | 3076 | } |
3059 | 3077 | |
3060 | 3078 | if (update_allocator) |
3070 | 3088 | } |
3071 | 3089 | |
3072 | 3090 | return TRUE; |
3091 | ||
3092 | config_failed: | |
3093 | GST_ELEMENT_ERROR (basesrc, RESOURCE, SETTINGS, | |
3094 | ("Failed to configure the buffer pool"), | |
3095 | ("Configuration is most likely invalid, please report this issue.")); | |
3096 | return FALSE; | |
3073 | 3097 | } |
3074 | 3098 | |
3075 | 3099 | static gboolean |
898 | 898 | config = gst_buffer_pool_get_config (pool); |
899 | 899 | gst_buffer_pool_config_set_params (config, outcaps, size, min, max); |
900 | 900 | gst_buffer_pool_config_set_allocator (config, allocator, ¶ms); |
901 | gst_buffer_pool_set_config (pool, config); | |
901 | ||
902 | /* buffer pool may have to do some changes */ | |
903 | if (!gst_buffer_pool_set_config (pool, config)) { | |
904 | config = gst_buffer_pool_get_config (pool); | |
905 | ||
906 | /* If change are not acceptable, fallback to generic pool */ | |
907 | if (!gst_buffer_pool_config_validate_params (config, outcaps, size, min, | |
908 | max)) { | |
909 | GST_DEBUG_OBJECT (trans, "unsuported pool, making new pool"); | |
910 | ||
911 | gst_object_unref (pool); | |
912 | pool = gst_buffer_pool_new (); | |
913 | gst_buffer_pool_config_set_params (config, outcaps, size, min, max); | |
914 | gst_buffer_pool_config_set_allocator (config, allocator, ¶ms); | |
915 | } | |
916 | ||
917 | if (!gst_buffer_pool_set_config (pool, config)) | |
918 | goto config_failed; | |
919 | } | |
902 | 920 | } |
903 | 921 | |
904 | 922 | if (update_allocator) |
914 | 932 | } |
915 | 933 | |
916 | 934 | return TRUE; |
935 | ||
936 | config_failed: | |
937 | GST_ELEMENT_ERROR (trans, RESOURCE, SETTINGS, | |
938 | ("Failed to configure the buffer pool"), | |
939 | ("Configuration is most likely invalid, please report this issue.")); | |
940 | return FALSE; | |
917 | 941 | } |
918 | 942 | |
919 | 943 | static gboolean |
247 | 247 | send_failure_info (buf); |
248 | 248 | if (cur_fork_status () == CK_FORK) { |
249 | 249 | #ifdef _POSIX_VERSION |
250 | exit (1); | |
250 | _exit (1); | |
251 | 251 | #endif /* _POSIX_VERSION */ |
252 | 252 | } |
253 | 253 | } |
321 | 321 | GST_DEBUG_OBJECT (self, "notifying port %d", port); |
322 | 322 | g_object_notify (G_OBJECT (self), "port"); |
323 | 323 | } |
324 | GST_DEBUG_OBJECT (self, "bound on UDP address %s, port %d", address, port); | |
324 | GST_DEBUG_OBJECT (self, "bound on UDP address %s, port %d", | |
325 | self->priv->address, port); | |
325 | 326 | g_object_unref (bound_addr); |
326 | 327 | |
327 | 328 | self->priv->socket = socket; |
3 | 3 | libgstcoreelements_la_DEPENDENCIES = $(top_builddir)/gst/libgstreamer-@GST_API_VERSION@.la |
4 | 4 | libgstcoreelements_la_SOURCES = \ |
5 | 5 | gstcapsfilter.c \ |
6 | gstdownloadbuffer.c \ | |
6 | 7 | gstelements.c \ |
7 | 8 | gstfakesrc.c \ |
8 | 9 | gstfakesink.c \ |
17 | 18 | gstmultiqueue.c \ |
18 | 19 | gstqueue.c \ |
19 | 20 | gstqueue2.c \ |
21 | gstsparsefile.c \ | |
20 | 22 | gsttee.c \ |
21 | 23 | gsttypefindelement.c \ |
22 | 24 | gstvalve.c |
30 | 32 | |
31 | 33 | noinst_HEADERS = \ |
32 | 34 | gstcapsfilter.h \ |
35 | gstdownloadbuffer.h \ | |
33 | 36 | gstfakesink.h \ |
34 | 37 | gstfakesrc.h \ |
35 | 38 | gstfdsrc.h \ |
43 | 46 | gstmultiqueue.h \ |
44 | 47 | gstqueue.h \ |
45 | 48 | gstqueue2.h \ |
49 | gstsparsefile.h \ | |
46 | 50 | gsttee.h \ |
47 | 51 | gsttypefindelement.h \ |
48 | 52 | gstvalve.h |
156 | 156 | am__DEPENDENCIES_1 = |
157 | 157 | am_libgstcoreelements_la_OBJECTS = \ |
158 | 158 | libgstcoreelements_la-gstcapsfilter.lo \ |
159 | libgstcoreelements_la-gstdownloadbuffer.lo \ | |
159 | 160 | libgstcoreelements_la-gstelements.lo \ |
160 | 161 | libgstcoreelements_la-gstfakesrc.lo \ |
161 | 162 | libgstcoreelements_la-gstfakesink.lo \ |
170 | 171 | libgstcoreelements_la-gstmultiqueue.lo \ |
171 | 172 | libgstcoreelements_la-gstqueue.lo \ |
172 | 173 | libgstcoreelements_la-gstqueue2.lo \ |
174 | libgstcoreelements_la-gstsparsefile.lo \ | |
173 | 175 | libgstcoreelements_la-gsttee.lo \ |
174 | 176 | libgstcoreelements_la-gsttypefindelement.lo \ |
175 | 177 | libgstcoreelements_la-gstvalve.lo |
524 | 526 | libgstcoreelements_la_DEPENDENCIES = $(top_builddir)/gst/libgstreamer-@GST_API_VERSION@.la |
525 | 527 | libgstcoreelements_la_SOURCES = \ |
526 | 528 | gstcapsfilter.c \ |
529 | gstdownloadbuffer.c \ | |
527 | 530 | gstelements.c \ |
528 | 531 | gstfakesrc.c \ |
529 | 532 | gstfakesink.c \ |
538 | 541 | gstmultiqueue.c \ |
539 | 542 | gstqueue.c \ |
540 | 543 | gstqueue2.c \ |
544 | gstsparsefile.c \ | |
541 | 545 | gsttee.c \ |
542 | 546 | gsttypefindelement.c \ |
543 | 547 | gstvalve.c |
551 | 555 | libgstcoreelements_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) |
552 | 556 | noinst_HEADERS = \ |
553 | 557 | gstcapsfilter.h \ |
558 | gstdownloadbuffer.h \ | |
554 | 559 | gstfakesink.h \ |
555 | 560 | gstfakesrc.h \ |
556 | 561 | gstfdsrc.h \ |
564 | 569 | gstmultiqueue.h \ |
565 | 570 | gstqueue.h \ |
566 | 571 | gstqueue2.h \ |
572 | gstsparsefile.h \ | |
567 | 573 | gsttee.h \ |
568 | 574 | gsttypefindelement.h \ |
569 | 575 | gstvalve.h |
652 | 658 | -rm -f *.tab.c |
653 | 659 | |
654 | 660 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstcoreelements_la-gstcapsfilter.Plo@am__quote@ |
661 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstcoreelements_la-gstdownloadbuffer.Plo@am__quote@ | |
655 | 662 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstcoreelements_la-gstelements.Plo@am__quote@ |
656 | 663 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstcoreelements_la-gstfakesink.Plo@am__quote@ |
657 | 664 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstcoreelements_la-gstfakesrc.Plo@am__quote@ |
666 | 673 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstcoreelements_la-gstoutputselector.Plo@am__quote@ |
667 | 674 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstcoreelements_la-gstqueue.Plo@am__quote@ |
668 | 675 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstcoreelements_la-gstqueue2.Plo@am__quote@ |
676 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstcoreelements_la-gstsparsefile.Plo@am__quote@ | |
669 | 677 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstcoreelements_la-gsttee.Plo@am__quote@ |
670 | 678 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstcoreelements_la-gsttypefindelement.Plo@am__quote@ |
671 | 679 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstcoreelements_la-gstvalve.Plo@am__quote@ |
701 | 709 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
702 | 710 | @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstcoreelements_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstcoreelements_la_CFLAGS) $(CFLAGS) -c -o libgstcoreelements_la-gstcapsfilter.lo `test -f 'gstcapsfilter.c' || echo '$(srcdir)/'`gstcapsfilter.c |
703 | 711 | |
712 | libgstcoreelements_la-gstdownloadbuffer.lo: gstdownloadbuffer.c | |
713 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstcoreelements_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstcoreelements_la_CFLAGS) $(CFLAGS) -MT libgstcoreelements_la-gstdownloadbuffer.lo -MD -MP -MF $(DEPDIR)/libgstcoreelements_la-gstdownloadbuffer.Tpo -c -o libgstcoreelements_la-gstdownloadbuffer.lo `test -f 'gstdownloadbuffer.c' || echo '$(srcdir)/'`gstdownloadbuffer.c | |
714 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstcoreelements_la-gstdownloadbuffer.Tpo $(DEPDIR)/libgstcoreelements_la-gstdownloadbuffer.Plo | |
715 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstdownloadbuffer.c' object='libgstcoreelements_la-gstdownloadbuffer.lo' libtool=yes @AMDEPBACKSLASH@ | |
716 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
717 | @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstcoreelements_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstcoreelements_la_CFLAGS) $(CFLAGS) -c -o libgstcoreelements_la-gstdownloadbuffer.lo `test -f 'gstdownloadbuffer.c' || echo '$(srcdir)/'`gstdownloadbuffer.c | |
718 | ||
704 | 719 | libgstcoreelements_la-gstelements.lo: gstelements.c |
705 | 720 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstcoreelements_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstcoreelements_la_CFLAGS) $(CFLAGS) -MT libgstcoreelements_la-gstelements.lo -MD -MP -MF $(DEPDIR)/libgstcoreelements_la-gstelements.Tpo -c -o libgstcoreelements_la-gstelements.lo `test -f 'gstelements.c' || echo '$(srcdir)/'`gstelements.c |
706 | 721 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstcoreelements_la-gstelements.Tpo $(DEPDIR)/libgstcoreelements_la-gstelements.Plo |
798 | 813 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstqueue2.c' object='libgstcoreelements_la-gstqueue2.lo' libtool=yes @AMDEPBACKSLASH@ |
799 | 814 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
800 | 815 | @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstcoreelements_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstcoreelements_la_CFLAGS) $(CFLAGS) -c -o libgstcoreelements_la-gstqueue2.lo `test -f 'gstqueue2.c' || echo '$(srcdir)/'`gstqueue2.c |
816 | ||
817 | libgstcoreelements_la-gstsparsefile.lo: gstsparsefile.c | |
818 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstcoreelements_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstcoreelements_la_CFLAGS) $(CFLAGS) -MT libgstcoreelements_la-gstsparsefile.lo -MD -MP -MF $(DEPDIR)/libgstcoreelements_la-gstsparsefile.Tpo -c -o libgstcoreelements_la-gstsparsefile.lo `test -f 'gstsparsefile.c' || echo '$(srcdir)/'`gstsparsefile.c | |
819 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstcoreelements_la-gstsparsefile.Tpo $(DEPDIR)/libgstcoreelements_la-gstsparsefile.Plo | |
820 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstsparsefile.c' object='libgstcoreelements_la-gstsparsefile.lo' libtool=yes @AMDEPBACKSLASH@ | |
821 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | |
822 | @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstcoreelements_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstcoreelements_la_CFLAGS) $(CFLAGS) -c -o libgstcoreelements_la-gstsparsefile.lo `test -f 'gstsparsefile.c' || echo '$(srcdir)/'`gstsparsefile.c | |
801 | 823 | |
802 | 824 | libgstcoreelements_la-gsttee.lo: gsttee.c |
803 | 825 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstcoreelements_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstcoreelements_la_CFLAGS) $(CFLAGS) -MT libgstcoreelements_la-gsttee.lo -MD -MP -MF $(DEPDIR)/libgstcoreelements_la-gsttee.Tpo -c -o libgstcoreelements_la-gsttee.lo `test -f 'gsttee.c' || echo '$(srcdir)/'`gsttee.c |
0 | /* GStreamer | |
1 | * Copyright (C) 2014 Wim Taymans <wim.taymans@gmail.com> | |
2 | * | |
3 | * gstdownloadbuffer.c: | |
4 | * | |
5 | * This library is free software; you can redistribute it and/or | |
6 | * modify it under the terms of the GNU Library General Public | |
7 | * License as published by the Free Software Foundation; either | |
8 | * version 2 of the License, or (at your option) any later version. | |
9 | * | |
10 | * This library is distributed in the hope that it will be useful, | |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 | * Library General Public License for more details. | |
14 | * | |
15 | * You should have received a copy of the GNU Library General Public | |
16 | * License along with this library; if not, write to the | |
17 | * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, | |
18 | * Boston, MA 02110-1301, USA. | |
19 | */ | |
20 | ||
21 | /** | |
22 | * SECTION:element-downloadbuffer | |
23 | * | |
24 | * The downloadbuffer element provides on-disk buffering and caching of, typically, | |
25 | * a network file. temp-template should be set to a value such as | |
26 | * /tmp/gstreamer-XXXXXX and the element will allocate a random free filename and | |
27 | * buffer the data in the file. | |
28 | * | |
29 | * With max-size-bytes and max-size-time you can configure the buffering limits. | |
30 | * The downloadbuffer element will try to read-ahead these amounts of data. When | |
31 | * the amount of read-ahead data drops below low-percent of the configured max, | |
32 | * the element will start emiting BUFFERING messages until high-percent of max is | |
33 | * reached again. | |
34 | * | |
35 | * The downloadbuffer provides push and pull based scheduling on its source pad | |
36 | * and will efficiently seek in the upstream element when needed. | |
37 | * | |
38 | * The temp-location property will be used to notify the application of the | |
39 | * allocated filename. | |
40 | * | |
41 | * When the downloadbuffer has completely downloaded the media, it will | |
42 | * post an application message named <classname>"GstCacheDownloadComplete"</classname> | |
43 | * with the following information: | |
44 | * <itemizedlist> | |
45 | * <listitem> | |
46 | * <para> | |
47 | * G_TYPE_STRING | |
48 | * <classname>"location"</classname>: | |
49 | * the location of the completely downloaded file. | |
50 | * </para> | |
51 | * </listitem> | |
52 | * </itemizedlist> | |
53 | */ | |
54 | ||
55 | #ifdef HAVE_CONFIG_H | |
56 | #include "config.h" | |
57 | #endif | |
58 | ||
59 | #include "gstdownloadbuffer.h" | |
60 | ||
61 | #include <glib/gstdio.h> | |
62 | ||
63 | #include "gst/gst-i18n-lib.h" | |
64 | #include "gst/glib-compat-private.h" | |
65 | ||
66 | #include <string.h> | |
67 | ||
68 | #ifdef G_OS_WIN32 | |
69 | #include <io.h> /* lseek, open, close, read */ | |
70 | #undef lseek | |
71 | #define lseek _lseeki64 | |
72 | #undef off_t | |
73 | #define off_t guint64 | |
74 | #else | |
75 | #include <unistd.h> | |
76 | #endif | |
77 | ||
78 | static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink", | |
79 | GST_PAD_SINK, | |
80 | GST_PAD_ALWAYS, | |
81 | GST_STATIC_CAPS_ANY); | |
82 | ||
83 | static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src", | |
84 | GST_PAD_SRC, | |
85 | GST_PAD_ALWAYS, | |
86 | GST_STATIC_CAPS_ANY); | |
87 | ||
88 | GST_DEBUG_CATEGORY_STATIC (downloadbuffer_debug); | |
89 | #define GST_CAT_DEFAULT (downloadbuffer_debug) | |
90 | ||
91 | enum | |
92 | { | |
93 | LAST_SIGNAL | |
94 | }; | |
95 | ||
96 | /* other defines */ | |
97 | #define DEFAULT_BUFFER_SIZE 4096 | |
98 | ||
99 | /* default property values */ | |
100 | #define DEFAULT_MAX_SIZE_BYTES (2 * 1024 * 1024) /* 2 MB */ | |
101 | #define DEFAULT_MAX_SIZE_TIME 2 * GST_SECOND /* 2 seconds */ | |
102 | #define DEFAULT_LOW_PERCENT 10 | |
103 | #define DEFAULT_HIGH_PERCENT 99 | |
104 | #define DEFAULT_TEMP_REMOVE TRUE | |
105 | ||
106 | enum | |
107 | { | |
108 | PROP_0, | |
109 | PROP_MAX_SIZE_BYTES, | |
110 | PROP_MAX_SIZE_TIME, | |
111 | PROP_LOW_PERCENT, | |
112 | PROP_HIGH_PERCENT, | |
113 | PROP_TEMP_TEMPLATE, | |
114 | PROP_TEMP_LOCATION, | |
115 | PROP_TEMP_REMOVE, | |
116 | PROP_LAST | |
117 | }; | |
118 | ||
119 | #define GST_DOWNLOAD_BUFFER_CLEAR_LEVEL(l) G_STMT_START { \ | |
120 | l.bytes = 0; \ | |
121 | l.time = 0; \ | |
122 | } G_STMT_END | |
123 | ||
124 | #define STATUS(elem, pad, msg) \ | |
125 | GST_LOG_OBJECT (elem, "(%s:%s) " msg ": %u of %u " \ | |
126 | "bytes, %" G_GUINT64_FORMAT " of %" G_GUINT64_FORMAT \ | |
127 | " ns", \ | |
128 | GST_DEBUG_PAD_NAME (pad), \ | |
129 | elem->cur_level.bytes, \ | |
130 | elem->max_level.bytes, \ | |
131 | elem->cur_level.time, \ | |
132 | elem->max_level.time) | |
133 | ||
134 | #define GST_DOWNLOAD_BUFFER_MUTEX_LOCK(q) G_STMT_START { \ | |
135 | g_mutex_lock (&q->qlock); \ | |
136 | } G_STMT_END | |
137 | ||
138 | #define GST_DOWNLOAD_BUFFER_MUTEX_LOCK_CHECK(q,res,label) G_STMT_START { \ | |
139 | GST_DOWNLOAD_BUFFER_MUTEX_LOCK (q); \ | |
140 | if (res != GST_FLOW_OK) \ | |
141 | goto label; \ | |
142 | } G_STMT_END | |
143 | ||
144 | #define GST_DOWNLOAD_BUFFER_MUTEX_UNLOCK(q) G_STMT_START { \ | |
145 | g_mutex_unlock (&q->qlock); \ | |
146 | } G_STMT_END | |
147 | ||
148 | #define GST_DOWNLOAD_BUFFER_WAIT_ADD_CHECK(q, res, o, label) G_STMT_START { \ | |
149 | STATUS (q, q->srcpad, "wait for ADD"); \ | |
150 | q->waiting_add = TRUE; \ | |
151 | q->waiting_offset = o; \ | |
152 | g_cond_wait (&q->item_add, &q->qlock); \ | |
153 | q->waiting_add = FALSE; \ | |
154 | if (res != GST_FLOW_OK) { \ | |
155 | STATUS (q, q->srcpad, "received ADD wakeup"); \ | |
156 | goto label; \ | |
157 | } \ | |
158 | STATUS (q, q->srcpad, "received ADD"); \ | |
159 | } G_STMT_END | |
160 | ||
161 | #define GST_DOWNLOAD_BUFFER_SIGNAL_ADD(q, o) G_STMT_START { \ | |
162 | if (q->waiting_add && q->waiting_offset <= o) { \ | |
163 | STATUS (q, q->sinkpad, "signal ADD"); \ | |
164 | g_cond_signal (&q->item_add); \ | |
165 | } \ | |
166 | } G_STMT_END | |
167 | ||
168 | #define _do_init \ | |
169 | GST_DEBUG_CATEGORY_INIT (downloadbuffer_debug, "downloadbuffer", 0, \ | |
170 | "downloadbuffer element"); | |
171 | ||
172 | #define gst_download_buffer_parent_class parent_class | |
173 | G_DEFINE_TYPE_WITH_CODE (GstDownloadBuffer, gst_download_buffer, | |
174 | GST_TYPE_ELEMENT, _do_init); | |
175 | ||
176 | static void update_buffering (GstDownloadBuffer * dlbuf); | |
177 | ||
178 | static void gst_download_buffer_finalize (GObject * object); | |
179 | ||
180 | static void gst_download_buffer_set_property (GObject * object, | |
181 | guint prop_id, const GValue * value, GParamSpec * pspec); | |
182 | static void gst_download_buffer_get_property (GObject * object, | |
183 | guint prop_id, GValue * value, GParamSpec * pspec); | |
184 | ||
185 | static GstFlowReturn gst_download_buffer_chain (GstPad * pad, | |
186 | GstObject * parent, GstBuffer * buffer); | |
187 | static void gst_download_buffer_loop (GstPad * pad); | |
188 | ||
189 | static gboolean gst_download_buffer_handle_sink_event (GstPad * pad, | |
190 | GstObject * parent, GstEvent * event); | |
191 | static gboolean gst_download_buffer_handle_sink_query (GstPad * pad, | |
192 | GstObject * parent, GstQuery * query); | |
193 | ||
194 | static gboolean gst_download_buffer_handle_src_event (GstPad * pad, | |
195 | GstObject * parent, GstEvent * event); | |
196 | static gboolean gst_download_buffer_handle_src_query (GstPad * pad, | |
197 | GstObject * parent, GstQuery * query); | |
198 | static gboolean gst_download_buffer_handle_query (GstElement * element, | |
199 | GstQuery * query); | |
200 | ||
201 | static GstFlowReturn gst_download_buffer_get_range (GstPad * pad, | |
202 | GstObject * parent, guint64 offset, guint length, GstBuffer ** buffer); | |
203 | ||
204 | static gboolean gst_download_buffer_src_activate_mode (GstPad * pad, | |
205 | GstObject * parent, GstPadMode mode, gboolean active); | |
206 | static gboolean gst_download_buffer_sink_activate_mode (GstPad * pad, | |
207 | GstObject * parent, GstPadMode mode, gboolean active); | |
208 | static GstStateChangeReturn gst_download_buffer_change_state (GstElement * | |
209 | element, GstStateChange transition); | |
210 | ||
211 | /* static guint gst_download_buffer_signals[LAST_SIGNAL] = { 0 }; */ | |
212 | ||
213 | static void | |
214 | gst_download_buffer_class_init (GstDownloadBufferClass * klass) | |
215 | { | |
216 | GObjectClass *gobject_class = G_OBJECT_CLASS (klass); | |
217 | GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass); | |
218 | ||
219 | gobject_class->set_property = gst_download_buffer_set_property; | |
220 | gobject_class->get_property = gst_download_buffer_get_property; | |
221 | ||
222 | /* properties */ | |
223 | g_object_class_install_property (gobject_class, PROP_MAX_SIZE_BYTES, | |
224 | g_param_spec_uint ("max-size-bytes", "Max. size (kB)", | |
225 | "Max. amount of data to buffer (bytes, 0=disable)", | |
226 | 0, G_MAXUINT, DEFAULT_MAX_SIZE_BYTES, | |
227 | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); | |
228 | g_object_class_install_property (gobject_class, PROP_MAX_SIZE_TIME, | |
229 | g_param_spec_uint64 ("max-size-time", "Max. size (ns)", | |
230 | "Max. amount of data to buffer (in ns, 0=disable)", 0, G_MAXUINT64, | |
231 | DEFAULT_MAX_SIZE_TIME, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); | |
232 | ||
233 | g_object_class_install_property (gobject_class, PROP_LOW_PERCENT, | |
234 | g_param_spec_int ("low-percent", "Low percent", | |
235 | "Low threshold for buffering to start. Only used if use-buffering is True", | |
236 | 0, 100, DEFAULT_LOW_PERCENT, | |
237 | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); | |
238 | g_object_class_install_property (gobject_class, PROP_HIGH_PERCENT, | |
239 | g_param_spec_int ("high-percent", "High percent", | |
240 | "High threshold for buffering to finish. Only used if use-buffering is True", | |
241 | 0, 100, DEFAULT_HIGH_PERCENT, | |
242 | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); | |
243 | ||
244 | g_object_class_install_property (gobject_class, PROP_TEMP_TEMPLATE, | |
245 | g_param_spec_string ("temp-template", "Temporary File Template", | |
246 | "File template to store temporary files in, should contain directory " | |
247 | "and XXXXXX. (NULL == disabled)", | |
248 | NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); | |
249 | ||
250 | g_object_class_install_property (gobject_class, PROP_TEMP_LOCATION, | |
251 | g_param_spec_string ("temp-location", "Temporary File Location", | |
252 | "Location to store temporary files in (Only read this property, " | |
253 | "use temp-template to configure the name template)", | |
254 | NULL, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); | |
255 | ||
256 | /** | |
257 | * GstDownloadBuffer:temp-remove | |
258 | * | |
259 | * When temp-template is set, remove the temporary file when going to READY. | |
260 | */ | |
261 | g_object_class_install_property (gobject_class, PROP_TEMP_REMOVE, | |
262 | g_param_spec_boolean ("temp-remove", "Remove the Temporary File", | |
263 | "Remove the temp-location after use", | |
264 | DEFAULT_TEMP_REMOVE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); | |
265 | ||
266 | /* set several parent class virtual functions */ | |
267 | gobject_class->finalize = gst_download_buffer_finalize; | |
268 | ||
269 | gst_element_class_add_pad_template (gstelement_class, | |
270 | gst_static_pad_template_get (&srctemplate)); | |
271 | gst_element_class_add_pad_template (gstelement_class, | |
272 | gst_static_pad_template_get (&sinktemplate)); | |
273 | ||
274 | gst_element_class_set_static_metadata (gstelement_class, "DownloadBuffer", | |
275 | "Generic", "Download Buffer element", | |
276 | "Wim Taymans <wim.taymans@gmail.com>"); | |
277 | ||
278 | gstelement_class->change_state = | |
279 | GST_DEBUG_FUNCPTR (gst_download_buffer_change_state); | |
280 | gstelement_class->query = | |
281 | GST_DEBUG_FUNCPTR (gst_download_buffer_handle_query); | |
282 | } | |
283 | ||
284 | static void | |
285 | gst_download_buffer_init (GstDownloadBuffer * dlbuf) | |
286 | { | |
287 | dlbuf->sinkpad = gst_pad_new_from_static_template (&sinktemplate, "sink"); | |
288 | ||
289 | gst_pad_set_chain_function (dlbuf->sinkpad, | |
290 | GST_DEBUG_FUNCPTR (gst_download_buffer_chain)); | |
291 | gst_pad_set_activatemode_function (dlbuf->sinkpad, | |
292 | GST_DEBUG_FUNCPTR (gst_download_buffer_sink_activate_mode)); | |
293 | gst_pad_set_event_function (dlbuf->sinkpad, | |
294 | GST_DEBUG_FUNCPTR (gst_download_buffer_handle_sink_event)); | |
295 | gst_pad_set_query_function (dlbuf->sinkpad, | |
296 | GST_DEBUG_FUNCPTR (gst_download_buffer_handle_sink_query)); | |
297 | GST_PAD_SET_PROXY_CAPS (dlbuf->sinkpad); | |
298 | gst_element_add_pad (GST_ELEMENT (dlbuf), dlbuf->sinkpad); | |
299 | ||
300 | dlbuf->srcpad = gst_pad_new_from_static_template (&srctemplate, "src"); | |
301 | ||
302 | gst_pad_set_activatemode_function (dlbuf->srcpad, | |
303 | GST_DEBUG_FUNCPTR (gst_download_buffer_src_activate_mode)); | |
304 | gst_pad_set_getrange_function (dlbuf->srcpad, | |
305 | GST_DEBUG_FUNCPTR (gst_download_buffer_get_range)); | |
306 | gst_pad_set_event_function (dlbuf->srcpad, | |
307 | GST_DEBUG_FUNCPTR (gst_download_buffer_handle_src_event)); | |
308 | gst_pad_set_query_function (dlbuf->srcpad, | |
309 | GST_DEBUG_FUNCPTR (gst_download_buffer_handle_src_query)); | |
310 | GST_PAD_SET_PROXY_CAPS (dlbuf->srcpad); | |
311 | gst_element_add_pad (GST_ELEMENT (dlbuf), dlbuf->srcpad); | |
312 | ||
313 | /* levels */ | |
314 | GST_DOWNLOAD_BUFFER_CLEAR_LEVEL (dlbuf->cur_level); | |
315 | dlbuf->max_level.bytes = DEFAULT_MAX_SIZE_BYTES; | |
316 | dlbuf->max_level.time = DEFAULT_MAX_SIZE_TIME; | |
317 | dlbuf->low_percent = DEFAULT_LOW_PERCENT; | |
318 | dlbuf->high_percent = DEFAULT_HIGH_PERCENT; | |
319 | ||
320 | dlbuf->srcresult = GST_FLOW_FLUSHING; | |
321 | dlbuf->sinkresult = GST_FLOW_FLUSHING; | |
322 | dlbuf->in_timer = g_timer_new (); | |
323 | dlbuf->out_timer = g_timer_new (); | |
324 | ||
325 | g_mutex_init (&dlbuf->qlock); | |
326 | dlbuf->waiting_add = FALSE; | |
327 | g_cond_init (&dlbuf->item_add); | |
328 | ||
329 | dlbuf->buffering_percent = 100; | |
330 | ||
331 | /* tempfile related */ | |
332 | dlbuf->temp_template = NULL; | |
333 | dlbuf->temp_location = NULL; | |
334 | dlbuf->temp_remove = DEFAULT_TEMP_REMOVE; | |
335 | } | |
336 | ||
337 | /* called only once, as opposed to dispose */ | |
338 | static void | |
339 | gst_download_buffer_finalize (GObject * object) | |
340 | { | |
341 | GstDownloadBuffer *dlbuf = GST_DOWNLOAD_BUFFER (object); | |
342 | ||
343 | g_mutex_clear (&dlbuf->qlock); | |
344 | g_cond_clear (&dlbuf->item_add); | |
345 | g_timer_destroy (dlbuf->in_timer); | |
346 | g_timer_destroy (dlbuf->out_timer); | |
347 | ||
348 | /* temp_file path cleanup */ | |
349 | g_free (dlbuf->temp_template); | |
350 | g_free (dlbuf->temp_location); | |
351 | ||
352 | G_OBJECT_CLASS (parent_class)->finalize (object); | |
353 | } | |
354 | ||
355 | static void | |
356 | reset_rate_timer (GstDownloadBuffer * dlbuf) | |
357 | { | |
358 | dlbuf->bytes_in = 0; | |
359 | dlbuf->bytes_out = 0; | |
360 | dlbuf->byte_in_rate = 0.0; | |
361 | dlbuf->byte_in_period = 0; | |
362 | dlbuf->byte_out_rate = 0.0; | |
363 | dlbuf->last_in_elapsed = 0.0; | |
364 | dlbuf->last_out_elapsed = 0.0; | |
365 | dlbuf->in_timer_started = FALSE; | |
366 | dlbuf->out_timer_started = FALSE; | |
367 | } | |
368 | ||
369 | /* the interval in seconds to recalculate the rate */ | |
370 | #define RATE_INTERVAL 0.2 | |
371 | /* Tuning for rate estimation. We use a large window for the input rate because | |
372 | * it should be stable when connected to a network. The output rate is less | |
373 | * stable (the elements preroll, queues behind a demuxer fill, ...) and should | |
374 | * therefore adapt more quickly. | |
375 | * However, initial input rate may be subject to a burst, and should therefore | |
376 | * initially also adapt more quickly to changes, and only later on give higher | |
377 | * weight to previous values. */ | |
378 | #define AVG_IN(avg,val,w1,w2) ((avg) * (w1) + (val) * (w2)) / ((w1) + (w2)) | |
379 | #define AVG_OUT(avg,val) ((avg) * 3.0 + (val)) / 4.0 | |
380 | ||
381 | static void | |
382 | update_time_level (GstDownloadBuffer * dlbuf) | |
383 | { | |
384 | if (dlbuf->byte_in_rate > 0.0) { | |
385 | dlbuf->cur_level.time = | |
386 | dlbuf->cur_level.bytes / dlbuf->byte_in_rate * GST_SECOND; | |
387 | } | |
388 | GST_DEBUG ("levels: bytes %u/%u, time %" GST_TIME_FORMAT "/%" GST_TIME_FORMAT, | |
389 | dlbuf->cur_level.bytes, dlbuf->max_level.bytes, | |
390 | GST_TIME_ARGS (dlbuf->cur_level.time), | |
391 | GST_TIME_ARGS (dlbuf->max_level.time)); | |
392 | /* update the buffering */ | |
393 | update_buffering (dlbuf); | |
394 | } | |
395 | ||
396 | static void | |
397 | update_levels (GstDownloadBuffer * dlbuf, guint bytes) | |
398 | { | |
399 | dlbuf->cur_level.bytes = bytes; | |
400 | update_time_level (dlbuf); | |
401 | } | |
402 | ||
403 | static void | |
404 | update_in_rates (GstDownloadBuffer * dlbuf) | |
405 | { | |
406 | gdouble elapsed, period; | |
407 | gdouble byte_in_rate; | |
408 | ||
409 | if (!dlbuf->in_timer_started) { | |
410 | dlbuf->in_timer_started = TRUE; | |
411 | g_timer_start (dlbuf->in_timer); | |
412 | return; | |
413 | } | |
414 | ||
415 | elapsed = g_timer_elapsed (dlbuf->in_timer, NULL); | |
416 | ||
417 | /* recalc after each interval. */ | |
418 | if (dlbuf->last_in_elapsed + RATE_INTERVAL < elapsed) { | |
419 | period = elapsed - dlbuf->last_in_elapsed; | |
420 | ||
421 | GST_DEBUG_OBJECT (dlbuf, | |
422 | "rates: period %f, in %" G_GUINT64_FORMAT ", global period %f", | |
423 | period, dlbuf->bytes_in, dlbuf->byte_in_period); | |
424 | ||
425 | byte_in_rate = dlbuf->bytes_in / period; | |
426 | ||
427 | if (dlbuf->byte_in_rate == 0.0) | |
428 | dlbuf->byte_in_rate = byte_in_rate; | |
429 | else | |
430 | dlbuf->byte_in_rate = AVG_IN (dlbuf->byte_in_rate, byte_in_rate, | |
431 | (double) dlbuf->byte_in_period, period); | |
432 | ||
433 | /* another data point, cap at 16 for long time running average */ | |
434 | if (dlbuf->byte_in_period < 16 * RATE_INTERVAL) | |
435 | dlbuf->byte_in_period += period; | |
436 | ||
437 | /* reset the values to calculate rate over the next interval */ | |
438 | dlbuf->last_in_elapsed = elapsed; | |
439 | dlbuf->bytes_in = 0; | |
440 | GST_DEBUG_OBJECT (dlbuf, "rates: in %f", dlbuf->byte_in_rate); | |
441 | } | |
442 | } | |
443 | ||
444 | static void | |
445 | update_out_rates (GstDownloadBuffer * dlbuf) | |
446 | { | |
447 | gdouble elapsed, period; | |
448 | gdouble byte_out_rate; | |
449 | ||
450 | if (!dlbuf->out_timer_started) { | |
451 | dlbuf->out_timer_started = TRUE; | |
452 | g_timer_start (dlbuf->out_timer); | |
453 | return; | |
454 | } | |
455 | ||
456 | elapsed = g_timer_elapsed (dlbuf->out_timer, NULL); | |
457 | ||
458 | /* recalc after each interval. */ | |
459 | if (dlbuf->last_out_elapsed + RATE_INTERVAL < elapsed) { | |
460 | period = elapsed - dlbuf->last_out_elapsed; | |
461 | ||
462 | GST_DEBUG_OBJECT (dlbuf, | |
463 | "rates: period %f, out %" G_GUINT64_FORMAT, period, dlbuf->bytes_out); | |
464 | ||
465 | byte_out_rate = dlbuf->bytes_out / period; | |
466 | ||
467 | if (dlbuf->byte_out_rate == 0.0) | |
468 | dlbuf->byte_out_rate = byte_out_rate; | |
469 | else | |
470 | dlbuf->byte_out_rate = AVG_OUT (dlbuf->byte_out_rate, byte_out_rate); | |
471 | ||
472 | /* reset the values to calculate rate over the next interval */ | |
473 | dlbuf->last_out_elapsed = elapsed; | |
474 | dlbuf->bytes_out = 0; | |
475 | GST_DEBUG_OBJECT (dlbuf, "rates: out %f", dlbuf->byte_out_rate); | |
476 | } | |
477 | } | |
478 | ||
479 | static gboolean | |
480 | get_buffering_percent (GstDownloadBuffer * dlbuf, gboolean * is_buffering, | |
481 | gint * percent) | |
482 | { | |
483 | gint perc; | |
484 | ||
485 | if (dlbuf->high_percent <= 0) { | |
486 | if (percent) | |
487 | *percent = 100; | |
488 | if (is_buffering) | |
489 | *is_buffering = FALSE; | |
490 | return FALSE; | |
491 | } | |
492 | ||
493 | /* Ensure the variables used to calculate buffering state are up-to-date. */ | |
494 | update_in_rates (dlbuf); | |
495 | update_out_rates (dlbuf); | |
496 | ||
497 | /* figure out the percent we are filled, we take the max of all formats. */ | |
498 | if (dlbuf->max_level.bytes > 0) { | |
499 | if (dlbuf->cur_level.bytes >= dlbuf->max_level.bytes) | |
500 | perc = 100; | |
501 | else | |
502 | perc = dlbuf->cur_level.bytes * 100 / dlbuf->max_level.bytes; | |
503 | } else | |
504 | perc = 0; | |
505 | ||
506 | if (dlbuf->max_level.time > 0) { | |
507 | if (dlbuf->cur_level.time >= dlbuf->max_level.time) | |
508 | perc = 100; | |
509 | else | |
510 | perc = MAX (perc, dlbuf->cur_level.time * 100 / dlbuf->max_level.time); | |
511 | } else | |
512 | perc = MAX (0, perc); | |
513 | ||
514 | if (is_buffering) | |
515 | *is_buffering = dlbuf->is_buffering; | |
516 | ||
517 | /* scale to high percent so that it becomes the 100% mark */ | |
518 | perc = perc * 100 / dlbuf->high_percent; | |
519 | /* clip */ | |
520 | if (perc > 100) | |
521 | perc = 100; | |
522 | ||
523 | if (percent) | |
524 | *percent = perc; | |
525 | ||
526 | GST_DEBUG_OBJECT (dlbuf, "buffering %d, percent %d", dlbuf->is_buffering, | |
527 | perc); | |
528 | ||
529 | return TRUE; | |
530 | } | |
531 | ||
532 | static void | |
533 | get_buffering_stats (GstDownloadBuffer * dlbuf, gint percent, | |
534 | GstBufferingMode * mode, gint * avg_in, gint * avg_out, | |
535 | gint64 * buffering_left) | |
536 | { | |
537 | if (mode) | |
538 | *mode = GST_BUFFERING_DOWNLOAD; | |
539 | ||
540 | if (avg_in) | |
541 | *avg_in = dlbuf->byte_in_rate; | |
542 | if (avg_out) | |
543 | *avg_out = dlbuf->byte_out_rate; | |
544 | ||
545 | if (buffering_left) { | |
546 | guint64 max, cur; | |
547 | ||
548 | *buffering_left = (percent == 100 ? 0 : -1); | |
549 | ||
550 | max = dlbuf->max_level.time; | |
551 | cur = dlbuf->cur_level.time; | |
552 | ||
553 | if (percent != 100 && max > cur) | |
554 | *buffering_left = (max - cur) / 1000000; | |
555 | } | |
556 | } | |
557 | ||
558 | static void | |
559 | update_buffering (GstDownloadBuffer * dlbuf) | |
560 | { | |
561 | gint percent; | |
562 | gboolean post = FALSE; | |
563 | ||
564 | if (!get_buffering_percent (dlbuf, NULL, &percent)) | |
565 | return; | |
566 | ||
567 | if (dlbuf->is_buffering) { | |
568 | post = TRUE; | |
569 | /* if we were buffering see if we reached the high watermark */ | |
570 | if (percent >= dlbuf->high_percent) | |
571 | dlbuf->is_buffering = FALSE; | |
572 | } else { | |
573 | /* we were not buffering, check if we need to start buffering if we drop | |
574 | * below the low threshold */ | |
575 | if (percent < dlbuf->low_percent) { | |
576 | dlbuf->is_buffering = TRUE; | |
577 | post = TRUE; | |
578 | } | |
579 | } | |
580 | ||
581 | if (post) { | |
582 | if (percent == dlbuf->buffering_percent) | |
583 | post = FALSE; | |
584 | else | |
585 | dlbuf->buffering_percent = percent; | |
586 | } | |
587 | ||
588 | if (post) { | |
589 | GstMessage *message; | |
590 | GstBufferingMode mode; | |
591 | gint avg_in, avg_out; | |
592 | gint64 buffering_left; | |
593 | ||
594 | get_buffering_stats (dlbuf, percent, &mode, &avg_in, &avg_out, | |
595 | &buffering_left); | |
596 | ||
597 | message = gst_message_new_buffering (GST_OBJECT_CAST (dlbuf), | |
598 | (gint) percent); | |
599 | gst_message_set_buffering_stats (message, mode, | |
600 | avg_in, avg_out, buffering_left); | |
601 | ||
602 | gst_element_post_message (GST_ELEMENT_CAST (dlbuf), message); | |
603 | } | |
604 | } | |
605 | ||
606 | static gboolean | |
607 | perform_seek_to_offset (GstDownloadBuffer * dlbuf, guint64 offset) | |
608 | { | |
609 | GstEvent *event; | |
610 | gboolean res; | |
611 | ||
612 | if (dlbuf->seeking) | |
613 | return TRUE; | |
614 | ||
615 | /* until we receive the FLUSH_STOP from this seek, we skip data */ | |
616 | dlbuf->seeking = TRUE; | |
617 | dlbuf->write_pos = offset; | |
618 | dlbuf->filling = FALSE; | |
619 | GST_DOWNLOAD_BUFFER_MUTEX_UNLOCK (dlbuf); | |
620 | ||
621 | GST_DEBUG_OBJECT (dlbuf, "Seeking to %" G_GUINT64_FORMAT, offset); | |
622 | ||
623 | event = | |
624 | gst_event_new_seek (1.0, GST_FORMAT_BYTES, | |
625 | GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE, GST_SEEK_TYPE_SET, offset, | |
626 | GST_SEEK_TYPE_NONE, -1); | |
627 | ||
628 | res = gst_pad_push_event (dlbuf->sinkpad, event); | |
629 | GST_DOWNLOAD_BUFFER_MUTEX_LOCK (dlbuf); | |
630 | ||
631 | return res; | |
632 | } | |
633 | ||
634 | /* get the threshold for when we decide to seek rather than wait */ | |
635 | static guint64 | |
636 | get_seek_threshold (GstDownloadBuffer * dlbuf) | |
637 | { | |
638 | guint64 threshold; | |
639 | ||
640 | /* FIXME, find a good threshold based on the incoming rate. */ | |
641 | threshold = 1024 * 512; | |
642 | ||
643 | return threshold; | |
644 | } | |
645 | ||
646 | static void | |
647 | gst_download_buffer_update_upstream_size (GstDownloadBuffer * dlbuf) | |
648 | { | |
649 | gint64 upstream_size = 0; | |
650 | ||
651 | if (gst_pad_peer_query_duration (dlbuf->sinkpad, GST_FORMAT_BYTES, | |
652 | &upstream_size)) { | |
653 | GST_INFO_OBJECT (dlbuf, "upstream size: %" G_GINT64_FORMAT, upstream_size); | |
654 | dlbuf->upstream_size = upstream_size; | |
655 | } | |
656 | } | |
657 | ||
658 | /* called with DOWNLOAD_BUFFER_MUTEX */ | |
659 | static GstFlowReturn | |
660 | gst_download_buffer_wait_for_data (GstDownloadBuffer * dlbuf, guint64 offset, | |
661 | guint length) | |
662 | { | |
663 | gsize start, stop; | |
664 | guint64 wanted; | |
665 | gboolean started; | |
666 | ||
667 | GST_DEBUG_OBJECT (dlbuf, "wait for %" G_GUINT64_FORMAT ", length %u", | |
668 | offset, length); | |
669 | ||
670 | wanted = offset + length; | |
671 | ||
672 | /* pause the timer while we wait. The fact that we are waiting does not mean | |
673 | * the byterate on the output pad is lower */ | |
674 | if ((started = dlbuf->out_timer_started)) | |
675 | g_timer_stop (dlbuf->out_timer); | |
676 | ||
677 | /* check range before us */ | |
678 | if (gst_sparse_file_get_range_before (dlbuf->file, offset, &start, &stop)) { | |
679 | GST_DEBUG_OBJECT (dlbuf, | |
680 | "range before %" G_GSIZE_FORMAT " - %" G_GSIZE_FORMAT, start, stop); | |
681 | if (start <= offset && offset < stop) { | |
682 | GST_DEBUG_OBJECT (dlbuf, "we have the offset"); | |
683 | /* we have the range, continue it */ | |
684 | offset = stop; | |
685 | } else { | |
686 | guint64 threshold, dist; | |
687 | ||
688 | /* there is a range before us, check how far away it is */ | |
689 | threshold = get_seek_threshold (dlbuf); | |
690 | dist = offset - stop; | |
691 | ||
692 | if (dist <= threshold) { | |
693 | GST_DEBUG_OBJECT (dlbuf, "not too far"); | |
694 | /* not far away, continue it */ | |
695 | offset = stop; | |
696 | } | |
697 | } | |
698 | } | |
699 | ||
700 | if (dlbuf->write_pos != offset) | |
701 | perform_seek_to_offset (dlbuf, offset); | |
702 | ||
703 | dlbuf->filling = TRUE; | |
704 | if (dlbuf->write_pos > dlbuf->read_pos) | |
705 | update_levels (dlbuf, dlbuf->write_pos - dlbuf->read_pos); | |
706 | else | |
707 | update_levels (dlbuf, 0); | |
708 | ||
709 | /* now wait for more data */ | |
710 | GST_DEBUG_OBJECT (dlbuf, "waiting for more data"); | |
711 | GST_DOWNLOAD_BUFFER_WAIT_ADD_CHECK (dlbuf, dlbuf->srcresult, wanted, | |
712 | out_flushing); | |
713 | GST_DEBUG_OBJECT (dlbuf, "got more data"); | |
714 | ||
715 | /* and continue if we were running before */ | |
716 | if (started) | |
717 | g_timer_continue (dlbuf->out_timer); | |
718 | ||
719 | return GST_FLOW_OK; | |
720 | ||
721 | out_flushing: | |
722 | { | |
723 | GST_DEBUG_OBJECT (dlbuf, "we are flushing"); | |
724 | return GST_FLOW_FLUSHING; | |
725 | } | |
726 | } | |
727 | ||
728 | static gboolean | |
729 | check_upstream_size (GstDownloadBuffer * dlbuf, gsize offset, guint * length) | |
730 | { | |
731 | gsize stop = offset + *length; | |
732 | /* catch any reads beyond the size of the file here to make sure cache | |
733 | * doesn't send seek events beyond the size of the file upstream, since | |
734 | * that would confuse elements such as souphttpsrc and/or http servers. | |
735 | * Demuxers often just loop until EOS at the end of the file to figure out | |
736 | * when they've read all the end-headers or index chunks. */ | |
737 | if (G_UNLIKELY (dlbuf->upstream_size == -1 || stop >= dlbuf->upstream_size)) { | |
738 | gst_download_buffer_update_upstream_size (dlbuf); | |
739 | } | |
740 | ||
741 | if (dlbuf->upstream_size != -1) { | |
742 | if (offset >= dlbuf->upstream_size) | |
743 | return FALSE; | |
744 | ||
745 | if (G_UNLIKELY (stop > dlbuf->upstream_size)) { | |
746 | *length = dlbuf->upstream_size - offset; | |
747 | GST_DEBUG_OBJECT (dlbuf, "adjusting length downto %u", *length); | |
748 | } | |
749 | } | |
750 | return TRUE; | |
751 | } | |
752 | ||
753 | /* called with DOWNLOAD_BUFFER_MUTEX */ | |
754 | static GstFlowReturn | |
755 | gst_download_buffer_read_buffer (GstDownloadBuffer * dlbuf, guint64 offset, | |
756 | guint length, GstBuffer ** buffer) | |
757 | { | |
758 | GstBuffer *buf; | |
759 | GstMapInfo info; | |
760 | GstFlowReturn ret = GST_FLOW_OK; | |
761 | gsize res, remaining; | |
762 | GError *error = NULL; | |
763 | ||
764 | length = (length == -1) ? DEFAULT_BUFFER_SIZE : length; | |
765 | offset = (offset == -1) ? dlbuf->read_pos : offset; | |
766 | ||
767 | if (!check_upstream_size (dlbuf, offset, &length)) | |
768 | goto hit_eos; | |
769 | ||
770 | /* allocate the output buffer of the requested size */ | |
771 | if (*buffer == NULL) | |
772 | buf = gst_buffer_new_allocate (NULL, length, NULL); | |
773 | else | |
774 | buf = *buffer; | |
775 | ||
776 | gst_buffer_map (buf, &info, GST_MAP_WRITE); | |
777 | ||
778 | GST_DEBUG_OBJECT (dlbuf, "Reading %u bytes from %" G_GUINT64_FORMAT, length, | |
779 | offset); | |
780 | ||
781 | dlbuf->read_pos = offset; | |
782 | ||
783 | do { | |
784 | res = | |
785 | gst_sparse_file_read (dlbuf->file, offset, info.data, length, | |
786 | &remaining, &error); | |
787 | if (G_UNLIKELY (res == 0)) { | |
788 | switch (error->code) { | |
789 | case GST_SPARSE_FILE_IO_ERROR_WOULD_BLOCK: | |
790 | /* we don't have the requested data in the file, decide what to | |
791 | * do next. */ | |
792 | ret = gst_download_buffer_wait_for_data (dlbuf, offset, length); | |
793 | if (ret != GST_FLOW_OK) | |
794 | goto out_flushing; | |
795 | break; | |
796 | default: | |
797 | goto read_error; | |
798 | } | |
799 | g_clear_error (&error); | |
800 | } | |
801 | } while (res == 0); | |
802 | ||
803 | gst_buffer_unmap (buf, &info); | |
804 | gst_buffer_resize (buf, 0, res); | |
805 | ||
806 | dlbuf->bytes_out += res; | |
807 | dlbuf->read_pos += res; | |
808 | ||
809 | GST_DEBUG_OBJECT (dlbuf, | |
810 | "Read %" G_GSIZE_FORMAT " bytes, remaining %" G_GSIZE_FORMAT, res, | |
811 | remaining); | |
812 | ||
813 | if (dlbuf->read_pos + remaining == dlbuf->upstream_size) | |
814 | update_levels (dlbuf, dlbuf->max_level.bytes); | |
815 | else | |
816 | update_levels (dlbuf, remaining); | |
817 | ||
818 | GST_BUFFER_OFFSET (buf) = offset; | |
819 | GST_BUFFER_OFFSET_END (buf) = offset + res; | |
820 | ||
821 | *buffer = buf; | |
822 | ||
823 | return ret; | |
824 | ||
825 | /* ERRORS */ | |
826 | hit_eos: | |
827 | { | |
828 | GST_DEBUG_OBJECT (dlbuf, "EOS hit"); | |
829 | return GST_FLOW_EOS; | |
830 | } | |
831 | out_flushing: | |
832 | { | |
833 | GST_DEBUG_OBJECT (dlbuf, "we are flushing"); | |
834 | gst_buffer_unmap (buf, &info); | |
835 | if (*buffer == NULL) | |
836 | gst_buffer_unref (buf); | |
837 | return GST_FLOW_FLUSHING; | |
838 | } | |
839 | read_error: | |
840 | { | |
841 | GST_DEBUG_OBJECT (dlbuf, "we have a read error: %s", error->message); | |
842 | g_clear_error (&error); | |
843 | gst_buffer_unmap (buf, &info); | |
844 | if (*buffer == NULL) | |
845 | gst_buffer_unref (buf); | |
846 | return ret; | |
847 | } | |
848 | } | |
849 | ||
850 | /* must be called with MUTEX_LOCK. Will briefly release the lock when notifying | |
851 | * the temp filename. */ | |
852 | static gboolean | |
853 | gst_download_buffer_open_temp_location_file (GstDownloadBuffer * dlbuf) | |
854 | { | |
855 | gint fd = -1; | |
856 | gchar *name = NULL; | |
857 | ||
858 | if (dlbuf->file) | |
859 | goto already_opened; | |
860 | ||
861 | GST_DEBUG_OBJECT (dlbuf, "opening temp file %s", dlbuf->temp_template); | |
862 | ||
863 | /* If temp_template was set, allocate a filename and open that filen */ | |
864 | ||
865 | /* nothing to do */ | |
866 | if (dlbuf->temp_template == NULL) | |
867 | goto no_directory; | |
868 | ||
869 | /* make copy of the template, we don't want to change this */ | |
870 | name = g_strdup (dlbuf->temp_template); | |
871 | fd = g_mkstemp (name); | |
872 | if (fd == -1) | |
873 | goto mkstemp_failed; | |
874 | ||
875 | /* open the file for update/writing */ | |
876 | dlbuf->file = gst_sparse_file_new (); | |
877 | /* error creating file */ | |
878 | if (!gst_sparse_file_set_fd (dlbuf->file, fd)) | |
879 | goto open_failed; | |
880 | ||
881 | g_free (dlbuf->temp_location); | |
882 | dlbuf->temp_location = name; | |
883 | dlbuf->temp_fd = fd; | |
884 | ||
885 | GST_DOWNLOAD_BUFFER_MUTEX_UNLOCK (dlbuf); | |
886 | ||
887 | /* we can't emit the notify with the lock */ | |
888 | g_object_notify (G_OBJECT (dlbuf), "temp-location"); | |
889 | ||
890 | GST_DOWNLOAD_BUFFER_MUTEX_LOCK (dlbuf); | |
891 | ||
892 | GST_DEBUG_OBJECT (dlbuf, "opened temp file %s", dlbuf->temp_template); | |
893 | ||
894 | return TRUE; | |
895 | ||
896 | /* ERRORS */ | |
897 | already_opened: | |
898 | { | |
899 | GST_DEBUG_OBJECT (dlbuf, "temp file was already open"); | |
900 | return TRUE; | |
901 | } | |
902 | no_directory: | |
903 | { | |
904 | GST_ELEMENT_ERROR (dlbuf, RESOURCE, NOT_FOUND, | |
905 | (_("No Temp directory specified.")), (NULL)); | |
906 | return FALSE; | |
907 | } | |
908 | mkstemp_failed: | |
909 | { | |
910 | GST_ELEMENT_ERROR (dlbuf, RESOURCE, OPEN_READ, | |
911 | (_("Could not create temp file \"%s\"."), dlbuf->temp_template), | |
912 | GST_ERROR_SYSTEM); | |
913 | g_free (name); | |
914 | return FALSE; | |
915 | } | |
916 | open_failed: | |
917 | { | |
918 | GST_ELEMENT_ERROR (dlbuf, RESOURCE, OPEN_READ, | |
919 | (_("Could not open file \"%s\" for reading."), name), GST_ERROR_SYSTEM); | |
920 | g_free (name); | |
921 | if (fd != -1) | |
922 | close (fd); | |
923 | return FALSE; | |
924 | } | |
925 | } | |
926 | ||
927 | static void | |
928 | gst_download_buffer_close_temp_location_file (GstDownloadBuffer * dlbuf) | |
929 | { | |
930 | /* nothing to do */ | |
931 | if (dlbuf->file == NULL) | |
932 | return; | |
933 | ||
934 | GST_DEBUG_OBJECT (dlbuf, "closing sparse file"); | |
935 | ||
936 | if (dlbuf->temp_remove) { | |
937 | if (remove (dlbuf->temp_location) < 0) { | |
938 | GST_WARNING_OBJECT (dlbuf, "Failed to remove temporary file %s: %s", | |
939 | dlbuf->temp_location, g_strerror (errno)); | |
940 | } | |
941 | } | |
942 | gst_sparse_file_free (dlbuf->file); | |
943 | close (dlbuf->temp_fd); | |
944 | dlbuf->file = NULL; | |
945 | } | |
946 | ||
947 | static void | |
948 | gst_download_buffer_flush_temp_file (GstDownloadBuffer * dlbuf) | |
949 | { | |
950 | if (dlbuf->file == NULL) | |
951 | return; | |
952 | ||
953 | GST_DEBUG_OBJECT (dlbuf, "flushing temp file"); | |
954 | ||
955 | gst_sparse_file_clear (dlbuf->file); | |
956 | } | |
957 | ||
958 | static void | |
959 | gst_download_buffer_locked_flush (GstDownloadBuffer * dlbuf, gboolean full, | |
960 | gboolean clear_temp) | |
961 | { | |
962 | if (clear_temp) | |
963 | gst_download_buffer_flush_temp_file (dlbuf); | |
964 | GST_DOWNLOAD_BUFFER_CLEAR_LEVEL (dlbuf->cur_level); | |
965 | gst_event_replace (&dlbuf->stream_start_event, NULL); | |
966 | gst_event_replace (&dlbuf->segment_event, NULL); | |
967 | } | |
968 | ||
969 | static gboolean | |
970 | gst_download_buffer_handle_sink_event (GstPad * pad, GstObject * parent, | |
971 | GstEvent * event) | |
972 | { | |
973 | gboolean ret = TRUE; | |
974 | GstDownloadBuffer *dlbuf; | |
975 | ||
976 | dlbuf = GST_DOWNLOAD_BUFFER (parent); | |
977 | ||
978 | switch (GST_EVENT_TYPE (event)) { | |
979 | case GST_EVENT_FLUSH_START: | |
980 | { | |
981 | GST_LOG_OBJECT (dlbuf, "received flush start event"); | |
982 | if (GST_PAD_MODE (dlbuf->srcpad) == GST_PAD_MODE_PUSH) { | |
983 | /* forward event */ | |
984 | ret = gst_pad_push_event (dlbuf->srcpad, event); | |
985 | ||
986 | /* now unblock the chain function */ | |
987 | GST_DOWNLOAD_BUFFER_MUTEX_LOCK (dlbuf); | |
988 | dlbuf->srcresult = GST_FLOW_FLUSHING; | |
989 | dlbuf->sinkresult = GST_FLOW_FLUSHING; | |
990 | /* unblock the loop and chain functions */ | |
991 | GST_DOWNLOAD_BUFFER_SIGNAL_ADD (dlbuf, -1); | |
992 | GST_DOWNLOAD_BUFFER_MUTEX_UNLOCK (dlbuf); | |
993 | ||
994 | /* make sure it pauses, this should happen since we sent | |
995 | * flush_start downstream. */ | |
996 | gst_pad_pause_task (dlbuf->srcpad); | |
997 | GST_LOG_OBJECT (dlbuf, "loop stopped"); | |
998 | } else { | |
999 | GST_DOWNLOAD_BUFFER_MUTEX_LOCK (dlbuf); | |
1000 | /* flush the sink pad */ | |
1001 | dlbuf->sinkresult = GST_FLOW_FLUSHING; | |
1002 | GST_DOWNLOAD_BUFFER_MUTEX_UNLOCK (dlbuf); | |
1003 | ||
1004 | gst_event_unref (event); | |
1005 | } | |
1006 | break; | |
1007 | } | |
1008 | case GST_EVENT_FLUSH_STOP: | |
1009 | { | |
1010 | GST_LOG_OBJECT (dlbuf, "received flush stop event"); | |
1011 | ||
1012 | if (GST_PAD_MODE (dlbuf->srcpad) == GST_PAD_MODE_PUSH) { | |
1013 | /* forward event */ | |
1014 | ret = gst_pad_push_event (dlbuf->srcpad, event); | |
1015 | ||
1016 | GST_DOWNLOAD_BUFFER_MUTEX_LOCK (dlbuf); | |
1017 | gst_download_buffer_locked_flush (dlbuf, FALSE, TRUE); | |
1018 | dlbuf->srcresult = GST_FLOW_OK; | |
1019 | dlbuf->sinkresult = GST_FLOW_OK; | |
1020 | dlbuf->unexpected = FALSE; | |
1021 | dlbuf->seeking = FALSE; | |
1022 | /* reset rate counters */ | |
1023 | reset_rate_timer (dlbuf); | |
1024 | gst_pad_start_task (dlbuf->srcpad, | |
1025 | (GstTaskFunction) gst_download_buffer_loop, dlbuf->srcpad, NULL); | |
1026 | GST_DOWNLOAD_BUFFER_MUTEX_UNLOCK (dlbuf); | |
1027 | } else { | |
1028 | GST_DOWNLOAD_BUFFER_MUTEX_LOCK (dlbuf); | |
1029 | dlbuf->unexpected = FALSE; | |
1030 | dlbuf->sinkresult = GST_FLOW_OK; | |
1031 | dlbuf->seeking = FALSE; | |
1032 | GST_DOWNLOAD_BUFFER_MUTEX_UNLOCK (dlbuf); | |
1033 | ||
1034 | gst_event_unref (event); | |
1035 | } | |
1036 | break; | |
1037 | } | |
1038 | default: | |
1039 | if (GST_EVENT_IS_SERIALIZED (event)) { | |
1040 | /* serialized events go in the buffer */ | |
1041 | GST_DOWNLOAD_BUFFER_MUTEX_LOCK_CHECK (dlbuf, dlbuf->sinkresult, | |
1042 | out_flushing); | |
1043 | switch (GST_EVENT_TYPE (event)) { | |
1044 | case GST_EVENT_EOS: | |
1045 | GST_DEBUG_OBJECT (dlbuf, "we have EOS"); | |
1046 | /* Zero the thresholds, this makes sure the dlbuf is completely | |
1047 | * filled and we can read all data from the dlbuf. */ | |
1048 | /* update the buffering status */ | |
1049 | update_levels (dlbuf, dlbuf->max_level.bytes); | |
1050 | /* wakeup the waiter and let it recheck */ | |
1051 | GST_DOWNLOAD_BUFFER_SIGNAL_ADD (dlbuf, -1); | |
1052 | break; | |
1053 | case GST_EVENT_SEGMENT: | |
1054 | gst_event_replace (&dlbuf->segment_event, event); | |
1055 | /* a new segment allows us to accept more buffers if we got EOS | |
1056 | * from downstream */ | |
1057 | dlbuf->unexpected = FALSE; | |
1058 | break; | |
1059 | case GST_EVENT_STREAM_START: | |
1060 | gst_event_replace (&dlbuf->stream_start_event, event); | |
1061 | break; | |
1062 | default: | |
1063 | break; | |
1064 | } | |
1065 | gst_event_unref (event); | |
1066 | GST_DOWNLOAD_BUFFER_MUTEX_UNLOCK (dlbuf); | |
1067 | } else { | |
1068 | /* non-serialized events are passed upstream. */ | |
1069 | ret = gst_pad_push_event (dlbuf->srcpad, event); | |
1070 | } | |
1071 | break; | |
1072 | } | |
1073 | return ret; | |
1074 | ||
1075 | /* ERRORS */ | |
1076 | out_flushing: | |
1077 | { | |
1078 | GST_DEBUG_OBJECT (dlbuf, "refusing event, we are flushing"); | |
1079 | GST_DOWNLOAD_BUFFER_MUTEX_UNLOCK (dlbuf); | |
1080 | gst_event_unref (event); | |
1081 | return FALSE; | |
1082 | } | |
1083 | } | |
1084 | ||
1085 | static gboolean | |
1086 | gst_download_buffer_handle_sink_query (GstPad * pad, GstObject * parent, | |
1087 | GstQuery * query) | |
1088 | { | |
1089 | GstDownloadBuffer *dlbuf; | |
1090 | gboolean res; | |
1091 | ||
1092 | dlbuf = GST_DOWNLOAD_BUFFER (parent); | |
1093 | ||
1094 | switch (GST_QUERY_TYPE (query)) { | |
1095 | default: | |
1096 | if (GST_QUERY_IS_SERIALIZED (query)) { | |
1097 | GST_LOG_OBJECT (dlbuf, "received query %p", query); | |
1098 | GST_DEBUG_OBJECT (dlbuf, "refusing query, we are not using the dlbuf"); | |
1099 | res = FALSE; | |
1100 | } else { | |
1101 | res = gst_pad_query_default (pad, parent, query); | |
1102 | } | |
1103 | break; | |
1104 | } | |
1105 | return res; | |
1106 | } | |
1107 | ||
1108 | static GstFlowReturn | |
1109 | gst_download_buffer_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) | |
1110 | { | |
1111 | GstDownloadBuffer *dlbuf; | |
1112 | GstMapInfo info; | |
1113 | guint64 offset; | |
1114 | gsize res, available; | |
1115 | GError *error = NULL; | |
1116 | ||
1117 | dlbuf = GST_DOWNLOAD_BUFFER (parent); | |
1118 | ||
1119 | GST_LOG_OBJECT (dlbuf, "received buffer %p of " | |
1120 | "size %" G_GSIZE_FORMAT ", time %" GST_TIME_FORMAT ", duration %" | |
1121 | GST_TIME_FORMAT, buffer, gst_buffer_get_size (buffer), | |
1122 | GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer)), | |
1123 | GST_TIME_ARGS (GST_BUFFER_DURATION (buffer))); | |
1124 | ||
1125 | /* we have to lock the dlbuf since we span threads */ | |
1126 | GST_DOWNLOAD_BUFFER_MUTEX_LOCK_CHECK (dlbuf, dlbuf->sinkresult, out_flushing); | |
1127 | /* when we received unexpected from downstream, refuse more buffers */ | |
1128 | if (dlbuf->unexpected) | |
1129 | goto out_eos; | |
1130 | ||
1131 | /* while we didn't receive the newsegment, we're seeking and we skip data */ | |
1132 | if (dlbuf->seeking) | |
1133 | goto out_seeking; | |
1134 | ||
1135 | /* put buffer in dlbuf now */ | |
1136 | offset = dlbuf->write_pos; | |
1137 | ||
1138 | /* sanity check */ | |
1139 | if (GST_BUFFER_OFFSET_IS_VALID (buffer) && | |
1140 | GST_BUFFER_OFFSET (buffer) != offset) { | |
1141 | GST_WARNING_OBJECT (dlbuf, "buffer offset does not match current writing " | |
1142 | "position! %" G_GINT64_FORMAT " != %" G_GINT64_FORMAT, | |
1143 | GST_BUFFER_OFFSET (buffer), offset); | |
1144 | } | |
1145 | ||
1146 | gst_buffer_map (buffer, &info, GST_MAP_READ); | |
1147 | ||
1148 | GST_DEBUG_OBJECT (dlbuf, "Writing %" G_GSIZE_FORMAT " bytes to %" | |
1149 | G_GUINT64_FORMAT, info.size, offset); | |
1150 | ||
1151 | res = | |
1152 | gst_sparse_file_write (dlbuf->file, offset, info.data, info.size, | |
1153 | &available, &error); | |
1154 | if (res == 0) | |
1155 | goto write_error; | |
1156 | ||
1157 | gst_buffer_unmap (buffer, &info); | |
1158 | gst_buffer_unref (buffer); | |
1159 | ||
1160 | dlbuf->write_pos = offset + info.size; | |
1161 | dlbuf->bytes_in += info.size; | |
1162 | ||
1163 | GST_DOWNLOAD_BUFFER_SIGNAL_ADD (dlbuf, dlbuf->write_pos + available); | |
1164 | ||
1165 | /* we hit the end, see what to do */ | |
1166 | if (dlbuf->write_pos + available == dlbuf->upstream_size) { | |
1167 | gsize start, stop; | |
1168 | ||
1169 | /* we have everything up to the end, find a region to fill */ | |
1170 | if (gst_sparse_file_get_range_after (dlbuf->file, 0, &start, &stop)) { | |
1171 | if (stop < dlbuf->upstream_size) { | |
1172 | /* a hole to fill, seek to its end */ | |
1173 | perform_seek_to_offset (dlbuf, stop); | |
1174 | } else { | |
1175 | /* we filled all the holes, we are done */ | |
1176 | goto completed; | |
1177 | } | |
1178 | } | |
1179 | } else { | |
1180 | /* see if we need to skip this region or just read it again. The idea | |
1181 | * is that when the region is not big, we want to avoid a seek and just | |
1182 | * let it reread */ | |
1183 | guint64 threshold = get_seek_threshold (dlbuf); | |
1184 | ||
1185 | if (available > threshold) { | |
1186 | /* further than threshold, it's better to skip than to reread */ | |
1187 | perform_seek_to_offset (dlbuf, dlbuf->write_pos + available); | |
1188 | } | |
1189 | } | |
1190 | if (dlbuf->filling) { | |
1191 | if (dlbuf->write_pos > dlbuf->read_pos) | |
1192 | update_levels (dlbuf, dlbuf->write_pos - dlbuf->read_pos); | |
1193 | else | |
1194 | update_levels (dlbuf, 0); | |
1195 | } | |
1196 | ||
1197 | GST_DOWNLOAD_BUFFER_MUTEX_UNLOCK (dlbuf); | |
1198 | ||
1199 | return GST_FLOW_OK; | |
1200 | ||
1201 | /* ERRORS */ | |
1202 | out_flushing: | |
1203 | { | |
1204 | GstFlowReturn ret = dlbuf->sinkresult; | |
1205 | GST_LOG_OBJECT (dlbuf, | |
1206 | "exit because task paused, reason: %s", gst_flow_get_name (ret)); | |
1207 | GST_DOWNLOAD_BUFFER_MUTEX_UNLOCK (dlbuf); | |
1208 | gst_buffer_unref (buffer); | |
1209 | return ret; | |
1210 | } | |
1211 | out_eos: | |
1212 | { | |
1213 | GST_LOG_OBJECT (dlbuf, "exit because we received EOS"); | |
1214 | GST_DOWNLOAD_BUFFER_MUTEX_UNLOCK (dlbuf); | |
1215 | gst_buffer_unref (buffer); | |
1216 | return GST_FLOW_EOS; | |
1217 | } | |
1218 | out_seeking: | |
1219 | { | |
1220 | GST_LOG_OBJECT (dlbuf, "exit because we are seeking"); | |
1221 | GST_DOWNLOAD_BUFFER_MUTEX_UNLOCK (dlbuf); | |
1222 | gst_buffer_unref (buffer); | |
1223 | return GST_FLOW_OK; | |
1224 | } | |
1225 | write_error: | |
1226 | { | |
1227 | gst_buffer_unmap (buffer, &info); | |
1228 | gst_buffer_unref (buffer); | |
1229 | GST_ELEMENT_ERROR (dlbuf, RESOURCE, WRITE, | |
1230 | (_("Error while writing to download file.")), ("%s", error->message)); | |
1231 | g_clear_error (&error); | |
1232 | return GST_FLOW_ERROR; | |
1233 | } | |
1234 | completed: | |
1235 | { | |
1236 | GST_LOG_OBJECT (dlbuf, "we completed the download"); | |
1237 | dlbuf->write_pos = dlbuf->upstream_size; | |
1238 | dlbuf->filling = FALSE; | |
1239 | update_levels (dlbuf, dlbuf->max_level.bytes); | |
1240 | gst_element_post_message (GST_ELEMENT_CAST (dlbuf), | |
1241 | gst_message_new_element (GST_OBJECT_CAST (dlbuf), | |
1242 | gst_structure_new ("GstCacheDownloadComplete", | |
1243 | "location", G_TYPE_STRING, dlbuf->temp_location, NULL))); | |
1244 | GST_DOWNLOAD_BUFFER_MUTEX_UNLOCK (dlbuf); | |
1245 | ||
1246 | return GST_FLOW_EOS; | |
1247 | } | |
1248 | } | |
1249 | ||
1250 | /* called repeatedly with @pad as the source pad. This function should push out | |
1251 | * data to the peer element. */ | |
1252 | static void | |
1253 | gst_download_buffer_loop (GstPad * pad) | |
1254 | { | |
1255 | GstDownloadBuffer *dlbuf; | |
1256 | GstFlowReturn ret; | |
1257 | GstBuffer *buffer = NULL; | |
1258 | ||
1259 | dlbuf = GST_DOWNLOAD_BUFFER (GST_PAD_PARENT (pad)); | |
1260 | ||
1261 | /* have to lock for thread-safety */ | |
1262 | GST_DOWNLOAD_BUFFER_MUTEX_LOCK_CHECK (dlbuf, dlbuf->srcresult, out_flushing); | |
1263 | ||
1264 | if (dlbuf->stream_start_event != NULL) { | |
1265 | gst_pad_push_event (dlbuf->srcpad, dlbuf->stream_start_event); | |
1266 | dlbuf->stream_start_event = NULL; | |
1267 | } | |
1268 | if (dlbuf->segment_event != NULL) { | |
1269 | gst_pad_push_event (dlbuf->srcpad, dlbuf->segment_event); | |
1270 | dlbuf->segment_event = NULL; | |
1271 | } | |
1272 | ||
1273 | ret = gst_download_buffer_read_buffer (dlbuf, -1, -1, &buffer); | |
1274 | if (ret != GST_FLOW_OK) | |
1275 | goto out_flushing; | |
1276 | ||
1277 | g_atomic_int_set (&dlbuf->downstream_may_block, 1); | |
1278 | GST_DOWNLOAD_BUFFER_MUTEX_UNLOCK (dlbuf); | |
1279 | ||
1280 | ret = gst_pad_push (dlbuf->srcpad, buffer); | |
1281 | g_atomic_int_set (&dlbuf->downstream_may_block, 0); | |
1282 | ||
1283 | /* need to check for srcresult here as well */ | |
1284 | GST_DOWNLOAD_BUFFER_MUTEX_LOCK_CHECK (dlbuf, dlbuf->srcresult, out_flushing); | |
1285 | dlbuf->srcresult = ret; | |
1286 | dlbuf->sinkresult = ret; | |
1287 | if (ret != GST_FLOW_OK) | |
1288 | goto out_flushing; | |
1289 | GST_DOWNLOAD_BUFFER_MUTEX_UNLOCK (dlbuf); | |
1290 | ||
1291 | return; | |
1292 | ||
1293 | /* ERRORS */ | |
1294 | out_flushing: | |
1295 | { | |
1296 | GstFlowReturn ret = dlbuf->srcresult; | |
1297 | ||
1298 | gst_pad_pause_task (dlbuf->srcpad); | |
1299 | GST_DOWNLOAD_BUFFER_MUTEX_UNLOCK (dlbuf); | |
1300 | GST_LOG_OBJECT (dlbuf, "pause task, reason: %s", gst_flow_get_name (ret)); | |
1301 | /* let app know about us giving up if upstream is not expected to do so */ | |
1302 | if (ret == GST_FLOW_EOS) { | |
1303 | /* FIXME perform EOS logic, this is really a basesrc operating on a | |
1304 | * file. */ | |
1305 | gst_pad_push_event (dlbuf->srcpad, gst_event_new_eos ()); | |
1306 | } else if ((ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_EOS)) { | |
1307 | GST_ELEMENT_ERROR (dlbuf, STREAM, FAILED, | |
1308 | (_("Internal data flow error.")), | |
1309 | ("streaming task paused, reason %s (%d)", | |
1310 | gst_flow_get_name (ret), ret)); | |
1311 | gst_pad_push_event (dlbuf->srcpad, gst_event_new_eos ()); | |
1312 | } | |
1313 | return; | |
1314 | } | |
1315 | } | |
1316 | ||
1317 | static gboolean | |
1318 | gst_download_buffer_handle_src_event (GstPad * pad, GstObject * parent, | |
1319 | GstEvent * event) | |
1320 | { | |
1321 | gboolean res = TRUE; | |
1322 | GstDownloadBuffer *dlbuf = GST_DOWNLOAD_BUFFER (parent); | |
1323 | ||
1324 | #ifndef GST_DISABLE_GST_DEBUG | |
1325 | GST_DEBUG_OBJECT (dlbuf, "got event %p (%s)", | |
1326 | event, GST_EVENT_TYPE_NAME (event)); | |
1327 | #endif | |
1328 | ||
1329 | switch (GST_EVENT_TYPE (event)) { | |
1330 | case GST_EVENT_FLUSH_START: | |
1331 | /* now unblock the getrange function */ | |
1332 | GST_DOWNLOAD_BUFFER_MUTEX_LOCK (dlbuf); | |
1333 | GST_DEBUG_OBJECT (dlbuf, "flushing"); | |
1334 | dlbuf->srcresult = GST_FLOW_FLUSHING; | |
1335 | GST_DOWNLOAD_BUFFER_SIGNAL_ADD (dlbuf, -1); | |
1336 | GST_DOWNLOAD_BUFFER_MUTEX_UNLOCK (dlbuf); | |
1337 | ||
1338 | /* when using a temp file, we eat the event */ | |
1339 | res = TRUE; | |
1340 | gst_event_unref (event); | |
1341 | break; | |
1342 | case GST_EVENT_FLUSH_STOP: | |
1343 | /* now unblock the getrange function */ | |
1344 | GST_DOWNLOAD_BUFFER_MUTEX_LOCK (dlbuf); | |
1345 | dlbuf->srcresult = GST_FLOW_OK; | |
1346 | GST_DOWNLOAD_BUFFER_MUTEX_UNLOCK (dlbuf); | |
1347 | ||
1348 | /* when using a temp file, we eat the event */ | |
1349 | res = TRUE; | |
1350 | gst_event_unref (event); | |
1351 | break; | |
1352 | case GST_EVENT_RECONFIGURE: | |
1353 | GST_DOWNLOAD_BUFFER_MUTEX_LOCK (dlbuf); | |
1354 | /* assume downstream is linked now and try to push again */ | |
1355 | if (dlbuf->srcresult == GST_FLOW_NOT_LINKED) { | |
1356 | dlbuf->srcresult = GST_FLOW_OK; | |
1357 | dlbuf->sinkresult = GST_FLOW_OK; | |
1358 | if (GST_PAD_MODE (pad) == GST_PAD_MODE_PUSH) { | |
1359 | gst_pad_start_task (pad, (GstTaskFunction) gst_download_buffer_loop, | |
1360 | pad, NULL); | |
1361 | } | |
1362 | } | |
1363 | GST_DOWNLOAD_BUFFER_MUTEX_UNLOCK (dlbuf); | |
1364 | ||
1365 | res = gst_pad_push_event (dlbuf->sinkpad, event); | |
1366 | break; | |
1367 | default: | |
1368 | res = gst_pad_push_event (dlbuf->sinkpad, event); | |
1369 | break; | |
1370 | } | |
1371 | ||
1372 | return res; | |
1373 | } | |
1374 | ||
1375 | static gboolean | |
1376 | gst_download_buffer_handle_src_query (GstPad * pad, GstObject * parent, | |
1377 | GstQuery * query) | |
1378 | { | |
1379 | GstDownloadBuffer *dlbuf; | |
1380 | ||
1381 | dlbuf = GST_DOWNLOAD_BUFFER (parent); | |
1382 | ||
1383 | switch (GST_QUERY_TYPE (query)) { | |
1384 | case GST_QUERY_POSITION: | |
1385 | { | |
1386 | gint64 peer_pos; | |
1387 | GstFormat format; | |
1388 | ||
1389 | if (!gst_pad_peer_query (dlbuf->sinkpad, query)) | |
1390 | goto peer_failed; | |
1391 | ||
1392 | /* get peer position */ | |
1393 | gst_query_parse_position (query, &format, &peer_pos); | |
1394 | ||
1395 | /* FIXME: this code assumes that there's no discont in the dlbuf */ | |
1396 | switch (format) { | |
1397 | case GST_FORMAT_BYTES: | |
1398 | peer_pos -= dlbuf->cur_level.bytes; | |
1399 | break; | |
1400 | case GST_FORMAT_TIME: | |
1401 | peer_pos -= dlbuf->cur_level.time; | |
1402 | break; | |
1403 | default: | |
1404 | GST_WARNING_OBJECT (dlbuf, "dropping query in %s format, don't " | |
1405 | "know how to adjust value", gst_format_get_name (format)); | |
1406 | return FALSE; | |
1407 | } | |
1408 | /* set updated position */ | |
1409 | gst_query_set_position (query, format, peer_pos); | |
1410 | break; | |
1411 | } | |
1412 | case GST_QUERY_DURATION: | |
1413 | { | |
1414 | GST_DEBUG_OBJECT (dlbuf, "doing peer query"); | |
1415 | ||
1416 | if (!gst_pad_peer_query (dlbuf->sinkpad, query)) | |
1417 | goto peer_failed; | |
1418 | ||
1419 | GST_DEBUG_OBJECT (dlbuf, "peer query success"); | |
1420 | break; | |
1421 | } | |
1422 | case GST_QUERY_BUFFERING: | |
1423 | { | |
1424 | gint percent; | |
1425 | gboolean is_buffering; | |
1426 | GstBufferingMode mode; | |
1427 | gint avg_in, avg_out; | |
1428 | gint64 buffering_left; | |
1429 | ||
1430 | GST_DEBUG_OBJECT (dlbuf, "query buffering"); | |
1431 | ||
1432 | get_buffering_percent (dlbuf, &is_buffering, &percent); | |
1433 | gst_query_set_buffering_percent (query, is_buffering, percent); | |
1434 | ||
1435 | get_buffering_stats (dlbuf, percent, &mode, &avg_in, &avg_out, | |
1436 | &buffering_left); | |
1437 | gst_query_set_buffering_stats (query, mode, avg_in, avg_out, | |
1438 | buffering_left); | |
1439 | ||
1440 | { | |
1441 | /* add ranges for download and ringbuffer buffering */ | |
1442 | GstFormat format; | |
1443 | gint64 start, stop; | |
1444 | guint64 write_pos; | |
1445 | gint64 estimated_total; | |
1446 | gint64 duration; | |
1447 | gsize offset, range_start, range_stop; | |
1448 | ||
1449 | write_pos = dlbuf->write_pos; | |
1450 | ||
1451 | /* get duration of upstream in bytes */ | |
1452 | gst_download_buffer_update_upstream_size (dlbuf); | |
1453 | duration = dlbuf->upstream_size; | |
1454 | ||
1455 | GST_DEBUG_OBJECT (dlbuf, "percent %d, duration %" G_GINT64_FORMAT | |
1456 | ", writing %" G_GINT64_FORMAT, percent, duration, write_pos); | |
1457 | ||
1458 | /* calculate remaining and total download time */ | |
1459 | if (duration > write_pos && avg_in > 0.0) | |
1460 | estimated_total = ((duration - write_pos) * 1000) / avg_in; | |
1461 | else | |
1462 | estimated_total = -1; | |
1463 | ||
1464 | GST_DEBUG_OBJECT (dlbuf, "estimated-total %" G_GINT64_FORMAT, | |
1465 | estimated_total); | |
1466 | ||
1467 | gst_query_parse_buffering_range (query, &format, NULL, NULL, NULL); | |
1468 | ||
1469 | switch (format) { | |
1470 | case GST_FORMAT_PERCENT: | |
1471 | start = 0; | |
1472 | /* get our available data relative to the duration */ | |
1473 | if (duration != -1) | |
1474 | stop = | |
1475 | gst_util_uint64_scale (GST_FORMAT_PERCENT_MAX, write_pos, | |
1476 | duration); | |
1477 | else | |
1478 | stop = -1; | |
1479 | break; | |
1480 | case GST_FORMAT_BYTES: | |
1481 | start = 0; | |
1482 | stop = write_pos; | |
1483 | break; | |
1484 | default: | |
1485 | start = -1; | |
1486 | stop = -1; | |
1487 | break; | |
1488 | } | |
1489 | ||
1490 | gst_query_set_buffering_range (query, format, start, stop, | |
1491 | estimated_total); | |
1492 | ||
1493 | /* fill out the buffered ranges */ | |
1494 | offset = 0; | |
1495 | while (gst_sparse_file_get_range_after (dlbuf->file, offset, | |
1496 | &range_start, &range_stop)) { | |
1497 | offset = range_stop; | |
1498 | ||
1499 | switch (format) { | |
1500 | case GST_FORMAT_PERCENT: | |
1501 | if (duration == -1) { | |
1502 | range_start = 0; | |
1503 | range_stop = 0; | |
1504 | } else { | |
1505 | range_start = gst_util_uint64_scale (GST_FORMAT_PERCENT_MAX, | |
1506 | range_start, duration); | |
1507 | range_stop = gst_util_uint64_scale (GST_FORMAT_PERCENT_MAX, | |
1508 | range_stop, duration); | |
1509 | } | |
1510 | break; | |
1511 | case GST_FORMAT_BYTES: | |
1512 | break; | |
1513 | default: | |
1514 | range_start = -1; | |
1515 | range_stop = -1; | |
1516 | break; | |
1517 | } | |
1518 | if (range_start == range_stop) | |
1519 | continue; | |
1520 | GST_DEBUG_OBJECT (dlbuf, | |
1521 | "range starting at %" G_GSIZE_FORMAT " and finishing at %" | |
1522 | G_GSIZE_FORMAT, range_start, range_stop); | |
1523 | gst_query_add_buffering_range (query, range_start, range_stop); | |
1524 | } | |
1525 | } | |
1526 | break; | |
1527 | } | |
1528 | case GST_QUERY_SCHEDULING: | |
1529 | { | |
1530 | GstSchedulingFlags flags = 0; | |
1531 | ||
1532 | if (!gst_pad_peer_query (dlbuf->sinkpad, query)) | |
1533 | goto peer_failed; | |
1534 | ||
1535 | gst_query_parse_scheduling (query, &flags, NULL, NULL, NULL); | |
1536 | ||
1537 | /* we can operate in pull mode when we are using a tempfile */ | |
1538 | flags |= GST_SCHEDULING_FLAG_SEEKABLE; | |
1539 | gst_query_set_scheduling (query, flags, 0, -1, 0); | |
1540 | gst_query_add_scheduling_mode (query, GST_PAD_MODE_PULL); | |
1541 | gst_query_add_scheduling_mode (query, GST_PAD_MODE_PUSH); | |
1542 | break; | |
1543 | } | |
1544 | default: | |
1545 | /* peer handled other queries */ | |
1546 | if (!gst_pad_query_default (pad, parent, query)) | |
1547 | goto peer_failed; | |
1548 | break; | |
1549 | } | |
1550 | ||
1551 | return TRUE; | |
1552 | ||
1553 | /* ERRORS */ | |
1554 | peer_failed: | |
1555 | { | |
1556 | GST_DEBUG_OBJECT (dlbuf, "failed peer query"); | |
1557 | return FALSE; | |
1558 | } | |
1559 | } | |
1560 | ||
1561 | static gboolean | |
1562 | gst_download_buffer_handle_query (GstElement * element, GstQuery * query) | |
1563 | { | |
1564 | GstDownloadBuffer *dlbuf = GST_DOWNLOAD_BUFFER (element); | |
1565 | ||
1566 | /* simply forward to the srcpad query function */ | |
1567 | return gst_download_buffer_handle_src_query (dlbuf->srcpad, | |
1568 | GST_OBJECT_CAST (element), query); | |
1569 | } | |
1570 | ||
1571 | static GstFlowReturn | |
1572 | gst_download_buffer_get_range (GstPad * pad, GstObject * parent, guint64 offset, | |
1573 | guint length, GstBuffer ** buffer) | |
1574 | { | |
1575 | GstDownloadBuffer *dlbuf; | |
1576 | GstFlowReturn ret; | |
1577 | ||
1578 | dlbuf = GST_DOWNLOAD_BUFFER_CAST (parent); | |
1579 | ||
1580 | GST_DOWNLOAD_BUFFER_MUTEX_LOCK_CHECK (dlbuf, dlbuf->srcresult, out_flushing); | |
1581 | /* FIXME - function will block when the range is not yet available */ | |
1582 | ret = gst_download_buffer_read_buffer (dlbuf, offset, length, buffer); | |
1583 | GST_DOWNLOAD_BUFFER_MUTEX_UNLOCK (dlbuf); | |
1584 | ||
1585 | return ret; | |
1586 | ||
1587 | /* ERRORS */ | |
1588 | out_flushing: | |
1589 | { | |
1590 | ret = dlbuf->srcresult; | |
1591 | ||
1592 | GST_DEBUG_OBJECT (dlbuf, "we are flushing"); | |
1593 | GST_DOWNLOAD_BUFFER_MUTEX_UNLOCK (dlbuf); | |
1594 | return ret; | |
1595 | } | |
1596 | } | |
1597 | ||
1598 | /* sink currently only operates in push mode */ | |
1599 | static gboolean | |
1600 | gst_download_buffer_sink_activate_mode (GstPad * pad, GstObject * parent, | |
1601 | GstPadMode mode, gboolean active) | |
1602 | { | |
1603 | gboolean result; | |
1604 | GstDownloadBuffer *dlbuf; | |
1605 | ||
1606 | dlbuf = GST_DOWNLOAD_BUFFER (parent); | |
1607 | ||
1608 | switch (mode) { | |
1609 | case GST_PAD_MODE_PUSH: | |
1610 | if (active) { | |
1611 | GST_DOWNLOAD_BUFFER_MUTEX_LOCK (dlbuf); | |
1612 | GST_DEBUG_OBJECT (dlbuf, "activating push mode"); | |
1613 | dlbuf->srcresult = GST_FLOW_OK; | |
1614 | dlbuf->sinkresult = GST_FLOW_OK; | |
1615 | dlbuf->unexpected = FALSE; | |
1616 | reset_rate_timer (dlbuf); | |
1617 | GST_DOWNLOAD_BUFFER_MUTEX_UNLOCK (dlbuf); | |
1618 | } else { | |
1619 | /* unblock chain function */ | |
1620 | GST_DOWNLOAD_BUFFER_MUTEX_LOCK (dlbuf); | |
1621 | GST_DEBUG_OBJECT (dlbuf, "deactivating push mode"); | |
1622 | dlbuf->srcresult = GST_FLOW_FLUSHING; | |
1623 | dlbuf->sinkresult = GST_FLOW_FLUSHING; | |
1624 | GST_DOWNLOAD_BUFFER_MUTEX_UNLOCK (dlbuf); | |
1625 | ||
1626 | /* wait until it is unblocked and clean up */ | |
1627 | GST_PAD_STREAM_LOCK (pad); | |
1628 | GST_DOWNLOAD_BUFFER_MUTEX_LOCK (dlbuf); | |
1629 | gst_download_buffer_locked_flush (dlbuf, TRUE, FALSE); | |
1630 | GST_DOWNLOAD_BUFFER_MUTEX_UNLOCK (dlbuf); | |
1631 | GST_PAD_STREAM_UNLOCK (pad); | |
1632 | } | |
1633 | result = TRUE; | |
1634 | break; | |
1635 | default: | |
1636 | result = FALSE; | |
1637 | break; | |
1638 | } | |
1639 | return result; | |
1640 | } | |
1641 | ||
1642 | /* src operating in push mode, we start a task on the source pad that pushes out | |
1643 | * buffers from the dlbuf */ | |
1644 | static gboolean | |
1645 | gst_download_buffer_src_activate_push (GstPad * pad, GstObject * parent, | |
1646 | gboolean active) | |
1647 | { | |
1648 | gboolean result = FALSE; | |
1649 | GstDownloadBuffer *dlbuf; | |
1650 | ||
1651 | dlbuf = GST_DOWNLOAD_BUFFER (parent); | |
1652 | ||
1653 | if (active) { | |
1654 | GST_DOWNLOAD_BUFFER_MUTEX_LOCK (dlbuf); | |
1655 | GST_DEBUG_OBJECT (dlbuf, "activating push mode"); | |
1656 | dlbuf->srcresult = GST_FLOW_OK; | |
1657 | dlbuf->sinkresult = GST_FLOW_OK; | |
1658 | dlbuf->unexpected = FALSE; | |
1659 | result = | |
1660 | gst_pad_start_task (pad, (GstTaskFunction) gst_download_buffer_loop, | |
1661 | pad, NULL); | |
1662 | GST_DOWNLOAD_BUFFER_MUTEX_UNLOCK (dlbuf); | |
1663 | } else { | |
1664 | /* unblock loop function */ | |
1665 | GST_DOWNLOAD_BUFFER_MUTEX_LOCK (dlbuf); | |
1666 | GST_DEBUG_OBJECT (dlbuf, "deactivating push mode"); | |
1667 | dlbuf->srcresult = GST_FLOW_FLUSHING; | |
1668 | dlbuf->sinkresult = GST_FLOW_FLUSHING; | |
1669 | /* the item add signal will unblock */ | |
1670 | GST_DOWNLOAD_BUFFER_SIGNAL_ADD (dlbuf, -1); | |
1671 | GST_DOWNLOAD_BUFFER_MUTEX_UNLOCK (dlbuf); | |
1672 | ||
1673 | /* step 2, make sure streaming finishes */ | |
1674 | result = gst_pad_stop_task (pad); | |
1675 | } | |
1676 | ||
1677 | return result; | |
1678 | } | |
1679 | ||
1680 | /* pull mode, downstream will call our getrange function */ | |
1681 | static gboolean | |
1682 | gst_download_buffer_src_activate_pull (GstPad * pad, GstObject * parent, | |
1683 | gboolean active) | |
1684 | { | |
1685 | gboolean result; | |
1686 | GstDownloadBuffer *dlbuf; | |
1687 | ||
1688 | dlbuf = GST_DOWNLOAD_BUFFER (parent); | |
1689 | ||
1690 | if (active) { | |
1691 | GST_DOWNLOAD_BUFFER_MUTEX_LOCK (dlbuf); | |
1692 | /* open the temp file now */ | |
1693 | result = gst_download_buffer_open_temp_location_file (dlbuf); | |
1694 | GST_DEBUG_OBJECT (dlbuf, "activating pull mode"); | |
1695 | dlbuf->srcresult = GST_FLOW_OK; | |
1696 | dlbuf->sinkresult = GST_FLOW_OK; | |
1697 | dlbuf->unexpected = FALSE; | |
1698 | dlbuf->upstream_size = 0; | |
1699 | GST_DOWNLOAD_BUFFER_MUTEX_UNLOCK (dlbuf); | |
1700 | } else { | |
1701 | GST_DOWNLOAD_BUFFER_MUTEX_LOCK (dlbuf); | |
1702 | GST_DEBUG_OBJECT (dlbuf, "deactivating pull mode"); | |
1703 | dlbuf->srcresult = GST_FLOW_FLUSHING; | |
1704 | dlbuf->sinkresult = GST_FLOW_FLUSHING; | |
1705 | /* this will unlock getrange */ | |
1706 | GST_DOWNLOAD_BUFFER_SIGNAL_ADD (dlbuf, -1); | |
1707 | result = TRUE; | |
1708 | GST_DOWNLOAD_BUFFER_MUTEX_UNLOCK (dlbuf); | |
1709 | } | |
1710 | ||
1711 | return result; | |
1712 | } | |
1713 | ||
1714 | static gboolean | |
1715 | gst_download_buffer_src_activate_mode (GstPad * pad, GstObject * parent, | |
1716 | GstPadMode mode, gboolean active) | |
1717 | { | |
1718 | gboolean res; | |
1719 | ||
1720 | switch (mode) { | |
1721 | case GST_PAD_MODE_PULL: | |
1722 | res = gst_download_buffer_src_activate_pull (pad, parent, active); | |
1723 | break; | |
1724 | case GST_PAD_MODE_PUSH: | |
1725 | res = gst_download_buffer_src_activate_push (pad, parent, active); | |
1726 | break; | |
1727 | default: | |
1728 | GST_LOG_OBJECT (pad, "unknown activation mode %d", mode); | |
1729 | res = FALSE; | |
1730 | break; | |
1731 | } | |
1732 | return res; | |
1733 | } | |
1734 | ||
1735 | static GstStateChangeReturn | |
1736 | gst_download_buffer_change_state (GstElement * element, | |
1737 | GstStateChange transition) | |
1738 | { | |
1739 | GstDownloadBuffer *dlbuf; | |
1740 | GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS; | |
1741 | ||
1742 | dlbuf = GST_DOWNLOAD_BUFFER (element); | |
1743 | ||
1744 | switch (transition) { | |
1745 | case GST_STATE_CHANGE_NULL_TO_READY: | |
1746 | break; | |
1747 | case GST_STATE_CHANGE_READY_TO_PAUSED: | |
1748 | GST_DOWNLOAD_BUFFER_MUTEX_LOCK (dlbuf); | |
1749 | if (!gst_download_buffer_open_temp_location_file (dlbuf)) | |
1750 | ret = GST_STATE_CHANGE_FAILURE; | |
1751 | gst_event_replace (&dlbuf->stream_start_event, NULL); | |
1752 | gst_event_replace (&dlbuf->segment_event, NULL); | |
1753 | GST_DOWNLOAD_BUFFER_MUTEX_UNLOCK (dlbuf); | |
1754 | break; | |
1755 | case GST_STATE_CHANGE_PAUSED_TO_PLAYING: | |
1756 | break; | |
1757 | default: | |
1758 | break; | |
1759 | } | |
1760 | ||
1761 | if (ret == GST_STATE_CHANGE_FAILURE) | |
1762 | return ret; | |
1763 | ||
1764 | ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); | |
1765 | ||
1766 | if (ret == GST_STATE_CHANGE_FAILURE) | |
1767 | return ret; | |
1768 | ||
1769 | switch (transition) { | |
1770 | case GST_STATE_CHANGE_PLAYING_TO_PAUSED: | |
1771 | break; | |
1772 | case GST_STATE_CHANGE_PAUSED_TO_READY: | |
1773 | GST_DOWNLOAD_BUFFER_MUTEX_LOCK (dlbuf); | |
1774 | gst_download_buffer_close_temp_location_file (dlbuf); | |
1775 | gst_event_replace (&dlbuf->stream_start_event, NULL); | |
1776 | gst_event_replace (&dlbuf->segment_event, NULL); | |
1777 | GST_DOWNLOAD_BUFFER_MUTEX_UNLOCK (dlbuf); | |
1778 | break; | |
1779 | case GST_STATE_CHANGE_READY_TO_NULL: | |
1780 | break; | |
1781 | default: | |
1782 | break; | |
1783 | } | |
1784 | ||
1785 | return ret; | |
1786 | } | |
1787 | ||
1788 | #define CAPACITY_CHANGE(elem) \ | |
1789 | update_buffering (elem); | |
1790 | ||
1791 | static void | |
1792 | gst_download_buffer_set_temp_template (GstDownloadBuffer * dlbuf, | |
1793 | const gchar * template) | |
1794 | { | |
1795 | GstState state; | |
1796 | ||
1797 | /* the element must be stopped in order to do this */ | |
1798 | GST_OBJECT_LOCK (dlbuf); | |
1799 | state = GST_STATE (dlbuf); | |
1800 | if (state != GST_STATE_READY && state != GST_STATE_NULL) | |
1801 | goto wrong_state; | |
1802 | GST_OBJECT_UNLOCK (dlbuf); | |
1803 | ||
1804 | /* set new location */ | |
1805 | g_free (dlbuf->temp_template); | |
1806 | dlbuf->temp_template = g_strdup (template); | |
1807 | ||
1808 | return; | |
1809 | ||
1810 | /* ERROR */ | |
1811 | wrong_state: | |
1812 | { | |
1813 | GST_WARNING_OBJECT (dlbuf, "setting temp-template property in wrong state"); | |
1814 | GST_OBJECT_UNLOCK (dlbuf); | |
1815 | } | |
1816 | } | |
1817 | ||
1818 | static void | |
1819 | gst_download_buffer_set_property (GObject * object, | |
1820 | guint prop_id, const GValue * value, GParamSpec * pspec) | |
1821 | { | |
1822 | GstDownloadBuffer *dlbuf = GST_DOWNLOAD_BUFFER (object); | |
1823 | ||
1824 | /* someone could change levels here, and since this | |
1825 | * affects the get/put funcs, we need to lock for safety. */ | |
1826 | GST_DOWNLOAD_BUFFER_MUTEX_LOCK (dlbuf); | |
1827 | ||
1828 | switch (prop_id) { | |
1829 | case PROP_MAX_SIZE_BYTES: | |
1830 | dlbuf->max_level.bytes = g_value_get_uint (value); | |
1831 | CAPACITY_CHANGE (dlbuf); | |
1832 | break; | |
1833 | case PROP_MAX_SIZE_TIME: | |
1834 | dlbuf->max_level.time = g_value_get_uint64 (value); | |
1835 | CAPACITY_CHANGE (dlbuf); | |
1836 | break; | |
1837 | case PROP_LOW_PERCENT: | |
1838 | dlbuf->low_percent = g_value_get_int (value); | |
1839 | break; | |
1840 | case PROP_HIGH_PERCENT: | |
1841 | dlbuf->high_percent = g_value_get_int (value); | |
1842 | break; | |
1843 | case PROP_TEMP_TEMPLATE: | |
1844 | gst_download_buffer_set_temp_template (dlbuf, g_value_get_string (value)); | |
1845 | break; | |
1846 | case PROP_TEMP_REMOVE: | |
1847 | dlbuf->temp_remove = g_value_get_boolean (value); | |
1848 | break; | |
1849 | default: | |
1850 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); | |
1851 | break; | |
1852 | } | |
1853 | ||
1854 | GST_DOWNLOAD_BUFFER_MUTEX_UNLOCK (dlbuf); | |
1855 | } | |
1856 | ||
1857 | static void | |
1858 | gst_download_buffer_get_property (GObject * object, | |
1859 | guint prop_id, GValue * value, GParamSpec * pspec) | |
1860 | { | |
1861 | GstDownloadBuffer *dlbuf = GST_DOWNLOAD_BUFFER (object); | |
1862 | ||
1863 | GST_DOWNLOAD_BUFFER_MUTEX_LOCK (dlbuf); | |
1864 | ||
1865 | switch (prop_id) { | |
1866 | case PROP_MAX_SIZE_BYTES: | |
1867 | g_value_set_uint (value, dlbuf->max_level.bytes); | |
1868 | break; | |
1869 | case PROP_MAX_SIZE_TIME: | |
1870 | g_value_set_uint64 (value, dlbuf->max_level.time); | |
1871 | break; | |
1872 | case PROP_LOW_PERCENT: | |
1873 | g_value_set_int (value, dlbuf->low_percent); | |
1874 | break; | |
1875 | case PROP_HIGH_PERCENT: | |
1876 | g_value_set_int (value, dlbuf->high_percent); | |
1877 | break; | |
1878 | case PROP_TEMP_TEMPLATE: | |
1879 | g_value_set_string (value, dlbuf->temp_template); | |
1880 | break; | |
1881 | case PROP_TEMP_LOCATION: | |
1882 | g_value_set_string (value, dlbuf->temp_location); | |
1883 | break; | |
1884 | case PROP_TEMP_REMOVE: | |
1885 | g_value_set_boolean (value, dlbuf->temp_remove); | |
1886 | break; | |
1887 | default: | |
1888 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); | |
1889 | break; | |
1890 | } | |
1891 | ||
1892 | GST_DOWNLOAD_BUFFER_MUTEX_UNLOCK (dlbuf); | |
1893 | } |
0 | /* GStreamer | |
1 | * Copyright (C) 2014 Wim Taymans <wim.taymans@gmail.com> | |
2 | * | |
3 | * gstdownloadbuffer.h: | |
4 | * | |
5 | * This library is free software; you can redistribute it and/or | |
6 | * modify it under the terms of the GNU Library General Public | |
7 | * License as published by the Free Software Foundation; either | |
8 | * version 2 of the License, or (at your option) any later version. | |
9 | * | |
10 | * This library is distributed in the hope that it will be useful, | |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 | * Library General Public License for more details. | |
14 | * | |
15 | * You should have received a copy of the GNU Library General Public | |
16 | * License along with this library; if not, write to the | |
17 | * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, | |
18 | * Boston, MA 02110-1301, USA. | |
19 | */ | |
20 | #ifndef __GST_DOWNLOAD_BUFFER_H__ | |
21 | #define __GST_DOWNLOAD_BUFFER_H__ | |
22 | ||
23 | #include <gst/gst.h> | |
24 | #include <stdio.h> | |
25 | ||
26 | #include "gstsparsefile.h" | |
27 | ||
28 | G_BEGIN_DECLS | |
29 | ||
30 | #define GST_TYPE_DOWNLOAD_BUFFER \ | |
31 | (gst_download_buffer_get_type()) | |
32 | #define GST_DOWNLOAD_BUFFER(obj) \ | |
33 | (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DOWNLOAD_BUFFER,GstDownloadBuffer)) | |
34 | #define GST_DOWNLOAD_BUFFER_CLASS(klass) \ | |
35 | (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DOWNLOAD_BUFFER,GstDownloadBufferClass)) | |
36 | #define GST_IS_DOWNLOAD_BUFFER(obj) \ | |
37 | (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DOWNLOAD_BUFFER)) | |
38 | #define GST_IS_DOWNLOAD_BUFFER_CLASS(klass) \ | |
39 | (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DOWNLOAD_BUFFER)) | |
40 | #define GST_DOWNLOAD_BUFFER_CAST(obj) \ | |
41 | ((GstDownloadBuffer *)(obj)) | |
42 | ||
43 | typedef struct _GstDownloadBuffer GstDownloadBuffer; | |
44 | typedef struct _GstDownloadBufferClass GstDownloadBufferClass; | |
45 | typedef struct _GstDownloadBufferSize GstDownloadBufferSize; | |
46 | ||
47 | /* used to keep track of sizes (current and max) */ | |
48 | struct _GstDownloadBufferSize | |
49 | { | |
50 | guint bytes; | |
51 | guint64 time; | |
52 | }; | |
53 | ||
54 | struct _GstDownloadBuffer | |
55 | { | |
56 | GstElement element; | |
57 | ||
58 | /*< private > */ | |
59 | GstPad *sinkpad; | |
60 | GstPad *srcpad; | |
61 | ||
62 | /* upstream size in bytes (if downstream is operating in pull mode) */ | |
63 | guint64 upstream_size; | |
64 | ||
65 | /* flowreturn when srcpad is paused */ | |
66 | GstFlowReturn srcresult; | |
67 | GstFlowReturn sinkresult; | |
68 | gboolean unexpected; | |
69 | ||
70 | /* the queue of data we're keeping our hands on */ | |
71 | GstSparseFile *file; | |
72 | guint64 write_pos; | |
73 | guint64 read_pos; | |
74 | gboolean filling; | |
75 | ||
76 | GstDownloadBufferSize cur_level; | |
77 | GstDownloadBufferSize max_level; | |
78 | gint low_percent; /* low/high watermarks for buffering */ | |
79 | gint high_percent; | |
80 | ||
81 | /* current buffering state */ | |
82 | gboolean is_buffering; | |
83 | gint buffering_percent; | |
84 | ||
85 | /* for measuring input/output rates */ | |
86 | GTimer *in_timer; | |
87 | gboolean in_timer_started; | |
88 | gdouble last_in_elapsed; | |
89 | guint64 bytes_in; | |
90 | gdouble byte_in_rate; | |
91 | gdouble byte_in_period; | |
92 | ||
93 | GTimer *out_timer; | |
94 | gboolean out_timer_started; | |
95 | gdouble last_out_elapsed; | |
96 | guint64 bytes_out; | |
97 | gdouble byte_out_rate; | |
98 | ||
99 | GMutex qlock; /* lock for queue (vs object lock) */ | |
100 | gboolean waiting_add; | |
101 | GCond item_add; /* signals buffers now available for reading */ | |
102 | guint64 waiting_offset; | |
103 | ||
104 | /* temp location stuff */ | |
105 | gchar *temp_template; | |
106 | gboolean temp_location_set; | |
107 | gchar *temp_location; | |
108 | gboolean temp_remove; | |
109 | gint temp_fd; | |
110 | gboolean seeking; | |
111 | ||
112 | GstEvent *stream_start_event; | |
113 | GstEvent *segment_event; | |
114 | ||
115 | volatile gint downstream_may_block; | |
116 | }; | |
117 | ||
118 | struct _GstDownloadBufferClass | |
119 | { | |
120 | GstElementClass parent_class; | |
121 | }; | |
122 | ||
123 | G_GNUC_INTERNAL GType gst_download_buffer_get_type (void); | |
124 | ||
125 | G_END_DECLS | |
126 | ||
127 | #endif /* __GST_DOWNLOAD_BUFFER_H__ */ |
27 | 27 | #include <gst/gst.h> |
28 | 28 | |
29 | 29 | #include "gstcapsfilter.h" |
30 | #include "gstdownloadbuffer.h" | |
30 | 31 | #include "gstfakesink.h" |
31 | 32 | #include "gstfakesrc.h" |
32 | 33 | #include "gstfdsrc.h" |
49 | 50 | { |
50 | 51 | if (!gst_element_register (plugin, "capsfilter", GST_RANK_NONE, |
51 | 52 | gst_capsfilter_get_type ())) |
53 | return FALSE; | |
54 | if (!gst_element_register (plugin, "downloadbuffer", GST_RANK_NONE, | |
55 | gst_download_buffer_get_type ())) | |
52 | 56 | return FALSE; |
53 | 57 | if (!gst_element_register (plugin, "fakesrc", GST_RANK_NONE, |
54 | 58 | gst_fake_src_get_type ())) |
629 | 629 | * form. Correct this. |
630 | 630 | */ |
631 | 631 | if (location[0] == '\\' && location[1] == '\\' && location[2] == '\\') |
632 | g_memmove (location, location + 1, strlen (location + 1) + 1); | |
632 | memmove (location, location + 1, strlen (location + 1) + 1); | |
633 | 633 | #endif |
634 | 634 | |
635 | 635 | ret = gst_file_src_set_location (src, location); |
37 | 37 | * achieve such a feature it has request sink pads (sink%u) and |
38 | 38 | * 'sometimes' src pads (src%u). |
39 | 39 | * </para><para> |
40 | * When requesting a given sinkpad with gst_element_get_request_pad(), | |
40 | * When requesting a given sinkpad with gst_element_request_pad(), | |
41 | 41 | * the associated srcpad for that stream will be created. |
42 | 42 | * Example: requesting sink1 will generate src1. |
43 | 43 | * </para></listitem> |
0 | /* GStreamer | |
1 | * Copyright (C) 2014 Wim Taymans <wtaymans@redhat.com> | |
2 | * | |
3 | * This library is free software; you can redistribute it and/or | |
4 | * modify it under the terms of the GNU Library General Public | |
5 | * License as published by the Free Software Foundation; either | |
6 | * version 2 of the License, or (at your option) any later version. | |
7 | * | |
8 | * This library is distributed in the hope that it will be useful, | |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
11 | * Library General Public License for more details. | |
12 | * | |
13 | * You should have received a copy of the GNU Library General Public | |
14 | * License along with this library; if not, write to the | |
15 | * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, | |
16 | * Boston, MA 02110-1301, USA. | |
17 | */ | |
18 | ||
19 | #ifdef HAVE_CONFIG_H | |
20 | #include "config.h" | |
21 | #endif | |
22 | ||
23 | #include <gst/gst.h> | |
24 | #include <glib/gstdio.h> | |
25 | ||
26 | #include "gstsparsefile.h" | |
27 | ||
28 | #ifdef G_OS_WIN32 | |
29 | #include <io.h> /* lseek, open, close, read */ | |
30 | #undef lseek | |
31 | #define lseek _lseeki64 | |
32 | #undef off_t | |
33 | #define off_t guint64 | |
34 | #else | |
35 | #include <unistd.h> | |
36 | #endif | |
37 | ||
38 | #ifdef HAVE_FSEEKO | |
39 | #define FSEEK_FILE(file,offset) (fseeko (file, (off_t) offset, SEEK_SET) != 0) | |
40 | #elif defined (G_OS_UNIX) || defined (G_OS_WIN32) | |
41 | #define FSEEK_FILE(file,offset) (lseek (fileno (file), (off_t) offset, SEEK_SET) == (off_t) -1) | |
42 | #else | |
43 | #define FSEEK_FILE(file,offset) (fseek (file, offset, SEEK_SET) != 0) | |
44 | #endif | |
45 | ||
46 | #define GST_SPARSE_FILE_IO_ERROR \ | |
47 | g_quark_from_static_string("gst-sparse-file-io-error-quark") | |
48 | ||
49 | static GstSparseFileIOErrorEnum | |
50 | gst_sparse_file_io_error_from_errno (gint err_no); | |
51 | ||
52 | typedef struct _GstSparseRange GstSparseRange; | |
53 | ||
54 | struct _GstSparseRange | |
55 | { | |
56 | GstSparseRange *next; | |
57 | ||
58 | gsize start; | |
59 | gsize stop; | |
60 | }; | |
61 | ||
62 | #define RANGE_CONTAINS(r,o) ((r)->start <= (o) && (r)->stop > (o)) | |
63 | ||
64 | struct _GstSparseFile | |
65 | { | |
66 | gint fd; | |
67 | FILE *file; | |
68 | gsize current_pos; | |
69 | ||
70 | GstSparseRange *ranges; | |
71 | guint n_ranges; | |
72 | ||
73 | GstSparseRange *write_range; | |
74 | GstSparseRange *read_range; | |
75 | }; | |
76 | ||
77 | static GstSparseRange * | |
78 | get_write_range (GstSparseFile * file, gsize offset) | |
79 | { | |
80 | GstSparseRange *next, *prev, *result = NULL; | |
81 | ||
82 | if (file->write_range && file->write_range->stop == offset) | |
83 | return file->write_range; | |
84 | ||
85 | prev = NULL; | |
86 | next = file->ranges; | |
87 | while (next) { | |
88 | if (next->start > offset) | |
89 | break; | |
90 | ||
91 | if (next->stop >= offset) { | |
92 | result = next; | |
93 | break; | |
94 | } | |
95 | prev = next; | |
96 | next = next->next; | |
97 | } | |
98 | if (result == NULL) { | |
99 | result = g_slice_new0 (GstSparseRange); | |
100 | result->start = offset; | |
101 | result->stop = offset; | |
102 | ||
103 | result->next = next; | |
104 | if (prev) | |
105 | prev->next = result; | |
106 | else | |
107 | file->ranges = result; | |
108 | ||
109 | file->write_range = result; | |
110 | file->read_range = NULL; | |
111 | ||
112 | file->n_ranges++; | |
113 | } | |
114 | return result; | |
115 | } | |
116 | ||
117 | static GstSparseRange * | |
118 | get_read_range (GstSparseFile * file, gsize offset, gsize count) | |
119 | { | |
120 | GstSparseRange *walk, *result = NULL; | |
121 | ||
122 | if (file->read_range && RANGE_CONTAINS (file->read_range, offset)) | |
123 | return file->read_range; | |
124 | ||
125 | for (walk = file->ranges; walk; walk = walk->next) { | |
126 | if (walk->start > offset) | |
127 | break; | |
128 | ||
129 | if (walk->stop >= offset + count) { | |
130 | result = walk; | |
131 | break; | |
132 | } | |
133 | } | |
134 | return result; | |
135 | } | |
136 | ||
137 | /** | |
138 | * gst_sparse_file_new: | |
139 | * | |
140 | * Make a new #GstSparseFile backed by the file represented with @fd. | |
141 | * | |
142 | * Returns: a new #GstSparseFile, gst_sparse_file_free() after usage. | |
143 | * | |
144 | * Since: 1.4 | |
145 | */ | |
146 | GstSparseFile * | |
147 | gst_sparse_file_new (void) | |
148 | { | |
149 | GstSparseFile *result; | |
150 | ||
151 | result = g_slice_new0 (GstSparseFile); | |
152 | result->current_pos = 0; | |
153 | result->ranges = NULL; | |
154 | result->n_ranges = 0; | |
155 | ||
156 | return result; | |
157 | } | |
158 | ||
159 | /** | |
160 | * gst_sparse_file_set_fd: | |
161 | * @file: a #GstSparseFile | |
162 | * @fd: a file descriptor | |
163 | * | |
164 | * Store the data for @file in the file represented with @fd. | |
165 | * | |
166 | * Returns: %TRUE when @fd could be set | |
167 | * | |
168 | * Since: 1.4 | |
169 | */ | |
170 | gboolean | |
171 | gst_sparse_file_set_fd (GstSparseFile * file, gint fd) | |
172 | { | |
173 | g_return_val_if_fail (file != NULL, FALSE); | |
174 | g_return_val_if_fail (fd != 0, FALSE); | |
175 | ||
176 | file->file = fdopen (fd, "wb+"); | |
177 | file->fd = fd; | |
178 | ||
179 | return file->file != NULL; | |
180 | } | |
181 | ||
182 | /** | |
183 | * gst_sparse_file_clear: | |
184 | * @file: a #GstSparseFile | |
185 | * | |
186 | * Clear all the ranges in @file. | |
187 | */ | |
188 | void | |
189 | gst_sparse_file_clear (GstSparseFile * file) | |
190 | { | |
191 | g_return_if_fail (file != NULL); | |
192 | ||
193 | if (file->file) { | |
194 | fclose (file->file); | |
195 | file->file = fdopen (file->fd, "wb+"); | |
196 | } | |
197 | g_slice_free_chain (GstSparseRange, file->ranges, next); | |
198 | file->current_pos = 0; | |
199 | file->ranges = NULL; | |
200 | file->n_ranges = 0; | |
201 | } | |
202 | ||
203 | /** | |
204 | * gst_sparse_file_free: | |
205 | * @file: a #GstSparseFile | |
206 | * | |
207 | * Free the memory used by @file. | |
208 | * | |
209 | * Since: 1.4 | |
210 | */ | |
211 | void | |
212 | gst_sparse_file_free (GstSparseFile * file) | |
213 | { | |
214 | g_return_if_fail (file != NULL); | |
215 | ||
216 | if (file->file) { | |
217 | fflush (file->file); | |
218 | fclose (file->file); | |
219 | } | |
220 | g_slice_free_chain (GstSparseRange, file->ranges, next); | |
221 | g_slice_free (GstSparseFile, file); | |
222 | } | |
223 | ||
224 | /** | |
225 | * gst_sparse_file_write: | |
226 | * @file: a #GstSparseFile | |
227 | * @offset: the offset | |
228 | * @data: the data | |
229 | * @count: amount of bytes | |
230 | * @available: amount of bytes already available | |
231 | * @error: a #GError | |
232 | * | |
233 | * Write @count bytes from @data to @file at @offset. | |
234 | * | |
235 | * If @available is not %NULL, it will be updated with the amount of | |
236 | * data already available after the last written byte. | |
237 | * | |
238 | * Returns: The number of bytes written of 0 on error. | |
239 | * | |
240 | * Since: 1.4 | |
241 | */ | |
242 | gsize | |
243 | gst_sparse_file_write (GstSparseFile * file, gsize offset, gconstpointer data, | |
244 | gsize count, gsize * available, GError ** error) | |
245 | { | |
246 | GstSparseRange *range, *next; | |
247 | gsize stop; | |
248 | ||
249 | g_return_val_if_fail (file != NULL, 0); | |
250 | g_return_val_if_fail (count != 0, 0); | |
251 | ||
252 | if (file->file) { | |
253 | if (file->current_pos != offset) { | |
254 | GST_DEBUG ("seeking to %" G_GSIZE_FORMAT, offset); | |
255 | if (FSEEK_FILE (file->file, offset)) | |
256 | goto error; | |
257 | } | |
258 | if (fwrite (data, count, 1, file->file) != 1) | |
259 | goto error; | |
260 | } | |
261 | ||
262 | file->current_pos = offset + count; | |
263 | ||
264 | /* update the new stop position in the range */ | |
265 | range = get_write_range (file, offset); | |
266 | stop = offset + count; | |
267 | range->stop = MAX (range->stop, stop); | |
268 | ||
269 | /* see if we can merge with next region */ | |
270 | while ((next = range->next)) { | |
271 | if (next->start > range->stop) | |
272 | break; | |
273 | ||
274 | GST_DEBUG ("merging range %" G_GSIZE_FORMAT "-%" G_GSIZE_FORMAT ", next %" | |
275 | G_GSIZE_FORMAT "-%" G_GSIZE_FORMAT, range->start, range->stop, | |
276 | next->start, next->stop); | |
277 | ||
278 | range->stop = MAX (next->stop, range->stop); | |
279 | range->next = next->next; | |
280 | ||
281 | if (file->write_range == next) | |
282 | file->write_range = NULL; | |
283 | if (file->read_range == next) | |
284 | file->read_range = NULL; | |
285 | g_slice_free (GstSparseRange, next); | |
286 | file->n_ranges--; | |
287 | } | |
288 | if (available) | |
289 | *available = range->stop - stop; | |
290 | ||
291 | return count; | |
292 | ||
293 | /* ERRORS */ | |
294 | error: | |
295 | { | |
296 | g_set_error (error, GST_SPARSE_FILE_IO_ERROR, | |
297 | gst_sparse_file_io_error_from_errno (errno), "Error writing file: %s", | |
298 | g_strerror (errno)); | |
299 | return 0; | |
300 | } | |
301 | } | |
302 | ||
303 | /** | |
304 | * gst_sparse_file_read: | |
305 | * @file: a #GstSparseFile | |
306 | * @offset: the offset | |
307 | * @data: the data | |
308 | * @count: amount of bytes | |
309 | * @remaining: amount of bytes remaining | |
310 | * @error: a #GError | |
311 | * | |
312 | * Read @count bytes from @file at @offset into @data. | |
313 | * | |
314 | * On error, @error will be set. If there are no @count bytes available | |
315 | * at @offset, %GST_SPARSE_FILE_IO_ERROR_WOULD_BLOCK is returned. | |
316 | * | |
317 | * @remaining will be set to the amount of bytes remaining in the read | |
318 | * range. | |
319 | * | |
320 | * Returns: The number of bytes read of 0 on error. | |
321 | * | |
322 | * Since: 1.4 | |
323 | */ | |
324 | gsize | |
325 | gst_sparse_file_read (GstSparseFile * file, gsize offset, gpointer data, | |
326 | gsize count, gsize * remaining, GError ** error) | |
327 | { | |
328 | GstSparseRange *range; | |
329 | gsize res = 0; | |
330 | ||
331 | g_return_val_if_fail (file != NULL, 0); | |
332 | g_return_val_if_fail (count != 0, 0); | |
333 | ||
334 | if ((range = get_read_range (file, offset, count)) == NULL) | |
335 | goto no_range; | |
336 | ||
337 | if (file->file) { | |
338 | if (file->current_pos != offset) { | |
339 | GST_DEBUG ("seeking from %" G_GSIZE_FORMAT " to %" G_GSIZE_FORMAT, | |
340 | file->current_pos, offset); | |
341 | if (FSEEK_FILE (file->file, offset)) | |
342 | goto error; | |
343 | } | |
344 | res = fread (data, 1, count, file->file); | |
345 | } | |
346 | ||
347 | file->current_pos = offset + res; | |
348 | ||
349 | if (G_UNLIKELY (res < count)) | |
350 | goto error; | |
351 | ||
352 | if (remaining) | |
353 | *remaining = range->stop - file->current_pos; | |
354 | ||
355 | return count; | |
356 | ||
357 | /* ERRORS */ | |
358 | no_range: | |
359 | { | |
360 | g_set_error_literal (error, GST_SPARSE_FILE_IO_ERROR, | |
361 | GST_SPARSE_FILE_IO_ERROR_WOULD_BLOCK, "Offset not written to file yet"); | |
362 | return 0; | |
363 | } | |
364 | error: | |
365 | { | |
366 | if (ferror (file->file)) { | |
367 | g_set_error (error, GST_SPARSE_FILE_IO_ERROR, | |
368 | gst_sparse_file_io_error_from_errno (errno), "Error reading file: %s", | |
369 | g_strerror (errno)); | |
370 | } else if (feof (file->file)) { | |
371 | return res; | |
372 | } | |
373 | return 0; | |
374 | } | |
375 | } | |
376 | ||
377 | /** | |
378 | * gst_sparse_file_n_ranges: | |
379 | * @file: a #GstSparseFile | |
380 | * | |
381 | * Get the number of ranges that are written in @file. | |
382 | * | |
383 | * Returns: the number of written ranges. | |
384 | * | |
385 | * Since: 1.4 | |
386 | */ | |
387 | guint | |
388 | gst_sparse_file_n_ranges (GstSparseFile * file) | |
389 | { | |
390 | g_return_val_if_fail (file != NULL, 0); | |
391 | ||
392 | return file->n_ranges; | |
393 | } | |
394 | ||
395 | /** | |
396 | * gst_sparse_file_get_range_before: | |
397 | * @file: a #GstSparseFile | |
398 | * @offset: the range offset | |
399 | * @start: result start | |
400 | * @stop: result stop | |
401 | * | |
402 | * Get the start and stop offset of the range containing data before or | |
403 | * including @offset. | |
404 | * | |
405 | * Returns: %TRUE if the range with data before @offset exists. | |
406 | * | |
407 | * Since: 1.4 | |
408 | */ | |
409 | gboolean | |
410 | gst_sparse_file_get_range_before (GstSparseFile * file, gsize offset, | |
411 | gsize * start, gsize * stop) | |
412 | { | |
413 | GstSparseRange *walk, *result = NULL; | |
414 | ||
415 | g_return_val_if_fail (file != NULL, FALSE); | |
416 | ||
417 | for (walk = file->ranges; walk; walk = walk->next) { | |
418 | GST_DEBUG ("start %" G_GSIZE_FORMAT " > %" G_GSIZE_FORMAT, | |
419 | walk->stop, offset); | |
420 | if (walk->start > offset) | |
421 | break; | |
422 | ||
423 | if (walk->start <= offset) | |
424 | result = walk; | |
425 | } | |
426 | ||
427 | if (result) { | |
428 | if (start) | |
429 | *start = result->start; | |
430 | if (stop) | |
431 | *stop = result->stop; | |
432 | } | |
433 | return result != NULL; | |
434 | } | |
435 | ||
436 | /** | |
437 | * gst_sparse_file_get_range_after: | |
438 | * @file: a #GstSparseFile | |
439 | * @offset: the range offset | |
440 | * @start: result start | |
441 | * @stop: result stop | |
442 | * | |
443 | * Get the start and stop offset of the range containing data after or | |
444 | * including @offset. | |
445 | * | |
446 | * Returns: %TRUE if the range with data after @offset exists. | |
447 | * | |
448 | * Since: 1.4 | |
449 | */ | |
450 | gboolean | |
451 | gst_sparse_file_get_range_after (GstSparseFile * file, gsize offset, | |
452 | gsize * start, gsize * stop) | |
453 | { | |
454 | GstSparseRange *walk, *result = NULL; | |
455 | ||
456 | g_return_val_if_fail (file != NULL, FALSE); | |
457 | ||
458 | for (walk = file->ranges; walk; walk = walk->next) { | |
459 | GST_DEBUG ("stop %" G_GSIZE_FORMAT " > %" G_GSIZE_FORMAT, | |
460 | walk->stop, offset); | |
461 | if (walk->stop > offset) { | |
462 | result = walk; | |
463 | break; | |
464 | } | |
465 | } | |
466 | if (result) { | |
467 | if (start) | |
468 | *start = result->start; | |
469 | if (stop) | |
470 | *stop = result->stop; | |
471 | } | |
472 | return result != NULL; | |
473 | } | |
474 | ||
475 | /* we don't want to rely on libgio just for g_io_error_from_errno() */ | |
476 | static GstSparseFileIOErrorEnum | |
477 | gst_sparse_file_io_error_from_errno (gint err_no) | |
478 | { | |
479 | switch (err_no) { | |
480 | #ifdef EEXIST | |
481 | case EEXIST: | |
482 | return GST_SPARSE_FILE_IO_ERROR_EXISTS; | |
483 | break; | |
484 | #endif | |
485 | ||
486 | #ifdef EISDIR | |
487 | case EISDIR: | |
488 | return GST_SPARSE_FILE_IO_ERROR_IS_DIRECTORY; | |
489 | break; | |
490 | #endif | |
491 | ||
492 | #ifdef EACCES | |
493 | case EACCES: | |
494 | return GST_SPARSE_FILE_IO_ERROR_PERMISSION_DENIED; | |
495 | break; | |
496 | #endif | |
497 | ||
498 | #ifdef ENAMETOOLONG | |
499 | case ENAMETOOLONG: | |
500 | return GST_SPARSE_FILE_IO_ERROR_FILENAME_TOO_LONG; | |
501 | break; | |
502 | #endif | |
503 | ||
504 | #ifdef ENOENT | |
505 | case ENOENT: | |
506 | return GST_SPARSE_FILE_IO_ERROR_NOT_FOUND; | |
507 | break; | |
508 | #endif | |
509 | ||
510 | #ifdef ENOTDIR | |
511 | case ENOTDIR: | |
512 | return GST_SPARSE_FILE_IO_ERROR_NOT_DIRECTORY; | |
513 | break; | |
514 | #endif | |
515 | ||
516 | #ifdef EROFS | |
517 | case EROFS: | |
518 | return GST_SPARSE_FILE_IO_ERROR_READ_ONLY; | |
519 | break; | |
520 | #endif | |
521 | ||
522 | #ifdef ELOOP | |
523 | case ELOOP: | |
524 | return GST_SPARSE_FILE_IO_ERROR_TOO_MANY_LINKS; | |
525 | break; | |
526 | #endif | |
527 | ||
528 | #ifdef ENOSPC | |
529 | case ENOSPC: | |
530 | return GST_SPARSE_FILE_IO_ERROR_NO_SPACE; | |
531 | break; | |
532 | #endif | |
533 | ||
534 | #ifdef ENOMEM | |
535 | case ENOMEM: | |
536 | return GST_SPARSE_FILE_IO_ERROR_NO_SPACE; | |
537 | break; | |
538 | #endif | |
539 | ||
540 | #ifdef EINVAL | |
541 | case EINVAL: | |
542 | return GST_SPARSE_FILE_IO_ERROR_INVALID_ARGUMENT; | |
543 | break; | |
544 | #endif | |
545 | ||
546 | #ifdef EPERM | |
547 | case EPERM: | |
548 | return GST_SPARSE_FILE_IO_ERROR_PERMISSION_DENIED; | |
549 | break; | |
550 | #endif | |
551 | ||
552 | #ifdef ECANCELED | |
553 | case ECANCELED: | |
554 | return GST_SPARSE_FILE_IO_ERROR_CANCELLED; | |
555 | break; | |
556 | #endif | |
557 | ||
558 | /* ENOTEMPTY == EEXIST on AIX for backward compatibility reasons */ | |
559 | #if defined (ENOTEMPTY) && (!defined (EEXIST) || (ENOTEMPTY != EEXIST)) | |
560 | case ENOTEMPTY: | |
561 | return GST_SPARSE_FILE_IO_ERROR_NOT_EMPTY; | |
562 | break; | |
563 | #endif | |
564 | ||
565 | #ifdef ENOTSUP | |
566 | case ENOTSUP: | |
567 | return GST_SPARSE_FILE_IO_ERROR_NOT_SUPPORTED; | |
568 | break; | |
569 | #endif | |
570 | ||
571 | /* EOPNOTSUPP == ENOTSUP on Linux, but POSIX considers them distinct */ | |
572 | #if defined (EOPNOTSUPP) && (!defined (ENOTSUP) || (EOPNOTSUPP != ENOTSUP)) | |
573 | case EOPNOTSUPP: | |
574 | return GST_SPARSE_FILE_IO_ERROR_NOT_SUPPORTED; | |
575 | break; | |
576 | #endif | |
577 | ||
578 | #ifdef EPROTONOSUPPORT | |
579 | case EPROTONOSUPPORT: | |
580 | return GST_SPARSE_FILE_IO_ERROR_NOT_SUPPORTED; | |
581 | break; | |
582 | #endif | |
583 | ||
584 | #ifdef ESOCKTNOSUPPORT | |
585 | case ESOCKTNOSUPPORT: | |
586 | return GST_SPARSE_FILE_IO_ERROR_NOT_SUPPORTED; | |
587 | break; | |
588 | #endif | |
589 | ||
590 | #ifdef EPFNOSUPPORT | |
591 | case EPFNOSUPPORT: | |
592 | return GST_SPARSE_FILE_IO_ERROR_NOT_SUPPORTED; | |
593 | break; | |
594 | #endif | |
595 | ||
596 | #ifdef EAFNOSUPPORT | |
597 | case EAFNOSUPPORT: | |
598 | return GST_SPARSE_FILE_IO_ERROR_NOT_SUPPORTED; | |
599 | break; | |
600 | #endif | |
601 | ||
602 | #ifdef ETIMEDOUT | |
603 | case ETIMEDOUT: | |
604 | return GST_SPARSE_FILE_IO_ERROR_TIMED_OUT; | |
605 | break; | |
606 | #endif | |
607 | ||
608 | #ifdef EBUSY | |
609 | case EBUSY: | |
610 | return GST_SPARSE_FILE_IO_ERROR_BUSY; | |
611 | break; | |
612 | #endif | |
613 | ||
614 | #ifdef EWOULDBLOCK | |
615 | case EWOULDBLOCK: | |
616 | return GST_SPARSE_FILE_IO_ERROR_WOULD_BLOCK; | |
617 | break; | |
618 | #endif | |
619 | ||
620 | /* EWOULDBLOCK == EAGAIN on most systems, but POSIX considers them distinct */ | |
621 | #if defined (EAGAIN) && (!defined (EWOULDBLOCK) || (EWOULDBLOCK != EAGAIN)) | |
622 | case EAGAIN: | |
623 | return GST_SPARSE_FILE_IO_ERROR_WOULD_BLOCK; | |
624 | break; | |
625 | #endif | |
626 | ||
627 | #ifdef EMFILE | |
628 | case EMFILE: | |
629 | return GST_SPARSE_FILE_IO_ERROR_TOO_MANY_OPEN_FILES; | |
630 | break; | |
631 | #endif | |
632 | ||
633 | #ifdef EADDRINUSE | |
634 | case EADDRINUSE: | |
635 | return GST_SPARSE_FILE_IO_ERROR_ADDRESS_IN_USE; | |
636 | break; | |
637 | #endif | |
638 | ||
639 | #ifdef EHOSTUNREACH | |
640 | case EHOSTUNREACH: | |
641 | return GST_SPARSE_FILE_IO_ERROR_HOST_UNREACHABLE; | |
642 | break; | |
643 | #endif | |
644 | ||
645 | #ifdef ENETUNREACH | |
646 | case ENETUNREACH: | |
647 | return GST_SPARSE_FILE_IO_ERROR_NETWORK_UNREACHABLE; | |
648 | break; | |
649 | #endif | |
650 | ||
651 | #ifdef ECONNREFUSED | |
652 | case ECONNREFUSED: | |
653 | return GST_SPARSE_FILE_IO_ERROR_CONNECTION_REFUSED; | |
654 | break; | |
655 | #endif | |
656 | ||
657 | #ifdef EPIPE | |
658 | case EPIPE: | |
659 | return GST_SPARSE_FILE_IO_ERROR_BROKEN_PIPE; | |
660 | break; | |
661 | #endif | |
662 | ||
663 | default: | |
664 | return GST_SPARSE_FILE_IO_ERROR_FAILED; | |
665 | break; | |
666 | } | |
667 | } |
0 | /* GStreamer | |
1 | * Copyright (C) 2014 Wim Taymans <wtaymans@redhat.com> | |
2 | * | |
3 | * This library is free software; you can redistribute it and/or | |
4 | * modify it under the terms of the GNU Library General Public | |
5 | * License as published by the Free Software Foundation; either | |
6 | * version 2 of the License, or (at your option) any later version. | |
7 | * | |
8 | * This library is distributed in the hope that it will be useful, | |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
11 | * Library General Public License for more details. | |
12 | * | |
13 | * You should have received a copy of the GNU Library General Public | |
14 | * License along with this library; if not, write to the | |
15 | * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, | |
16 | * Boston, MA 02110-1301, USA. | |
17 | */ | |
18 | ||
19 | #include <glib.h> | |
20 | ||
21 | #ifndef __GST_SPARSE_FILE_H__ | |
22 | #define __GST_SPARSE_FILE_H__ | |
23 | ||
24 | G_BEGIN_DECLS | |
25 | ||
26 | typedef struct _GstSparseFile GstSparseFile; | |
27 | ||
28 | /* NOTE: Remove this before making this public API again! */ | |
29 | typedef enum { | |
30 | GST_SPARSE_FILE_IO_ERROR_FAILED, | |
31 | GST_SPARSE_FILE_IO_ERROR_NOT_FOUND, | |
32 | GST_SPARSE_FILE_IO_ERROR_EXISTS, | |
33 | GST_SPARSE_FILE_IO_ERROR_IS_DIRECTORY, | |
34 | GST_SPARSE_FILE_IO_ERROR_NOT_DIRECTORY, | |
35 | GST_SPARSE_FILE_IO_ERROR_NOT_EMPTY, | |
36 | GST_SPARSE_FILE_IO_ERROR_NOT_REGULAR_FILE, | |
37 | GST_SPARSE_FILE_IO_ERROR_NOT_SYMBOLIC_LINK, | |
38 | GST_SPARSE_FILE_IO_ERROR_NOT_MOUNTABLE_FILE, | |
39 | GST_SPARSE_FILE_IO_ERROR_FILENAME_TOO_LONG, | |
40 | GST_SPARSE_FILE_IO_ERROR_INVALID_FILENAME, | |
41 | GST_SPARSE_FILE_IO_ERROR_TOO_MANY_LINKS, | |
42 | GST_SPARSE_FILE_IO_ERROR_NO_SPACE, | |
43 | GST_SPARSE_FILE_IO_ERROR_INVALID_ARGUMENT, | |
44 | GST_SPARSE_FILE_IO_ERROR_PERMISSION_DENIED, | |
45 | GST_SPARSE_FILE_IO_ERROR_NOT_SUPPORTED, | |
46 | GST_SPARSE_FILE_IO_ERROR_NOT_MOUNTED, | |
47 | GST_SPARSE_FILE_IO_ERROR_ALREADY_MOUNTED, | |
48 | GST_SPARSE_FILE_IO_ERROR_CLOSED, | |
49 | GST_SPARSE_FILE_IO_ERROR_CANCELLED, | |
50 | GST_SPARSE_FILE_IO_ERROR_PENDING, | |
51 | GST_SPARSE_FILE_IO_ERROR_READ_ONLY, | |
52 | GST_SPARSE_FILE_IO_ERROR_CANT_CREATE_BACKUP, | |
53 | GST_SPARSE_FILE_IO_ERROR_WRONG_ETAG, | |
54 | GST_SPARSE_FILE_IO_ERROR_TIMED_OUT, | |
55 | GST_SPARSE_FILE_IO_ERROR_WOULD_RECURSE, | |
56 | GST_SPARSE_FILE_IO_ERROR_BUSY, | |
57 | GST_SPARSE_FILE_IO_ERROR_WOULD_BLOCK, | |
58 | GST_SPARSE_FILE_IO_ERROR_HOST_NOT_FOUND, | |
59 | GST_SPARSE_FILE_IO_ERROR_WOULD_MERGE, | |
60 | GST_SPARSE_FILE_IO_ERROR_FAILED_HANDLED, | |
61 | GST_SPARSE_FILE_IO_ERROR_TOO_MANY_OPEN_FILES, | |
62 | GST_SPARSE_FILE_IO_ERROR_NOT_INITIALIZED, | |
63 | GST_SPARSE_FILE_IO_ERROR_ADDRESS_IN_USE, | |
64 | GST_SPARSE_FILE_IO_ERROR_PARTIAL_INPUT, | |
65 | GST_SPARSE_FILE_IO_ERROR_INVALID_DATA, | |
66 | GST_SPARSE_FILE_IO_ERROR_DBUS_ERROR, | |
67 | GST_SPARSE_FILE_IO_ERROR_HOST_UNREACHABLE, | |
68 | GST_SPARSE_FILE_IO_ERROR_NETWORK_UNREACHABLE, | |
69 | GST_SPARSE_FILE_IO_ERROR_CONNECTION_REFUSED, | |
70 | GST_SPARSE_FILE_IO_ERROR_PROXY_FAILED, | |
71 | GST_SPARSE_FILE_IO_ERROR_PROXY_AUTH_FAILED, | |
72 | GST_SPARSE_FILE_IO_ERROR_PROXY_NEED_AUTH, | |
73 | GST_SPARSE_FILE_IO_ERROR_PROXY_NOT_ALLOWED, | |
74 | GST_SPARSE_FILE_IO_ERROR_BROKEN_PIPE | |
75 | } GstSparseFileIOErrorEnum; | |
76 | ||
77 | GstSparseFile * gst_sparse_file_new (void); | |
78 | void gst_sparse_file_free (GstSparseFile *file); | |
79 | ||
80 | gboolean gst_sparse_file_set_fd (GstSparseFile *file, gint fd); | |
81 | void gst_sparse_file_clear (GstSparseFile *file); | |
82 | ||
83 | gsize gst_sparse_file_write (GstSparseFile *file, | |
84 | gsize offset, | |
85 | gconstpointer data, | |
86 | gsize count, | |
87 | gsize *available, | |
88 | GError **error); | |
89 | ||
90 | gsize gst_sparse_file_read (GstSparseFile *file, | |
91 | gsize offset, | |
92 | gpointer data, | |
93 | gsize count, | |
94 | gsize *remaining, | |
95 | GError **error); | |
96 | ||
97 | guint gst_sparse_file_n_ranges (GstSparseFile *file); | |
98 | ||
99 | gboolean gst_sparse_file_get_range_before (GstSparseFile *file, gsize offset, | |
100 | gsize *start, gsize *stop); | |
101 | ||
102 | gboolean gst_sparse_file_get_range_after (GstSparseFile *file, gsize offset, | |
103 | gsize *start, gsize *stop); | |
104 | ||
105 | G_END_DECLS | |
106 | ||
107 | #endif /* __GST_SPARSE_FILE_H__ */ |
6 | 6 | msgstr "" |
7 | 7 | "Project-Id-Version: gstreamer 0.9.7\n" |
8 | 8 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
9 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
9 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
10 | 10 | "PO-Revision-Date: 2005-12-05 11:45+0200\n" |
11 | 11 | "Last-Translator: Petri Jooste <rkwjpj@puk.ac.za>\n" |
12 | 12 | "Language-Team: Afrikaans <i18n@af.org.za>\n" |
6 | 6 | msgstr "" |
7 | 7 | "Project-Id-Version: gstreamer-0.8.0\n" |
8 | 8 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
9 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
9 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
10 | 10 | "PO-Revision-Date: 2004-03-19 18:40+0200\n" |
11 | 11 | "Last-Translator: Metin Amiroff <metin@karegen.com>\n" |
12 | 12 | "Language-Team: Azerbaijani <translation-team-az@lists.sourceforge.net>\n" |
5 | 5 | msgstr "" |
6 | 6 | "Project-Id-Version: gstreamer 0.9.7\n" |
7 | 7 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
8 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
8 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
9 | 9 | "PO-Revision-Date: 2006-01-18 22:26+0200\n" |
10 | 10 | "Last-Translator: Ales Nyakhaychyk <nab@mail.by>\n" |
11 | 11 | "Language-Team: Belarusian <i18n@mova.org>\n" |
7 | 7 | msgstr "" |
8 | 8 | "Project-Id-Version: gstreamer 0.10.32.2\n" |
9 | 9 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
10 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
10 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
11 | 11 | "PO-Revision-Date: 2011-04-26 22:40+0300\n" |
12 | 12 | "Last-Translator: Alexander Shopov <ash@kambanaria.org>\n" |
13 | 13 | "Language-Team: Bulgarian <dict@fsa-bg.org>\n" |
6 | 6 | msgstr "" |
7 | 7 | "Project-Id-Version: gstreamer 0.10.30.3\n" |
8 | 8 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
9 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
9 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
10 | 10 | "PO-Revision-Date: 2010-11-04 19:41+0100\n" |
11 | 11 | "Last-Translator: Jordi Mallach <jordi@sindominio.net>\n" |
12 | 12 | "Language-Team: Catalan <ca@dodds.net>\n" |
8 | 8 | msgstr "" |
9 | 9 | "Project-Id-Version: gstreamer 1.2.1\n" |
10 | 10 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
11 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
11 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
12 | 12 | "PO-Revision-Date: 2014-03-09 11:07+0100\n" |
13 | 13 | "Last-Translator: Marek Černocký <marek@manet.cz>\n" |
14 | 14 | "Language-Team: Czech <translation-team-cs@lists.sourceforge.net>\n" |
7 | 7 | msgstr "" |
8 | 8 | "Project-Id-Version: gstreamer 1.2.1\n" |
9 | 9 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
10 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
10 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
11 | 11 | "PO-Revision-Date: 2013-12-08 12:41+0100\n" |
12 | 12 | "Last-Translator: Mogens Jaeger <mogensjaeger@gmail.com>\n" |
13 | 13 | "Language-Team: Danish <dansk@dansk-gruppen.dk>\n" |
8 | 8 | msgstr "" |
9 | 9 | "Project-Id-Version: gstreamer 1.2.1\n" |
10 | 10 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
11 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
11 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
12 | 12 | "PO-Revision-Date: 2013-12-16 00:01+0100\n" |
13 | 13 | "Last-Translator: Christian Kirbach <christian.kirbach@gmail.com>\n" |
14 | 14 | "Language-Team: German <translation-team-de@lists.sourceforge.net>\n" |
5 | 5 | msgstr "" |
6 | 6 | "Project-Id-Version: gstreamer-0.10.30.3\n" |
7 | 7 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
8 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
8 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
9 | 9 | "PO-Revision-Date: 2010-11-29 11:14+0200\n" |
10 | 10 | "Last-Translator: Michael Kotsarinis <mk73628@gmail.com>\n" |
11 | 11 | "Language-Team: Greek <team@lists.gnome.gr>\n" |
Binary diff not shown
5 | 5 | msgstr "" |
6 | 6 | "Project-Id-Version: gstreamer 0.8.1\n" |
7 | 7 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
8 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
8 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
9 | 9 | "PO-Revision-Date: 2004-04-26 10:36-0400\n" |
10 | 10 | "Last-Translator: Gareth Owen <gowen72@yahoo.com>\n" |
11 | 11 | "Language-Team: English (British) <en_gb@li.org>\n" |
6 | 6 | msgstr "" |
7 | 7 | "Project-Id-Version: gstreamer 0.10.32.2\n" |
8 | 8 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
9 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
9 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
10 | 10 | "PO-Revision-Date: 2011-06-04 21:11+0100\n" |
11 | 11 | "Last-Translator: Kristjan SCHMIDT <kristjan.schmidt@googlemail.com>\n" |
12 | 12 | "Language-Team: Esperanto <translation-team-eo@lists.sourceforge.net>\n" |
6 | 6 | msgstr "" |
7 | 7 | "Project-Id-Version: gstreamer 0.10.32.2\n" |
8 | 8 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
9 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
9 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
10 | 10 | "PO-Revision-Date: 2011-10-02 15:45+0200\n" |
11 | 11 | "Last-Translator: Jorge González González <aloriel@gmail.com>\n" |
12 | 12 | "Language-Team: Spanish <es@li.org>\n" |
7 | 7 | msgstr "" |
8 | 8 | "Project-Id-Version: gstreamer-0.10.26.2\n" |
9 | 9 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
10 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
10 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
11 | 11 | "PO-Revision-Date: 2010-03-25 13:10+0100\n" |
12 | 12 | "Last-Translator: Mikel Olasagasti Uranga <hey_neken@mundurat.net>\n" |
13 | 13 | "Language-Team: Basque <translation-team-eu@lists.sourceforge.net>\n" |
11 | 11 | msgstr "" |
12 | 12 | "Project-Id-Version: gstreamer 0.10.30.3\n" |
13 | 13 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
14 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
14 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
15 | 15 | "PO-Revision-Date: 2010-11-17 23:10+0200\n" |
16 | 16 | "Last-Translator: Tommi Vainikainen <Tommi.Vainikainen@iki.fi>\n" |
17 | 17 | "Language-Team: Finnish <translation-team-fi@lists.sourceforge.net>\n" |
8 | 8 | msgstr "" |
9 | 9 | "Project-Id-Version: gstreamer 1.0.3\n" |
10 | 10 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
11 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
11 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
12 | 12 | "PO-Revision-Date: 2012-12-05 19:31+0100\n" |
13 | 13 | "Last-Translator: Claude Paroz <claude@2xlibre.net>\n" |
14 | 14 | "Language-Team: French <traduc@traduc.org>\n" |
5 | 5 | msgstr "" |
6 | 6 | "Project-Id-Version: gstreamer 1.0.3\n" |
7 | 7 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
8 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
8 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
9 | 9 | "PO-Revision-Date: 2012-12-15 03:29+0200\n" |
10 | 10 | "Last-Translator: Fran Dieguez <frandieguez@ubuntu.com>\n" |
11 | 11 | "Language-Team: Galician <proxecto@trasno.net>\n" |
5 | 5 | #, fuzzy |
6 | 6 | msgid "" |
7 | 7 | msgstr "" |
8 | "Project-Id-Version: gstreamer 1.3.1\n" | |
8 | "Project-Id-Version: gstreamer 1.3.2\n" | |
9 | 9 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
10 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
10 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
11 | 11 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
12 | 12 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
13 | 13 | "Language-Team: LANGUAGE <LL@li.org>\n" |
5 | 5 | msgstr "" |
6 | 6 | "Project-Id-Version: gstreamer 0.10.32.2\n" |
7 | 7 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
8 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
8 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
9 | 9 | "PO-Revision-Date: 2012-05-25 16:47+0200\n" |
10 | 10 | "Last-Translator: Tomislav Krznar <tomislav.krznar@gmail.com>\n" |
11 | 11 | "Language-Team: Croatian <lokalizacija@linux.hr>\n" |
7 | 7 | msgstr "" |
8 | 8 | "Project-Id-Version: gstreamer 1.2.1\n" |
9 | 9 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
10 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
10 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
11 | 11 | "PO-Revision-Date: 2014-03-20 19:07+0100\n" |
12 | 12 | "Last-Translator: Balázs Úr <urbalazs@gmail.com>\n" |
13 | 13 | "Language-Team: Hungarian <translation-team-hu@lists.sourceforge.net>\n" |
6 | 6 | msgstr "" |
7 | 7 | "Project-Id-Version: gstreamer 1.2.1\n" |
8 | 8 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
9 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
9 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
10 | 10 | "PO-Revision-Date: 2014-01-27 20:09+0700\n" |
11 | 11 | "Last-Translator: Andhika Padmawan <andhika.padmawan@gmail.com>\n" |
12 | 12 | "Language-Team: Indonesian <translation-team-id@lists.sourceforge.net>\n" |
105 | 105 | msgstr "" |
106 | 106 | "Project-Id-Version: gstreamer 0.10.30.3\n" |
107 | 107 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
108 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
108 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
109 | 109 | "PO-Revision-Date: 2010-10-25 10:03+0200\n" |
110 | 110 | "Last-Translator: Luca Ferretti <elle.uca@infinito.it>\n" |
111 | 111 | "Language-Team: Italian <tp@lists.linux.it>\n" |
5 | 5 | msgstr "" |
6 | 6 | "Project-Id-Version: gstreamer 1.0.3\n" |
7 | 7 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
8 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
8 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
9 | 9 | "PO-Revision-Date: 2013-08-20 14:56+0900\n" |
10 | 10 | "Last-Translator: Makoto Kato <makoto.kt@gmail.com>\n" |
11 | 11 | "Language-Team: Japanese <translation-team-ja@lists.sourceforge.net>\n" |
6 | 6 | msgstr "" |
7 | 7 | "Project-Id-Version: gstreamer 0.10.29.2\n" |
8 | 8 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
9 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
9 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
10 | 10 | "PO-Revision-Date: 2010-07-16 00:50+0300\n" |
11 | 11 | "Last-Translator: Žygimantas Beručka <uid0@akl.lt>\n" |
12 | 12 | "Language-Team: Lithuanian <komp_lt@konferencijos.lt>\n" |
5 | 5 | msgstr "" |
6 | 6 | "Project-Id-Version: gstreamer 0.10.30.3\n" |
7 | 7 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
8 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
8 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
9 | 9 | "PO-Revision-Date: 2010-10-24 21:36+0200\n" |
10 | 10 | "Last-Translator: Kjartan Maraas <kmaraas@gnome.org>\n" |
11 | 11 | "Language-Team: Norwegian Bokmaal <i18n-nb@lister.ping.uio.no>\n" |
9 | 9 | msgstr "" |
10 | 10 | "Project-Id-Version: gstreamer 1.2.1\n" |
11 | 11 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
12 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
12 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
13 | 13 | "PO-Revision-Date: 2014-01-09 12:55+0100\n" |
14 | 14 | "Last-Translator: Freek de Kruijf <f.de.kruijf@gmail.com>\n" |
15 | 15 | "Language-Team: Dutch <vertaling@vrijschrift.org>\n" |
5 | 5 | msgstr "" |
6 | 6 | "Project-Id-Version: gstreamer 1.2.1\n" |
7 | 7 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
8 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
8 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
9 | 9 | "PO-Revision-Date: 2013-12-08 08:57+0100\n" |
10 | 10 | "Last-Translator: Jakub Bogusz <qboosh@pld-linux.org>\n" |
11 | 11 | "Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n" |
Binary diff not shown
16 | 16 | msgstr "" |
17 | 17 | "Project-Id-Version: gstreamer-1.2.1\n" |
18 | 18 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
19 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
19 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
20 | 20 | "PO-Revision-Date: 2013-12-29 18:20-0200\n" |
21 | 21 | "Last-Translator: Fabrício Godoy <skarllot@gmail.com>\n" |
22 | 22 | "Language-Team: Brazilian Portuguese <ldpbr-translation@lists.sourceforge." |
4 | 4 | msgstr "" |
5 | 5 | "Project-Id-Version: gstreamer 0.10.29.2\n" |
6 | 6 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
7 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
7 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
8 | 8 | "PO-Revision-Date: 2010-08-16 01:10+0300\n" |
9 | 9 | "Last-Translator: Lucian Adrian Grijincu <lucian.grijincu@gmail.com>\n" |
10 | 10 | "Language-Team: Romanian <translation-team-ro@lists.sourceforge.net>\n" |
8 | 8 | msgstr "" |
9 | 9 | "Project-Id-Version: gstreamer 1.2.1\n" |
10 | 10 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
11 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
11 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
12 | 12 | "PO-Revision-Date: 2013-12-08 12:44+0400\n" |
13 | 13 | "Last-Translator: Yuri Kozlov <yuray@komyakino.ru>\n" |
14 | 14 | "Language-Team: Russian <gnu@mx.ru>\n" |
14 | 14 | msgstr "" |
15 | 15 | "Project-Id-Version: gstreamer 0.8.8\n" |
16 | 16 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
17 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
17 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
18 | 18 | "PO-Revision-Date: 2005-04-04 10:55-0700\n" |
19 | 19 | "Last-Translator: Steven Michael Murphy <murf@e-tools.com>\n" |
20 | 20 | "Language-Team: Kinyarwanda <translation-team-rw@lists.sourceforge.net>\n" |
7 | 7 | msgstr "" |
8 | 8 | "Project-Id-Version: gstreamer 1.2.1\n" |
9 | 9 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
10 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
10 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
11 | 11 | "PO-Revision-Date: 2014-01-30 10:24+0100\n" |
12 | 12 | "Last-Translator: Peter Tuhársky <tuharsky@misbb.sk>\n" |
13 | 13 | "Language-Team: Slovak <sk-i18n@lists.linux.sk>\n" |
9 | 9 | msgstr "" |
10 | 10 | "Project-Id-Version: gstreamer-1.2.1\n" |
11 | 11 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
12 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
12 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
13 | 13 | "PO-Revision-Date: 2014-04-09 22:38+0100\n" |
14 | 14 | "Last-Translator: Klemen Košir <klemen913@gmail.com>\n" |
15 | 15 | "Language-Team: Slovenian <translation-team-sl@lists.sourceforge.net>\n" |
5 | 5 | msgstr "" |
6 | 6 | "Project-Id-Version: gstreamer 0.8.4\n" |
7 | 7 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
8 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
8 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
9 | 9 | "PO-Revision-Date: 2004-08-07 23:46+0200\n" |
10 | 10 | "Last-Translator: Laurent Dhima <laurenti@alblinux.net>\n" |
11 | 11 | "Language-Team: Albanian <begraj@hotmail.com>\n" |
6 | 6 | msgstr "" |
7 | 7 | "Project-Id-Version: gstreamer-1.2.1\n" |
8 | 8 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
9 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
9 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
10 | 10 | "PO-Revision-Date: 2014-01-13 17:53+0200\n" |
11 | 11 | "Last-Translator: Мирослав Николић <miroslavnikolic@rocketmail.com>\n" |
12 | 12 | "Language-Team: Serbian <(nothing)>\n" |
7 | 7 | msgstr "" |
8 | 8 | "Project-Id-Version: gstreamer 0.10.31.2\n" |
9 | 9 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
10 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
10 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
11 | 11 | "PO-Revision-Date: 2011-01-09 19:46+0100\n" |
12 | 12 | "Last-Translator: Daniel Nylander <po@danielnylander.se>\n" |
13 | 13 | "Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n" |
5 | 5 | msgstr "" |
6 | 6 | "Project-Id-Version: gstreamer 0.8.0\n" |
7 | 7 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
8 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
8 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
9 | 9 | "PO-Revision-Date: 2004-04-03 03:14+0300\n" |
10 | 10 | "Last-Translator: Baris Cicek <baris@teamforce.name.tr>\n" |
11 | 11 | "Language-Team: Turkish <gnu-tr-u12a@lists.sourceforge.net>\n" |
7 | 7 | msgstr "" |
8 | 8 | "Project-Id-Version: gstreamer 1.2.1\n" |
9 | 9 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
10 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
10 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
11 | 11 | "PO-Revision-Date: 2013-12-07 22:49+0200\n" |
12 | 12 | "Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n" |
13 | 13 | "Language-Team: Ukrainian <translation-team-uk@lists.sourceforge.net>\n" |
8 | 8 | msgstr "" |
9 | 9 | "Project-Id-Version: gstreamer-1.2.1\n" |
10 | 10 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
11 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
11 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
12 | 12 | "PO-Revision-Date: 2013-12-11 08:08+0700\n" |
13 | 13 | "Last-Translator: Trần Ngọc Quân <vnwildman@gmail.com>\n" |
14 | 14 | "Language-Team: Vietnamese <translation-team-vi@lists.sourceforge.net>\n" |
Binary diff not shown
5 | 5 | msgstr "" |
6 | 6 | "Project-Id-Version: gstreamer 0.10.25.2\n" |
7 | 7 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
8 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
8 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
9 | 9 | "PO-Revision-Date: 2010-02-02 18:58+0800\n" |
10 | 10 | "Last-Translator: Ji ZhengYu <zhengyuji@gmail.com>\n" |
11 | 11 | "Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n" |
Binary diff not shown
5 | 5 | msgstr "" |
6 | 6 | "Project-Id-Version: gstreamer 0.8.8\n" |
7 | 7 | "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" |
8 | "POT-Creation-Date: 2014-05-03 17:32+0200\n" | |
8 | "POT-Creation-Date: 2014-05-21 11:18+0200\n" | |
9 | 9 | "PO-Revision-Date: 2005-04-27 14:55+0800\n" |
10 | 10 | "Last-Translator: Abel Cheung <abelcheung@gmail.com>\n" |
11 | 11 | "Language-Team: Chinese (traditional) <zh-l10n@linux.org.tw>\n" |
90 | 90 | libs/baseparse \ |
91 | 91 | libs/basesrc \ |
92 | 92 | libs/basesink \ |
93 | libs/sparsefile \ | |
93 | 94 | libs/controller \ |
94 | 95 | libs/queuearray \ |
95 | 96 | libs/typefindhelper \ |
141 | 142 | libs/bitreader-noinline \ |
142 | 143 | libs/bytereader-noinline \ |
143 | 144 | libs/bytewriter-noinline \ |
145 | libs/sparsefile \ | |
144 | 146 | libs/collectpads \ |
145 | 147 | libs/gstnetclientclock \ |
146 | 148 | libs/gstnettimeprovider \ |
102 | 102 | libs/bytereader$(EXEEXT) libs/bytewriter$(EXEEXT) \ |
103 | 103 | libs/bitreader-noinline$(EXEEXT) \ |
104 | 104 | libs/bytereader-noinline$(EXEEXT) \ |
105 | libs/bytewriter-noinline$(EXEEXT) libs/collectpads$(EXEEXT) \ | |
106 | libs/gstnetclientclock$(EXEEXT) \ | |
105 | libs/bytewriter-noinline$(EXEEXT) libs/sparsefile$(EXEEXT) \ | |
106 | libs/collectpads$(EXEEXT) libs/gstnetclientclock$(EXEEXT) \ | |
107 | 107 | libs/gstnettimeprovider$(EXEEXT) libs/gsttestclock$(EXEEXT) \ |
108 | 108 | libs/transform1$(EXEEXT) tools/gstinspect$(EXEEXT) |
109 | 109 | noinst_PROGRAMS = |
191 | 191 | @GST_DISABLE_REGISTRY_FALSE@ libs/baseparse$(EXEEXT) \ |
192 | 192 | @GST_DISABLE_REGISTRY_FALSE@ libs/basesrc$(EXEEXT) \ |
193 | 193 | @GST_DISABLE_REGISTRY_FALSE@ libs/basesink$(EXEEXT) \ |
194 | @GST_DISABLE_REGISTRY_FALSE@ libs/sparsefile$(EXEEXT) \ | |
194 | 195 | @GST_DISABLE_REGISTRY_FALSE@ libs/controller$(EXEEXT) \ |
195 | 196 | @GST_DISABLE_REGISTRY_FALSE@ libs/queuearray$(EXEEXT) \ |
196 | 197 | @GST_DISABLE_REGISTRY_FALSE@ libs/typefindhelper$(EXEEXT) \ |
689 | 690 | libs_queuearray_OBJECTS = libs/queuearray.$(OBJEXT) |
690 | 691 | libs_queuearray_LDADD = $(LDADD) |
691 | 692 | libs_queuearray_DEPENDENCIES = $(top_builddir)/libs/gst/check/libgstcheck-@GST_API_VERSION@.la \ |
693 | $(top_builddir)/libs/gst/base/libgstbase-@GST_API_VERSION@.la \ | |
694 | $(am__DEPENDENCIES_1) | |
695 | libs_sparsefile_SOURCES = libs/sparsefile.c | |
696 | libs_sparsefile_OBJECTS = libs/sparsefile.$(OBJEXT) | |
697 | libs_sparsefile_LDADD = $(LDADD) | |
698 | libs_sparsefile_DEPENDENCIES = $(top_builddir)/libs/gst/check/libgstcheck-@GST_API_VERSION@.la \ | |
692 | 699 | $(top_builddir)/libs/gst/base/libgstbase-@GST_API_VERSION@.la \ |
693 | 700 | $(am__DEPENDENCIES_1) |
694 | 701 | libs_transform1_SOURCES = libs/transform1.c |
831 | 838 | libs/controller.c $(libs_gstlibscpp_SOURCES) \ |
832 | 839 | libs/gstnetclientclock.c libs/gstnettimeprovider.c \ |
833 | 840 | libs/gsttestclock.c libs/libsabi.c libs/queuearray.c \ |
834 | libs/transform1.c libs/typefindhelper.c pipelines/cleanup.c \ | |
835 | pipelines/parse-disabled.c pipelines/parse-launch.c \ | |
836 | pipelines/queue-error.c pipelines/seek.c \ | |
837 | pipelines/simple-launch-lines.c pipelines/stress.c \ | |
838 | tools/gstinspect.c | |
841 | libs/sparsefile.c libs/transform1.c libs/typefindhelper.c \ | |
842 | pipelines/cleanup.c pipelines/parse-disabled.c \ | |
843 | pipelines/parse-launch.c pipelines/queue-error.c \ | |
844 | pipelines/seek.c pipelines/simple-launch-lines.c \ | |
845 | pipelines/stress.c tools/gstinspect.c | |
839 | 846 | DIST_SOURCES = elements/capsfilter.c elements/fakesink.c \ |
840 | 847 | elements/fakesrc.c elements/fdsrc.c elements/filesink.c \ |
841 | 848 | elements/filesrc.c elements/funnel.c elements/identity.c \ |
863 | 870 | libs/controller.c $(libs_gstlibscpp_SOURCES) \ |
864 | 871 | libs/gstnetclientclock.c libs/gstnettimeprovider.c \ |
865 | 872 | libs/gsttestclock.c libs/libsabi.c libs/queuearray.c \ |
866 | libs/transform1.c libs/typefindhelper.c pipelines/cleanup.c \ | |
867 | pipelines/parse-disabled.c pipelines/parse-launch.c \ | |
868 | pipelines/queue-error.c pipelines/seek.c \ | |
869 | pipelines/simple-launch-lines.c pipelines/stress.c \ | |
870 | tools/gstinspect.c | |
873 | libs/sparsefile.c libs/transform1.c libs/typefindhelper.c \ | |
874 | pipelines/cleanup.c pipelines/parse-disabled.c \ | |
875 | pipelines/parse-launch.c pipelines/queue-error.c \ | |
876 | pipelines/seek.c pipelines/simple-launch-lines.c \ | |
877 | pipelines/stress.c tools/gstinspect.c | |
871 | 878 | am__can_run_installinfo = \ |
872 | 879 | case $$AM_UPDATE_INFO_DIR in \ |
873 | 880 | n|no|NO) false;; \ |
1440 | 1447 | @GST_DISABLE_REGISTRY_FALSE@ libs/baseparse \ |
1441 | 1448 | @GST_DISABLE_REGISTRY_FALSE@ libs/basesrc \ |
1442 | 1449 | @GST_DISABLE_REGISTRY_FALSE@ libs/basesink \ |
1450 | @GST_DISABLE_REGISTRY_FALSE@ libs/sparsefile \ | |
1443 | 1451 | @GST_DISABLE_REGISTRY_FALSE@ libs/controller \ |
1444 | 1452 | @GST_DISABLE_REGISTRY_FALSE@ libs/queuearray \ |
1445 | 1453 | @GST_DISABLE_REGISTRY_FALSE@ libs/typefindhelper \ |
2094 | 2102 | libs/queuearray$(EXEEXT): $(libs_queuearray_OBJECTS) $(libs_queuearray_DEPENDENCIES) $(EXTRA_libs_queuearray_DEPENDENCIES) libs/$(am__dirstamp) |
2095 | 2103 | @rm -f libs/queuearray$(EXEEXT) |
2096 | 2104 | $(AM_V_CCLD)$(LINK) $(libs_queuearray_OBJECTS) $(libs_queuearray_LDADD) $(LIBS) |
2105 | libs/sparsefile.$(OBJEXT): libs/$(am__dirstamp) \ | |
2106 | libs/$(DEPDIR)/$(am__dirstamp) | |
2107 | ||
2108 | libs/sparsefile$(EXEEXT): $(libs_sparsefile_OBJECTS) $(libs_sparsefile_DEPENDENCIES) $(EXTRA_libs_sparsefile_DEPENDENCIES) libs/$(am__dirstamp) | |
2109 | @rm -f libs/sparsefile$(EXEEXT) | |
2110 | $(AM_V_CCLD)$(LINK) $(libs_sparsefile_OBJECTS) $(libs_sparsefile_LDADD) $(LIBS) | |
2097 | 2111 | libs/transform1.$(OBJEXT): libs/$(am__dirstamp) \ |
2098 | 2112 | libs/$(DEPDIR)/$(am__dirstamp) |
2099 | 2113 | |
2259 | 2273 | @AMDEP_TRUE@@am__include@ @am__quote@libs/$(DEPDIR)/gsttestclock.Po@am__quote@ |
2260 | 2274 | @AMDEP_TRUE@@am__include@ @am__quote@libs/$(DEPDIR)/libsabi.Po@am__quote@ |
2261 | 2275 | @AMDEP_TRUE@@am__include@ @am__quote@libs/$(DEPDIR)/queuearray.Po@am__quote@ |
2276 | @AMDEP_TRUE@@am__include@ @am__quote@libs/$(DEPDIR)/sparsefile.Po@am__quote@ | |
2262 | 2277 | @AMDEP_TRUE@@am__include@ @am__quote@libs/$(DEPDIR)/transform1.Po@am__quote@ |
2263 | 2278 | @AMDEP_TRUE@@am__include@ @am__quote@libs/$(DEPDIR)/typefindhelper.Po@am__quote@ |
2264 | 2279 | @AMDEP_TRUE@@am__include@ @am__quote@pipelines/$(DEPDIR)/cleanup.Po@am__quote@ |
3041 | 3056 | --log-file $$b.log --trs-file $$b.trs \ |
3042 | 3057 | $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ |
3043 | 3058 | "$$tst" $(AM_TESTS_FD_REDIRECT) |
3059 | libs/sparsefile.log: libs/sparsefile$(EXEEXT) | |
3060 | @p='libs/sparsefile$(EXEEXT)'; \ | |
3061 | b='libs/sparsefile'; \ | |
3062 | $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ | |
3063 | --log-file $$b.log --trs-file $$b.trs \ | |
3064 | $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ | |
3065 | "$$tst" $(AM_TESTS_FD_REDIRECT) | |
3044 | 3066 | libs/controller.log: libs/controller$(EXEEXT) |
3045 | 3067 | @p='libs/controller$(EXEEXT)'; \ |
3046 | 3068 | b='libs/controller'; \ |
815 | 815 | |
816 | 816 | GST_END_TEST; |
817 | 817 | |
818 | static GMutex block_mutex; | |
819 | static GCond block_cond; | |
820 | static gint unblock_count; | |
821 | static gboolean expect_overrun; | |
822 | ||
823 | static GstFlowReturn | |
824 | pad_chain_block (GstPad * pad, GstObject * parent, GstBuffer * buffer) | |
825 | { | |
826 | g_mutex_lock (&block_mutex); | |
827 | while (unblock_count == 0) { | |
828 | g_cond_wait (&block_cond, &block_mutex); | |
829 | } | |
830 | if (unblock_count > 0) { | |
831 | unblock_count--; | |
832 | } | |
833 | g_mutex_unlock (&block_mutex); | |
834 | ||
835 | gst_buffer_unref (buffer); | |
836 | return GST_FLOW_OK; | |
837 | } | |
838 | ||
839 | static gboolean | |
840 | pad_event_always_ok (GstPad * pad, GstObject * parent, GstEvent * event) | |
841 | { | |
842 | gst_event_unref (event); | |
843 | return TRUE; | |
844 | } | |
845 | ||
846 | static void | |
847 | mq_overrun (GstElement * mq, gpointer udata) | |
848 | { | |
849 | fail_unless (expect_overrun); | |
850 | ||
851 | /* unblock always so we don't get stuck */ | |
852 | g_mutex_lock (&block_mutex); | |
853 | unblock_count = 2; /* let the PTS=0 and PTS=none go */ | |
854 | g_cond_signal (&block_cond); | |
855 | g_mutex_unlock (&block_mutex); | |
856 | } | |
857 | ||
858 | GST_START_TEST (test_buffering_with_none_pts) | |
859 | { | |
860 | /* | |
861 | * This test creates a multiqueue where source pushing blocks so we can check | |
862 | * how its buffering level is reacting to GST_CLOCK_TIME_NONE buffers | |
863 | * mixed with properly timestamped buffers. | |
864 | * | |
865 | * Sequence of pushing: | |
866 | * pts=0 | |
867 | * pts=none | |
868 | * pts=1 (it gets full now) | |
869 | * pts=none (overrun expected) | |
870 | */ | |
871 | GstElement *mq; | |
872 | GstPad *inputpad; | |
873 | GstPad *outputpad; | |
874 | GstPad *mq_sinkpad; | |
875 | GstPad *mq_srcpad; | |
876 | GstSegment segment; | |
877 | GstBuffer *buffer; | |
878 | ||
879 | g_mutex_init (&block_mutex); | |
880 | g_cond_init (&block_cond); | |
881 | unblock_count = 0; | |
882 | expect_overrun = FALSE; | |
883 | ||
884 | mq = gst_element_factory_make ("multiqueue", NULL); | |
885 | fail_unless (mq != NULL); | |
886 | ||
887 | g_object_set (mq, | |
888 | "max-size-bytes", (guint) 0, | |
889 | "max-size-buffers", (guint) 0, | |
890 | "max-size-time", (guint64) GST_SECOND, NULL); | |
891 | g_signal_connect (mq, "overrun", (GCallback) mq_overrun, NULL); | |
892 | ||
893 | gst_segment_init (&segment, GST_FORMAT_TIME); | |
894 | ||
895 | inputpad = gst_pad_new ("dummysrc", GST_PAD_SRC); | |
896 | outputpad = gst_pad_new ("dummysink", GST_PAD_SINK); | |
897 | gst_pad_set_chain_function (outputpad, pad_chain_block); | |
898 | gst_pad_set_event_function (outputpad, pad_event_always_ok); | |
899 | mq_sinkpad = gst_element_get_request_pad (mq, "sink_%u"); | |
900 | mq_srcpad = gst_element_get_static_pad (mq, "src_0"); | |
901 | fail_unless (mq_sinkpad != NULL); | |
902 | fail_unless (gst_pad_link (inputpad, mq_sinkpad) == GST_PAD_LINK_OK); | |
903 | fail_unless (gst_pad_link (mq_srcpad, outputpad) == GST_PAD_LINK_OK); | |
904 | ||
905 | gst_pad_set_active (inputpad, TRUE); | |
906 | gst_pad_set_active (outputpad, TRUE); | |
907 | gst_pad_push_event (inputpad, gst_event_new_stream_start ("test")); | |
908 | gst_pad_push_event (inputpad, gst_event_new_segment (&segment)); | |
909 | ||
910 | gst_element_set_state (mq, GST_STATE_PAUSED); | |
911 | ||
912 | /* push a buffer with PTS = 0 */ | |
913 | buffer = gst_buffer_new (); | |
914 | GST_BUFFER_PTS (buffer) = 0; | |
915 | fail_unless (gst_pad_push (inputpad, buffer) == GST_FLOW_OK); | |
916 | ||
917 | /* push a buffer with PTS = NONE */ | |
918 | buffer = gst_buffer_new (); | |
919 | GST_BUFFER_PTS (buffer) = GST_CLOCK_TIME_NONE; | |
920 | fail_unless (gst_pad_push (inputpad, buffer) == GST_FLOW_OK); | |
921 | ||
922 | /* push a buffer with PTS = 1s, so we have 1s of data in multiqueue, we are | |
923 | * full */ | |
924 | buffer = gst_buffer_new (); | |
925 | GST_BUFFER_PTS (buffer) = GST_SECOND; | |
926 | fail_unless (gst_pad_push (inputpad, buffer) == GST_FLOW_OK); | |
927 | ||
928 | /* push a buffer with PTS = NONE, the queue is full so it should overrun */ | |
929 | expect_overrun = TRUE; | |
930 | buffer = gst_buffer_new (); | |
931 | GST_BUFFER_PTS (buffer) = GST_CLOCK_TIME_NONE; | |
932 | fail_unless (gst_pad_push (inputpad, buffer) == GST_FLOW_OK); | |
933 | ||
934 | g_mutex_lock (&block_mutex); | |
935 | unblock_count = -1; | |
936 | g_cond_signal (&block_cond); | |
937 | g_mutex_unlock (&block_mutex); | |
938 | ||
939 | gst_element_set_state (mq, GST_STATE_NULL); | |
940 | gst_object_unref (inputpad); | |
941 | gst_object_unref (outputpad); | |
942 | gst_object_unref (mq); | |
943 | g_mutex_clear (&block_mutex); | |
944 | g_cond_clear (&block_cond); | |
945 | } | |
946 | ||
947 | GST_END_TEST; | |
948 | ||
818 | 949 | static Suite * |
819 | 950 | multiqueue_suite (void) |
820 | 951 | { |
836 | 967 | tcase_add_test (tc_chain, test_sparse_stream); |
837 | 968 | tcase_add_test (tc_chain, test_limit_changes); |
838 | 969 | |
970 | tcase_add_test (tc_chain, test_buffering_with_none_pts); | |
971 | ||
839 | 972 | return s; |
840 | 973 | } |
841 | 974 |
25 | 25 | { |
26 | 26 | GstBufferPool *pool = gst_buffer_pool_new (); |
27 | 27 | GstStructure *conf = gst_buffer_pool_get_config (pool); |
28 | ||
29 | gst_buffer_pool_config_set_params (conf, NULL, size, min_buf, max_buf); | |
28 | GstCaps *caps = gst_caps_new_empty_simple ("test/data"); | |
29 | ||
30 | gst_buffer_pool_config_set_params (conf, caps, size, min_buf, max_buf); | |
30 | 31 | gst_buffer_pool_set_config (pool, conf); |
32 | gst_caps_unref (caps); | |
31 | 33 | |
32 | 34 | return pool; |
33 | 35 | } |
166 | 168 | fail_if (buf == prev, "got a reused buffer instead of new one"); |
167 | 169 | gst_buffer_unref (buf); |
168 | 170 | gst_buffer_pool_set_active (pool, FALSE); |
171 | gst_object_unref (pool); | |
172 | } | |
173 | ||
174 | GST_END_TEST; | |
175 | ||
176 | GST_START_TEST (test_pool_activation_and_config) | |
177 | { | |
178 | GstBufferPool *pool = gst_buffer_pool_new (); | |
179 | GstStructure *config = gst_buffer_pool_get_config (pool); | |
180 | GstCaps *caps = gst_caps_new_empty_simple ("test/data"); | |
181 | GstBuffer *buffer = NULL; | |
182 | ||
183 | /* unconfigured pool cannot be activated */ | |
184 | fail_if (gst_buffer_pool_set_active (pool, TRUE)); | |
185 | ||
186 | gst_buffer_pool_config_set_params (config, caps, 10, 10, 0); | |
187 | fail_unless (gst_buffer_pool_set_config (pool, config)); | |
188 | fail_unless (gst_buffer_pool_set_active (pool, TRUE)); | |
189 | ||
190 | /* setting the same config on an active pool is ok */ | |
191 | config = gst_buffer_pool_get_config (pool); | |
192 | fail_unless (gst_buffer_pool_set_config (pool, config)); | |
193 | ||
194 | /* setting a different config should deactivate the pool */ | |
195 | config = gst_buffer_pool_get_config (pool); | |
196 | gst_buffer_pool_config_set_params (config, caps, 12, 10, 0); | |
197 | fail_unless (gst_buffer_pool_set_config (pool, config)); | |
198 | fail_if (gst_buffer_pool_is_active (pool)); | |
199 | ||
200 | /* though it should fail if there is outstanding buffers */ | |
201 | gst_buffer_pool_set_active (pool, TRUE); | |
202 | gst_buffer_pool_acquire_buffer (pool, &buffer, NULL); | |
203 | fail_if (buffer == NULL); | |
204 | config = gst_buffer_pool_get_config (pool); | |
205 | gst_buffer_pool_config_set_params (config, caps, 10, 10, 0); | |
206 | fail_if (gst_buffer_pool_set_config (pool, config)); | |
207 | ||
208 | /* and work when last buffer is back */ | |
209 | config = gst_buffer_pool_get_config (pool); | |
210 | gst_buffer_pool_config_set_params (config, caps, 10, 10, 0); | |
211 | gst_buffer_unref (buffer); | |
212 | fail_unless (gst_buffer_pool_set_config (pool, config)); | |
213 | fail_unless (gst_buffer_pool_set_active (pool, TRUE)); | |
214 | ||
215 | gst_buffer_pool_set_active (pool, FALSE); | |
216 | gst_object_unref (pool); | |
217 | gst_caps_unref (caps); | |
218 | } | |
219 | ||
220 | GST_END_TEST; | |
221 | ||
222 | GST_START_TEST (test_pool_config_validate) | |
223 | { | |
224 | GstBufferPool *pool = create_pool (5, 4, 30); | |
225 | GstStructure *config = gst_buffer_pool_get_config (pool); | |
226 | GstCaps *caps = gst_caps_new_empty_simple ("test/data"); | |
227 | ||
228 | fail_unless (gst_buffer_pool_config_validate_params (config, caps, 5, 4, 0)); | |
229 | fail_unless (gst_buffer_pool_config_validate_params (config, caps, 5, 2, 0)); | |
230 | fail_if (gst_buffer_pool_config_validate_params (config, caps, 5, 6, 0)); | |
231 | fail_if (gst_buffer_pool_config_validate_params (config, caps, 4, 4, 0)); | |
232 | ||
233 | gst_caps_unref (caps); | |
234 | caps = gst_caps_new_empty_simple ("test/data2"); | |
235 | fail_if (gst_buffer_pool_config_validate_params (config, caps, 5, 4, 0)); | |
236 | ||
237 | gst_caps_unref (caps); | |
238 | gst_structure_free (config); | |
169 | 239 | gst_object_unref (pool); |
170 | 240 | } |
171 | 241 | |
186 | 256 | tcase_add_test (tc_chain, test_pool_config_buffer_size); |
187 | 257 | tcase_add_test (tc_chain, test_inactive_pool_returns_flushing); |
188 | 258 | tcase_add_test (tc_chain, test_buffer_modify_discard); |
259 | tcase_add_test (tc_chain, test_pool_activation_and_config); | |
260 | tcase_add_test (tc_chain, test_pool_config_validate); | |
189 | 261 | |
190 | 262 | return s; |
191 | 263 | } |
537 | 537 | const gchar *to; |
538 | 538 | } tests[] = { |
539 | 539 | { |
540 | "\"foo\"", "foo"}, { | |
541 | "\"foo\\%\"", "foo%"}, { | |
542 | "\"0123456789_-+/:.\"", "0123456789_-+/:."}, { | |
543 | "\"Hello\\ World\"", "Hello World"}, { | |
540 | 544 | "", ""}, /* empty strings */ |
541 | 545 | { |
542 | 546 | "\"\"", ""}, /* quoted empty string -> empty string */ |
583 | 587 | GValue value1 = { 0 }; |
584 | 588 | GValue value2 = { 0 }; |
585 | 589 | GValue tmp = { 0 }; |
590 | GstAllocationParams alloc_params = { 0 }; | |
586 | 591 | |
587 | 592 | g_value_init (&value1, G_TYPE_INT); |
588 | 593 | g_value_set_int (&value1, 10); |
767 | 772 | gst_value_set_bitmask (&value2, 0x321); |
768 | 773 | fail_unless (gst_value_compare (&value1, &value2) == GST_VALUE_UNORDERED); |
769 | 774 | fail_unless (gst_value_compare (&value2, &value1) == GST_VALUE_UNORDERED); |
775 | fail_unless (gst_value_compare (&value1, &value1) == GST_VALUE_EQUAL); | |
776 | g_value_unset (&value1); | |
777 | g_value_unset (&value2); | |
778 | ||
779 | /* Check that we can compare objects */ | |
780 | g_value_init (&value1, GST_TYPE_BIN); | |
781 | g_value_take_object (&value1, gst_bin_new (NULL)); | |
782 | g_value_init (&value2, GST_TYPE_BIN); | |
783 | g_value_take_object (&value2, gst_bin_new (NULL)); | |
784 | fail_unless (gst_value_compare (&value1, &value2) == GST_VALUE_UNORDERED); | |
785 | fail_unless (gst_value_compare (&value1, &value1) == GST_VALUE_EQUAL); | |
786 | g_value_unset (&value1); | |
787 | g_value_unset (&value2); | |
788 | ||
789 | /* Check that we can compare allocation params */ | |
790 | g_value_init (&value1, GST_TYPE_ALLOCATION_PARAMS); | |
791 | g_value_set_boxed (&value1, &alloc_params); | |
792 | g_value_init (&value2, GST_TYPE_ALLOCATION_PARAMS); | |
793 | alloc_params.align = 1; | |
794 | g_value_set_boxed (&value2, &alloc_params); | |
795 | fail_unless (gst_value_compare (&value1, &value2) == GST_VALUE_UNORDERED); | |
770 | 796 | fail_unless (gst_value_compare (&value1, &value1) == GST_VALUE_EQUAL); |
771 | 797 | g_value_unset (&value1); |
772 | 798 | g_value_unset (&value2); |
0 | /* GStreamer | |
1 | * | |
2 | * unit test for cachefile helper | |
3 | * | |
4 | * Copyright (C) 2014 Wim Taymans <wtaymans@redhat.com> | |
5 | * | |
6 | * This library is free software; you can redistribute it and/or | |
7 | * modify it under the terms of the GNU Library General Public | |
8 | * License as published by the Free Software Foundation; either | |
9 | * version 2 of the License, or (at your option) any later version. | |
10 | * | |
11 | * This library 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 GNU | |
14 | * Library General Public License for more details. | |
15 | * | |
16 | * You should have received a copy of the GNU Library General Public | |
17 | * License along with this library; if not, write to the | |
18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
19 | * Boston, MA 02111-1307, USA. | |
20 | */ | |
21 | ||
22 | #ifdef HAVE_CONFIG_H | |
23 | #include "config.h" | |
24 | #endif | |
25 | ||
26 | #include <glib/gstdio.h> | |
27 | ||
28 | #include <gst/check/gstcheck.h> | |
29 | ||
30 | /* not public API for now */ | |
31 | #include "../../../plugins/elements/gstsparsefile.c" | |
32 | ||
33 | static void | |
34 | expect_range_before (GstSparseFile * file, gsize offset, gsize start, | |
35 | gsize stop) | |
36 | { | |
37 | gsize tstart, tstop; | |
38 | ||
39 | fail_unless (gst_sparse_file_get_range_before (file, offset, &tstart, | |
40 | &tstop) == TRUE); | |
41 | fail_unless (tstart == start); | |
42 | fail_unless (tstop == stop); | |
43 | } | |
44 | ||
45 | static void | |
46 | expect_range_after (GstSparseFile * file, gsize offset, gsize start, gsize stop) | |
47 | { | |
48 | gsize tstart, tstop; | |
49 | ||
50 | fail_unless (gst_sparse_file_get_range_after (file, offset, &tstart, | |
51 | &tstop) == TRUE); | |
52 | fail_unless (tstart == start); | |
53 | fail_unless (tstop == stop); | |
54 | } | |
55 | ||
56 | static gboolean | |
57 | expect_write (GstSparseFile * file, gsize offset, gsize count, gsize result, | |
58 | gsize avail) | |
59 | { | |
60 | GError *error = NULL; | |
61 | gchar buffer[200]; | |
62 | gsize res, a; | |
63 | ||
64 | res = gst_sparse_file_write (file, offset, buffer, count, &a, &error); | |
65 | if (res != result) | |
66 | return FALSE; | |
67 | if (res == 0) { | |
68 | if (error == NULL) | |
69 | return FALSE; | |
70 | g_clear_error (&error); | |
71 | } else if (a != avail) | |
72 | return FALSE; | |
73 | return TRUE; | |
74 | } | |
75 | ||
76 | static gboolean | |
77 | expect_read (GstSparseFile * file, gsize offset, gsize count, gsize result, | |
78 | gsize avail) | |
79 | { | |
80 | GError *error = NULL; | |
81 | gchar buffer[200]; | |
82 | gsize res, a; | |
83 | ||
84 | res = gst_sparse_file_read (file, offset, buffer, count, &a, &error); | |
85 | if (res != result) | |
86 | return FALSE; | |
87 | if (res == 0) { | |
88 | if (error == NULL) | |
89 | return FALSE; | |
90 | g_clear_error (&error); | |
91 | } else if (a != avail) | |
92 | return FALSE; | |
93 | return TRUE; | |
94 | } | |
95 | ||
96 | GST_START_TEST (test_write_read) | |
97 | { | |
98 | GstSparseFile *file; | |
99 | gint fd; | |
100 | gchar *name; | |
101 | gsize start, stop; | |
102 | ||
103 | name = g_strdup ("cachefile-testXXXXXX"); | |
104 | fd = g_mkstemp (name); | |
105 | fail_if (fd == -1); | |
106 | ||
107 | file = gst_sparse_file_new (); | |
108 | fail_unless (file != NULL); | |
109 | fail_unless (gst_sparse_file_set_fd (file, fd)); | |
110 | fail_unless (gst_sparse_file_n_ranges (file) == 0); | |
111 | ||
112 | /* should fail, we didn't write anything yet */ | |
113 | fail_unless (expect_read (file, 0, 100, 0, 0)); | |
114 | ||
115 | /* no ranges, searching for a range should fail */ | |
116 | fail_unless (gst_sparse_file_n_ranges (file) == 0); | |
117 | fail_unless (gst_sparse_file_get_range_before (file, 0, &start, | |
118 | &stop) == FALSE); | |
119 | fail_unless (gst_sparse_file_get_range_before (file, 10, &start, | |
120 | &stop) == FALSE); | |
121 | fail_unless (gst_sparse_file_get_range_after (file, 0, &start, | |
122 | &stop) == FALSE); | |
123 | fail_unless (gst_sparse_file_get_range_after (file, 10, &start, | |
124 | &stop) == FALSE); | |
125 | ||
126 | /* now write some data */ | |
127 | fail_unless (expect_write (file, 0, 100, 100, 0)); | |
128 | ||
129 | /* we have 1 range now */ | |
130 | fail_unless (gst_sparse_file_n_ranges (file) == 1); | |
131 | expect_range_before (file, 0, 0, 100); | |
132 | expect_range_after (file, 0, 0, 100); | |
133 | expect_range_before (file, 100, 0, 100); | |
134 | expect_range_before (file, 50, 0, 100); | |
135 | expect_range_before (file, 200, 0, 100); | |
136 | fail_unless (gst_sparse_file_get_range_after (file, 100, &start, | |
137 | &stop) == FALSE); | |
138 | expect_range_after (file, 50, 0, 100); | |
139 | ||
140 | /* we can read all data now */ | |
141 | fail_unless (expect_read (file, 0, 100, 100, 0)); | |
142 | /* we can read less */ | |
143 | fail_unless (expect_read (file, 0, 50, 50, 50)); | |
144 | /* but we can't read more than what is written */ | |
145 | fail_unless (expect_read (file, 0, 101, 0, 0)); | |
146 | ||
147 | g_unlink (name); | |
148 | gst_sparse_file_free (file); | |
149 | g_free (name); | |
150 | } | |
151 | ||
152 | GST_END_TEST; | |
153 | ||
154 | GST_START_TEST (test_write_merge) | |
155 | { | |
156 | GstSparseFile *file; | |
157 | gint fd; | |
158 | gchar *name; | |
159 | gsize start, stop; | |
160 | ||
161 | name = g_strdup ("cachefile-testXXXXXX"); | |
162 | fd = g_mkstemp (name); | |
163 | fail_if (fd == -1); | |
164 | ||
165 | file = gst_sparse_file_new (); | |
166 | gst_sparse_file_set_fd (file, fd); | |
167 | ||
168 | /* write something at offset 0 */ | |
169 | fail_unless (expect_write (file, 0, 100, 100, 0)); | |
170 | /* we have 1 range now */ | |
171 | fail_unless (gst_sparse_file_n_ranges (file) == 1); | |
172 | expect_range_before (file, 110, 0, 100); | |
173 | expect_range_after (file, 50, 0, 100); | |
174 | fail_unless (gst_sparse_file_get_range_after (file, 100, &start, | |
175 | &stop) == FALSE); | |
176 | ||
177 | /* read should fail */ | |
178 | fail_unless (expect_read (file, 50, 150, 0, 0)); | |
179 | ||
180 | /* write something at offset 150 */ | |
181 | fail_unless (expect_write (file, 150, 100, 100, 0)); | |
182 | /* we have 2 ranges now */ | |
183 | fail_unless (gst_sparse_file_n_ranges (file) == 2); | |
184 | expect_range_before (file, 110, 0, 100); | |
185 | expect_range_after (file, 50, 0, 100); | |
186 | expect_range_after (file, 100, 150, 250); | |
187 | expect_range_before (file, 150, 150, 250); | |
188 | ||
189 | /* read should still fail */ | |
190 | fail_unless (expect_read (file, 50, 150, 0, 0)); | |
191 | ||
192 | /* fill the hole */ | |
193 | fail_unless (expect_write (file, 100, 50, 50, 100)); | |
194 | /* we have 1 range now */ | |
195 | fail_unless (gst_sparse_file_n_ranges (file) == 1); | |
196 | expect_range_before (file, 110, 0, 250); | |
197 | expect_range_after (file, 50, 0, 250); | |
198 | expect_range_after (file, 100, 0, 250); | |
199 | expect_range_before (file, 150, 0, 250); | |
200 | fail_unless (gst_sparse_file_get_range_after (file, 250, &start, | |
201 | &stop) == FALSE); | |
202 | ||
203 | /* read work */ | |
204 | fail_unless (expect_read (file, 50, 150, 150, 50)); | |
205 | ||
206 | g_unlink (name); | |
207 | gst_sparse_file_free (file); | |
208 | g_free (name); | |
209 | } | |
210 | ||
211 | GST_END_TEST; | |
212 | ||
213 | static Suite * | |
214 | gst_cachefile_suite (void) | |
215 | { | |
216 | Suite *s = suite_create ("cachefile"); | |
217 | TCase *tc_chain = tcase_create ("general"); | |
218 | ||
219 | suite_add_tcase (s, tc_chain); | |
220 | tcase_add_test (tc_chain, test_write_read); | |
221 | tcase_add_test (tc_chain, test_write_merge); | |
222 | ||
223 | return s; | |
224 | } | |
225 | ||
226 | GST_CHECK_MAIN (gst_cachefile); |
61 | 61 | #define GST_PACKAGE_ORIGIN "Unknown package origin" |
62 | 62 | |
63 | 63 | /* GStreamer package release date/time for plugins as YYYY-MM-DD */ |
64 | #define GST_PACKAGE_RELEASE_DATETIME "2014-05-03" | |
64 | #define GST_PACKAGE_RELEASE_DATETIME "2014-05-21" | |
65 | 65 | |
66 | 66 | /* Define if static plugins should be built */ |
67 | 67 | #undef GST_PLUGIN_BUILD_STATIC |
353 | 353 | #define PACKAGE_NAME "GStreamer" |
354 | 354 | |
355 | 355 | /* Define to the full name and version of this package. */ |
356 | #define PACKAGE_STRING "GStreamer 1.3.1" | |
356 | #define PACKAGE_STRING "GStreamer 1.3.2" | |
357 | 357 | |
358 | 358 | /* Define to the one symbol short name of this package. */ |
359 | 359 | #define PACKAGE_TARNAME "gstreamer" |
362 | 362 | #undef PACKAGE_URL |
363 | 363 | |
364 | 364 | /* Define to the version of this package. */ |
365 | #define PACKAGE_VERSION "1.3.1" | |
365 | #define PACKAGE_VERSION "1.3.2" | |
366 | 366 | |
367 | 367 | /* directory where plugins are located */ |
368 | 368 | #ifdef _DEBUG |
400 | 400 | #undef USE_POISONING |
401 | 401 | |
402 | 402 | /* Version number of package */ |
403 | #define VERSION "1.3.1" | |
403 | #define VERSION "1.3.2" | |
404 | 404 | |
405 | 405 | /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most |
406 | 406 | significant byte first (like Motorola and SPARC, unlike Intel). */ |
56 | 56 | * |
57 | 57 | * The micro version of GStreamer at compile time: |
58 | 58 | */ |
59 | #define GST_VERSION_MICRO (1) | |
59 | #define GST_VERSION_MICRO (2) | |
60 | 60 | /** |
61 | 61 | * GST_VERSION_NANO: |
62 | 62 | * |