| 1 | // Generated by gmmproc 2.50.1 -- DO NOT MODIFY! |
| 2 | #ifndef _GSTREAMERMM_VIDEOSINK_H |
| 3 | #define _GSTREAMERMM_VIDEOSINK_H |
| 4 | |
| 5 | |
| 6 | #include <glibmm/ustring.h> |
| 7 | #include <sigc++/sigc++.h> |
| 8 | |
| 9 | /* gstreamermm - a C++ wrapper for gstreamer |
| 10 | * |
| 11 | * Copyright 2008 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/basesink.h> |
| 29 | |
| 30 | |
| 31 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 32 | using GstVideoSink = struct _GstVideoSink; |
| 33 | using GstVideoSinkClass = struct _GstVideoSinkClass; |
| 34 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ |
| 35 | |
| 36 | |
| 37 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 38 | namespace Gst |
| 39 | { class VideoSink_Class; } // namespace Gst |
| 40 | #endif //DOXYGEN_SHOULD_SKIP_THIS |
| 41 | |
| 42 | namespace Gst |
| 43 | { |
| 44 | |
| 45 | /** A helper structure for the Gst::VideoSink class representing a rectangular |
| 46 | * area. |
| 47 | */ |
| 48 | struct VideoRectangle |
| 49 | { |
| 50 | /// The X coordinate of the rectangle's top-left point. |
| 51 | int x; |
| 52 | |
| 53 | /// The Y coordinate of rectangle's top-left point. |
| 54 | int y; |
| 55 | |
| 56 | /// The width of the rectangle. |
| 57 | int w; |
| 58 | |
| 59 | /// The height of the rectangle. |
| 60 | int h; |
| 61 | }; |
| 62 | |
| 63 | /** A base class for video sinks. |
| 64 | * Gst::VideoSink provides useful functions and a base class for video sinks. |
| 65 | * |
| 66 | * Gst::VideoSink will configure the default base sink to drop frames that |
| 67 | * arrive later than 20ms as this is considered the default threshold for |
| 68 | * observing out-of-sync frames. |
| 69 | * |
| 70 | * @ingroup GstBaseClasses |
| 71 | */ |
| 72 | |
| 73 | class VideoSink : public Gst::BaseSink |
| 74 | { |
| 75 | |
| 76 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 77 | |
| 78 | public: |
| 79 | using CppObjectType = VideoSink; |
| 80 | using CppClassType = VideoSink_Class; |
| 81 | using BaseObjectType = GstVideoSink; |
| 82 | using BaseClassType = GstVideoSinkClass; |
| 83 | |
| 84 | // noncopyable |
| 85 | VideoSink(const VideoSink&) = delete; |
| 86 | VideoSink& operator=(const VideoSink&) = delete; |
| 87 | |
| 88 | private: friend class VideoSink_Class; |
| 89 | static CppClassType videosink_class_; |
| 90 | |
| 91 | protected: |
| 92 | explicit VideoSink(const Glib::ConstructParams& construct_params); |
| 93 | explicit VideoSink(GstVideoSink* castitem); |
| 94 | |
| 95 | #endif /* DOXYGEN_SHOULD_SKIP_THIS */ |
| 96 | |
| 97 | public: |
| 98 | |
| 99 | VideoSink(VideoSink&& src) noexcept; |
| 100 | VideoSink& operator=(VideoSink&& src) noexcept; |
| 101 | |
| 102 | ~VideoSink() noexcept override; |
| 103 | |
| 104 | /** Get the GType for this class, for use with the underlying GObject type system. |
| 105 | */ |
| 106 | static GType get_type() G_GNUC_CONST; |
| 107 | |
| 108 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 109 | |
| 110 | |
| 111 | static GType get_base_type() G_GNUC_CONST; |
| 112 | #endif |
| 113 | |
| 114 | ///Provides access to the underlying C GObject. |
| 115 | GstVideoSink* gobj() { return reinterpret_cast<GstVideoSink*>(gobject_); } |
| 116 | |
| 117 | ///Provides access to the underlying C GObject. |
| 118 | const GstVideoSink* gobj() const { return reinterpret_cast<GstVideoSink*>(gobject_); } |
| 119 | |
| 120 | ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. |
| 121 | GstVideoSink* gobj_copy(); |
| 122 | |
| 123 | private: |
| 124 | |
| 125 | |
| 126 | public: |
| 127 | /** Get height of Gst::VideoSink. |
| 128 | */ |
| 129 | int get_height() const; |
| 130 | |
| 131 | /** Get width of Gst::VideoSink. |
| 132 | */ |
| 133 | int get_width() const; |
| 134 | |
| 135 | |
| 136 | /** Takes @a src rectangle and position it at the center of @a dst rectangle with or |
| 137 | * without @a scaling. It handles clipping if the @a src rectangle is bigger than |
| 138 | * the @a dst one and @a scaling is set to <tt>false</tt>. |
| 139 | * |
| 140 | * @param src The Gst::VideoRectangle describing the source area. |
| 141 | * @param dst The Gst::VideoRectangle describing the destination area. |
| 142 | * @param result A pointer to a Gst::VideoRectangle which will receive the result area. |
| 143 | * @param scaling A <tt>bool</tt> indicating if scaling should be applied or not. |
| 144 | */ |
| 145 | static void center_rect(const Gst::VideoRectangle& src, const Gst::VideoRectangle& dst, Gst::VideoRectangle& result, bool scaling = false); |
| 146 | |
| 147 | /** Whether to render video frames during preroll. |
| 148 | * |
| 149 | * @return A PropertyProxy that allows you to get or set the value of the property, |
| 150 | * or receive notification when the value of the property changes. |
| 151 | */ |
| 152 | Glib::PropertyProxy< bool > property_show_preroll_frame() ; |
| 153 | |
| 154 | /** Whether to render video frames during preroll. |
| 155 | * |
| 156 | * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, |
| 157 | * or receive notification when the value of the property changes. |
| 158 | */ |
| 159 | Glib::PropertyProxy_ReadOnly< bool > property_show_preroll_frame() const; |
| 160 | |
| 161 | |
| 162 | public: |
| 163 | |
| 164 | public: |
| 165 | //C++ methods used to invoke GTK+ virtual functions: |
| 166 | |
| 167 | protected: |
| 168 | //GTK+ Virtual Functions (override these to change behaviour): |
| 169 | |
| 170 | //Default Signal Handlers:: |
| 171 | |
| 172 | |
| 173 | }; |
| 174 | |
| 175 | } // namespace Gst |
| 176 | |
| 177 | |
| 178 | namespace Glib |
| 179 | { |
| 180 | /** A Glib::wrap() method for this object. |
| 181 | * |
| 182 | * @param object The C instance. |
| 183 | * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref. |
| 184 | * @result A C++ instance that wraps this C instance. |
| 185 | * |
| 186 | * @relates Gst::VideoSink |
| 187 | */ |
| 188 | Glib::RefPtr<Gst::VideoSink> wrap(GstVideoSink* object, bool take_copy = false); |
| 189 | } |
| 190 | |
| 191 | |
| 192 | #endif /* _GSTREAMERMM_VIDEOSINK_H */ |
| 193 |