00001
00002
00003 #ifndef _GSTREAMERMM_PARSE_H
00004 #define _GSTREAMERMM_PARSE_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/gstparse.h>
00031
00032
00033 namespace Gst
00034 {
00035
00036 class Element;
00037
00048 class ParseError : public Glib::Error
00049 {
00050 public:
00051 enum Code
00052 {
00053 SYNTAX,
00054 NO_SUCH_ELEMENT,
00055 NO_SUCH_PROPERTY,
00056 LINK,
00057 COULD_NOT_SET_PROPERTY,
00058 EMPTY_BIN,
00059 EMPTY
00060 };
00061
00062 ParseError(Code error_code, const Glib::ustring& error_message);
00063 explicit ParseError(GError* gobject);
00064 Code code() const;
00065
00066 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00067 private:
00068
00069 #ifdef GLIBMM_EXCEPTIONS_ENABLED
00070 static void throw_func(GError* gobject);
00071 #else
00072
00073 static std::auto_ptr<Glib::Error> throw_func(GError* gobject);
00074 #endif //GLIBMM_EXCEPTIONS_ENABLED
00075
00076 friend void wrap_init();
00077 #endif
00078 };
00079
00080 }
00081
00082 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00083 namespace Glib
00084 {
00085
00086 template <>
00087 class Value<Gst::ParseError::Code> : public Glib::Value_Enum<Gst::ParseError::Code>
00088 {
00089 public:
00090 static GType value_type() G_GNUC_CONST;
00091 };
00092
00093 }
00094 #endif
00095
00096
00097 namespace Gst
00098 {
00099
00100
00105 class Parse
00106 {
00107 public:
00111 static Glib::QueryQuark error_quark();
00112
00125 #ifdef GLIBMM_EXCEPTIONS_ENABLED
00126 static Glib::RefPtr<Gst::Element> launch(const Glib::ustring& pipeline_description);
00127 #else
00128 static Glib::RefPtr<Gst::Element> launch(const Glib::ustring& pipeline_description, std::auto_ptr<Glib::Error>& error);
00129 #endif //GLIBMM_EXCEPTIONS_ENABLED
00130
00140 #ifdef GLIBMM_EXCEPTIONS_ENABLED
00141 static Glib::RefPtr<Gst::Element> launchv(const gchar *argv[]);
00142 #else
00143 static Glib::RefPtr<Gst::Element> launchv(const gchar *argv[], std::auto_ptr<Glib::Error>& error);
00144 #endif //GLIBMM_EXCEPTIONS_ENABLED
00145
00163 #ifdef GLIBMM_EXCEPTIONS_ENABLED
00164 static Glib::RefPtr<Gst::Element> create_bin(const Glib::ustring& bin_description, bool ghost_unconnected_pads);
00165 #else
00166 static Glib::RefPtr<Gst::Element> create_bin(const Glib::ustring& bin_description, bool ghost_unconnected_pads, std::auto_ptr<Glib::Error>& error);
00167 #endif //GLIBMM_EXCEPTIONS_ENABLED
00168 };
00169
00170 }
00171
00172
00173 #endif
00174