Debian Codegraph @

gstreamer/src/sample.hg

raw
1 /*
2 * sample.hg
3 *
4 * Created on: Jul 30, 2013
5 * Author: m.kolny
6 */
7 /* gstreamermm - a C++ wrapper for gstreamer
8 *
9 * Copyright 2008-2016 The gstreamermm Development Team
10 *
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public
13 * License as published by the Free Software Foundation; either
14 * version 2.1 of the License, or (at your option) any later version.
15 *
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
20 *
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with this library; if not, write to the Free
23 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 */
25
26 #include <gst/gst.h>
27 #include <gstreamermm/miniobject.h>
28 #include <gstreamermm/buffer.h>
29 #include <gstreamermm/caps.h>
30 #include <gstreamermm/segment.h>
31 #include <gstreamermm/structure.h>
32
33
34 _DEFS(gstreamermm,gst)
35
36 namespace Gst
37 {
38
39 /**
40 * A Gst::Sample is a small object containing data, a type, timing and
41 * extra arbitrary information.
42 *
43 * Last reviewed on 2016-09-14 (1.8.0).
44 */
45 class Sample : public MiniObject
46 {
47 _CLASS_OPAQUE_REFCOUNTED(Sample, GstSample, NONE, gst_sample_ref, gst_sample_unref)
48 _IGNORE(gst_sample_ref, gst_sample_unref)
49
50 public:
51 static Glib::RefPtr<Gst::Sample> create(const Glib::RefPtr<Gst::Buffer>& buffer, const Glib::RefPtr<Gst::Caps>& caps, const Gst::Segment& segment, Gst::Structure&& info);
52
53 _WRAP_METHOD(Glib::RefPtr<Gst::Buffer> get_buffer(), gst_sample_get_buffer, refreturn)
54 _WRAP_METHOD(Glib::RefPtr<const Gst::Buffer> get_buffer() const, gst_sample_get_buffer, constversion)
55 _WRAP_METHOD(Glib::RefPtr<Gst::Caps> get_caps(), gst_sample_get_caps, refreturn)
56 _WRAP_METHOD(Glib::RefPtr<const Gst::Caps> get_caps() const, gst_sample_get_caps, constversion)
57 _WRAP_METHOD(Gst::Structure get_info() const, gst_sample_get_info)
58 _WRAP_METHOD(Glib::RefPtr<Gst::Sample> copy() const, gst_sample_copy)
59
60 #m4 _CONVERSION(`GstSegment*',`Gst::Segment',`Glib::wrap($3, true)')
61 _WRAP_METHOD(Gst::Segment get_segment() const, gst_sample_get_segment)
62 };
63
64 }//namespace Gst