Debian Codegraph @

gstreamer/gstreamermm/discovererinfo.h

raw symbols SCIP
1 // Generated by gmmproc 2.50.1 -- DO NOT MODIFY!
2 #ifndef _GSTREAMERMM_DISCOVERERINFO_H
3 #define _GSTREAMERMM_DISCOVERERINFO_H
4
5
6 #include <glibmm/ustring.h>
7 #include <sigc++/sigc++.h>
8
9 /* gstreamermm - a C++ wrapper for gstreamer
10 *
11 * Copyright 2011-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 <gstreamermm/miniobject.h>
29 #include <gstreamermm/clock.h>
30
31
32 #ifndef DOXYGEN_SHOULD_SKIP_THIS
33 typedef struct _GstDiscovererInfo GstDiscovererInfo;
34 typedef GObjectClass GstDiscovererInfoClass;
35 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
36
37 #ifndef DOXYGEN_SHOULD_SKIP_THIS
38 typedef struct _GstDiscovererStreamInfo GstDiscovererStreamInfo;
39 typedef GObjectClass GstDiscovererStreamInfoClass;
40 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
41
42 #ifndef DOXYGEN_SHOULD_SKIP_THIS
43 typedef struct _GstDiscovererContainerInfo GstDiscovererContainerInfo;
44 typedef GObjectClass GstDiscovererContainerInfoClass;
45 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
46
47 #ifndef DOXYGEN_SHOULD_SKIP_THIS
48 typedef struct _GstDiscovererAudioInfo GstDiscovererAudioInfo;
49 typedef GObjectClass GstDiscovererAudioInfoClass;
50 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
51
52 #ifndef DOXYGEN_SHOULD_SKIP_THIS
53 typedef struct _GstDiscovererVideoInfo GstDiscovererVideoInfo;
54 typedef GObjectClass GstDiscovererVideoInfoClass;
55 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
56
57 namespace Gst
58 {
59
60 /** @addtogroup gstreamermmEnums gstreamermm Enums and Flags */
61
62 /**
63 * @var DiscovererResult DISCOVERER_OK
64 * The discovery was successful.
65 *
66 * @var DiscovererResult DISCOVERER_URI_INVALID
67 * The URI is invalid.
68 *
69 * @var DiscovererResult DISCOVERER_ERROR
70 * An error happened and the GError is set.
71 *
72 * @var DiscovererResult DISCOVERER_TIMEOUT
73 * The discovery timed-out.
74 *
75 * @var DiscovererResult DISCOVERER_BUSY
76 * The discoverer was already discovering a file.
77 *
78 * @var DiscovererResult DISCOVERER_MISSING_PLUGINS
79 * Some plugins are missing for full discovery.
80 *
81 * @enum DiscovererResult
82 *
83 * Result values for the discovery process.
84 *
85 * @ingroup gstreamermmEnums
86 */
87 enum DiscovererResult
88 {
89 DISCOVERER_OK,
90 DISCOVERER_URI_INVALID,
91 DISCOVERER_ERROR,
92 DISCOVERER_TIMEOUT,
93 DISCOVERER_BUSY,
94 DISCOVERER_MISSING_PLUGINS
95 };
96
97 } // namespace Gst
98
99 #ifndef DOXYGEN_SHOULD_SKIP_THIS
100 namespace Glib
101 {
102
103 template <>
104 class Value<Gst::DiscovererResult> : public Glib::Value_Enum<Gst::DiscovererResult>
105 {
106 public:
107 static GType value_type() G_GNUC_CONST;
108 };
109
110 } // namespace Glib
111 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
112
113 namespace Gst
114 {
115
116 /**
117 * @var DiscovererSerializeFlags DISCOVERER_SERIALIZE_BASIC
118 * Serialize only basic information, excluding
119 * caps, tags and miscellaneous information.
120 *
121 * @var DiscovererSerializeFlags DISCOVERER_SERIALIZE_CAPS
122 * Serialize the caps for each stream.
123 *
124 * @var DiscovererSerializeFlags DISCOVERER_SERIALIZE_TAGS
125 * Serialize the tags for each stream.
126 *
127 * @var DiscovererSerializeFlags DISCOVERER_SERIALIZE_MISC
128 * Serialize miscellaneous information for each stream.
129 *
130 * @var DiscovererSerializeFlags DISCOVERER_SERIALIZE_ALL
131 * Serialize all the available info, including
132 * caps, tags and miscellaneous information.
133 *
134 * @enum DiscovererSerializeFlags
135 *
136 * You can use these flags to control what is serialized by
137 * Gst::Discoverer::info_to_variant()
138 *
139 * @ingroup gstreamermmEnums
140 * @par Bitwise operators:
141 * <tt>%DiscovererSerializeFlags operator|(DiscovererSerializeFlags, DiscovererSerializeFlags)</tt><br>
142 * <tt>%DiscovererSerializeFlags operator&(DiscovererSerializeFlags, DiscovererSerializeFlags)</tt><br>
143 * <tt>%DiscovererSerializeFlags operator^(DiscovererSerializeFlags, DiscovererSerializeFlags)</tt><br>
144 * <tt>%DiscovererSerializeFlags operator~(DiscovererSerializeFlags)</tt><br>
145 * <tt>%DiscovererSerializeFlags& operator|=(DiscovererSerializeFlags&, DiscovererSerializeFlags)</tt><br>
146 * <tt>%DiscovererSerializeFlags& operator&=(DiscovererSerializeFlags&, DiscovererSerializeFlags)</tt><br>
147 * <tt>%DiscovererSerializeFlags& operator^=(DiscovererSerializeFlags&, DiscovererSerializeFlags)</tt><br>
148 */
149 enum DiscovererSerializeFlags
150 {
151 DISCOVERER_SERIALIZE_BASIC = 0x0,
152 DISCOVERER_SERIALIZE_CAPS = 1 << 0,
153 DISCOVERER_SERIALIZE_TAGS = 1 << 1,
154 DISCOVERER_SERIALIZE_MISC = 1 << 2,
155 DISCOVERER_SERIALIZE_ALL = 0x7
156 };
157
158 /** @ingroup gstreamermmEnums */
159 inline DiscovererSerializeFlags operator|(DiscovererSerializeFlags lhs, DiscovererSerializeFlags rhs)
160 { return static_cast<DiscovererSerializeFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
161
162 /** @ingroup gstreamermmEnums */
163 inline DiscovererSerializeFlags operator&(DiscovererSerializeFlags lhs, DiscovererSerializeFlags rhs)
164 { return static_cast<DiscovererSerializeFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
165
166 /** @ingroup gstreamermmEnums */
167 inline DiscovererSerializeFlags operator^(DiscovererSerializeFlags lhs, DiscovererSerializeFlags rhs)
168 { return static_cast<DiscovererSerializeFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
169
170 /** @ingroup gstreamermmEnums */
171 inline DiscovererSerializeFlags operator~(DiscovererSerializeFlags flags)
172 { return static_cast<DiscovererSerializeFlags>(~static_cast<unsigned>(flags)); }
173
174 /** @ingroup gstreamermmEnums */
175 inline DiscovererSerializeFlags& operator|=(DiscovererSerializeFlags& lhs, DiscovererSerializeFlags rhs)
176 { return (lhs = static_cast<DiscovererSerializeFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
177
178 /** @ingroup gstreamermmEnums */
179 inline DiscovererSerializeFlags& operator&=(DiscovererSerializeFlags& lhs, DiscovererSerializeFlags rhs)
180 { return (lhs = static_cast<DiscovererSerializeFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
181
182 /** @ingroup gstreamermmEnums */
183 inline DiscovererSerializeFlags& operator^=(DiscovererSerializeFlags& lhs, DiscovererSerializeFlags rhs)
184 { return (lhs = static_cast<DiscovererSerializeFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
185
186 } // namespace Gst
187
188 #ifndef DOXYGEN_SHOULD_SKIP_THIS
189 namespace Glib
190 {
191
192 template <>
193 class Value<Gst::DiscovererSerializeFlags> : public Glib::Value_Flags<Gst::DiscovererSerializeFlags>
194 {
195 public:
196 static GType value_type() G_GNUC_CONST;
197 };
198
199 } // namespace Glib
200 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
201
202 namespace Gst
203 {
204
205
206 class Caps;
207 class DiscovererStreamInfo;
208 class Structure;
209 class TagList;
210 class Toc;
211
212 /** DiscovererInfo - Class containing the information of a URI analyzed by
213 * Gst::Discoverer.
214 */
215 class DiscovererInfo : public MiniObject
216 {
217 public:
218 #ifndef DOXYGEN_SHOULD_SKIP_THIS
219 using CppObjectType = DiscovererInfo;
220 using BaseObjectType = GstDiscovererInfo;
221 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
222
223 static Glib::RefPtr<DiscovererInfo> create();
224
225 /** Increment the reference count for this object.
226 * You should never need to do this manually - use the object via a RefPtr instead.
227 */
228 void reference() const;
229
230 /** Decrement the reference count for this object.
231 * You should never need to do this manually - use the object via a RefPtr instead.
232 */
233 void unreference() const;
234
235 ///Provides access to the underlying C instance.
236 GstDiscovererInfo* gobj();
237
238 ///Provides access to the underlying C instance.
239 const GstDiscovererInfo* gobj() const;
240
241 ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
242 GstDiscovererInfo* gobj_copy() const;
243
244 DiscovererInfo() = delete;
245
246 // noncopyable
247 DiscovererInfo(const DiscovererInfo&) = delete;
248 DiscovererInfo& operator=(const DiscovererInfo&) = delete;
249
250 protected:
251 // Do not derive this. Gst::DiscovererInfo can neither be constructed nor deleted.
252
253 void operator delete(void*, std::size_t);
254
255 private:
256
257
258 public:
259
260 /** @return A copy of the Gst::DiscovererInfo.
261 */
262 Glib::RefPtr<Gst::DiscovererInfo> copy() const;
263
264
265 /** @return The duration of the URI in Gst::ClockTime (nanoseconds).
266 */
267 ClockTime get_duration() const;
268
269
270 /** Deprecated: This functions is deprecated since version 1.4, use
271 * #gst_discoverer_info_get_missing_elements_installer_details
272 *
273 * @return Miscellaneous information stored as a Gst::Structure
274 * (for example: information about missing plugins). If you wish to use the
275 * Gst::Structure after the life-time of @a info, you will need to copy it.
276 */
277 Structure get_misc() const;
278
279 /** @return The result of the discovery as a Gst::DiscovererResult.
280 */
281 DiscovererResult get_result() const;
282
283
284 /** @return The structure (or topology) of the URI as a
285 * Gst::DiscovererStreamInfo.
286 * This structure can be traversed to see the original hierarchy. Unref with
287 * gst_discoverer_stream_info_unref() after usage.
288 */
289 Glib::RefPtr<Gst::DiscovererStreamInfo> get_stream_info();
290
291 /** @return The structure (or topology) of the URI as a
292 * Gst::DiscovererStreamInfo.
293 * This structure can be traversed to see the original hierarchy. Unref with
294 * gst_discoverer_stream_info_unref() after usage.
295 */
296 Glib::RefPtr<const Gst::DiscovererStreamInfo> get_stream_info() const;
297
298
299 /** @return The list of
300 * all streams contained in the #info. Free after usage
301 * with stream_info_list_free().
302 */
303 std::vector< Glib::RefPtr<Gst::DiscovererStreamInfo> > get_stream_list();
304
305 /** @return The list of
306 * all streams contained in the #info. Free after usage
307 * with stream_info_list_free().
308 */
309 std::vector< Glib::RefPtr<const Gst::DiscovererStreamInfo> > get_stream_list() const;
310
311
312 /** @return All tags contained in the URI. If you wish to use
313 * the tags after the life-time of @a info, you will need to copy them.
314 */
315 Gst::TagList get_tags() const;
316
317
318 /** @return The URI to which this information corresponds to.
319 * Copy it if you wish to use it after the life-time of @a info.
320 */
321 Glib::ustring get_uri() const;
322
323 /** @return The whether the URI is seekable.
324 */
325 bool get_seekable() const;
326
327
328 /** Finds all the Gst::DiscovererAudioInfo contained in @a info
329 *
330 * @return A List of
331 * matching Gst::DiscovererStreamInfo. The caller should free it with
332 * stream_info_list_free().
333 */
334 std::vector< Glib::RefPtr<Gst::DiscovererStreamInfo> > get_audio_streams();
335
336 /** Finds all the Gst::DiscovererAudioInfo contained in @a info
337 *
338 * @return A List of
339 * matching Gst::DiscovererStreamInfo. The caller should free it with
340 * stream_info_list_free().
341 */
342 std::vector< Glib::RefPtr<const Gst::DiscovererStreamInfo> > get_audio_streams() const;
343
344
345 /** Finds all the Gst::DiscovererContainerInfo contained in @a info
346 *
347 * @return A List of
348 * matching Gst::DiscovererStreamInfo. The caller should free it with
349 * stream_info_list_free().
350 */
351 std::vector< Glib::RefPtr<Gst::DiscovererStreamInfo> > get_container_streams();
352
353 /** Finds all the Gst::DiscovererContainerInfo contained in @a info
354 *
355 * @return A List of
356 * matching Gst::DiscovererStreamInfo. The caller should free it with
357 * stream_info_list_free().
358 */
359 std::vector< Glib::RefPtr<const Gst::DiscovererStreamInfo> > get_container_streams() const;
360
361
362 /** Finds the Gst::DiscovererStreamInfo contained in @a info that match the
363 * given @a streamtype.
364 *
365 * @param streamtype A Type derived from Gst::DiscovererStreamInfo.
366 * @return A List of
367 * matching Gst::DiscovererStreamInfo. The caller should free it with
368 * stream_info_list_free().
369 */
370 std::vector< Glib::RefPtr<Gst::DiscovererStreamInfo> > get_streams(GType streamtype);
371
372 /** Finds the Gst::DiscovererStreamInfo contained in @a info that match the
373 * given @a streamtype.
374 *
375 * @param streamtype A Type derived from Gst::DiscovererStreamInfo.
376 * @return A List of
377 * matching Gst::DiscovererStreamInfo. The caller should free it with
378 * stream_info_list_free().
379 */
380 std::vector< Glib::RefPtr<const Gst::DiscovererStreamInfo> > get_streams(GType streamtype) const;
381
382
383 /** Finds all the Gst::DiscovererVideoInfo contained in @a info
384 *
385 * @return A List of
386 * matching Gst::DiscovererStreamInfo. The caller should free it with
387 * stream_info_list_free().
388 */
389 std::vector< Glib::RefPtr<Gst::DiscovererStreamInfo> > get_video_streams();
390
391 /** Finds all the Gst::DiscovererVideoInfo contained in @a info
392 *
393 * @return A List of
394 * matching Gst::DiscovererStreamInfo. The caller should free it with
395 * stream_info_list_free().
396 */
397 std::vector< Glib::RefPtr<const Gst::DiscovererStreamInfo> > get_video_streams() const;
398
399
400 /** Finds all the Gst::DiscovererSubtitleInfo contained in @a info
401 *
402 * @return A List of
403 * matching Gst::DiscovererStreamInfo. The caller should free it with
404 * stream_info_list_free().
405 */
406 std::vector< Glib::RefPtr<Gst::DiscovererStreamInfo> > get_subtitle_streams();
407
408 /** Finds all the Gst::DiscovererSubtitleInfo contained in @a info
409 *
410 * @return A List of
411 * matching Gst::DiscovererStreamInfo. The caller should free it with
412 * stream_info_list_free().
413 */
414 std::vector< Glib::RefPtr<const Gst::DiscovererStreamInfo> > get_subtitle_streams() const;
415
416
417 /** Get the installer details for missing elements
418 *
419 * @return An array of strings
420 * containing informations about how to install the various missing elements
421 * for @a info to be usable. If you wish to use the strings after the life-time
422 * of @a info, you will need to copy them.
423 */
424 std::vector<Glib::ustring> get_missing_elements_installer_details() const;
425
426
427 /** @return TOC contained in the URI. If you wish to use
428 * the TOC after the life-time of @a info, you will need to copy it.
429 */
430 Glib::RefPtr<const Gst::Toc> get_toc() const;
431
432
433 };
434
435 /** DiscovererStreamInfo - Base class for information concerning a media
436 * stream.
437 * Depending on the stream type, one can find more media-specific information
438 * in Gst::DiscovererAudioInfo, Gst::DiscovererVideoInfo, and
439 * Gst::DiscovererContainerInfo.
440 *
441 * The Gst::DiscovererStreamInfo represents the topology of the stream.
442 * Siblings can be iterated over with get_next() and get_previous(). Children
443 * (sub-streams) of a stream can be accessed using the
444 * Gst::DiscovererContainerInfo API.
445 *
446 * As a simple example, if you run Gst::Discoverer on an AVI file with one
447 * audio and one video stream, you will get a Gst::DiscovererContainerInfo
448 * corresponding to the AVI container, which in turn will have a
449 * Gst::DiscovererAudioInfo sub-stream and a Gst::DiscovererVideoInfo
450 * sub-stream for the audio and video streams respectively.
451 */
452 class DiscovererStreamInfo : public MiniObject
453 {
454 public:
455 #ifndef DOXYGEN_SHOULD_SKIP_THIS
456 using CppObjectType = DiscovererStreamInfo;
457 using BaseObjectType = GstDiscovererStreamInfo;
458 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
459
460
461 /** Increment the reference count for this object.
462 * You should never need to do this manually - use the object via a RefPtr instead.
463 */
464 void reference() const;
465
466 /** Decrement the reference count for this object.
467 * You should never need to do this manually - use the object via a RefPtr instead.
468 */
469 void unreference() const;
470
471 ///Provides access to the underlying C instance.
472 GstDiscovererStreamInfo* gobj();
473
474 ///Provides access to the underlying C instance.
475 const GstDiscovererStreamInfo* gobj() const;
476
477 ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
478 GstDiscovererStreamInfo* gobj_copy() const;
479
480 DiscovererStreamInfo() = delete;
481
482 // noncopyable
483 DiscovererStreamInfo(const DiscovererStreamInfo&) = delete;
484 DiscovererStreamInfo& operator=(const DiscovererStreamInfo&) = delete;
485
486 protected:
487 // Do not derive this. Gst::DiscovererStreamInfo can neither be constructed nor deleted.
488
489 void operator delete(void*, std::size_t);
490
491 private:
492
493
494 public:
495
496 /** @return The Gst::Caps of the stream. Unref with
497 * #gst_caps_unref after usage.
498 */
499 Glib::RefPtr<Gst::Caps> get_caps();
500
501 /** @return The Gst::Caps of the stream. Unref with
502 * #gst_caps_unref after usage.
503 */
504 Glib::RefPtr<const Gst::Caps> get_caps() const;
505
506
507 /** Deprecated: This functions is deprecated since version 1.4, use
508 * #gst_discoverer_info_get_missing_elements_installer_details
509 *
510 * @return Additional information regarding the stream (for
511 * example codec version, profile, etc..). If you wish to use the Gst::Structure
512 * after the life-time of @a info you will need to copy it.
513 */
514 Structure get_misc() const;
515
516
517 /** @return The next Gst::DiscovererStreamInfo in a chain. <tt>nullptr</tt>
518 * for final streams.
519 * Unref with #gst_discoverer_stream_info_unref after usage.
520 */
521 Glib::RefPtr<Gst::DiscovererStreamInfo> get_next();
522
523 /** @return The next Gst::DiscovererStreamInfo in a chain. <tt>nullptr</tt>
524 * for final streams.
525 * Unref with #gst_discoverer_stream_info_unref after usage.
526 */
527 Glib::RefPtr<const Gst::DiscovererStreamInfo> get_next() const;
528
529
530 /** @return The previous Gst::DiscovererStreamInfo in a chain.
531 * <tt>nullptr</tt> for starting points. Unref with #gst_discoverer_stream_info_unref
532 * after usage.
533 */
534 Glib::RefPtr<Gst::DiscovererStreamInfo> get_previous();
535
536 /** @return The previous Gst::DiscovererStreamInfo in a chain.
537 * <tt>nullptr</tt> for starting points. Unref with #gst_discoverer_stream_info_unref
538 * after usage.
539 */
540 Glib::RefPtr<Gst::DiscovererStreamInfo> get_previous() const;
541
542
543 /** @return The tags contained in this stream. If you wish to
544 * use the tags after the life-time of @a info you will need to copy them.
545 */
546 Gst::TagList get_tags() const;
547
548
549 /** @return A human readable name for the stream type of the given @a info (ex : "audio",
550 * "container",...).
551 */
552 Glib::ustring get_stream_type_nick() const;
553
554 /** @return The stream ID of this stream. If you wish to
555 * use the stream ID after the life-time of @a info you will need to copy it.
556 */
557 Glib::ustring get_stream_id() const;
558
559
560 /** @return The TOC contained in this stream. If you wish to
561 * use the TOC after the life-time of @a info you will need to copy it.
562 */
563 Glib::RefPtr<const Gst::Toc> get_toc() const;
564
565
566 };
567
568 /** DiscovererContainerInfo - Gst::DiscovererStreamInfo specific to container
569 * streams.
570 */
571 class DiscovererContainerInfo : public DiscovererStreamInfo
572 {
573 public:
574 #ifndef DOXYGEN_SHOULD_SKIP_THIS
575 using CppObjectType = DiscovererContainerInfo;
576 using BaseObjectType = GstDiscovererContainerInfo;
577 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
578
579
580 /** Increment the reference count for this object.
581 * You should never need to do this manually - use the object via a RefPtr instead.
582 */
583 void reference() const;
584
585 /** Decrement the reference count for this object.
586 * You should never need to do this manually - use the object via a RefPtr instead.
587 */
588 void unreference() const;
589
590 ///Provides access to the underlying C instance.
591 GstDiscovererContainerInfo* gobj();
592
593 ///Provides access to the underlying C instance.
594 const GstDiscovererContainerInfo* gobj() const;
595
596 ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
597 GstDiscovererContainerInfo* gobj_copy() const;
598
599 DiscovererContainerInfo() = delete;
600
601 // noncopyable
602 DiscovererContainerInfo(const DiscovererContainerInfo&) = delete;
603 DiscovererContainerInfo& operator=(const DiscovererContainerInfo&) = delete;
604
605 protected:
606 // Do not derive this. Gst::DiscovererContainerInfo can neither be constructed nor deleted.
607
608 void operator delete(void*, std::size_t);
609
610 private:
611
612
613 public:
614
615 /** @return The list of
616 * Gst::DiscovererStreamInfo this container stream offers.
617 * Free with stream_info_list_free() after usage.
618 */
619 std::vector< Glib::RefPtr<Gst::DiscovererStreamInfo> > get_streams();
620
621 /** @return The list of
622 * Gst::DiscovererStreamInfo this container stream offers.
623 * Free with stream_info_list_free() after usage.
624 */
625 std::vector< Glib::RefPtr<const Gst::DiscovererStreamInfo> > get_streams() const;
626
627
628 };
629
630
631 /** DiscovererAudioInfo - Gst::DiscovererStreamInfo specific to audio streams.
632 */
633 class DiscovererAudioInfo : public DiscovererStreamInfo
634 {
635 public:
636 #ifndef DOXYGEN_SHOULD_SKIP_THIS
637 using CppObjectType = DiscovererAudioInfo;
638 using BaseObjectType = GstDiscovererAudioInfo;
639 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
640
641
642 /** Increment the reference count for this object.
643 * You should never need to do this manually - use the object via a RefPtr instead.
644 */
645 void reference() const;
646
647 /** Decrement the reference count for this object.
648 * You should never need to do this manually - use the object via a RefPtr instead.
649 */
650 void unreference() const;
651
652 ///Provides access to the underlying C instance.
653 GstDiscovererAudioInfo* gobj();
654
655 ///Provides access to the underlying C instance.
656 const GstDiscovererAudioInfo* gobj() const;
657
658 ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
659 GstDiscovererAudioInfo* gobj_copy() const;
660
661 DiscovererAudioInfo() = delete;
662
663 // noncopyable
664 DiscovererAudioInfo(const DiscovererAudioInfo&) = delete;
665 DiscovererAudioInfo& operator=(const DiscovererAudioInfo&) = delete;
666
667 protected:
668 // Do not derive this. Gst::DiscovererAudioInfo can neither be constructed nor deleted.
669
670 void operator delete(void*, std::size_t);
671
672 private:
673
674
675 public:
676
677 /** @return The average or nominal bitrate of the stream in bits/second.
678 */
679 guint get_bitrate() const;
680
681 /** @return The number of channels in the stream.
682 */
683 guint get_channels() const;
684
685 /** @return The number of bits used per sample in each channel.
686 */
687 guint get_depth() const;
688
689 /** @return The maximum bitrate of the stream in bits/second.
690 */
691 guint get_max_bitrate() const;
692
693 /** @return The sample rate of the stream in Hertz.
694 */
695 guint get_sample_rate() const;
696
697 /** @return The language of the stream, or <tt>nullptr</tt> if unknown.
698 */
699 Glib::ustring get_language() const;
700
701
702 };
703
704 /** DiscovererVideoInfo - Gst::DiscovererStreamInfo specific to video streams
705 * (this includes images).
706 */
707 class DiscovererVideoInfo : public DiscovererStreamInfo
708 {
709 public:
710 #ifndef DOXYGEN_SHOULD_SKIP_THIS
711 using CppObjectType = DiscovererVideoInfo;
712 using BaseObjectType = GstDiscovererVideoInfo;
713 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
714
715
716 /** Increment the reference count for this object.
717 * You should never need to do this manually - use the object via a RefPtr instead.
718 */
719 void reference() const;
720
721 /** Decrement the reference count for this object.
722 * You should never need to do this manually - use the object via a RefPtr instead.
723 */
724 void unreference() const;
725
726 ///Provides access to the underlying C instance.
727 GstDiscovererVideoInfo* gobj();
728
729 ///Provides access to the underlying C instance.
730 const GstDiscovererVideoInfo* gobj() const;
731
732 ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
733 GstDiscovererVideoInfo* gobj_copy() const;
734
735 DiscovererVideoInfo() = delete;
736
737 // noncopyable
738 DiscovererVideoInfo(const DiscovererVideoInfo&) = delete;
739 DiscovererVideoInfo& operator=(const DiscovererVideoInfo&) = delete;
740
741 protected:
742 // Do not derive this. Gst::DiscovererVideoInfo can neither be constructed nor deleted.
743
744 void operator delete(void*, std::size_t);
745
746 private:
747
748
749 public:
750
751 /** @return The average or nominal bitrate of the video stream in bits/second.
752 */
753 guint get_bitrate() const;
754
755 /** @return The depth in bits of the video stream.
756 */
757 guint get_depth() const;
758
759 /** @return The framerate of the video stream (denominator).
760 */
761 guint get_framerate_denom() const;
762
763 /** @return The framerate of the video stream (numerator).
764 */
765 guint get_framerate_num() const;
766
767 /** @return The height of the video stream in pixels.
768 */
769 guint get_height() const;
770
771 /** @return <tt>true</tt> if the stream is interlaced, else <tt>false</tt>.
772 */
773 bool is_interlaced() const;
774
775 /** @return #<tt>true</tt> if the video stream corresponds to an image (i.e.\ only contains
776 * one frame).
777 */
778 bool is_image() const;
779
780 /** @return The maximum bitrate of the video stream in bits/second.
781 */
782 guint get_max_bitrate() const;
783
784 /** @return The Pixel Aspect Ratio (PAR) of the video stream (denominator).
785 */
786 guint get_par_denom() const;
787
788 /** @return The Pixel Aspect Ratio (PAR) of the video stream (numerator).
789 */
790 guint get_par_num() const;
791
792 /** @return The width of the video stream in pixels.
793 */
794 guint get_width() const;
795
796
797 };
798
799 } //namespace Gst
800
801
802 namespace Glib
803 {
804
805 /** A Glib::wrap() method for this object.
806 *
807 * @param object The C instance.
808 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
809 * @result A C++ instance that wraps this C instance.
810 *
811 * @relates Gst::DiscovererInfo
812 */
813 Glib::RefPtr<Gst::DiscovererInfo> wrap(GstDiscovererInfo* object, bool take_copy = false);
814
815 } // namespace Glib
816
817
818 namespace Glib
819 {
820
821 /** A Glib::wrap() method for this object.
822 *
823 * @param object The C instance.
824 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
825 * @result A C++ instance that wraps this C instance.
826 *
827 * @relates Gst::DiscovererStreamInfo
828 */
829 Glib::RefPtr<Gst::DiscovererStreamInfo> wrap(GstDiscovererStreamInfo* object, bool take_copy = false);
830
831 } // namespace Glib
832
833
834 namespace Glib
835 {
836
837 /** A Glib::wrap() method for this object.
838 *
839 * @param object The C instance.
840 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
841 * @result A C++ instance that wraps this C instance.
842 *
843 * @relates Gst::DiscovererContainerInfo
844 */
845 Glib::RefPtr<Gst::DiscovererContainerInfo> wrap(GstDiscovererContainerInfo* object, bool take_copy = false);
846
847 } // namespace Glib
848
849
850 namespace Glib
851 {
852
853 /** A Glib::wrap() method for this object.
854 *
855 * @param object The C instance.
856 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
857 * @result A C++ instance that wraps this C instance.
858 *
859 * @relates Gst::DiscovererAudioInfo
860 */
861 Glib::RefPtr<Gst::DiscovererAudioInfo> wrap(GstDiscovererAudioInfo* object, bool take_copy = false);
862
863 } // namespace Glib
864
865
866 namespace Glib
867 {
868
869 /** A Glib::wrap() method for this object.
870 *
871 * @param object The C instance.
872 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
873 * @result A C++ instance that wraps this C instance.
874 *
875 * @relates Gst::DiscovererVideoInfo
876 */
877 Glib::RefPtr<Gst::DiscovererVideoInfo> wrap(GstDiscovererVideoInfo* object, bool take_copy = false);
878
879 } // namespace Glib
880
881
882 #endif /* _GSTREAMERMM_DISCOVERERINFO_H */
883