- Main Page
- Modules
- Namespaces
- Classes
- Files

# basesink.h

Go to the documentation of this file.

    00001 // -*- c++ -*-
    00002 // Generated by gtkmmproc -- DO NOT MODIFY!
    00003 #ifndef _GSTREAMERMM_BASESINK_H
    00004 #define _GSTREAMERMM_BASESINK_H
    00005
    00006
    00007 #include <glibmm.h>
    00008
    00009 /* gstreamermm - a C++ wrapper for gstreamer
    00010  *
    00011  * Copyright 2008 The gstreamermm Development Team
    00012  *
    00013  * This library is free software; you can redistribute it and/or
    00014  * modify it under the terms of the GNU Lesser General Public
    00015  * License as published by the Free Software Foundation; either
    00016  * version 2.1 of the License, or (at your option) any later version.
    00017  *
    00018  * This library is distributed in the hope that it will be useful,
    00019  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00021  * Lesser General Public License for more details.
    00022  *
    00023  * You should have received a copy of the GNU Lesser General Public
    00024  * License along with this library; if not, write to the Free
    00025  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    00026  */
    00027
    00028 #include <gst/base/gstbasesink.h>
    00029 #include <gstreamermm/element.h>
    00030 #include <gstreamermm/buffer.h>
    00031 #include <gstreamermm/pad.h>
    00032
    00033
    00034 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00035 typedef struct _GstBaseSink GstBaseSink;
    00036 typedef struct _GstBaseSinkClass GstBaseSinkClass;
    00037 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
    00038
    00039
    00040 namespace Gst
    00041 { class BaseSink_Class; } // namespace Gst
    00042 namespace Gst
    00043 {
    00044
    00148 class BaseSink
    00149 : public Element
    00150 {
    00151
    00152 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00153
    00154 public:
    00155   typedef BaseSink CppObjectType;
    00156   typedef BaseSink_Class CppClassType;
    00157   typedef GstBaseSink BaseObjectType;
    00158   typedef GstBaseSinkClass BaseClassType;
    00159
    00160 private:  friend class BaseSink_Class;
    00161   static CppClassType basesink_class_;
    00162
    00163 private:
    00164   // noncopyable
    00165   BaseSink(const BaseSink&);
    00166   BaseSink& operator=(const BaseSink&);
    00167
    00168 protected:
    00169   explicit BaseSink(const Glib::ConstructParams& construct_params);
    00170   explicit BaseSink(GstBaseSink* castitem);
    00171
    00172 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
    00173
    00174 public:
    00175   virtual ~BaseSink();
    00176
    00177 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00178   static GType get_type()      G_GNUC_CONST;
    00179   static GType get_base_type() G_GNUC_CONST;
    00180 #endif
    00181
    00183   GstBaseSink*       gobj()       { return reinterpret_cast<GstBaseSink*>(gobject_); }
    00184
    00186   const GstBaseSink* gobj() const { return reinterpret_cast<GstBaseSink*>(gobject_); }
    00187
    00189   GstBaseSink* gobj_copy();
    00190
    00191 private:
    00192
    00193
    00194 public:
    00195
    00215   bool query_latency(bool& live, bool& upstream_live, ClockTime& min_latency,
    00216     ClockTime& max_latency) const;
    00217
    00223   ClockTime get_latency() const;
    00224
    00236   FlowReturn wait_preroll();
    00237
    00258   ClockReturn wait_clock(ClockTime time, ClockTimeDiff& jitter);
    00259
    00281   ClockReturn wait_clock(ClockTime time);
    00282
    00283
    00299   FlowReturn wait_eos(ClockTime time, ClockTimeDiff& jitter);
    00300
    00316    FlowReturn wait_eos(ClockTime time);
    00317
    00318
    00328   void set_sync(bool sync);
    00329
    00336   bool get_sync() const;
    00337
    00346   void set_max_lateness(gint64 max_lateness);
    00347
    00356   gint64 get_max_lateness() const;
    00357
    00363   void set_qos_enabled(bool enabled);
    00364
    00371   bool is_qos_enabled() const;
    00372
    00381   void set_async_enabled(bool enabled);
    00382
    00390   bool is_async_enabled() const;
    00391
    00400   void set_ts_offset(ClockTimeDiff offset);
    00401
    00407   ClockTimeDiff get_ts_offset() const;
    00408
    00422   void set_render_delay(ClockTime delay);
    00423
    00430   ClockTime get_render_delay() const;
    00431
    00442   Glib::RefPtr<Gst::Buffer> get_last_buffer();
    00443
    00454   Glib::RefPtr<const Gst::Buffer> get_last_buffer() const;
    00455
    00458    Glib::RefPtr<Gst::Pad> get_sink_pad();
    00459   Glib::RefPtr<const Gst::Pad> get_sink_pad() const;
    00460
    00461   #ifdef GLIBMM_PROPERTIES_ENABLED
    00462
    00468   Glib::PropertyProxy<bool> property_async() ;
    00469 #endif //#GLIBMM_PROPERTIES_ENABLED
    00470
    00471 #ifdef GLIBMM_PROPERTIES_ENABLED
    00472
    00478   Glib::PropertyProxy_ReadOnly<bool> property_async() const;
    00479 #endif //#GLIBMM_PROPERTIES_ENABLED
    00480
    00481   #ifdef GLIBMM_PROPERTIES_ENABLED
    00482
    00488   Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gst::Buffer> > property_last_buffer() const;
    00489 #endif //#GLIBMM_PROPERTIES_ENABLED
    00490
    00491
    00492   #ifdef GLIBMM_PROPERTIES_ENABLED
    00493
    00499   Glib::PropertyProxy<gint64> property_max_lateness() ;
    00500 #endif //#GLIBMM_PROPERTIES_ENABLED
    00501
    00502 #ifdef GLIBMM_PROPERTIES_ENABLED
    00503
    00509   Glib::PropertyProxy_ReadOnly<gint64> property_max_lateness() const;
    00510 #endif //#GLIBMM_PROPERTIES_ENABLED
    00511
    00512   #ifdef GLIBMM_PROPERTIES_ENABLED
    00513
    00519   Glib::PropertyProxy<guint> property_preroll_queue_len() ;
    00520 #endif //#GLIBMM_PROPERTIES_ENABLED
    00521
    00522 #ifdef GLIBMM_PROPERTIES_ENABLED
    00523
    00529   Glib::PropertyProxy_ReadOnly<guint> property_preroll_queue_len() const;
    00530 #endif //#GLIBMM_PROPERTIES_ENABLED
    00531
    00532   #ifdef GLIBMM_PROPERTIES_ENABLED
    00533
    00539   Glib::PropertyProxy<bool> property_qos() ;
    00540 #endif //#GLIBMM_PROPERTIES_ENABLED
    00541
    00542 #ifdef GLIBMM_PROPERTIES_ENABLED
    00543
    00549   Glib::PropertyProxy_ReadOnly<bool> property_qos() const;
    00550 #endif //#GLIBMM_PROPERTIES_ENABLED
    00551
    00552   #ifdef GLIBMM_PROPERTIES_ENABLED
    00553
    00559   Glib::PropertyProxy<bool> property_sync() ;
    00560 #endif //#GLIBMM_PROPERTIES_ENABLED
    00561
    00562 #ifdef GLIBMM_PROPERTIES_ENABLED
    00563
    00569   Glib::PropertyProxy_ReadOnly<bool> property_sync() const;
    00570 #endif //#GLIBMM_PROPERTIES_ENABLED
    00571
    00572   #ifdef GLIBMM_PROPERTIES_ENABLED
    00573
    00579   Glib::PropertyProxy<gint64> property_ts_offset() ;
    00580 #endif //#GLIBMM_PROPERTIES_ENABLED
    00581
    00582 #ifdef GLIBMM_PROPERTIES_ENABLED
    00583
    00589   Glib::PropertyProxy_ReadOnly<gint64> property_ts_offset() const;
    00590 #endif //#GLIBMM_PROPERTIES_ENABLED
    00591
    00592
    00595   #ifdef GLIBMM_VFUNCS_ENABLED
    00596   virtual Glib::RefPtr<Gst::Caps> get_caps_vfunc() const;
    00597 #endif //GLIBMM_VFUNCS_ENABLED
    00598
    00599
    00600   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00601   //callbacks return false with the last "return RType()" line.  Make sure this
    00602   //one doesn't cause problems and implement later.
    00604    //*/
    00605   //_WRAP_VFUNC(bool set_caps(const Glib::RefPtr<Gst::Caps>& caps), "set_caps")
    00606
    00607 #ifdef GLIBMM_VFUNCS_ENABLED
    00608
    00609   virtual FlowReturn buffer_alloc_vfunc(guint64 offset, guint size, const Glib::RefPtr<Gst::Caps>& caps, Glib::RefPtr<Gst::Buffer>& buffer);
    00610 #endif //GLIBMM_VFUNCS_ENABLED
    00611
    00612
    00616   #ifdef GLIBMM_VFUNCS_ENABLED
    00617   virtual void get_times_vfunc(const Glib::RefPtr<Gst::Buffer>& buffer, ClockTime& start, ClockTime& end) const;
    00618 #endif //GLIBMM_VFUNCS_ENABLED
    00619
    00620
    00621   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00622   //callbacks return false with the last "return RType()" line.  Make sure this
    00623   //one doesn't cause problems and implement later.
    00625    //*/
    00626   //_WRAP_VFUNC(bool start(), "start")
    00627
    00628   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00629   //callbacks return false with the last "return RType()" line.  Make sure this
    00630   //one doesn't cause problems and implement later.
    00632    //*/
    00633   //_WRAP_VFUNC(bool stop(), "stop")
    00634
    00635   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00636   //callbacks return false with the last "return RType()" line.  Make sure this
    00637   //one doesn't cause problems and implement later.
    00639    //* blocked function ASAP.
    00640    //*/
    00641   //_WRAP_VFUNC(bool unlock(), "unlock")
    00642
    00643
    00644   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00645   //callbacks return false with the last "return RType()" line.  Make sure this
    00646   //one doesn't cause problems and implement later.
    00648    //*/
    00649   //_WRAP_VFUNC(bool event(const Glib::RefPtr<Gst::Event>& event), "event")
    00650
    00653   #ifdef GLIBMM_VFUNCS_ENABLED
    00654   virtual FlowReturn preroll_vfunc(const Glib::RefPtr<Gst::Buffer>& buffer);
    00655 #endif //GLIBMM_VFUNCS_ENABLED
    00656
    00657
    00661   #ifdef GLIBMM_VFUNCS_ENABLED
    00662   virtual FlowReturn render_vfunc(const Glib::RefPtr<Gst::Buffer>& buffer);
    00663 #endif //GLIBMM_VFUNCS_ENABLED
    00664
    00665
    00670   #ifdef GLIBMM_VFUNCS_ENABLED
    00671   virtual StateChangeReturn async_play_vfunc();
    00672 #endif //GLIBMM_VFUNCS_ENABLED
    00673
    00674
    00675   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00676   //callbacks return false with the last "return RType()" line.  Make sure this
    00677   //one doesn't cause problems and implement later.
    00679    //* of spawning a thread to drive the pipeline in pull mode. Should start or
    00680    //* stop the pulling thread, depending on the value of the "active" argument.
    00681    //* Called after actually activating the sink pad in pull mode. The default
    00682    //* implementation starts a task on the sink pad.
    00683    //*/
    00684   //_WRAP_VFUNC(bool activate_pull(bool active), "activate_pull")
    00685
    00691   #ifdef GLIBMM_VFUNCS_ENABLED
    00692   virtual void fixate_vfunc(const Glib::RefPtr<Gst::Caps>& caps);
    00693 #endif //GLIBMM_VFUNCS_ENABLED
    00694
    00695
    00696   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00697   //callbacks return false with the last "return RType()" line.  Make sure this
    00698   //one doesn't cause problems and implement later.
    00700    //* set during unlock_vfunc(), such as clearing command queues.
    00701    //*/
    00702   //_WRAP_VFUNC(bool unlock_stop(), "unlock_stop")
    00703 protected:
    00704
    00705
    00706 public:
    00707
    00708 public:
    00709   //C++ methods used to invoke GTK+ virtual functions:
    00710 #ifdef GLIBMM_VFUNCS_ENABLED
    00711 #endif //GLIBMM_VFUNCS_ENABLED
    00712
    00713 protected:
    00714   //GTK+ Virtual Functions (override these to change behaviour):
    00715 #ifdef GLIBMM_VFUNCS_ENABLED
    00716 #endif //GLIBMM_VFUNCS_ENABLED
    00717
    00718   //Default Signal Handlers::
    00719 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
    00720 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
    00721
    00722
    00723 };
    00724
    00725 } // namespace Gst
    00726
    00727
    00728 namespace Glib
    00729 {
    00738   Glib::RefPtr<Gst::BaseSink> wrap(GstBaseSink* object, bool take_copy = false);
    00739 }
    00740
    00741
    00742 #endif /* _GSTREAMERMM_BASESINK_H */
    00743