00001
00002
00003 #ifndef _GSTREAMERMM_URIHANDLER_H
00004 #define _GSTREAMERMM_URIHANDLER_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/gsturi.h>
00031 #include <glibmm/interface.h>
00032 #include <gstreamermm/enums.h>
00033
00034
00035 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00036 typedef struct _GstURIHandler GstURIHandler;
00037 typedef struct _GstURIHandlerClass GstURIHandlerClass;
00038 #endif
00039
00040
00041 namespace Gst
00042 { class URIHandler_Class; }
00043 namespace Gst
00044 {
00045
00046 enum URIType
00047 {
00048 URI_UNKNOWN = GST_URI_UNKNOWN,
00049 URI_SINK = GST_URI_SINK,
00050 URI_SRC = GST_URI_SRC
00051 };
00052
00053 class Element;
00054
00067 class URIHandler : public Glib::Interface
00068 {
00069
00070 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00071
00072 public:
00073 typedef URIHandler CppObjectType;
00074 typedef URIHandler_Class CppClassType;
00075 typedef GstURIHandler BaseObjectType;
00076 typedef GstURIHandlerInterface BaseClassType;
00077
00078 private:
00079 friend class URIHandler_Class;
00080 static CppClassType urihandler_class_;
00081
00082
00083 URIHandler(const URIHandler&);
00084 URIHandler& operator=(const URIHandler&);
00085
00086 protected:
00087 URIHandler();
00088
00095 explicit URIHandler(const Glib::Interface_Class& interface_class);
00096
00097 public:
00098
00099
00100
00101 explicit URIHandler(GstURIHandler* castitem);
00102
00103 protected:
00104 #endif
00105
00106 public:
00107 virtual ~URIHandler();
00108
00109 static void add_interface(GType gtype_implementer);
00110
00111 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00112 static GType get_type() G_GNUC_CONST;
00113 static GType get_base_type() G_GNUC_CONST;
00114 #endif
00115
00117 GstURIHandler* gobj() { return reinterpret_cast<GstURIHandler*>(gobject_); }
00118
00120 const GstURIHandler* gobj() const { return reinterpret_cast<GstURIHandler*>(gobject_); }
00121
00122 private:
00123
00124
00125 public:
00126
00133 static bool protocol_is_valid(const Glib::ustring& protocol);
00134
00144 static bool protocol_is_supported(const URIType type, const Glib::ustring& protocol);
00145
00151 static bool uri_is_valid(const Glib::ustring& uri);
00152
00160 static bool uri_has_protocol(const Glib::ustring& uri, const Glib::ustring& protocol);
00161
00167 static Glib::ustring get_protocol(const Glib::ustring& uri);
00168
00177 static Glib::ustring get_location(const Glib::ustring& uri);
00178
00185 static Glib::ustring construct_uri(const Glib::ustring& protocol, const Glib::ustring& location);
00186
00193 static Glib::RefPtr<Gst::Element> make_element_from_uri(const URIType type, const Glib::ustring& uri, const Glib::ustring& name);
00194
00195
00201 guint get_uri_type();
00202
00203
00211 Glib::StringArrayHandle get_protocols();
00212
00213
00220 Glib::ustring get_uri();
00221
00226 bool set_uri(const Glib::ustring& uri);
00227
00232 void new_uri(const Glib::ustring& uri);
00233
00240 Glib::SignalProxy1< void,const Glib::ustring& > signal_new_uri();
00241
00242
00243 public:
00244
00245 public:
00246
00247 #ifdef GLIBMM_VFUNCS_ENABLED
00248 #endif //GLIBMM_VFUNCS_ENABLED
00249
00250 protected:
00251
00252 #ifdef GLIBMM_VFUNCS_ENABLED
00253 #endif //GLIBMM_VFUNCS_ENABLED
00254
00255
00256 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00257 virtual void on_new_uri(const Glib::ustring& uri);
00258 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00259
00260
00261 };
00262
00263 }
00264
00265
00266 namespace Glib
00267 {
00276 Glib::RefPtr<Gst::URIHandler> wrap(GstURIHandler* object, bool take_copy = false);
00277
00278 }
00279
00280
00281 #endif
00282