00001
00002
00003 #ifndef _GSTREAMERMM_BASESRC_H
00004 #define _GSTREAMERMM_BASESRC_H
00005
00006
00007 #include <glibmm.h>
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #include <gst/base/gstbasesrc.h>
00031 #include <gstreamermm/element.h>
00032 #include <gstreamermm/pad.h>
00033 #include <gstreamermm/format.h>
00034 #include <gstreamermm/clock.h>
00035 #include <gstreamermm/segment.h>
00036
00037
00038 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00039 typedef struct _GstBaseSrc GstBaseSrc;
00040 typedef struct _GstBaseSrcClass GstBaseSrcClass;
00041 #endif
00042
00043
00044 namespace Gst
00045 { class BaseSrc_Class; }
00046 namespace Gst
00047 {
00048
00159 class BaseSrc
00160 : public Element
00161 {
00162
00163 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00164
00165 public:
00166 typedef BaseSrc CppObjectType;
00167 typedef BaseSrc_Class CppClassType;
00168 typedef GstBaseSrc BaseObjectType;
00169 typedef GstBaseSrcClass BaseClassType;
00170
00171 private: friend class BaseSrc_Class;
00172 static CppClassType basesrc_class_;
00173
00174 private:
00175
00176 BaseSrc(const BaseSrc&);
00177 BaseSrc& operator=(const BaseSrc&);
00178
00179 protected:
00180 explicit BaseSrc(const Glib::ConstructParams& construct_params);
00181 explicit BaseSrc(GstBaseSrc* castitem);
00182
00183 #endif
00184
00185 public:
00186 virtual ~BaseSrc();
00187
00188 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00189 static GType get_type() G_GNUC_CONST;
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();
00224
00235 void set_live(bool live);
00236
00246 void set_format(Format format);
00247
00261 bool query_latency(bool& live, ClockTime& min_latency, ClockTime& max_latency);
00262
00268 bool get_do_timestamp();
00269
00277 void set_do_timestamp(bool timestamp);
00278
00281 Glib::RefPtr<Gst::Pad> get_src_pad() const;
00282
00283 #ifdef GLIBMM_PROPERTIES_ENABLED
00284
00290 Glib::PropertyProxy<gulong> property_blocksize() ;
00291 #endif //#GLIBMM_PROPERTIES_ENABLED
00292
00293 #ifdef GLIBMM_PROPERTIES_ENABLED
00294
00300 Glib::PropertyProxy_ReadOnly<gulong> property_blocksize() const;
00301 #endif //#GLIBMM_PROPERTIES_ENABLED
00302
00303 #ifdef GLIBMM_PROPERTIES_ENABLED
00304
00310 Glib::PropertyProxy<bool> property_do_timestamp() ;
00311 #endif //#GLIBMM_PROPERTIES_ENABLED
00312
00313 #ifdef GLIBMM_PROPERTIES_ENABLED
00314
00320 Glib::PropertyProxy_ReadOnly<bool> property_do_timestamp() const;
00321 #endif //#GLIBMM_PROPERTIES_ENABLED
00322
00323 #ifdef GLIBMM_PROPERTIES_ENABLED
00324
00330 Glib::PropertyProxy<int> property_num_buffers() ;
00331 #endif //#GLIBMM_PROPERTIES_ENABLED
00332
00333 #ifdef GLIBMM_PROPERTIES_ENABLED
00334
00340 Glib::PropertyProxy_ReadOnly<int> property_num_buffers() const;
00341 #endif //#GLIBMM_PROPERTIES_ENABLED
00342
00343 #ifdef GLIBMM_PROPERTIES_ENABLED
00344
00350 Glib::PropertyProxy<bool> property_typefind() ;
00351 #endif //#GLIBMM_PROPERTIES_ENABLED
00352
00353 #ifdef GLIBMM_PROPERTIES_ENABLED
00354
00360 Glib::PropertyProxy_ReadOnly<bool> property_typefind() const;
00361 #endif //#GLIBMM_PROPERTIES_ENABLED
00362
00363
00364
00365
00366
00367
00368
00369
00370
00371
00372
00375 #ifdef GLIBMM_VFUNCS_ENABLED
00376 virtual Glib::RefPtr<Gst::Caps> get_caps_vfunc();
00377 #endif //GLIBMM_VFUNCS_ENABLED
00378
00379
00381
00382
00383
00385
00386
00387
00389
00390
00391
00393
00394
00395
00396
00398
00399
00400
00401
00405 #ifdef GLIBMM_VFUNCS_ENABLED
00406 virtual void get_times_vfunc(const Glib::RefPtr<Gst::Buffer>& buffer, ClockTime& start, ClockTime& end);
00407 #endif //GLIBMM_VFUNCS_ENABLED
00408
00409
00411
00412
00413
00415
00416
00417
00419
00420
00421
00422
00424
00425
00426
00427
00428
00429
00430
00432
00433
00434
00436
00437
00438
00440
00441
00442
00443
00444
00445
00446
00450 #ifdef GLIBMM_VFUNCS_ENABLED
00451 virtual void fixate_vfunc(const Glib::RefPtr<Gst::Caps>& caps);
00452 #endif //GLIBMM_VFUNCS_ENABLED
00453
00454
00456
00457
00458
00459
00461
00462
00463
00464
00465
00466
00467
00468
00469 public:
00470
00471 public:
00472
00473 #ifdef GLIBMM_VFUNCS_ENABLED
00474 #endif //GLIBMM_VFUNCS_ENABLED
00475
00476 protected:
00477
00478 #ifdef GLIBMM_VFUNCS_ENABLED
00479 #endif //GLIBMM_VFUNCS_ENABLED
00480
00481
00482 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00483 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00484
00485
00486 };
00487
00488 }
00489
00490
00491 namespace Glib
00492 {
00501 Glib::RefPtr<Gst::BaseSrc> wrap(GstBaseSrc* object, bool take_copy = false);
00502 }
00503
00504
00505 #endif
00506