00001
00002
00003 #ifndef _GSTREAMERBASEMM_PLAYBIN2_H
00004 #define _GSTREAMERBASEMM_PLAYBIN2_H
00005
00006
00007 #include <glibmm.h>
00008
00009 #include <gstreamermm/pipeline.h>
00010 #include <gstreamermm/element.h>
00011 #include <gstreamermm/buffer.h>
00012 #include <gstreamermm/taglist.h>
00013 #include <gstreamermm/caps.h>
00014 #include <gstreamermm/pad.h>
00015
00016
00017 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00018 typedef struct _GstPlayBin2 GstPlayBin2;
00019 typedef struct _GstPlayBin2Class GstPlayBin2Class;
00020 #endif
00021
00022
00023 namespace GstBase
00024 { class PlayBin2_Class; }
00025 namespace GstBase
00026 {
00027
00041 enum PlayFlags
00042 {
00043 PLAY_FLAG_VIDEO = 1 << 0,
00044 PLAY_FLAG_AUDIO = 1 << 1,
00045 PLAY_FLAG_TEXT = 1 << 2,
00046 PLAY_FLAG_VIS = 1 << 3,
00047 PLAY_FLAG_SOFT_VOLUME = 1 << 4,
00048 PLAY_FLAG_NATIVE_AUDIO = 1 << 5,
00049 PLAY_FLAG_NATIVE_VIDEO = 1 << 6
00050 };
00051
00053 inline PlayFlags operator|(PlayFlags lhs, PlayFlags rhs)
00054 { return static_cast<PlayFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
00055
00057 inline PlayFlags operator&(PlayFlags lhs, PlayFlags rhs)
00058 { return static_cast<PlayFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
00059
00061 inline PlayFlags operator^(PlayFlags lhs, PlayFlags rhs)
00062 { return static_cast<PlayFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
00063
00065 inline PlayFlags operator~(PlayFlags flags)
00066 { return static_cast<PlayFlags>(~static_cast<unsigned>(flags)); }
00067
00069 inline PlayFlags& operator|=(PlayFlags& lhs, PlayFlags rhs)
00070 { return (lhs = static_cast<PlayFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
00071
00073 inline PlayFlags& operator&=(PlayFlags& lhs, PlayFlags rhs)
00074 { return (lhs = static_cast<PlayFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
00075
00077 inline PlayFlags& operator^=(PlayFlags& lhs, PlayFlags rhs)
00078 { return (lhs = static_cast<PlayFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
00079
00080 }
00081
00082
00083 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00084 namespace Glib
00085 {
00086
00087 template <>
00088 class Value<GstBase::PlayFlags> : public Glib::Value_Flags<GstBase::PlayFlags>
00089 {
00090 public:
00091 static GType value_type() G_GNUC_CONST;
00092 };
00093
00094 }
00095 #endif
00096
00097
00098 namespace GstBase
00099 {
00100
00101
00111 class PlayBin2
00112 : public Gst::Pipeline
00113 {
00114
00115 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00116
00117 public:
00118 typedef PlayBin2 CppObjectType;
00119 typedef PlayBin2_Class CppClassType;
00120 typedef GstPlayBin2 BaseObjectType;
00121 typedef GstPlayBin2Class BaseClassType;
00122
00123 private: friend class PlayBin2_Class;
00124 static CppClassType playbin2_class_;
00125
00126 private:
00127
00128 PlayBin2(const PlayBin2&);
00129 PlayBin2& operator=(const PlayBin2&);
00130
00131 protected:
00132 explicit PlayBin2(const Glib::ConstructParams& construct_params);
00133 explicit PlayBin2(GstPlayBin2* castitem);
00134
00135 #endif
00136
00137 public:
00138 virtual ~PlayBin2();
00139
00140 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00141 static GType get_type() G_GNUC_CONST;
00142 static GType get_base_type() G_GNUC_CONST;
00143 #endif
00144
00146 GstPlayBin2* gobj() { return reinterpret_cast<GstPlayBin2*>(gobject_); }
00147
00149 const GstPlayBin2* gobj() const { return reinterpret_cast<GstPlayBin2*>(gobject_); }
00150
00152 GstPlayBin2* gobj_copy();
00153
00154 private:
00155
00156
00157 protected:
00158 PlayBin2();
00159 PlayBin2(const Glib::ustring& name);
00160
00161 public:
00165 static Glib::RefPtr<PlayBin2> create();
00166
00167
00171 static Glib::RefPtr<PlayBin2> create(const Glib::ustring& name);
00172
00173
00174 #ifdef GLIBMM_PROPERTIES_ENABLED
00175
00181 Glib::PropertyProxy<Glib::ustring> property_uri() ;
00182 #endif //#GLIBMM_PROPERTIES_ENABLED
00183
00184 #ifdef GLIBMM_PROPERTIES_ENABLED
00185
00191 Glib::PropertyProxy_ReadOnly<Glib::ustring> property_uri() const;
00192 #endif //#GLIBMM_PROPERTIES_ENABLED
00193
00194 #ifdef GLIBMM_PROPERTIES_ENABLED
00195
00201 Glib::PropertyProxy<Glib::ustring> property_suburi() ;
00202 #endif //#GLIBMM_PROPERTIES_ENABLED
00203
00204 #ifdef GLIBMM_PROPERTIES_ENABLED
00205
00211 Glib::PropertyProxy_ReadOnly<Glib::ustring> property_suburi() const;
00212 #endif //#GLIBMM_PROPERTIES_ENABLED
00213
00214 #ifdef GLIBMM_PROPERTIES_ENABLED
00215
00221 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gst::Element> > property_source() const;
00222 #endif //#GLIBMM_PROPERTIES_ENABLED
00223
00224
00225 #ifdef GLIBMM_PROPERTIES_ENABLED
00226
00232 Glib::PropertyProxy<PlayFlags> property_flags() ;
00233 #endif //#GLIBMM_PROPERTIES_ENABLED
00234
00235 #ifdef GLIBMM_PROPERTIES_ENABLED
00236
00242 Glib::PropertyProxy_ReadOnly<PlayFlags> property_flags() const;
00243 #endif //#GLIBMM_PROPERTIES_ENABLED
00244
00245 #ifdef GLIBMM_PROPERTIES_ENABLED
00246
00252 Glib::PropertyProxy_ReadOnly<int> property_n_video() const;
00253 #endif //#GLIBMM_PROPERTIES_ENABLED
00254
00255
00256 #ifdef GLIBMM_PROPERTIES_ENABLED
00257
00263 Glib::PropertyProxy<int> property_current_video() ;
00264 #endif //#GLIBMM_PROPERTIES_ENABLED
00265
00266 #ifdef GLIBMM_PROPERTIES_ENABLED
00267
00273 Glib::PropertyProxy_ReadOnly<int> property_current_video() const;
00274 #endif //#GLIBMM_PROPERTIES_ENABLED
00275
00276 #ifdef GLIBMM_PROPERTIES_ENABLED
00277
00283 Glib::PropertyProxy_ReadOnly<int> property_n_audio() const;
00284 #endif //#GLIBMM_PROPERTIES_ENABLED
00285
00286
00287 #ifdef GLIBMM_PROPERTIES_ENABLED
00288
00294 Glib::PropertyProxy<int> property_current_audio() ;
00295 #endif //#GLIBMM_PROPERTIES_ENABLED
00296
00297 #ifdef GLIBMM_PROPERTIES_ENABLED
00298
00304 Glib::PropertyProxy_ReadOnly<int> property_current_audio() const;
00305 #endif //#GLIBMM_PROPERTIES_ENABLED
00306
00307 #ifdef GLIBMM_PROPERTIES_ENABLED
00308
00314 Glib::PropertyProxy_ReadOnly<int> property_n_text() const;
00315 #endif //#GLIBMM_PROPERTIES_ENABLED
00316
00317
00318 #ifdef GLIBMM_PROPERTIES_ENABLED
00319
00325 Glib::PropertyProxy<int> property_current_text() ;
00326 #endif //#GLIBMM_PROPERTIES_ENABLED
00327
00328 #ifdef GLIBMM_PROPERTIES_ENABLED
00329
00335 Glib::PropertyProxy_ReadOnly<int> property_current_text() const;
00336 #endif //#GLIBMM_PROPERTIES_ENABLED
00337
00338 #ifdef GLIBMM_PROPERTIES_ENABLED
00339
00345 Glib::PropertyProxy<Glib::ustring> property_subtitle_encoding() ;
00346 #endif //#GLIBMM_PROPERTIES_ENABLED
00347
00348 #ifdef GLIBMM_PROPERTIES_ENABLED
00349
00355 Glib::PropertyProxy_ReadOnly<Glib::ustring> property_subtitle_encoding() const;
00356 #endif //#GLIBMM_PROPERTIES_ENABLED
00357
00358 #ifdef GLIBMM_PROPERTIES_ENABLED
00359
00365 Glib::PropertyProxy< Glib::RefPtr<Gst::Element> > property_audio_sink() ;
00366 #endif //#GLIBMM_PROPERTIES_ENABLED
00367
00368 #ifdef GLIBMM_PROPERTIES_ENABLED
00369
00375 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gst::Element> > property_audio_sink() const;
00376 #endif //#GLIBMM_PROPERTIES_ENABLED
00377
00378 #ifdef GLIBMM_PROPERTIES_ENABLED
00379
00385 Glib::PropertyProxy< Glib::RefPtr<Gst::Element> > property_video_sink() ;
00386 #endif //#GLIBMM_PROPERTIES_ENABLED
00387
00388 #ifdef GLIBMM_PROPERTIES_ENABLED
00389
00395 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gst::Element> > property_video_sink() const;
00396 #endif //#GLIBMM_PROPERTIES_ENABLED
00397
00398 #ifdef GLIBMM_PROPERTIES_ENABLED
00399
00405 Glib::PropertyProxy< Glib::RefPtr<Gst::Element> > property_vis_plugin() ;
00406 #endif //#GLIBMM_PROPERTIES_ENABLED
00407
00408 #ifdef GLIBMM_PROPERTIES_ENABLED
00409
00415 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gst::Element> > property_vis_plugin() const;
00416 #endif //#GLIBMM_PROPERTIES_ENABLED
00417
00418 #ifdef GLIBMM_PROPERTIES_ENABLED
00419
00425 Glib::PropertyProxy<double> property_volume() ;
00426 #endif //#GLIBMM_PROPERTIES_ENABLED
00427
00428 #ifdef GLIBMM_PROPERTIES_ENABLED
00429
00435 Glib::PropertyProxy_ReadOnly<double> property_volume() const;
00436 #endif //#GLIBMM_PROPERTIES_ENABLED
00437
00438 #ifdef GLIBMM_PROPERTIES_ENABLED
00439
00445 Glib::PropertyProxy<bool> property_mute() ;
00446 #endif //#GLIBMM_PROPERTIES_ENABLED
00447
00448 #ifdef GLIBMM_PROPERTIES_ENABLED
00449
00455 Glib::PropertyProxy_ReadOnly<bool> property_mute() const;
00456 #endif //#GLIBMM_PROPERTIES_ENABLED
00457
00458 #ifdef GLIBMM_PROPERTIES_ENABLED
00459
00465 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gst::Buffer> > property_frame() const;
00466 #endif //#GLIBMM_PROPERTIES_ENABLED
00467
00468
00469 #ifdef GLIBMM_PROPERTIES_ENABLED
00470
00476 Glib::PropertyProxy_WriteOnly<Glib::ustring> property_subtitle_font_desc() ;
00477 #endif //#GLIBMM_PROPERTIES_ENABLED
00478
00479
00480 #ifdef GLIBMM_PROPERTIES_ENABLED
00481
00487 Glib::PropertyProxy<guint> property_connection_speed() ;
00488 #endif //#GLIBMM_PROPERTIES_ENABLED
00489
00490 #ifdef GLIBMM_PROPERTIES_ENABLED
00491
00497 Glib::PropertyProxy_ReadOnly<guint> property_connection_speed() const;
00498 #endif //#GLIBMM_PROPERTIES_ENABLED
00499
00500
00506 Glib::SignalProxy0< void > signal_about_to_finish();
00507
00508
00514 Glib::SignalProxy0< void > signal_video_changed();
00515
00516
00522 Glib::SignalProxy0< void > signal_audio_changed();
00523
00524
00530 Glib::SignalProxy0< void > signal_text_changed();
00531
00532
00538 Glib::SignalProxy1< Gst::TagList,int > signal_get_video_tags();
00539
00540
00546 Glib::SignalProxy1< Gst::TagList,int > signal_get_audio_tags();
00547
00548
00554 Glib::SignalProxy1< Gst::TagList,int > signal_get_text_tags();
00555
00556
00562 Glib::SignalProxy1< Glib::RefPtr<Gst::Buffer>,const Glib::RefPtr<Gst::Caps>& > signal_convert_frame();
00563
00564
00570 Glib::SignalProxy1< Glib::RefPtr<Gst::Pad>,int > signal_get_video_pad();
00571
00572
00578 Glib::SignalProxy1< Glib::RefPtr<Gst::Pad>,int > signal_get_audio_pad();
00579
00580
00586 Glib::SignalProxy1< Glib::RefPtr<Gst::Pad>,int > signal_get_text_pad();
00587
00588
00589 public:
00590
00591 public:
00592
00593 #ifdef GLIBMM_VFUNCS_ENABLED
00594 #endif //GLIBMM_VFUNCS_ENABLED
00595
00596 protected:
00597
00598 #ifdef GLIBMM_VFUNCS_ENABLED
00599 #endif //GLIBMM_VFUNCS_ENABLED
00600
00601
00602 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00603 virtual void on_about_to_finish();
00604 virtual void on_video_changed();
00605 virtual void on_audio_changed();
00606 virtual void on_text_changed();
00607 virtual Gst::TagList on_get_video_tags(int arg0);
00608 virtual Gst::TagList on_get_audio_tags(int arg0);
00609 virtual Gst::TagList on_get_text_tags(int arg0);
00610 virtual Glib::RefPtr<Gst::Buffer> on_convert_frame(const Glib::RefPtr<Gst::Caps>& arg0);
00611 virtual Glib::RefPtr<Gst::Pad> on_get_video_pad(int arg0);
00612 virtual Glib::RefPtr<Gst::Pad> on_get_audio_pad(int arg0);
00613 virtual Glib::RefPtr<Gst::Pad> on_get_text_pad(int arg0);
00614 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00615
00616
00617 };
00618
00619 }
00620
00621
00622 namespace Glib
00623 {
00632 Glib::RefPtr<GstBase::PlayBin2> wrap(GstPlayBin2* object, bool take_copy = false);
00633 }
00634
00635
00636 #endif
00637