- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

# 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
    00180
    00181   static GType get_base_type() G_GNUC_CONST;
    00182 #endif
    00183
    00185   GstBaseSink*       gobj()       { return reinterpret_cast<GstBaseSink*>(gobject_); }
    00186
    00188   const GstBaseSink* gobj() const { return reinterpret_cast<GstBaseSink*>(gobject_); }
    00189
    00191   GstBaseSink* gobj_copy();
    00192
    00193 private:
    00194
    00195
    00196 public:
    00197
    00217   bool query_latency(bool& live, bool& upstream_live, ClockTime& min_latency,
    00218     ClockTime& max_latency) const;
    00219
    00225   ClockTime get_latency() const;
    00226
    00239   Gst::FlowReturn do_preroll(const Glib::RefPtr<Gst::MiniObject>& obj);
    00240
    00252   FlowReturn wait_preroll();
    00253
    00274   ClockReturn wait_clock(ClockTime time, ClockTimeDiff& jitter);
    00275
    00297   ClockReturn wait_clock(ClockTime time);
    00298
    00299
    00315   FlowReturn wait_eos(ClockTime time, ClockTimeDiff& jitter);
    00316
    00332    FlowReturn wait_eos(ClockTime time);
    00333
    00334
    00344   void set_sync(bool sync);
    00345
    00352   bool get_sync() const;
    00353
    00362   void set_max_lateness(gint64 max_lateness);
    00363
    00372   gint64 get_max_lateness() const;
    00373
    00379   void set_qos_enabled(bool enabled);
    00380
    00387   bool is_qos_enabled() const;
    00388
    00397   void set_async_enabled(bool enabled);
    00398
    00406   bool is_async_enabled() const;
    00407
    00416   void set_ts_offset(ClockTimeDiff offset);
    00417
    00423   ClockTimeDiff get_ts_offset() const;
    00424
    00438   void set_render_delay(ClockTime delay);
    00439
    00446   ClockTime get_render_delay() const;
    00447
    00458   Glib::RefPtr<Gst::Buffer> get_last_buffer();
    00459
    00470   Glib::RefPtr<const Gst::Buffer> get_last_buffer() const;
    00471
    00478   void set_blocksize(guint blocksize);
    00479
    00486   guint get_blocksize() const;
    00487
    00488
    00491    Glib::RefPtr<Gst::Pad> get_sink_pad();
    00492   Glib::RefPtr<const Gst::Pad> get_sink_pad() const;
    00493
    00494   #ifdef GLIBMM_PROPERTIES_ENABLED
    00495
    00501   Glib::PropertyProxy<bool> property_async() ;
    00502 #endif //#GLIBMM_PROPERTIES_ENABLED
    00503
    00504 #ifdef GLIBMM_PROPERTIES_ENABLED
    00505
    00511   Glib::PropertyProxy_ReadOnly<bool> property_async() const;
    00512 #endif //#GLIBMM_PROPERTIES_ENABLED
    00513
    00514   #ifdef GLIBMM_PROPERTIES_ENABLED
    00515
    00521   Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gst::Buffer> > property_last_buffer() const;
    00522 #endif //#GLIBMM_PROPERTIES_ENABLED
    00523
    00524
    00525   #ifdef GLIBMM_PROPERTIES_ENABLED
    00526
    00532   Glib::PropertyProxy<gint64> property_max_lateness() ;
    00533 #endif //#GLIBMM_PROPERTIES_ENABLED
    00534
    00535 #ifdef GLIBMM_PROPERTIES_ENABLED
    00536
    00542   Glib::PropertyProxy_ReadOnly<gint64> property_max_lateness() const;
    00543 #endif //#GLIBMM_PROPERTIES_ENABLED
    00544
    00545   #ifdef GLIBMM_PROPERTIES_ENABLED
    00546
    00552   Glib::PropertyProxy<guint> property_preroll_queue_len() ;
    00553 #endif //#GLIBMM_PROPERTIES_ENABLED
    00554
    00555 #ifdef GLIBMM_PROPERTIES_ENABLED
    00556
    00562   Glib::PropertyProxy_ReadOnly<guint> property_preroll_queue_len() const;
    00563 #endif //#GLIBMM_PROPERTIES_ENABLED
    00564
    00565   #ifdef GLIBMM_PROPERTIES_ENABLED
    00566
    00572   Glib::PropertyProxy<bool> property_qos() ;
    00573 #endif //#GLIBMM_PROPERTIES_ENABLED
    00574
    00575 #ifdef GLIBMM_PROPERTIES_ENABLED
    00576
    00582   Glib::PropertyProxy_ReadOnly<bool> property_qos() const;
    00583 #endif //#GLIBMM_PROPERTIES_ENABLED
    00584
    00585   #ifdef GLIBMM_PROPERTIES_ENABLED
    00586
    00592   Glib::PropertyProxy<bool> property_sync() ;
    00593 #endif //#GLIBMM_PROPERTIES_ENABLED
    00594
    00595 #ifdef GLIBMM_PROPERTIES_ENABLED
    00596
    00602   Glib::PropertyProxy_ReadOnly<bool> property_sync() const;
    00603 #endif //#GLIBMM_PROPERTIES_ENABLED
    00604
    00605   #ifdef GLIBMM_PROPERTIES_ENABLED
    00606
    00612   Glib::PropertyProxy<gint64> property_ts_offset() ;
    00613 #endif //#GLIBMM_PROPERTIES_ENABLED
    00614
    00615 #ifdef GLIBMM_PROPERTIES_ENABLED
    00616
    00622   Glib::PropertyProxy_ReadOnly<gint64> property_ts_offset() const;
    00623 #endif //#GLIBMM_PROPERTIES_ENABLED
    00624
    00625
    00628   #ifdef GLIBMM_VFUNCS_ENABLED
    00629   virtual Glib::RefPtr<Gst::Caps> get_caps_vfunc() const;
    00630 #endif //GLIBMM_VFUNCS_ENABLED
    00631
    00632
    00633   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00634   //callbacks return false with the last "return RType()" line.  Make sure this
    00635   //one doesn't cause problems and implement later.
    00637    //*/
    00638   //_WRAP_VFUNC(bool set_caps(const Glib::RefPtr<Gst::Caps>& caps), "set_caps")
    00639
    00640 #ifdef GLIBMM_VFUNCS_ENABLED
    00641
    00642   virtual FlowReturn buffer_alloc_vfunc(guint64 offset, guint size, const Glib::RefPtr<Gst::Caps>& caps, Glib::RefPtr<Gst::Buffer>& buffer);
    00643 #endif //GLIBMM_VFUNCS_ENABLED
    00644
    00645
    00649   #ifdef GLIBMM_VFUNCS_ENABLED
    00650   virtual void get_times_vfunc(const Glib::RefPtr<Gst::Buffer>& buffer, ClockTime& start, ClockTime& end) const;
    00651 #endif //GLIBMM_VFUNCS_ENABLED
    00652
    00653
    00654   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00655   //callbacks return false with the last "return RType()" line.  Make sure this
    00656   //one doesn't cause problems and implement later.
    00658    //*/
    00659   //_WRAP_VFUNC(bool start(), "start")
    00660
    00661   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00662   //callbacks return false with the last "return RType()" line.  Make sure this
    00663   //one doesn't cause problems and implement later.
    00665    //*/
    00666   //_WRAP_VFUNC(bool stop(), "stop")
    00667
    00668   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00669   //callbacks return false with the last "return RType()" line.  Make sure this
    00670   //one doesn't cause problems and implement later.
    00672    //* blocked function ASAP.
    00673    //*/
    00674   //_WRAP_VFUNC(bool unlock(), "unlock")
    00675
    00676
    00677   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00678   //callbacks return false with the last "return RType()" line.  Make sure this
    00679   //one doesn't cause problems and implement later.
    00681    //*/
    00682   //_WRAP_VFUNC(bool event(const Glib::RefPtr<Gst::Event>& event), "event")
    00683
    00686   #ifdef GLIBMM_VFUNCS_ENABLED
    00687   virtual FlowReturn preroll_vfunc(const Glib::RefPtr<Gst::Buffer>& buffer);
    00688 #endif //GLIBMM_VFUNCS_ENABLED
    00689
    00690
    00694   #ifdef GLIBMM_VFUNCS_ENABLED
    00695   virtual FlowReturn render_vfunc(const Glib::RefPtr<Gst::Buffer>& buffer);
    00696 #endif //GLIBMM_VFUNCS_ENABLED
    00697
    00698
    00703   #ifdef GLIBMM_VFUNCS_ENABLED
    00704   virtual StateChangeReturn async_play_vfunc();
    00705 #endif //GLIBMM_VFUNCS_ENABLED
    00706
    00707
    00708   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00709   //callbacks return false with the last "return RType()" line.  Make sure this
    00710   //one doesn't cause problems and implement later.
    00712    //* of spawning a thread to drive the pipeline in pull mode. Should start or
    00713    //* stop the pulling thread, depending on the value of the "active" argument.
    00714    //* Called after actually activating the sink pad in pull mode. The default
    00715    //* implementation starts a task on the sink pad.
    00716    //*/
    00717   //_WRAP_VFUNC(bool activate_pull(bool active), "activate_pull")
    00718
    00724   #ifdef GLIBMM_VFUNCS_ENABLED
    00725   virtual void fixate_vfunc(const Glib::RefPtr<Gst::Caps>& caps);
    00726 #endif //GLIBMM_VFUNCS_ENABLED
    00727
    00728
    00729   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00730   //callbacks return false with the last "return RType()" line.  Make sure this
    00731   //one doesn't cause problems and implement later.
    00733    //* set during unlock_vfunc(), such as clearing command queues.
    00734    //*/
    00735   //_WRAP_VFUNC(bool unlock_stop(), "unlock_stop")
    00736 protected:
    00737
    00738
    00739 public:
    00740
    00741 public:
    00742   //C++ methods used to invoke GTK+ virtual functions:
    00743 #ifdef GLIBMM_VFUNCS_ENABLED
    00744 #endif //GLIBMM_VFUNCS_ENABLED
    00745
    00746 protected:
    00747   //GTK+ Virtual Functions (override these to change behaviour):
    00748 #ifdef GLIBMM_VFUNCS_ENABLED
    00749 #endif //GLIBMM_VFUNCS_ENABLED
    00750
    00751   //Default Signal Handlers::
    00752 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
    00753 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
    00754
    00755
    00756 };
    00757
    00758 } // namespace Gst
    00759
    00760
    00761 namespace Glib
    00762 {
    00771   Glib::RefPtr<Gst::BaseSink> wrap(GstBaseSink* object, bool take_copy = false);
    00772 }
    00773
    00774
    00775 #endif /* _GSTREAMERMM_BASESINK_H */
    00776