Debian Codegraph @

gstreamer/gstreamermm/basesrc.h

raw symbols SCIP
1 // Generated by gmmproc 2.50.1 -- DO NOT MODIFY!cxx . . $ `<file>/gstreamer/gstreamermm/basesrc.h`/
2 #ifndef _GSTREAMERMM_BASESRC_H
3 #define _GSTREAMERMM_BASESRC_Hcxx . . $ `gstreamer/gstreamermm/basesrc.h:3:9`!
4
5
6 #include <glibmm/ustring.h>
7 #include <sigc++/sigc++.h>
8
9 /* gstreamermm - a C++ wrapper for gstreamer
10 *
11 * Copyright 2008-2016 The gstreamermm Development Team
12 *
13 * This library is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU Lesser General Public
15 * License as published by the Free Software Foundation; either
16 * version 2.1 of the License, or (at your option) any later version.
17 *
18 * This library is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * Lesser General Public License for more details.
22 *
23 * You should have received a copy of the GNU Lesser General Public
24 * License along with this library; if not, write to the Free
25 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 */
27
28 #include <gst/base/gstbasesrc.h>
29 #include <gstreamermm/element.h>cxx . . $ `<file>/gstreamer/gstreamermm/element.h`/
30 #include <gstreamermm/pad.h>cxx . . $ `<file>/gstreamer/gstreamermm/pad.h`/
31 #include <gstreamermm/format.h>cxx . . $ `<file>/gstreamer/gstreamermm/format.h`/
32 #include <gstreamermm/clock.h>cxx . . $ `<file>/gstreamer/gstreamermm/clock.h`/
33 #include <gstreamermm/segment.h>cxx . . $ `<file>/gstreamer/gstreamermm/segment.h`/
34
35
36 #ifndef DOXYGEN_SHOULD_SKIP_THIS
37 using GstBaseSrccxx . . $ GstBaseSrc# = struct _GstBaseSrccxx . . $ _GstBaseSrc#;
38 using GstBaseSrcClasscxx . . $ GstBaseSrcClass# = struct _GstBaseSrcClasscxx . . $ _GstBaseSrcClass#;
39 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
40
41
42 #ifndef DOXYGEN_SHOULD_SKIP_THIS
43 namespace Gstcxx . . $ Gst/
44 { class BaseSrc_Classcxx . . $ Gst/BaseSrc_Class#; } // namespace Gst
45 #endif //DOXYGEN_SHOULD_SKIP_THIS
46
47 namespace Gstcxx . . $ Gst/
48 {
49
50 /** @addtogroup gstreamermmEnums gstreamermm Enums and Flags */
51
52 /**
53 * @var BaseSrcFlags BASE_SRC_FLAG_STARTING
54 * Has source is starting.
55 *
56 * @var BaseSrcFlags BASE_SRC_FLAG_STARTED
57 * Has source been started.
58 *
59 * @var BaseSrcFlags BASE_SRC_FLAG_LAST
60 * Offset to define more flags.
61 *
62 * @enum BaseSrcFlags
63 *
64 * The Gst::Element flags that a basesrc element may have.
65 *
66 * @ingroup gstreamermmEnums
67 * @par Bitwise operators:
68 * <tt>%BaseSrcFlags operator|(BaseSrcFlags, BaseSrcFlags)</tt><br>
69 * <tt>%BaseSrcFlags operator&(BaseSrcFlags, BaseSrcFlags)</tt><br>
70 * <tt>%BaseSrcFlags operator^(BaseSrcFlags, BaseSrcFlags)</tt><br>
71 * <tt>%BaseSrcFlags operator~(BaseSrcFlags)</tt><br>
72 * <tt>%BaseSrcFlags& operator|=(BaseSrcFlags&, BaseSrcFlags)</tt><br>
73 * <tt>%BaseSrcFlags& operator&=(BaseSrcFlags&, BaseSrcFlags)</tt><br>
74 * <tt>%BaseSrcFlags& operator^=(BaseSrcFlags&, BaseSrcFlags)</tt><br>
75 */
76 enum BaseSrcFlagscxx . . $ Gst/BaseSrcFlags#
77 {
78 BASE_SRC_FLAG_STARTINGcxx . . $ Gst/BASE_SRC_FLAG_STARTING. = (((GST_OBJECT_FLAG_LAST << 10)) << 0),
79 BASE_SRC_FLAG_STARTEDcxx . . $ Gst/BASE_SRC_FLAG_STARTED. = (((GST_OBJECT_FLAG_LAST << 10)) << 1),
80 BASE_SRC_FLAG_LASTcxx . . $ Gst/BASE_SRC_FLAG_LAST. = (((GST_OBJECT_FLAG_LAST << 10)) << 6)
81 };
82
83 /** @ingroup gstreamermmEnums */
84 inline BaseSrcFlagscxx . . $ Gst/BaseSrcFlags# operatorcxx . . $ Gst/`operator|`(2f9b9f9896df6132).|(BaseSrcFlagscxx . . $ Gst/BaseSrcFlags# lhs, BaseSrcFlagscxx . . $ Gst/BaseSrcFlags# rhs)
85 { return static_cast<BaseSrcFlagscxx . . $ Gst/BaseSrcFlags#>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
86
87 /** @ingroup gstreamermmEnums */
88 inline BaseSrcFlagscxx . . $ Gst/BaseSrcFlags# operatorcxx . . $ Gst/`operator&`(2f9b9f9896df6132).&(BaseSrcFlagscxx . . $ Gst/BaseSrcFlags# lhs, BaseSrcFlagscxx . . $ Gst/BaseSrcFlags# rhs)
89 { return static_cast<BaseSrcFlagscxx . . $ Gst/BaseSrcFlags#>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
90
91 /** @ingroup gstreamermmEnums */
92 inline BaseSrcFlagscxx . . $ Gst/BaseSrcFlags# operatorcxx . . $ Gst/`operator^`(2f9b9f9896df6132).^(BaseSrcFlagscxx . . $ Gst/BaseSrcFlags# lhs, BaseSrcFlagscxx . . $ Gst/BaseSrcFlags# rhs)
93 { return static_cast<BaseSrcFlagscxx . . $ Gst/BaseSrcFlags#>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
94
95 /** @ingroup gstreamermmEnums */
96 inline BaseSrcFlagscxx . . $ Gst/BaseSrcFlags# operatorcxx . . $ Gst/`operator~`(a30c4ffaf01b119d).~(BaseSrcFlagscxx . . $ Gst/BaseSrcFlags# flags)
97 { return static_cast<BaseSrcFlagscxx . . $ Gst/BaseSrcFlags#>(~static_cast<unsigned>(flags)); }
98
99 /** @ingroup gstreamermmEnums */
100 inline BaseSrcFlagscxx . . $ Gst/BaseSrcFlags#& operatorcxx . . $ Gst/`operator|=`(2e6785b5d065bbf7).|=(BaseSrcFlagscxx . . $ Gst/BaseSrcFlags#& lhs, BaseSrcFlagscxx . . $ Gst/BaseSrcFlags# rhs)
101 { return (lhs = static_cast<BaseSrcFlagscxx . . $ Gst/BaseSrcFlags#>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
102
103 /** @ingroup gstreamermmEnums */
104 inline BaseSrcFlagscxx . . $ Gst/BaseSrcFlags#& operatorcxx . . $ Gst/`operator&=`(2e6785b5d065bbf7).&=(BaseSrcFlagscxx . . $ Gst/BaseSrcFlags#& lhs, BaseSrcFlagscxx . . $ Gst/BaseSrcFlags# rhs)
105 { return (lhs = static_cast<BaseSrcFlagscxx . . $ Gst/BaseSrcFlags#>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
106
107 /** @ingroup gstreamermmEnums */
108 inline BaseSrcFlagscxx . . $ Gst/BaseSrcFlags#& operatorcxx . . $ Gst/`operator^=`(2e6785b5d065bbf7).^=(BaseSrcFlagscxx . . $ Gst/BaseSrcFlags#& lhs, BaseSrcFlagscxx . . $ Gst/BaseSrcFlags# rhs)
109 { return (lhs = static_cast<BaseSrcFlagscxx . . $ Gst/BaseSrcFlags#>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
110
111
112 /** A base class for getrange based source elements.
113 *
114 * This is a generice base class for source elements. The following types of
115 * sources are supported:
116 *
117 * - random access sources like files,
118 * - seekable sources,
119 * - live sources.
120 *
121 * The source can be configured to operate in any Gst::Format with the
122 * set_format() method. The currently set format determines the format of the
123 * internal Gst::Segment and any Gst::EVENT_NEWSEGMENT events. The default
124 * format for Gst::BaseSrc is Gst::FORMAT_BYTES.
125 *
126 * Gst::BaseSrc always supports push mode scheduling. If the following
127 * conditions are met, it also supports pull mode scheduling:
128 *
129 * - The format is set to Gst::FORMAT_BYTES (default).
130 * - Gst::BaseSrc::is_seekable_vfunc() returns TRUE.
131 *
132 * Since GStreamer 0.10.9, any Gst::BaseSrc can enable pull based scheduling at
133 * any time by overriding Gst::BaseSrc::check_get_range_vfunc() so that it
134 * returns TRUE.
135 *
136 * If all the conditions are met for operating in pull mode, Gst::BaseSrc is
137 * automatically seekable in push mode as well. The following conditions must
138 * be met to make the element seekable in push mode when the format is not
139 * Gst::FORMAT_BYTES:
140 *
141 * - Gst::BaseSrc::is_seekable_vfunc() returns TRUE.
142 * - Gst::BaseSrc::query_vfunc() can convert all supported seek formats to
143 * the internal format as set with set_format().
144 * - Gst::BaseSrc::do_seek_vfunc() is implemented, performs the seek and
145 * returns TRUE.
146 *
147 * When the element does not meet the requirements to operate in pull mode, the
148 * offset and length in the Gst::BaseSrc::create_vfunc() method should be
149 * ignored. It is recommended to subclass Gst::PushSrc instead, in this
150 * situation. If the element can operate in pull mode but only with specific
151 * offsets and lengths, it is allowed to generate an error when the wrong
152 * values are passed to the Gst::BaseSrc::create_vfunc() function.
153 *
154 * Gst::BaseSrc has support for live sources. Live sources are sources that
155 * when paused discard data, such as audio or video capture devices. A typical
156 * live source also produces data at a fixed rate and thus provides a clock to
157 * publish this rate. Use set_live() to activate the live source mode.
158 *
159 * A live source does not produce data in the PAUSED state. This means that the
160 * Gst::BaseSrc::create_vfunc() method will not be called in PAUSED but only in
161 * PLAYING. To signal the pipeline that the element will not produce data, the
162 * return value from the READY to PAUSED state will be
163 * Gst::STATE_CHANGE_NO_PREROLL.
164 *
165 * A typical live source will timestamp the buffers it creates with the current
166 * running time of the pipeline. This is one reason why a live source can only
167 * produce data in the PLAYING state, when the clock is actually distributed
168 * and running.
169 *
170 * Live sources that synchronize and block on the clock (an audio source, for
171 * example) can since GStreamer 0.10.12 use wait_playing() when the
172 * create_vfunc() function was interrupted by a state change to PAUSED.
173 *
174 * The Gst::BaseSrc::get_times_vfunc() method can be used to implement
175 * pseudo-live sources. It only makes sense to implement the get_times_vfunc()
176 * function if the source is a live source. The get_times_vfunc() function
177 * should return timestamps starting from 0, as if it were a non-live source.
178 * The base class will make sure that the timestamps are transformed into the
179 * current running_time. The base source will then wait for the calculated
180 * running_time before pushing out the buffer.
181 *
182 * For live sources, the base class will by default report a latency of 0. For
183 * pseudo live sources, the base class will by default measure the difference
184 * between the first buffer timestamp and the start time of get_times_vfunc()
185 * and will report this value as the latency. Subclasses should override the
186 * query_vfunc() function when this behaviour is not acceptable.
187 *
188 * TODO: Edit below paragraph for C++ and include C++ example from C API (if
189 * necessary):
190 *
191 * There is only support in Gst::BaseSrc for exactly one source pad, which
192 * should be named "src". A source implementation (subclass of Gst::BaseSrc)
193 * should install a pad template in its class_init function, like so:
194 * @code
195 * // static
196 * void SampleBaseSrc::base_init(Gst::ElementClass<SampleBaseSrc> *klass)
197 * {
198 * klass->add_pad_template(Gst::PadTemplate::create(
199 * "src",
200 * Gst::PAD_SRC,
201 * Gst::PAD_ALWAYS,
202 * Gst::Caps::create_from_string("x-application/x-foo1")
203 * ));
204 *
205 * klass->set_metadata("Source name", "Source", "My source element", "The author <[email protected]>");
206 * }
207 * @endcode
208 *
209 * <H2>Controlled shutdown of live sources in applications</H2>
210 *
211 * Applications that record from a live source may want to stop recording in a
212 * controlled way, so that the recording is stopped, but the data already in
213 * the pipeline is processed to the end (remember that many live sources would
214 * go on recording forever otherwise). For that to happen the application needs
215 * to make the source stop recording and send an EOS event down the pipeline.
216 * The application would then wait for an EOS message posted on the pipeline's
217 * bus to know when all data has been processed and the pipeline can safely be
218 * stopped.
219 *
220 * Since GStreamer 0.10.16 an application may send an EOS event to a source
221 * element to make it perform the EOS logic (send EOS event downstream or post
222 * a Gst::MESSAGE_SEGMENT_DONE on the bus). This can typically be done with the
223 * Gst::Element::send_event() function on the element or its parent bin.
224 *
225 * After the EOS has been sent to the element, the application should wait for
226 * an EOS message to be posted on the pipeline's bus. Once this EOS message is
227 * received, it may safely shut down the entire pipeline.
228 *
229 * The old behaviour for controlled shutdown introduced since GStreamer 0.10.3
230 * is still available but deprecated as it is dangerous and less flexible.
231 *
232 * Last reviewed on 2016-05-05 (1.8.0).
233 *
234 * @ingroup GstBaseClasses
235 */
236
237 class BaseSrccxx . . $ Gst/BaseSrc#
238 : public Elementcxx . . $ Gst/Element#
239 {
240
241 #ifndef DOXYGEN_SHOULD_SKIP_THIS
242
243 public:
244 using CppObjectTypecxx . . $ Gst/BaseSrc#CppObjectType# = BaseSrccxx . . $ Gst/BaseSrc#;
245 using CppClassTypecxx . . $ Gst/BaseSrc#CppClassType# = BaseSrc_Classcxx . . $ Gst/BaseSrc_Class#;
246 using BaseObjectTypecxx . . $ Gst/BaseSrc#BaseObjectType# = GstBaseSrccxx . . $ GstBaseSrc#;
247 using BaseClassTypecxx . . $ Gst/BaseSrc#BaseClassType# = GstBaseSrcClasscxx . . $ GstBaseSrcClass#;
248
249 // noncopyable
250 BaseSrccxx . . $ Gst/BaseSrc#BaseSrc(f21cbd6e016d4af0).(const BaseSrccxx . . $ Gst/BaseSrc#&) = delete;
251 BaseSrccxx . . $ Gst/BaseSrc#& operatorcxx . . $ Gst/BaseSrc#`operator=`(97997f9d102f91e).=(const BaseSrccxx . . $ Gst/BaseSrc#&) = delete;
252
253 private: friend class BaseSrc_Classcxx . . $ Gst/BaseSrc_Class#;
254 static CppClassTypecxx . . $ Gst/BaseSrc#CppClassType# basesrc_class_cxx . . $ Gst/BaseSrc#basesrc_class_.;
255
256 protected:
257 explicit BaseSrccxx . . $ Gst/BaseSrc#BaseSrc(237165b4a42a691a).(const Glibcxx . . $ Glib/::ConstructParamscxx . . $ Glib/ConstructParams#& construct_params);
258 explicit BaseSrccxx . . $ Gst/BaseSrc#BaseSrc(ce7ed1b6913c9f3c).(GstBaseSrccxx . . $ GstBaseSrc#* castitem);
259
260 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
261
262 public:
263
264 BaseSrccxx . . $ Gst/BaseSrc#BaseSrc(c1f48854013c1c36).(BaseSrccxx . . $ Gst/BaseSrc#&& src) noexcept;
265 BaseSrccxx . . $ Gst/BaseSrc#& operatorcxx . . $ Gst/BaseSrc#`operator=`(c32245d37b3b8e16).=(BaseSrccxx . . $ Gst/BaseSrc#&& src) noexcept;
266
267 ~cxx . . $ Gst/BaseSrc#`~BaseSrc`(ced63f7c635d850d).BaseSrccxx . . $ Gst/BaseSrc#() noexcept override;
268
269 /** Get the GType for this class, for use with the underlying GObject type system.
270 */
271 static GType get_typecxx . . $ Gst/BaseSrc#get_type(f708dce9a8856c70).() G_GNUC_CONSTcxx . . $ `gstreamer/gstreamermm/wrap_init.cc:9:9`!;
272
273 #ifndef DOXYGEN_SHOULD_SKIP_THIS
274
275
276 static GType get_base_typecxx . . $ Gst/BaseSrc#get_base_type(f708dce9a8856c70).() G_GNUC_CONSTcxx . . $ `<external>/12741050725406041920/gmacros.h:640:9`!;
277 #endif
278
279 ///Provides access to the underlying C GObject.
280 GstBaseSrccxx . . $ GstBaseSrc#* gobjcxx . . $ Gst/BaseSrc#gobj(a2960c3f28421427).() { return reinterpret_cast<GstBaseSrccxx . . $ GstBaseSrc#*>(gobject_cxx . . $ Glib/ObjectBase#gobject_.); }
281
282 ///Provides access to the underlying C GObject.
283 const GstBaseSrccxx . . $ GstBaseSrc#* gobjcxx . . $ Gst/BaseSrc#gobj(934e8f75948f1d81).() const { return reinterpret_cast<GstBaseSrccxx . . $ GstBaseSrc#*>(gobject_cxx . . $ Glib/ObjectBase#gobject_.); }
284
285 ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
286 GstBaseSrccxx . . $ GstBaseSrc#* gobj_copycxx . . $ Gst/BaseSrc#gobj_copy(a2960c3f28421427).();
287
288 private:
289
290
291 public:
292
293 /** If the Gst::BaseSrcClass.create() method performs its own synchronisation
294 * against the clock it must unblock when going from PLAYING to the PAUSED state
295 * and call this method before continuing to produce the remaining data.
296 *
297 * This function will block until a state change to PLAYING happens (in which
298 * case this function returns Gst::FLOW_OK) or the processing must be stopped due
299 * to a state change to READY or a FLUSH event (in which case this function
300 * returns Gst::FLOW_FLUSHING).
301 *
302 * @return Gst::FLOW_OK if @a src is PLAYING and processing can
303 * continue. Any other return value should be returned from the create vmethod.
304 */
305 FlowReturncxx . . $ Gst/FlowReturn# wait_playingcxx . . $ Gst/BaseSrc#wait_playing(3a0c81c66b380fca).();
306
307 /** Check if an element is in live mode.
308 *
309 * @return <tt>true</tt> if element is in live mode.
310 */
311 bool is_livecxx . . $ Gst/BaseSrc#is_live(50ce9a9e25b4a850).() const;
312
313 /** If the element listens to a live source, @a live should
314 * be set to <tt>true</tt>.
315 *
316 * A live source will not produce data in the PAUSED state and
317 * will therefore not be able to participate in the PREROLL phase
318 * of a pipeline. To signal this fact to the application and the
319 * pipeline, the state change return value of the live source will
320 * be GST_STATE_CHANGE_NO_PREROLL.
321 *
322 * @param live New live-mode.
323 */
324 void set_livecxx . . $ Gst/BaseSrc#set_live(b45ddcbc8423892c).(bool live);
325
326 /** Sets the default format of the source. This will be the format used
327 * for sending SEGMENT events and for performing seeks.
328 *
329 * If a format of GST_FORMAT_BYTES is set, the element will be able to
330 * operate in pull mode if the Gst::BaseSrcClass.is_seekable() returns <tt>true</tt>.
331 *
332 * This function must only be called in states < Gst::STATE_PAUSED.
333 *
334 * @param format The format to use.
335 */
336 void set_formatcxx . . $ Gst/BaseSrc#set_format(a5d60b7254be6bff).(Formatcxx . . $ Gst/Format# format);
337
338 /** Query the source for the latency parameters. @a live will be <tt>true</tt> when @a src is
339 * configured as a live source. @a min_latency and @a max_latency will be set
340 * to the difference between the running time and the timestamp of the first
341 * buffer.
342 *
343 * This function is mostly used by subclasses.
344 *
345 * @param live If the source is live.
346 * @param min_latency The min latency of the source.
347 * @param max_latency The max latency of the source.
348 * @return <tt>true</tt> if the query succeeded.
349 */
350 bool query_latencycxx . . $ Gst/BaseSrc#query_latency(cd391a3f64034206).(bool& live, Gstcxx . . $ Gst/::ClockTimecxx . . $ Gst/ClockTime#& min_latency, Gstcxx . . $ Gst/::ClockTimecxx . . $ Gst/ClockTime#& max_latency) const;
351
352 /** Get the number of bytes that @a src will push out with each buffer.
353 *
354 * @return The number of bytes pushed with each buffer.
355 */
356 guint get_blocksizecxx . . $ Gst/BaseSrc#get_blocksize(ddd8539a2fcdd4ce).() const;
357
358 /** Set the number of bytes that @a src will push out with each buffer. When
359 * @a blocksize is set to -1, a default length will be used.
360 *
361 * @param blocksize The new blocksize in bytes.
362 */
363 void set_blocksizecxx . . $ Gst/BaseSrc#set_blocksize(cb2f890c2fdad230).(guint blocksize);
364
365 /** Query if @a src timestamps outgoing buffers based on the current running_time.
366 *
367 * @return <tt>true</tt> if the base class will automatically timestamp outgoing buffers.
368 */
369 bool get_do_timestampcxx . . $ Gst/BaseSrc#get_do_timestamp(50ce9a9e25b4a850).() const;
370
371 /** Configure @a src to automatically timestamp outgoing buffers based on the
372 * current running_time of the pipeline. This property is mostly useful for live
373 * sources.
374 *
375 * @param timestamp Enable or disable timestamping.
376 */
377 void set_do_timestampcxx . . $ Gst/BaseSrc#set_do_timestamp(b45ddcbc8423892c).(bool timestamp);
378
379 /** Prepare a new seamless segment for emission downstream. This function must
380 * only be called by derived sub-classes, and only from the create() function,
381 * as the stream-lock needs to be held.
382 *
383 * The format for the new segment will be the current format of the source, as
384 * configured with set_format()
385 *
386 * @param start The new start value for the segment.
387 * @param stop Stop value for the new segment.
388 * @param position The new time value for the start of the new segment.
389 * @return <tt>true</tt> if preparation of the seamless segment succeeded.
390 */
391 bool new_seamless_segmentcxx . . $ Gst/BaseSrc#new_seamless_segment(b82a3ef6165a407e).(gint64 start, gint64 stop, gint64 position);
392
393 /** Set new caps on the basesrc source pad.
394 *
395 * @param caps A Gst::Caps.
396 * @return <tt>true</tt> if the caps could be set.
397 */
398 bool set_capscxx . . $ Gst/BaseSrc#set_caps(d71e2c92ee80648b).(const Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Capscxx . . $ Gst/Caps#>& caps);
399
400 /** Wait until the start operation completes.
401 *
402 * @return A Gst::FlowReturn.
403 */
404 Gstcxx . . $ Gst/::FlowReturncxx . . $ Gst/FlowReturn# start_waitcxx . . $ Gst/BaseSrc#start_wait(3a0c81c66b380fca).();
405
406 /** If not @a dynamic_size, size is only updated when needed, such as when trying to
407 * read past current tracked size. Otherwise, size is checked for upon each
408 * read.
409 *
410 * @param dynamic_size New dynamic size mode.
411 */
412 void set_dynamic_sizecxx . . $ Gst/BaseSrc#set_dynamic_size(b45ddcbc8423892c).(bool dynamic_size);
413
414 /** Configure async behaviour in @a src, no state change will block. The open,
415 * close, start, stop, play and pause virtual methods will be executed in a
416 * different thread and are thus allowed to perform blocking operations. Any
417 * blocking operation should be unblocked with the unlock vmethod.
418 *
419 * @param async New async mode.
420 */
421 void set_asynccxx . . $ Gst/BaseSrc#set_async(b45ddcbc8423892c).(bool async);
422
423 /** Get the current async behaviour of @a src. See also set_async().
424 *
425 * @return <tt>true</tt> if @a src is operating in async mode.
426 */
427 bool is_asynccxx . . $ Gst/BaseSrc#is_async(50ce9a9e25b4a850).() const;
428
429 /** Complete an asynchronous start operation. When the subclass overrides the
430 * start method, it should call start_complete() when the start
431 * operation completes either from the same thread or from an asynchronous
432 * helper thread.
433 *
434 * @param ret A Gst::FlowReturn.
435 */
436 void start_completecxx . . $ Gst/BaseSrc#start_complete(85af068bdbdb1ab7).(Gstcxx . . $ Gst/::FlowReturncxx . . $ Gst/FlowReturn# ret);
437
438 /** If @a automatic_eos is <tt>true</tt>, @a src will automatically go EOS if a buffer
439 * after the total size is returned. By default this is <tt>true</tt> but sources
440 * that can't return an authoritative size and only know that they're EOS
441 * when trying to read more should set this to <tt>false</tt>.
442 *
443 * @param automatic_eos Automatic eos.
444 */
445 void set_automatic_eoscxx . . $ Gst/BaseSrc#set_automatic_eos(b45ddcbc8423892c).(bool automatic_eos);
446
447 /** Returns the memory @a allocator used by the base class and its @a params.
448 *
449 * @param params The Gst::AllocationParams of @a allocator.
450 * @return The Gst::Allocator used.
451 */
452 Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Allocatorcxx . . $ Gst/Allocator#> get_allocatorcxx . . $ Gst/BaseSrc#get_allocator(83c1a0bc496c7b91).(Gstcxx . . $ Gst/::AllocationParamscxx . . $ Gst/AllocationParams#& params);
453
454
455 /** Gets the source Gst::Pad object of the element.
456 */
457 Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Padcxx . . $ Gst/Pad#> get_src_padcxx . . $ Gst/BaseSrc#get_src_pad(933c6ba9162839d3).();
458 Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<const Gstcxx . . $ Gst/::Padcxx . . $ Gst/Pad#> get_src_padcxx . . $ Gst/BaseSrc#get_src_pad(dca65d54e9e25cdd).() const;
459
460 /** Size in bytes to read per buffer (-1 = default).
461 *
462 * @return A PropertyProxy that allows you to get or set the value of the property,
463 * or receive notification when the value of the property changes.
464 */
465 Glibcxx . . $ Glib/::PropertyProxycxx . . $ Glib/PropertyProxy#< gulong > property_blocksizecxx . . $ Gst/BaseSrc#property_blocksize(d486e8c449033ce8).() ;
466
467 /** Size in bytes to read per buffer (-1 = default).
468 *
469 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
470 * or receive notification when the value of the property changes.
471 */
472 Glibcxx . . $ Glib/::PropertyProxy_ReadOnlycxx . . $ Glib/PropertyProxy_ReadOnly#< gulong > property_blocksizecxx . . $ Gst/BaseSrc#property_blocksize(626cd103ac35282).() const;
473
474 /** Apply current stream time to buffers.
475 *
476 * @return A PropertyProxy that allows you to get or set the value of the property,
477 * or receive notification when the value of the property changes.
478 */
479 Glibcxx . . $ Glib/::PropertyProxycxx . . $ Glib/PropertyProxy#< bool > property_do_timestampcxx . . $ Gst/BaseSrc#property_do_timestamp(962e4b383dc974dc).() ;
480
481 /** Apply current stream time to buffers.
482 *
483 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
484 * or receive notification when the value of the property changes.
485 */
486 Glibcxx . . $ Glib/::PropertyProxy_ReadOnlycxx . . $ Glib/PropertyProxy_ReadOnly#< bool > property_do_timestampcxx . . $ Gst/BaseSrc#property_do_timestamp(bb701360c56d84c7).() const;
487
488 /** Number of buffers to output before sending EOS (-1 = unlimited).
489 *
490 * @return A PropertyProxy that allows you to get or set the value of the property,
491 * or receive notification when the value of the property changes.
492 */
493 Glibcxx . . $ Glib/::PropertyProxycxx . . $ Glib/PropertyProxy#< int > property_num_bufferscxx . . $ Gst/BaseSrc#property_num_buffers(bf3998fdb218c766).() ;
494
495 /** Number of buffers to output before sending EOS (-1 = unlimited).
496 *
497 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
498 * or receive notification when the value of the property changes.
499 */
500 Glibcxx . . $ Glib/::PropertyProxy_ReadOnlycxx . . $ Glib/PropertyProxy_ReadOnly#< int > property_num_bufferscxx . . $ Gst/BaseSrc#property_num_buffers(7e9006e11d14f0d6).() const;
501
502 /** Run typefind before negotiating.
503 *
504 * @return A PropertyProxy that allows you to get or set the value of the property,
505 * or receive notification when the value of the property changes.
506 */
507 Glibcxx . . $ Glib/::PropertyProxycxx . . $ Glib/PropertyProxy#< bool > property_typefindcxx . . $ Gst/BaseSrc#property_typefind(962e4b383dc974dc).() ;
508
509 /** Run typefind before negotiating.
510 *
511 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
512 * or receive notification when the value of the property changes.
513 */
514 Glibcxx . . $ Glib/::PropertyProxy_ReadOnlycxx . . $ Glib/PropertyProxy_ReadOnly#< bool > property_typefindcxx . . $ Gst/BaseSrc#property_typefind(bb701360c56d84c7).() const;
515
516
517 /** Called to get the caps to report.
518 */
519 virtual Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Capscxx . . $ Gst/Caps#> get_caps_vfunccxx . . $ Gst/BaseSrc#get_caps_vfunc(74dce9e80895d45c).(const Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Capscxx . . $ Gst/Caps#>& caps) const;
520
521
522 /** Notify subclass of changed output caps.
523 */
524 virtual bool set_caps_vfunccxx . . $ Gst/BaseSrc#set_caps_vfunc(d71e2c92ee80648b).(const Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Capscxx . . $ Gst/Caps#>& caps);
525
526
527 /** Negotiated the caps with the peer.
528 */
529 virtual bool negotiate_vfunccxx . . $ Gst/BaseSrc#negotiate_vfunc(c9857a73d68e59ba).();
530
531
532 /** Stop processing. Subclasses should use this to close resources.
533 */
534 virtual bool stop_vfunccxx . . $ Gst/BaseSrc#stop_vfunc(c9857a73d68e59ba).();
535
536
537 /** Start processing. Subclasses should open resources and prepare to produce
538 * data.
539 */
540 virtual bool start_vfunccxx . . $ Gst/BaseSrc#start_vfunc(c9857a73d68e59ba).();
541
542
543 /** Given a buffer, return the start and stop time when it should be pushed
544 * out. The base class will sync on the clock using these times.
545 */
546 virtual void get_times_vfunccxx . . $ Gst/BaseSrc#get_times_vfunc(c439da376c492fdc).(const Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Buffercxx . . $ Gst/Buffer#>& buffer, Gstcxx . . $ Gst/::ClockTimecxx . . $ Gst/ClockTime#& start, Gstcxx . . $ Gst/::ClockTimecxx . . $ Gst/ClockTime#& end) const;
547
548
549 /** Return the total size of the resource, in the configured format.
550 */
551 virtual bool get_size_vfunccxx . . $ Gst/BaseSrc#get_size_vfunc(e336676645bf3277).(guint64& size) const;
552
553
554 /** Check if the source can seek.
555 */
556 virtual bool is_seekable_vfunccxx . . $ Gst/BaseSrc#is_seekable_vfunc(50ce9a9e25b4a850).() const;
557
558
559 /** Unlock any pending access to the resource. Subclasses should unblock any
560 * blocked function ASAP.
561 */
562 virtual bool unlock_vfunccxx . . $ Gst/BaseSrc#unlock_vfunc(c9857a73d68e59ba).();
563
564
565 /** Override this to implement custom event handling.
566 */
567 virtual bool event_vfunccxx . . $ Gst/BaseSrc#event_vfunc(2055ffde69ae5030).(const Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Eventcxx . . $ Gst/Event#>& event);
568
569
570 virtual FlowReturncxx . . $ Gst/FlowReturn# create_vfunccxx . . $ Gst/BaseSrc#create_vfunc(3e8a842ebd68c874).(guint64 offset, guint size, Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Buffercxx . . $ Gst/Buffer#>& buffer);
571
572 /** Perform seeking on the resource to the indicated segment.
573 */
574 virtual bool do_seek_vfunccxx . . $ Gst/BaseSrc#do_seek_vfunc(59cd4886809070e2).(Gstcxx . . $ Gst/::Segmentcxx . . $ Gst/Segment#& segment);
575
576 // Cannot use query_vfunc because the name has been used in the Gst::Element class.
577 // We have to provide custom implementation, because query vfunc expects writable
578 // query object.
579 /** Handle a requested query.
580 */
581 virtual bool base_src_query_vfunccxx . . $ Gst/BaseSrc#base_src_query_vfunc(363e9ac1e31c4481).(const Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Querycxx . . $ Gst/Query#>& query);
582
583 /** Called during negotiation if caps need fixating. Implement instead of
584 * setting a fixate function on the source pad.
585 */
586 virtual Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Capscxx . . $ Gst/Caps#> fixate_vfunccxx . . $ Gst/BaseSrc#fixate_vfunc(cac43ebfde7bbd09).(const Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Capscxx . . $ Gst/Caps#>& caps);
587
588
589 /** Clear the previous unlock request. Subclasses should clear any state they
590 * set during unlock_vfunc(), such as clearing command queues.
591 */
592 virtual bool unlock_stop_vfunccxx . . $ Gst/BaseSrc#unlock_stop_vfunc(c9857a73d68e59ba).();
593
594
595 /** Prepare the Gst::Segment that will be passed to the do_seek_vfunc()
596 * vmethod for executing a seek request. Sub-classes should override this if
597 * they support seeking in formats other than the configured native format.
598 * By default, it tries to convert the seek arguments to the configured
599 * native format and prepare a segment in that format.
600 */
601 virtual bool prepare_seek_segment_vfunccxx . . $ Gst/BaseSrc#prepare_seek_segment_vfunc(7eefb845b1ed4a76).(const Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Eventcxx . . $ Gst/Event#>& seek, Gstcxx . . $ Gst/::Segmentcxx . . $ Gst/Segment#& segment);
602
603
604 /** Configure the allocation query.
605 */
606 virtual bool decide_allocation_vfunccxx . . $ Gst/BaseSrc#decide_allocation_vfunc(363e9ac1e31c4481).(const Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Querycxx . . $ Gst/Query#>& query);
607
608
609 /** Ask the subclass to allocate a buffer with for offset and size. The default
610 * implementation will create a new buffer from the negotiated allocator.
611 */
612 Gstcxx . . $ Gst/::FlowReturncxx . . $ Gst/FlowReturn# alloc_vfunccxx . . $ Gst/BaseSrc#alloc_vfunc(3e8a842ebd68c874).(guint64 offset, guint size, Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Buffercxx . . $ Gst/Buffer#>& buffer);
613
614 /** Ask the subclass to fill the buffer with data for offset and size. The passed
615 * buffer is guaranteed to hold the requested amount of bytes.
616 */
617 virtual Gstcxx . . $ Gst/::FlowReturncxx . . $ Gst/FlowReturn# fill_vfunccxx . . $ Gst/BaseSrc#fill_vfunc(462a3b94bd07269b).(guint64 offset, guint size, const Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Buffercxx . . $ Gst/Buffer#>& buffer);
618
619 protected:
620
621
622 public:
623
624 public:
625 //C++ methods used to invoke GTK+ virtual functions:
626
627 protected:
628 //GTK+ Virtual Functions (override these to change behaviour):
629
630 //Default Signal Handlers::
631
632
633 };
634
635 } //namespace Gst
636
637
638 namespace Glibcxx . . $ Glib/
639 {
640 /** A Glib::wrap() method for this object.
641 *
642 * @param object The C instance.
643 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
644 * @result A C++ instance that wraps this C instance.
645 *
646 * @relates Gst::BaseSrc
647 */
648 Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::BaseSrccxx . . $ Gst/BaseSrc#> wrapcxx . . $ Glib/wrap(f9eb66dd7dc65d41).(GstBaseSrccxx . . $ GstBaseSrc#* object, bool take_copy = false);
649 }
650
651
652 #endif /* _GSTREAMERMM_BASESRC_H */
653