- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List

# 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   static GType get_base_type() G_GNUC_CONST;
    00189 #endif
    00190
    00192   GstBaseSrc*       gobj()       { return reinterpret_cast<GstBaseSrc*>(gobject_); }
    00193
    00195   const GstBaseSrc* gobj() const { return reinterpret_cast<GstBaseSrc*>(gobject_); }
    00196
    00198   GstBaseSrc* gobj_copy();
    00199
    00200 private:
    00201
    00202
    00203 public:
    00204
    00216   FlowReturn wait_playing();
    00217
    00221   bool is_live() const;
    00222
    00233   void set_live(bool live);
    00234
    00244   void set_format(Format format);
    00245
    00260   bool query_latency(bool& live, ClockTime& min_latency,
    00261     ClockTime& max_latency) const;
    00262
    00268   bool get_do_timestamp() const;
    00269
    00277   void set_do_timestamp(bool timestamp);
    00278
    00281    Glib::RefPtr<Gst::Pad> get_src_pad();
    00282   Glib::RefPtr<const Gst::Pad> get_src_pad() const;
    00283
    00284   #ifdef GLIBMM_PROPERTIES_ENABLED
    00285
    00291   Glib::PropertyProxy<gulong> property_blocksize() ;
    00292 #endif //#GLIBMM_PROPERTIES_ENABLED
    00293
    00294 #ifdef GLIBMM_PROPERTIES_ENABLED
    00295
    00301   Glib::PropertyProxy_ReadOnly<gulong> property_blocksize() const;
    00302 #endif //#GLIBMM_PROPERTIES_ENABLED
    00303
    00304   #ifdef GLIBMM_PROPERTIES_ENABLED
    00305
    00311   Glib::PropertyProxy<bool> property_do_timestamp() ;
    00312 #endif //#GLIBMM_PROPERTIES_ENABLED
    00313
    00314 #ifdef GLIBMM_PROPERTIES_ENABLED
    00315
    00321   Glib::PropertyProxy_ReadOnly<bool> property_do_timestamp() const;
    00322 #endif //#GLIBMM_PROPERTIES_ENABLED
    00323
    00324   #ifdef GLIBMM_PROPERTIES_ENABLED
    00325
    00331   Glib::PropertyProxy<int> property_num_buffers() ;
    00332 #endif //#GLIBMM_PROPERTIES_ENABLED
    00333
    00334 #ifdef GLIBMM_PROPERTIES_ENABLED
    00335
    00341   Glib::PropertyProxy_ReadOnly<int> property_num_buffers() const;
    00342 #endif //#GLIBMM_PROPERTIES_ENABLED
    00343
    00344   #ifdef GLIBMM_PROPERTIES_ENABLED
    00345
    00351   Glib::PropertyProxy<bool> property_typefind() ;
    00352 #endif //#GLIBMM_PROPERTIES_ENABLED
    00353
    00354 #ifdef GLIBMM_PROPERTIES_ENABLED
    00355
    00361   Glib::PropertyProxy_ReadOnly<bool> property_typefind() const;
    00362 #endif //#GLIBMM_PROPERTIES_ENABLED
    00363
    00364
    00367   #ifdef GLIBMM_VFUNCS_ENABLED
    00368   virtual Glib::RefPtr<Gst::Caps> get_caps_vfunc() const;
    00369 #endif //GLIBMM_VFUNCS_ENABLED
    00370
    00371
    00372   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00373   //callbacks return false with the last "return RType()" line.  Make sure this
    00374   //one doesn't cause problems and implement later.
    00376    //*/
    00377   //_WRAP_VFUNC(bool set_caps(const Glib::RefPtr<Gst::Caps>& caps), "set_caps")
    00378
    00379   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00380   //callbacks return false with the last "return RType()" line.  Make sure this
    00381   //one doesn't cause problems and implement later.
    00383    //*/
    00384   //_WRAP_VFUNC(bool negotiate(), "negotiate")
    00385
    00386   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00387   //callbacks return false with the last "return RType()" line.  Make sure this
    00388   //one doesn't cause problems and implement later.
    00390    //*/
    00391   //_WRAP_VFUNC(bool new_segment(), "newsegment")
    00392
    00393   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00394   //callbacks return false with the last "return RType()" line.  Make sure this
    00395   //one doesn't cause problems and implement later.
    00397    //* data.
    00398    //*/
    00399   //_WRAP_VFUNC(bool start(), "start")
    00400
    00401   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00402   //callbacks return false with the last "return RType()" line.  Make sure this
    00403   //one doesn't cause problems and implement later.
    00405    //*/
    00406   //_WRAP_VFUNC(bool stop(), "stop")
    00407
    00408
    00412   #ifdef GLIBMM_VFUNCS_ENABLED
    00413   virtual void get_times_vfunc(const Glib::RefPtr<Gst::Buffer>& buffer, ClockTime& start, ClockTime& end) const;
    00414 #endif //GLIBMM_VFUNCS_ENABLED
    00415
    00416
    00417   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00418   //callbacks return false with the last "return RType()" line.  Make sure this
    00419   //one doesn't cause problems and implement later.
    00421    //*/
    00422   //_WRAP_VFUNC(bool get_size(guint64& size) const, "get_size")
    00423
    00424   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00425   //callbacks return false with the last "return RType()" line.  Make sure this
    00426   //one doesn't cause problems and implement later.
    00428    //*/
    00429   //_WRAP_VFUNC(bool is_seekable() const, "is_seekable")
    00430
    00431   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00432   //callbacks return false with the last "return RType()" line.  Make sure this
    00433   //one doesn't cause problems and implement later.
    00435    //* blocked function ASAP.
    00436    //*/
    00437   //_WRAP_VFUNC(bool unlock(), "unlock")
    00438
    00439
    00440   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00441   //callbacks return false with the last "return RType()" line.  Make sure this
    00442   //one doesn't cause problems and implement later.
    00444    //*/
    00445   //_WRAP_VFUNC(bool event(const Glib::RefPtr<Gst::Event>& event), "event")
    00446
    00447 #ifdef GLIBMM_VFUNCS_ENABLED
    00448   virtual FlowReturn create_vfunc(guint64 offset, guint size, Glib::RefPtr<Gst::Buffer>& buffer);
    00449 #endif //GLIBMM_VFUNCS_ENABLED
    00450
    00451 #ifdef GLIBMM_VFUNCS_ENABLED
    00452
    00454   virtual bool do_seek_vfunc(Gst::Segment& segment);
    00455 #endif //GLIBMM_VFUNCS_ENABLED
    00456
    00457
    00458   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00459   //callbacks return false with the last "return RType()" line.  Make sure this
    00460   //one doesn't cause problems and implement later.
    00462    //*/
    00463   //_WRAP_VFUNC(bool query(const Glib::RefPtr<Gst::Query>& query) const, "query")
    00464
    00465   //TODO: Some boolean vfuncs cause strange incorrect functionality when their
    00466   //callbacks return false with the last "return RType()" line.  Make sure this
    00467   //one doesn't cause problems and implement later.
    00469    //* be opened now. This vfunc is optional, but should be implemented if
    00470    //* possible to avoid unnecessary start/stop cycles. The default
    00471    //* implementation will open and close the resource to find out whether
    00472    //* get_range() is supported, and that is usually undesirable.
    00473    //*/
    00474   //_WRAP_VFUNC(bool check_get_range(), "check_get_range")
    00475
    00479   #ifdef GLIBMM_VFUNCS_ENABLED
    00480   virtual void fixate_vfunc(const Glib::RefPtr<Gst::Caps>& caps);
    00481 #endif //GLIBMM_VFUNCS_ENABLED
    00482
    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    //* set during unlock_vfunc(), such as clearing command queues.
    00489    //*/
    00490   //_WRAP_VFUNC(bool unlock_stop(), "unlock_stop")
    00491
    00492 #ifdef GLIBMM_VFUNCS_ENABLED
    00493
    00499    virtual bool prepare_seek_segment_vfunc(const Glib::RefPtr<Gst::Event>& seek, Gst::Segment& segment);
    00500 #endif //GLIBMM_VFUNCS_ENABLED
    00501
    00502 protected:
    00503
    00504
    00505 public:
    00506
    00507 public:
    00508   //C++ methods used to invoke GTK+ virtual functions:
    00509 #ifdef GLIBMM_VFUNCS_ENABLED
    00510 #endif //GLIBMM_VFUNCS_ENABLED
    00511
    00512 protected:
    00513   //GTK+ Virtual Functions (override these to change behaviour):
    00514 #ifdef GLIBMM_VFUNCS_ENABLED
    00515 #endif //GLIBMM_VFUNCS_ENABLED
    00516
    00517   //Default Signal Handlers::
    00518 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
    00519 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
    00520
    00521
    00522 };
    00523
    00524 } //namespace Gst
    00525
    00526
    00527 namespace Glib
    00528 {
    00537   Glib::RefPtr<Gst::BaseSrc> wrap(GstBaseSrc* object, bool take_copy = false);
    00538 }
    00539
    00540
    00541 #endif /* _GSTREAMERMM_BASESRC_H */
    00542