- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

# basesrc.h

Go to the documentation of this file.

    00001 // -*- c++ -*-
    00002 // Generated by gtkmmproc -- DO NOT MODIFY!
    00003 #ifndef _GSTREAMERMM_BASESRC_H
    00004 #define _GSTREAMERMM_BASESRC_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/gstbasesrc.h>
    00029 #include <gstreamermm/element.h>
    00030 #include <gstreamermm/pad.h>
    00031 #include <gstreamermm/format.h>
    00032 #include <gstreamermm/clock.h>
    00033 #include <gstreamermm/segment.h>
    00034
    00035
    00036 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00037 typedef struct _GstBaseSrc GstBaseSrc;
    00038 typedef struct _GstBaseSrcClass GstBaseSrcClass;
    00039 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
    00040
    00041
    00042 namespace Gst
    00043 { class BaseSrc_Class; } // namespace Gst
    00044 namespace Gst
    00045 {
    00046
    00157 class BaseSrc
    00158 : public Element
    00159 {
    00160
    00161 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00162
    00163 public:
    00164   typedef BaseSrc CppObjectType;
    00165   typedef BaseSrc_Class CppClassType;
    00166   typedef GstBaseSrc BaseObjectType;
    00167   typedef GstBaseSrcClass BaseClassType;
    00168
    00169 private:  friend class BaseSrc_Class;
    00170   static CppClassType basesrc_class_;
    00171
    00172 private:
    00173   // noncopyable
    00174   BaseSrc(const BaseSrc&);
    00175   BaseSrc& operator=(const BaseSrc&);
    00176
    00177 protected:
    00178   explicit BaseSrc(const Glib::ConstructParams& construct_params);
    00179   explicit BaseSrc(GstBaseSrc* castitem);
    00180
    00181 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
    00182
    00183 public:
    00184   virtual ~BaseSrc();
    00185
    00186 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00187   static GType get_type()      G_GNUC_CONST;
    00188
    00189
    00190   static GType get_base_type() G_GNUC_CONST;
    00191 #endif
    00192
    00194   GstBaseSrc*       gobj()       { return reinterpret_cast<GstBaseSrc*>(gobject_); }
    00195
    00197   const GstBaseSrc* gobj() const { return reinterpret_cast<GstBaseSrc*>(gobject_); }
    00198
    00200   GstBaseSrc* gobj_copy();
    00201
    00202 private:
    00203
    00204
    00205 public:
    00206
    00218   FlowReturn wait_playing();
    00219
    00223   bool is_live() const;
    00224
    00235   void set_live(bool live);
    00236
    00246   void set_format(Format format);
    00247
    00248
    00263   bool query_latency(bool& live, ClockTime& min_latency,
    00264     ClockTime& max_latency) const;
    00265
    00266
    00272   gulong get_blocksize() const;
    00273
    00280   void set_blocksize(gulong blocksize);
    00281
    00287   bool get_do_timestamp() const;
    00288
    00296   void set_do_timestamp(bool timestamp);
    00297
    00300    Glib::RefPtr<Gst::Pad> get_src_pad();
    00301   Glib::RefPtr<const Gst::Pad> get_src_pad() const;
    00302
    00303   #ifdef GLIBMM_PROPERTIES_ENABLED
    00304
    00310   Glib::PropertyProxy<gulong> property_blocksize() ;
    00311 #endif //#GLIBMM_PROPERTIES_ENABLED
    00312
    00313 #ifdef GLIBMM_PROPERTIES_ENABLED
    00314
    00320   Glib::PropertyProxy_ReadOnly<gulong> property_blocksize() const;
    00321 #endif //#GLIBMM_PROPERTIES_ENABLED
    00322
    00323   #ifdef GLIBMM_PROPERTIES_ENABLED
    00324
    00330   Glib::PropertyProxy<bool> property_do_timestamp() ;
    00331 #endif //#GLIBMM_PROPERTIES_ENABLED
    00332
    00333 #ifdef GLIBMM_PROPERTIES_ENABLED
    00334
    00340   Glib::PropertyProxy_ReadOnly<bool> property_do_timestamp() const;
    00341 #endif //#GLIBMM_PROPERTIES_ENABLED
    00342
    00343   #ifdef GLIBMM_PROPERTIES_ENABLED
    00344
    00350   Glib::PropertyProxy<int> property_num_buffers() ;
    00351 #endif //#GLIBMM_PROPERTIES_ENABLED
    00352
    00353 #ifdef GLIBMM_PROPERTIES_ENABLED
    00354
    00360   Glib::PropertyProxy_ReadOnly<int> property_num_buffers() const;
    00361 #endif //#GLIBMM_PROPERTIES_ENABLED
    00362
    00363   #ifdef GLIBMM_PROPERTIES_ENABLED
    00364
    00370   Glib::PropertyProxy<bool> property_typefind() ;
    00371 #endif //#GLIBMM_PROPERTIES_ENABLED
    00372
    00373 #ifdef GLIBMM_PROPERTIES_ENABLED
    00374
    00380   Glib::PropertyProxy_ReadOnly<bool> property_typefind() const;
    00381 #endif //#GLIBMM_PROPERTIES_ENABLED
    00382
    00383
    00386   #ifdef GLIBMM_VFUNCS_ENABLED
    00387   virtual Glib::RefPtr<Gst::Caps> get_caps_vfunc() const;
    00388 #endif //GLIBMM_VFUNCS_ENABLED
    00389
    00390
    00391   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00392   //callbacks return false with the last "return RType()" line.  Make sure this
    00393   //one doesn't cause problems and implement later.
    00395    //*/
    00396   //_WRAP_VFUNC(bool set_caps(const Glib::RefPtr<Gst::Caps>& caps), "set_caps")
    00397
    00398   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00399   //callbacks return false with the last "return RType()" line.  Make sure this
    00400   //one doesn't cause problems and implement later.
    00402    //*/
    00403   //_WRAP_VFUNC(bool negotiate(), "negotiate")
    00404
    00405   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00406   //callbacks return false with the last "return RType()" line.  Make sure this
    00407   //one doesn't cause problems and implement later.
    00409    //*/
    00410   //_WRAP_VFUNC(bool new_segment(), "newsegment")
    00411
    00412   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00413   //callbacks return false with the last "return RType()" line.  Make sure this
    00414   //one doesn't cause problems and implement later.
    00416    //* data.
    00417    //*/
    00418   //_WRAP_VFUNC(bool start(), "start")
    00419
    00420   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00421   //callbacks return false with the last "return RType()" line.  Make sure this
    00422   //one doesn't cause problems and implement later.
    00424    //*/
    00425   //_WRAP_VFUNC(bool stop(), "stop")
    00426
    00427
    00431   #ifdef GLIBMM_VFUNCS_ENABLED
    00432   virtual void get_times_vfunc(const Glib::RefPtr<Gst::Buffer>& buffer, ClockTime& start, ClockTime& end) const;
    00433 #endif //GLIBMM_VFUNCS_ENABLED
    00434
    00435
    00436   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00437   //callbacks return false with the last "return RType()" line.  Make sure this
    00438   //one doesn't cause problems and implement later.
    00440    //*/
    00441   //_WRAP_VFUNC(bool get_size(guint64& size) const, "get_size")
    00442
    00443   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00444   //callbacks return false with the last "return RType()" line.  Make sure this
    00445   //one doesn't cause problems and implement later.
    00447    //*/
    00448   //_WRAP_VFUNC(bool is_seekable() const, "is_seekable")
    00449
    00450   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00451   //callbacks return false with the last "return RType()" line.  Make sure this
    00452   //one doesn't cause problems and implement later.
    00454    //* blocked function ASAP.
    00455    //*/
    00456   //_WRAP_VFUNC(bool unlock(), "unlock")
    00457
    00458
    00459   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00460   //callbacks return false with the last "return RType()" line.  Make sure this
    00461   //one doesn't cause problems and implement later.
    00463    //*/
    00464   //_WRAP_VFUNC(bool event(const Glib::RefPtr<Gst::Event>& event), "event")
    00465
    00466 #ifdef GLIBMM_VFUNCS_ENABLED
    00467   virtual FlowReturn create_vfunc(guint64 offset, guint size, Glib::RefPtr<Gst::Buffer>& buffer);
    00468 #endif //GLIBMM_VFUNCS_ENABLED
    00469
    00470 #ifdef GLIBMM_VFUNCS_ENABLED
    00471
    00473   virtual bool do_seek_vfunc(Gst::Segment& segment);
    00474 #endif //GLIBMM_VFUNCS_ENABLED
    00475
    00476
    00477   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00478   //callbacks return false with the last "return RType()" line.  Make sure this
    00479   //one doesn't cause problems and implement later.
    00481    //*/
    00482   //_WRAP_VFUNC(bool query(const Glib::RefPtr<Gst::Query>& query) const, "query")
    00483
    00484   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00485   //callbacks return false with the last "return RType()" line.  Make sure this
    00486   //one doesn't cause problems and implement later.
    00488    //* be opened now. This vfunc is optional, but should be implemented if
    00489    //* possible to avoid unnecessary start/stop cycles. The default
    00490    //* implementation will open and close the resource to find out whether
    00491    //* get_range() is supported, and that is usually undesirable.
    00492    //*/
    00493   //_WRAP_VFUNC(bool check_get_range(), "check_get_range")
    00494
    00498   #ifdef GLIBMM_VFUNCS_ENABLED
    00499   virtual void fixate_vfunc(const Glib::RefPtr<Gst::Caps>& caps);
    00500 #endif //GLIBMM_VFUNCS_ENABLED
    00501
    00502
    00503   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00504   //callbacks return false with the last "return RType()" line.  Make sure this
    00505   //one doesn't cause problems and implement later.
    00507    //* set during unlock_vfunc(), such as clearing command queues.
    00508    //*/
    00509   //_WRAP_VFUNC(bool unlock_stop(), "unlock_stop")
    00510
    00511 #ifdef GLIBMM_VFUNCS_ENABLED
    00512
    00518    virtual bool prepare_seek_segment_vfunc(const Glib::RefPtr<Gst::Event>& seek, Gst::Segment& segment);
    00519 #endif //GLIBMM_VFUNCS_ENABLED
    00520
    00521 protected:
    00522
    00523
    00524 public:
    00525
    00526 public:
    00527   //C++ methods used to invoke GTK+ virtual functions:
    00528 #ifdef GLIBMM_VFUNCS_ENABLED
    00529 #endif //GLIBMM_VFUNCS_ENABLED
    00530
    00531 protected:
    00532   //GTK+ Virtual Functions (override these to change behaviour):
    00533 #ifdef GLIBMM_VFUNCS_ENABLED
    00534 #endif //GLIBMM_VFUNCS_ENABLED
    00535
    00536   //Default Signal Handlers::
    00537 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
    00538 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
    00539
    00540
    00541 };
    00542
    00543 } //namespace Gst
    00544
    00545
    00546 namespace Glib
    00547 {
    00556   Glib::RefPtr<Gst::BaseSrc> wrap(GstBaseSrc* object, bool take_copy = false);
    00557 }
    00558
    00559
    00560 #endif /* _GSTREAMERMM_BASESRC_H */
    00561