00001
00002
00003 #ifndef _GSTREAMERMM_PLAYBIN2_H
00004 #define _GSTREAMERMM_PLAYBIN2_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 <gstreamermm/pipeline.h>
00031 #include <gstreamermm/element.h>
00032 #include <gstreamermm/buffer.h>
00033 #include <gstreamermm/taglist.h>
00034 #include <gstreamermm/caps.h>
00035 #include <gstreamermm/pad.h>
00036
00037
00038 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00039 typedef struct _GstPlayBin2 GstPlayBin2;
00040 typedef struct _GstPlayBin2Class GstPlayBin2Class;
00041 #endif
00042
00043
00044 namespace Gst
00045 { class PlayBin2_Class; }
00046 namespace Gst
00047 {
00048
00062 enum PlayFlags
00063 {
00064 PLAY_FLAG_VIDEO = 1 << 0,
00065 PLAY_FLAG_AUDIO = 1 << 1,
00066 PLAY_FLAG_TEXT = 1 << 2,
00067 PLAY_FLAG_VIS = 1 << 3,
00068 PLAY_FLAG_SOFT_VOLUME = 1 << 4,
00069 PLAY_FLAG_NATIVE_AUDIO = 1 << 5,
00070 PLAY_FLAG_NATIVE_VIDEO = 1 << 6,
00071 PLAY_FLAG_DOWNLOAD = 1 << 7
00072 };
00073
00075 inline PlayFlags operator|(PlayFlags lhs, PlayFlags rhs)
00076 { return static_cast<PlayFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
00077
00079 inline PlayFlags operator&(PlayFlags lhs, PlayFlags rhs)
00080 { return static_cast<PlayFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
00081
00083 inline PlayFlags operator^(PlayFlags lhs, PlayFlags rhs)
00084 { return static_cast<PlayFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
00085
00087 inline PlayFlags operator~(PlayFlags flags)
00088 { return static_cast<PlayFlags>(~static_cast<unsigned>(flags)); }
00089
00091 inline PlayFlags& operator|=(PlayFlags& lhs, PlayFlags rhs)
00092 { return (lhs = static_cast<PlayFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
00093
00095 inline PlayFlags& operator&=(PlayFlags& lhs, PlayFlags rhs)
00096 { return (lhs = static_cast<PlayFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
00097
00099 inline PlayFlags& operator^=(PlayFlags& lhs, PlayFlags rhs)
00100 { return (lhs = static_cast<PlayFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
00101
00102 }
00103
00104
00105 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00106 namespace Glib
00107 {
00108
00109 template <>
00110 class Value<Gst::PlayFlags> : public Glib::Value_Flags<Gst::PlayFlags>
00111 {
00112 public:
00113 static GType value_type() G_GNUC_CONST;
00114 };
00115
00116 }
00117 #endif
00118
00119
00120 namespace Gst
00121 {
00122
00123
00134 class PlayBin2
00135 : public Gst::Pipeline
00136 {
00137
00138 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00139
00140 public:
00141 typedef PlayBin2 CppObjectType;
00142 typedef PlayBin2_Class CppClassType;
00143 typedef GstPlayBin2 BaseObjectType;
00144 typedef GstPlayBin2Class BaseClassType;
00145
00146 private: friend class PlayBin2_Class;
00147 static CppClassType playbin2_class_;
00148
00149 private:
00150
00151 PlayBin2(const PlayBin2&);
00152 PlayBin2& operator=(const PlayBin2&);
00153
00154 protected:
00155 explicit PlayBin2(const Glib::ConstructParams& construct_params);
00156 explicit PlayBin2(GstPlayBin2* castitem);
00157
00158 #endif
00159
00160 public:
00161 virtual ~PlayBin2();
00162
00163 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00164 static GType get_type() G_GNUC_CONST;
00165
00166
00167 static GType get_base_type() G_GNUC_CONST;
00168 #endif
00169
00171 GstPlayBin2* gobj() { return reinterpret_cast<GstPlayBin2*>(gobject_); }
00172
00174 const GstPlayBin2* gobj() const { return reinterpret_cast<GstPlayBin2*>(gobject_); }
00175
00177 GstPlayBin2* gobj_copy();
00178
00179 private:
00180
00181
00182 protected:
00183 PlayBin2();
00184 PlayBin2(const Glib::ustring& name);
00185
00186 public:
00190 static Glib::RefPtr<PlayBin2> create();
00191
00192
00196 static Glib::RefPtr<PlayBin2> create(const Glib::ustring& name);
00197
00198
00199 #ifdef GLIBMM_PROPERTIES_ENABLED
00200
00206 Glib::PropertyProxy<Glib::ustring> property_uri() ;
00207 #endif //#GLIBMM_PROPERTIES_ENABLED
00208
00209 #ifdef GLIBMM_PROPERTIES_ENABLED
00210
00216 Glib::PropertyProxy_ReadOnly<Glib::ustring> property_uri() const;
00217 #endif //#GLIBMM_PROPERTIES_ENABLED
00218
00219 #ifdef GLIBMM_PROPERTIES_ENABLED
00220
00226 Glib::PropertyProxy<Glib::ustring> property_suburi() ;
00227 #endif //#GLIBMM_PROPERTIES_ENABLED
00228
00229 #ifdef GLIBMM_PROPERTIES_ENABLED
00230
00236 Glib::PropertyProxy_ReadOnly<Glib::ustring> property_suburi() const;
00237 #endif //#GLIBMM_PROPERTIES_ENABLED
00238
00239 #ifdef GLIBMM_PROPERTIES_ENABLED
00240
00246 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gst::Element> > property_source() const;
00247 #endif //#GLIBMM_PROPERTIES_ENABLED
00248
00249
00250 #ifdef GLIBMM_PROPERTIES_ENABLED
00251
00257 Glib::PropertyProxy<Gst::PlayFlags> property_flags() ;
00258 #endif //#GLIBMM_PROPERTIES_ENABLED
00259
00260 #ifdef GLIBMM_PROPERTIES_ENABLED
00261
00267 Glib::PropertyProxy_ReadOnly<Gst::PlayFlags> property_flags() const;
00268 #endif //#GLIBMM_PROPERTIES_ENABLED
00269
00270 #ifdef GLIBMM_PROPERTIES_ENABLED
00271
00277 Glib::PropertyProxy_ReadOnly<int> property_n_video() const;
00278 #endif //#GLIBMM_PROPERTIES_ENABLED
00279
00280
00281 #ifdef GLIBMM_PROPERTIES_ENABLED
00282
00288 Glib::PropertyProxy<int> property_current_video() ;
00289 #endif //#GLIBMM_PROPERTIES_ENABLED
00290
00291 #ifdef GLIBMM_PROPERTIES_ENABLED
00292
00298 Glib::PropertyProxy_ReadOnly<int> property_current_video() const;
00299 #endif //#GLIBMM_PROPERTIES_ENABLED
00300
00301 #ifdef GLIBMM_PROPERTIES_ENABLED
00302
00308 Glib::PropertyProxy_ReadOnly<int> property_n_audio() const;
00309 #endif //#GLIBMM_PROPERTIES_ENABLED
00310
00311
00312 #ifdef GLIBMM_PROPERTIES_ENABLED
00313
00319 Glib::PropertyProxy<int> property_current_audio() ;
00320 #endif //#GLIBMM_PROPERTIES_ENABLED
00321
00322 #ifdef GLIBMM_PROPERTIES_ENABLED
00323
00329 Glib::PropertyProxy_ReadOnly<int> property_current_audio() const;
00330 #endif //#GLIBMM_PROPERTIES_ENABLED
00331
00332 #ifdef GLIBMM_PROPERTIES_ENABLED
00333
00339 Glib::PropertyProxy_ReadOnly<int> property_n_text() const;
00340 #endif //#GLIBMM_PROPERTIES_ENABLED
00341
00342
00343 #ifdef GLIBMM_PROPERTIES_ENABLED
00344
00350 Glib::PropertyProxy<int> property_current_text() ;
00351 #endif //#GLIBMM_PROPERTIES_ENABLED
00352
00353 #ifdef GLIBMM_PROPERTIES_ENABLED
00354
00360 Glib::PropertyProxy_ReadOnly<int> property_current_text() const;
00361 #endif //#GLIBMM_PROPERTIES_ENABLED
00362
00363 #ifdef GLIBMM_PROPERTIES_ENABLED
00364
00370 Glib::PropertyProxy<Glib::ustring> property_subtitle_encoding() ;
00371 #endif //#GLIBMM_PROPERTIES_ENABLED
00372
00373 #ifdef GLIBMM_PROPERTIES_ENABLED
00374
00380 Glib::PropertyProxy_ReadOnly<Glib::ustring> property_subtitle_encoding() const;
00381 #endif //#GLIBMM_PROPERTIES_ENABLED
00382
00383 #ifdef GLIBMM_PROPERTIES_ENABLED
00384
00390 Glib::PropertyProxy< Glib::RefPtr<Gst::Element> > property_audio_sink() ;
00391 #endif //#GLIBMM_PROPERTIES_ENABLED
00392
00393 #ifdef GLIBMM_PROPERTIES_ENABLED
00394
00400 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gst::Element> > property_audio_sink() const;
00401 #endif //#GLIBMM_PROPERTIES_ENABLED
00402
00403 #ifdef GLIBMM_PROPERTIES_ENABLED
00404
00410 Glib::PropertyProxy< Glib::RefPtr<Gst::Element> > property_video_sink() ;
00411 #endif //#GLIBMM_PROPERTIES_ENABLED
00412
00413 #ifdef GLIBMM_PROPERTIES_ENABLED
00414
00420 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gst::Element> > property_video_sink() const;
00421 #endif //#GLIBMM_PROPERTIES_ENABLED
00422
00423 #ifdef GLIBMM_PROPERTIES_ENABLED
00424
00430 Glib::PropertyProxy< Glib::RefPtr<Gst::Element> > property_vis_plugin() ;
00431 #endif //#GLIBMM_PROPERTIES_ENABLED
00432
00433 #ifdef GLIBMM_PROPERTIES_ENABLED
00434
00440 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gst::Element> > property_vis_plugin() const;
00441 #endif //#GLIBMM_PROPERTIES_ENABLED
00442
00443 #ifdef GLIBMM_PROPERTIES_ENABLED
00444
00450 Glib::PropertyProxy< Glib::RefPtr<Gst::Element> > property_text_sink() ;
00451 #endif //#GLIBMM_PROPERTIES_ENABLED
00452
00453 #ifdef GLIBMM_PROPERTIES_ENABLED
00454
00460 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gst::Element> > property_text_sink() const;
00461 #endif //#GLIBMM_PROPERTIES_ENABLED
00462
00463 #ifdef GLIBMM_PROPERTIES_ENABLED
00464
00470 Glib::PropertyProxy< Glib::RefPtr<Gst::Element> > property_subpic_sink() ;
00471 #endif //#GLIBMM_PROPERTIES_ENABLED
00472
00473 #ifdef GLIBMM_PROPERTIES_ENABLED
00474
00480 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gst::Element> > property_subpic_sink() const;
00481 #endif //#GLIBMM_PROPERTIES_ENABLED
00482
00483 #ifdef GLIBMM_PROPERTIES_ENABLED
00484
00490 Glib::PropertyProxy<double> property_volume() ;
00491 #endif //#GLIBMM_PROPERTIES_ENABLED
00492
00493 #ifdef GLIBMM_PROPERTIES_ENABLED
00494
00500 Glib::PropertyProxy_ReadOnly<double> property_volume() const;
00501 #endif //#GLIBMM_PROPERTIES_ENABLED
00502
00503 #ifdef GLIBMM_PROPERTIES_ENABLED
00504
00510 Glib::PropertyProxy<bool> property_mute() ;
00511 #endif //#GLIBMM_PROPERTIES_ENABLED
00512
00513 #ifdef GLIBMM_PROPERTIES_ENABLED
00514
00520 Glib::PropertyProxy_ReadOnly<bool> property_mute() const;
00521 #endif //#GLIBMM_PROPERTIES_ENABLED
00522
00523 #ifdef GLIBMM_PROPERTIES_ENABLED
00524
00530 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gst::Buffer> > property_frame() const;
00531 #endif //#GLIBMM_PROPERTIES_ENABLED
00532
00533
00534 #ifdef GLIBMM_PROPERTIES_ENABLED
00535
00541 Glib::PropertyProxy_WriteOnly<Glib::ustring> property_subtitle_font_desc() ;
00542 #endif //#GLIBMM_PROPERTIES_ENABLED
00543
00544
00545 #ifdef GLIBMM_PROPERTIES_ENABLED
00546
00552 Glib::PropertyProxy<guint> property_connection_speed() ;
00553 #endif //#GLIBMM_PROPERTIES_ENABLED
00554
00555 #ifdef GLIBMM_PROPERTIES_ENABLED
00556
00562 Glib::PropertyProxy_ReadOnly<guint> property_connection_speed() const;
00563 #endif //#GLIBMM_PROPERTIES_ENABLED
00564
00565 #ifdef GLIBMM_PROPERTIES_ENABLED
00566
00572 Glib::PropertyProxy<int> property_buffer_size() ;
00573 #endif //#GLIBMM_PROPERTIES_ENABLED
00574
00575 #ifdef GLIBMM_PROPERTIES_ENABLED
00576
00582 Glib::PropertyProxy_ReadOnly<int> property_buffer_size() const;
00583 #endif //#GLIBMM_PROPERTIES_ENABLED
00584
00585 #ifdef GLIBMM_PROPERTIES_ENABLED
00586
00592 Glib::PropertyProxy<gint64> property_buffer_duration() ;
00593 #endif //#GLIBMM_PROPERTIES_ENABLED
00594
00595 #ifdef GLIBMM_PROPERTIES_ENABLED
00596
00602 Glib::PropertyProxy_ReadOnly<gint64> property_buffer_duration() const;
00603 #endif //#GLIBMM_PROPERTIES_ENABLED
00604
00605
00611 Glib::SignalProxy0< void > signal_about_to_finish();
00612
00613
00619 Glib::SignalProxy0< void > signal_video_changed();
00620
00621
00627 Glib::SignalProxy0< void > signal_audio_changed();
00628
00629
00635 Glib::SignalProxy0< void > signal_text_changed();
00636
00637
00643 Glib::SignalProxy1< void,int > signal_video_tags_changed();
00644
00645
00651 Glib::SignalProxy1< void,int > signal_audio_tags_changed();
00652
00653
00659 Glib::SignalProxy1< void,int > signal_text_tags_changed();
00660
00661
00667 Glib::SignalProxy1< Gst::TagList,int > signal_get_video_tags();
00668
00669
00675 Glib::SignalProxy1< Gst::TagList,int > signal_get_audio_tags();
00676
00677
00683 Glib::SignalProxy1< Gst::TagList,int > signal_get_text_tags();
00684
00685
00691 Glib::SignalProxy1< Glib::RefPtr<Gst::Buffer>,const Glib::RefPtr<Gst::Caps>& > signal_convert_frame();
00692
00693
00699 Glib::SignalProxy1< Glib::RefPtr<Gst::Pad>,int > signal_get_video_pad();
00700
00701
00707 Glib::SignalProxy1< Glib::RefPtr<Gst::Pad>,int > signal_get_audio_pad();
00708
00709
00715 Glib::SignalProxy1< Glib::RefPtr<Gst::Pad>,int > signal_get_text_pad();
00716
00717
00718 public:
00719
00720 public:
00721
00722 #ifdef GLIBMM_VFUNCS_ENABLED
00723 #endif //GLIBMM_VFUNCS_ENABLED
00724
00725 protected:
00726
00727 #ifdef GLIBMM_VFUNCS_ENABLED
00728 #endif //GLIBMM_VFUNCS_ENABLED
00729
00730
00731 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00732 virtual void on_about_to_finish();
00733 virtual void on_video_changed();
00734 virtual void on_audio_changed();
00735 virtual void on_text_changed();
00736 virtual void on_video_tags_changed(int arg0);
00737 virtual void on_audio_tags_changed(int arg0);
00738 virtual void on_text_tags_changed(int arg0);
00739 virtual Gst::TagList on_get_video_tags(int arg0);
00740 virtual Gst::TagList on_get_audio_tags(int arg0);
00741 virtual Gst::TagList on_get_text_tags(int arg0);
00742 virtual Glib::RefPtr<Gst::Buffer> on_convert_frame(const Glib::RefPtr<Gst::Caps>& arg0);
00743 virtual Glib::RefPtr<Gst::Pad> on_get_video_pad(int arg0);
00744 virtual Glib::RefPtr<Gst::Pad> on_get_audio_pad(int arg0);
00745 virtual Glib::RefPtr<Gst::Pad> on_get_text_pad(int arg0);
00746 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00747
00748
00749 };
00750
00751 }
00752
00753
00754 namespace Glib
00755 {
00764 Glib::RefPtr<Gst::PlayBin2> wrap(GstPlayBin2* object, bool take_copy = false);
00765 }
00766
00767
00768 #endif
00769