1 // Generated by gmmproc 2.50.1 -- DO NOT MODIFY! 2 #ifndef _GSTREAMERMM_APPSINK_H 3 #define _GSTREAMERMM_APPSINK_H 4 5 #include <gstreamermmconfig.h> 6 7 #ifndef GSTREAMERMM_DISABLE_DEPRECATED 8 9 10 #include <glibmm/ustring.h> 11 #include <sigc++/sigc++.h> 12 13 // Generated by generate_plugin_gmmproc_file. Don't edit this file. 14 15 16 #include <gstreamermm/basesink.h> 17 #include <gstreamermm/caps.h> 18 #include <gstreamermm/pad.h> 19 #include <gstreamermm/sample.h> 20 #include <gstreamermm/urihandler.h> 21 22 23 // Plug-in C enums used in signals: 24 #ifndef DOXYGEN_SHOULD_SKIP_THIS 25 using GstAppSink = struct _GstAppSink; 26 using GstAppSinkClass = struct _GstAppSinkClass; 27 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 28 29 30 #ifndef DOXYGEN_SHOULD_SKIP_THIS 31 namespace Gst 32 { class AppSink_Class; } // namespace Gst 33 #endif //DOXYGEN_SHOULD_SKIP_THIS 34 35 namespace Gst 36 { 37 38 /** A Wrapper for the appsink plugin. 39 * Please note that not all plug-ins are available on all systems so care 40 * must be taken that they exist before they are used otherwise there will 41 * be errors and possibly a crash. 42 * 43 * @ingroup GstPlugins 44 * @deprecated Plugins API is deprecated, and should not be used in a new code. 45 */ 46 47 class AppSink 48 : public Gst::BaseSink, public Gst::URIHandler 49 { 50 51 #ifndef DOXYGEN_SHOULD_SKIP_THIS 52 53 public: 54 using CppObjectType = AppSink; 55 using CppClassType = AppSink_Class; 56 using BaseObjectType = GstAppSink; 57 using BaseClassType = GstAppSinkClass; 58 59 // noncopyable 60 AppSink(const AppSink&) = delete; 61 AppSink& operator=(const AppSink&) = delete; 62 63 private: friend class AppSink_Class; 64 static CppClassType appsink_class_; 65 66 protected: 67 explicit AppSink(const Glib::ConstructParams& construct_params); 68 explicit AppSink(GstAppSink* castitem); 69 70 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ 71 72 public: 73 74 AppSink(AppSink&& src) noexcept; 75 AppSink& operator=(AppSink&& src) noexcept; 76 77 ~AppSink() noexcept override; 78 79 /** Get the GType for this class, for use with the underlying GObject type system. 80 */ 81 static GType get_type() G_GNUC_CONST; 82 83 #ifndef DOXYGEN_SHOULD_SKIP_THIS 84 85 86 static GType get_base_type() G_GNUC_CONST; 87 #endif 88 89 ///Provides access to the underlying C GObject. gobj()90 GstAppSink* gobj() { return reinterpret_cast<GstAppSink*>(gobject_); } 91 92 ///Provides access to the underlying C GObject. gobj()93 const GstAppSink* gobj() const { return reinterpret_cast<GstAppSink*>(gobject_); } 94 95 ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. 96 GstAppSink* gobj_copy(); 97 98 private: 99 100 101 protected: 102 AppSink(); 103 explicit AppSink(const Glib::ustring& name); 104 105 public: 106 /** Creates a new appsink plugin with a unique name. 107 */ 108 109 static Glib::RefPtr<AppSink> create(); 110 111 112 /** Creates a new appsink plugin with the given name. 113 */ 114 115 static Glib::RefPtr<AppSink> create(const Glib::ustring& name); 116 117 118 /** This is a convenience method for the action signal 119 * signal_pull_preroll(). 120 */ 121 Glib::RefPtr<Gst::Sample> pull_preroll(); 122 123 /** This is a convenience method for the action signal 124 * signal_pull_sample(). 125 */ 126 Glib::RefPtr<Gst::Sample> pull_sample(); 127 128 /** This is a convenience method for the action signal 129 * signal_try_pull_preroll(). 130 */ 131 Glib::RefPtr<Gst::Sample> try_pull_preroll(guint64 arg0); 132 133 /** This is a convenience method for the action signal 134 * signal_try_pull_sample(). 135 */ 136 Glib::RefPtr<Gst::Sample> try_pull_sample(guint64 arg0); 137 138 139 /** The allowed caps for the sink pad. 140 * 141 * @return A PropertyProxy that allows you to get or set the value of the property, 142 * or receive notification when the value of the property changes. 143 */ 144 Glib::PropertyProxy< Glib::RefPtr<Gst::Caps> > property_caps() ; 145 146 /** The allowed caps for the sink pad. 147 * 148 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 149 * or receive notification when the value of the property changes. 150 */ 151 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gst::Caps> > property_caps() const; 152 153 /** Check if the sink is EOS or not started. 154 * 155 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 156 * or receive notification when the value of the property changes. 157 */ 158 Glib::PropertyProxy_ReadOnly< bool > property_eos() const; 159 160 161 /** Emit new-preroll and new-sample signals. 162 * 163 * @return A PropertyProxy that allows you to get or set the value of the property, 164 * or receive notification when the value of the property changes. 165 */ 166 Glib::PropertyProxy< bool > property_emit_signals() ; 167 168 /** Emit new-preroll and new-sample signals. 169 * 170 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 171 * or receive notification when the value of the property changes. 172 */ 173 Glib::PropertyProxy_ReadOnly< bool > property_emit_signals() const; 174 175 /** The maximum number of buffers to queue internally (0 = unlimited). 176 * 177 * @return A PropertyProxy that allows you to get or set the value of the property, 178 * or receive notification when the value of the property changes. 179 */ 180 Glib::PropertyProxy< guint > property_max_buffers() ; 181 182 /** The maximum number of buffers to queue internally (0 = unlimited). 183 * 184 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 185 * or receive notification when the value of the property changes. 186 */ 187 Glib::PropertyProxy_ReadOnly< guint > property_max_buffers() const; 188 189 /** Drop old buffers when the buffer queue is filled. 190 * 191 * @return A PropertyProxy that allows you to get or set the value of the property, 192 * or receive notification when the value of the property changes. 193 */ 194 Glib::PropertyProxy< bool > property_drop() ; 195 196 /** Drop old buffers when the buffer queue is filled. 197 * 198 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 199 * or receive notification when the value of the property changes. 200 */ 201 Glib::PropertyProxy_ReadOnly< bool > property_drop() const; 202 203 /** Wait for all buffers to be processed after receiving an EOS. 204 * 205 * @return A PropertyProxy that allows you to get or set the value of the property, 206 * or receive notification when the value of the property changes. 207 */ 208 Glib::PropertyProxy< bool > property_wait_on_eos() ; 209 210 /** Wait for all buffers to be processed after receiving an EOS. 211 * 212 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property, 213 * or receive notification when the value of the property changes. 214 */ 215 Glib::PropertyProxy_ReadOnly< bool > property_wait_on_eos() const; 216 217 218 /** 219 * @par Slot Prototype: 220 * <tt>void on_my_%eos()</tt> 221 * 222 * Signal that the end-of-stream has been reached. This signal is emitted from 223 * the streaming thread. 224 */ 225 226 Glib::SignalProxy< void > signal_eos(); 227 228 229 /** 230 * @par Slot Prototype: 231 * <tt>Gst::FlowReturn on_my_%new_preroll()</tt> 232 * 233 * Signal that a new preroll sample is available. 234 * 235 * This signal is emitted from the streaming thread and only when the 236 * "emit-signals" property is <tt>true</tt>. 237 * 238 * The new preroll sample can be retrieved with the "pull-preroll" action 239 * signal or Gst::AppSink::pull_preroll() either from this signal callback 240 * or from any other thread. 241 * 242 * Note that this signal is only emitted when the "emit-signals" property is 243 * set to <tt>true</tt>, which it is not by default for performance reasons. 244 */ 245 246 Glib::SignalProxy< Gst::FlowReturn > signal_new_preroll(); 247 248 249 /** 250 * @par Slot Prototype: 251 * <tt>Gst::FlowReturn on_my_%new_sample()</tt> 252 * 253 * Signal that a new sample is available. 254 * 255 * This signal is emitted from the streaming thread and only when the 256 * "emit-signals" property is <tt>true</tt>. 257 * 258 * The new sample can be retrieved with the "pull-sample" action 259 * signal or Gst::AppSink::pull_sample() either from this signal callback 260 * or from any other thread. 261 * 262 * Note that this signal is only emitted when the "emit-signals" property is 263 * set to <tt>true</tt>, which it is not by default for performance reasons. 264 */ 265 266 Glib::SignalProxy< Gst::FlowReturn > signal_new_sample(); 267 268 269 /** This is an action signal which is designed to be used as a method. To 270 * do that, use its convenience method, pull_preroll(). 271 * 272 * @par Slot Prototype: 273 * <tt>Glib::RefPtr<Gst::Sample> on_my_%pull_preroll()</tt> 274 * 275 * Get the last preroll sample in @a appsink. This was the sample that caused the 276 * appsink to preroll in the PAUSED state. This sample can be pulled many times 277 * and remains available to the application even after EOS. 278 * 279 * This function is typically used when dealing with a pipeline in the PAUSED 280 * state. Calling this function after doing a seek will give the sample right 281 * after the seek position. 282 * 283 * Note that the preroll sample will also be returned as the first sample 284 * when calling Gst::AppSink::pull_sample() or the "pull-sample" action signal. 285 * 286 * If an EOS event was received before any buffers, this function returns 287 * <tt>nullptr</tt>. Use Gst::AppSink::is_eos() to check for the EOS condition. 288 * 289 * This function blocks until a preroll sample or EOS is received or the appsink 290 * element is set to the READY/<tt>nullptr</tt> state. 291 * 292 * @return A Gst::Sample or <tt>nullptr</tt> when the appsink is stopped or EOS. 293 */ 294 295 Glib::SignalProxy< Glib::RefPtr<Gst::Sample> > signal_pull_preroll(); 296 297 298 /** This is an action signal which is designed to be used as a method. To 299 * do that, use its convenience method, pull_sample(). 300 * 301 * @par Slot Prototype: 302 * <tt>Glib::RefPtr<Gst::Sample> on_my_%pull_sample()</tt> 303 * 304 * This function blocks until a sample or EOS becomes available or the appsink 305 * element is set to the READY/<tt>nullptr</tt> state. 306 * 307 * This function will only return samples when the appsink is in the PLAYING 308 * state. All rendered samples will be put in a queue so that the application 309 * can pull samples at its own rate. 310 * 311 * Note that when the application does not pull samples fast enough, the 312 * queued samples could consume a lot of memory, especially when dealing with 313 * raw video frames. It's possible to control the behaviour of the queue with 314 * the "drop" and "max-buffers" properties. 315 * 316 * If an EOS event was received before any buffers, this function returns 317 * <tt>nullptr</tt>. Use Gst::AppSink::is_eos() to check for the EOS condition. 318 * 319 * @return A Gst::Sample or <tt>nullptr</tt> when the appsink is stopped or EOS. 320 */ 321 322 Glib::SignalProxy< Glib::RefPtr<Gst::Sample> > signal_pull_sample(); 323 324 325 //gtkmmproc error: try-pull-preroll : signal defs lookup failed 326 327 328 //gtkmmproc error: try-pull-sample : signal defs lookup failed 329 330 331 public: 332 333 public: 334 //C++ methods used to invoke GTK+ virtual functions: 335 336 protected: 337 //GTK+ Virtual Functions (override these to change behaviour): 338 339 //Default Signal Handlers:: 340 341 342 }; 343 344 } // namespace Gst 345 346 347 namespace Glib 348 { 349 /** A Glib::wrap() method for this object. 350 * 351 * @param object The C instance. 352 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref. 353 * @result A C++ instance that wraps this C instance. 354 * 355 * @relates Gst::AppSink 356 */ 357 Glib::RefPtr<Gst::AppSink> wrap(GstAppSink* object, bool take_copy = false); 358 } 359 360 361 #endif // GSTREAMERMM_DISABLE_DEPRECATED 362 363 364 #endif /* _GSTREAMERMM_APPSINK_H */ 365 366