| 1 | // Generated by gmmproc 2.50.1 -- DO NOT MODIFY!cxx . . $ `<file>/gstreamer/gstreamermm/sample.cc`/ |
| 2 | |
| 3 | |
| 4 | #include <glibmm.h> |
| 5 | |
| 6 | #include <gstreamermm/sample.h>cxx . . $ `<file>/gstreamer/gstreamermm/sample.h`/ |
| 7 | #include <gstreamermm/private/sample_p.h>cxx . . $ `<file>/gstreamer/gstreamermm/private/sample_p.h`/ |
| 8 | |
| 9 | |
| 10 | /* gstreamermm - a C++ wrapper for gstreamer |
| 11 | * |
| 12 | * Copyright 2008-2016 The gstreamermm Development Team |
| 13 | * |
| 14 | * This library is free software; you can redistribute it and/or |
| 15 | * modify it under the terms of the GNU Lesser General Public |
| 16 | * License as published by the Free Software Foundation; either |
| 17 | * version 2.1 of the License, or (at your option) any later version. |
| 18 | * |
| 19 | * This library is distributed in the hope that it will be useful, |
| 20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 22 | * Lesser General Public License for more details. |
| 23 | * |
| 24 | * You should have received a copy of the GNU Lesser General Public |
| 25 | * License along with this library; if not, write to the Free |
| 26 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 27 | */ |
| 28 | |
| 29 | namespace Gstcxx . . $ Gst/ { |
| 30 | |
| 31 | Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Samplecxx . . $ Gst/Sample#> Samplecxx . . $ Gst/Sample#::createcxx . . $ Gst/Sample#create(83fb127b6a52bb9d).(const Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Buffercxx . . $ Gst/Buffer#>& buffer, const Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Capscxx . . $ Gst/Caps#>& caps, const Gstcxx . . $ Gst/::Segmentcxx . . $ Gst/Segment#& segment, Gstcxx . . $ Gst/::Structurecxx . . $ Gst/Structure#&& info) |
| 32 | { |
| 33 | GstSample *sample = gst_sample_new(buffer->cxx . . $ Glib/RefPtr#`operator->`(34d6acfd341ba7ab).gobjcxx . . $ Gst/Buffer#gobj(fb1b615d1bc4ac88).(), caps->cxx . . $ Glib/RefPtr#`operator->`(34d6acfd341ba7ab).gobjcxx . . $ Gst/Caps#gobj(704ee61edb5225b).(), segment.gobjcxx . . $ Gst/Segment#gobj(841fa51e7d3f2dfa).(), info.gobjcxx . . $ Gst/Structure#gobj(f801621683f3ec38).()); |
| 34 | Gstcxx . . $ Gst/::Structurecxx . . $ Gst/Structure# empty_structurecxx . . $ Gst/Structure#Structure(49f6e7a06ebc5aa8).; |
| 35 | info.swapcxx . . $ Gst/Structure#swap(1c117fd2bd99e9c7).(empty_structure); |
| 36 | |
| 37 | return Glibcxx . . $ Glib/::wrapcxx . . $ Glib/wrap(9e4721cb9376f8a9).(sample, false); |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | namespacecxx . . $ `$anonymous_namespace_gstreamer/gstreamermm/sample.cc`/ |
| 42 | { |
| 43 | } // anonymous namespace |
| 44 | |
| 45 | |
| 46 | /* Why reinterpret_cast<Sample*>(gobject) is needed: |
| 47 | * |
| 48 | * A Sample instance is in fact always a GstSample instance. |
| 49 | * Unfortunately, GstSample cannot be a member of Sample, |
| 50 | * because it is an opaque struct. Also, the C interface does not provide |
| 51 | * any hooks to install a destroy notification handler, thus we cannot |
| 52 | * wrap it dynamically either. |
| 53 | * |
| 54 | * The cast works because Sample does not have any member data, and |
| 55 | * it is impossible to derive from it. This is ensured by using final on the |
| 56 | * class and by using = delete on the default constructor. |
| 57 | */ |
| 58 | |
| 59 | namespace Glibcxx . . $ Glib/ |
| 60 | { |
| 61 | |
| 62 | Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Samplecxx . . $ Gst/Sample#> wrapcxx . . $ Glib/wrap(9e4721cb9376f8a9).(GstSample* object, bool take_copy) |
| 63 | { |
| 64 | if(take_copy && object) |
| 65 | gst_sample_ref(object); |
| 66 | |
| 67 | // See the comment at the top of this file, if you want to know why the cast works. |
| 68 | return Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Samplecxx . . $ Gst/Sample#>(reinterpret_cast<Gstcxx . . $ Gst/::Samplecxx . . $ Gst/Sample#*>(object)); |
| 69 | } |
| 70 | |
| 71 | } // namespace Glib |
| 72 | |
| 73 | |
| 74 | namespace Gstcxx . . $ Gst/ |
| 75 | { |
| 76 | |
| 77 | |
| 78 | void Samplecxx . . $ Gst/Sample#::referencecxx . . $ Gst/Sample#reference(83f5f38750778ac8).() const |
| 79 | { |
| 80 | // See the comment at the top of this file, if you want to know why the cast works. |
| 81 | gst_sample_ref(reinterpret_cast<GstSample*>(const_cast<Samplecxx . . $ Gst/Sample#*>(this))); |
| 82 | } |
| 83 | |
| 84 | void Samplecxx . . $ Gst/Sample#::unreferencecxx . . $ Gst/Sample#unreference(83f5f38750778ac8).() const |
| 85 | { |
| 86 | // See the comment at the top of this file, if you want to know why the cast works. |
| 87 | gst_sample_unref(reinterpret_cast<GstSample*>(const_cast<Samplecxx . . $ Gst/Sample#*>(this))); |
| 88 | } |
| 89 | |
| 90 | GstSample* Samplecxx . . $ Gst/Sample#::gobjcxx . . $ Gst/Sample#gobj(7a668d1d85c8bc56).() |
| 91 | { |
| 92 | // See the comment at the top of this file, if you want to know why the cast works. |
| 93 | return reinterpret_cast<GstSample*>(this); |
| 94 | } |
| 95 | |
| 96 | const GstSample* Samplecxx . . $ Gst/Sample#::gobjcxx . . $ Gst/Sample#gobj(e5c4c4a1b6ba429f).() const |
| 97 | { |
| 98 | // See the comment at the top of this file, if you want to know why the cast works. |
| 99 | return reinterpret_cast<const GstSample*>(this); |
| 100 | } |
| 101 | |
| 102 | GstSample* Samplecxx . . $ Gst/Sample#::gobj_copycxx . . $ Gst/Sample#gobj_copy(66c293e4f3d76847).() const |
| 103 | { |
| 104 | // See the comment at the top of this file, if you want to know why the cast works. |
| 105 | const auto gobject = reinterpret_cast<GstSample*>(const_cast<Samplecxx . . $ Gst/Sample#*>(this)); |
| 106 | gst_sample_ref(gobject); |
| 107 | return gobject; |
| 108 | } |
| 109 | |
| 110 | |
| 111 | Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Buffercxx . . $ Gst/Buffer#> Samplecxx . . $ Gst/Sample#::get_buffercxx . . $ Gst/Sample#get_buffer(6fb1b7a5ca7b7240).() |
| 112 | { |
| 113 | Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Buffercxx . . $ Gst/Buffer#> retvalue = Glibcxx . . $ Glib/::wrapcxx . . $ Glib/wrap(3c551c778c6a14a5).(gst_sample_get_buffer(gobjcxx . . $ Gst/Sample#gobj(7a668d1d85c8bc56).())); |
| 114 | if(retvalue) |
| 115 | retvalue->cxx . . $ Glib/RefPtr#`operator->`(34d6acfd341ba7ab).referencecxx . . $ Gst/Buffer#reference(83f5f38750778ac8).(); //The function does not do a ref for us. |
| 116 | return retvaluecxx . . $ Glib/RefPtr#RefPtr(560c7fdd049cdfe1).; |
| 117 | } |
| 118 | |
| 119 | Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<const Gstcxx . . $ Gst/::Buffercxx . . $ Gst/Buffer#> Samplecxx . . $ Gst/Sample#::get_buffercxx . . $ Gst/Sample#get_buffer(9e6c469e1d332735).() const |
| 120 | { |
| 121 | return const_castcxx . . $ Glib/RefPtr#RefPtr(9e4c744904342adc).<Samplecxx . . $ Gst/Sample#*>(this)->get_buffercxx . . $ Gst/Sample#get_buffer(6fb1b7a5ca7b7240).(); |
| 122 | } |
| 123 | |
| 124 | Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Capscxx . . $ Gst/Caps#> Samplecxx . . $ Gst/Sample#::get_capscxx . . $ Gst/Sample#get_caps(22811ab509ec2061).() |
| 125 | { |
| 126 | Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Capscxx . . $ Gst/Caps#> retvalue = Glibcxx . . $ Glib/::wrapcxx . . $ Glib/wrap(cf037a2e82e55e6b).(gst_sample_get_caps(gobjcxx . . $ Gst/Sample#gobj(7a668d1d85c8bc56).())); |
| 127 | if(retvalue) |
| 128 | retvalue->cxx . . $ Glib/RefPtr#`operator->`(34d6acfd341ba7ab).referencecxx . . $ Gst/Caps#reference(83f5f38750778ac8).(); //The function does not do a ref for us. |
| 129 | return retvaluecxx . . $ Glib/RefPtr#RefPtr(560c7fdd049cdfe1).; |
| 130 | } |
| 131 | |
| 132 | Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<const Gstcxx . . $ Gst/::Capscxx . . $ Gst/Caps#> Samplecxx . . $ Gst/Sample#::get_capscxx . . $ Gst/Sample#get_caps(b365bf96c1803900).() const |
| 133 | { |
| 134 | return const_castcxx . . $ Glib/RefPtr#RefPtr(9e4c744904342adc).<Samplecxx . . $ Gst/Sample#*>(this)->get_capscxx . . $ Gst/Sample#get_caps(22811ab509ec2061).(); |
| 135 | } |
| 136 | |
| 137 | Gstcxx . . $ Gst/::Structurecxx . . $ Gst/Structure# Samplecxx . . $ Gst/Sample#::get_infocxx . . $ Gst/Sample#get_info(65062218a0489aeb).() const |
| 138 | { |
| 139 | return Glibcxx . . $ Glib/::wrapcxx . . $ Glib/wrap(51e1331ca9e65d80).(const_cast<GstStructure*>(gst_sample_get_info(const_cast<GstSample*>(gobjcxx . . $ Gst/Sample#gobj(e5c4c4a1b6ba429f).()))), false); |
| 140 | } |
| 141 | |
| 142 | Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Samplecxx . . $ Gst/Sample#> Samplecxx . . $ Gst/Sample#::copycxx . . $ Gst/Sample#copy(aa585b6a0e4e4e3a).() const |
| 143 | { |
| 144 | return Glibcxx . . $ Glib/::wrapcxx . . $ Glib/wrap(9e4721cb9376f8a9).(gst_sample_copy(const_cast<GstSample*>(gobjcxx . . $ Gst/Sample#gobj(e5c4c4a1b6ba429f).()))); |
| 145 | } |
| 146 | |
| 147 | Gstcxx . . $ Gst/::Segmentcxx . . $ Gst/Segment# Samplecxx . . $ Gst/Sample#::get_segmentcxx . . $ Gst/Sample#get_segment(f901a0bbfe1e5167).() const |
| 148 | { |
| 149 | return Glibcxx . . $ Glib/::wrapcxx . . $ Glib/wrap(acf2fb73624d1c73).(gst_sample_get_segment(const_cast<GstSample*>(gobjcxx . . $ Gst/Sample#gobj(e5c4c4a1b6ba429f).())), true); |
| 150 | } |
| 151 | |
| 152 | |
| 153 | } // namespace Gst |
| 154 | |
| 155 |