Commit eeea572c authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

Implement further parts of the Message machinery

parent 602c3f25
......@@ -27,7 +27,14 @@ generate = [
"Gst.URIType",
"Gst.ElementFactoryListType",
"Gst.Format",
"Gst.MessageType",
"Gst.BufferingMode",
"Gst.CoreError",
"Gst.ResourceError",
"Gst.LibraryError",
"Gst.StreamError",
"Gst.PluginError",
"Gst.ParseError",
"Gst.URIError",
]
manual = [
......
......@@ -146,10 +146,10 @@ pub trait ElementExt {
fn lost_state(&self);
//fn message_full<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b str>>>(&self, type_: MessageType, domain: /*Ignored*/glib::Quark, code: i32, text: P, debug: Q, file: &str, function: &str, line: i32);
//fn message_full<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b str>>>(&self, type_: /*Ignored*/MessageType, domain: /*Ignored*/glib::Quark, code: i32, text: P, debug: Q, file: &str, function: &str, line: i32);
//#[cfg(feature = "v1_10")]
//fn message_full_with_details<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b str>>>(&self, type_: MessageType, domain: /*Ignored*/glib::Quark, code: i32, text: P, debug: Q, file: &str, function: &str, line: i32, structure: /*Ignored*/&mut Structure);
//fn message_full_with_details<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b str>>>(&self, type_: /*Ignored*/MessageType, domain: /*Ignored*/glib::Quark, code: i32, text: P, debug: Q, file: &str, function: &str, line: i32, structure: /*Ignored*/&mut Structure);
fn no_more_pads(&self);
......@@ -395,12 +395,12 @@ impl<O: IsA<Element> + IsA<glib::object::Object>> ElementExt for O {
}
}
//fn message_full<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b str>>>(&self, type_: MessageType, domain: /*Ignored*/glib::Quark, code: i32, text: P, debug: Q, file: &str, function: &str, line: i32) {
//fn message_full<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b str>>>(&self, type_: /*Ignored*/MessageType, domain: /*Ignored*/glib::Quark, code: i32, text: P, debug: Q, file: &str, function: &str, line: i32) {
// unsafe { TODO: call ffi::gst_element_message_full() }
//}
//#[cfg(feature = "v1_10")]
//fn message_full_with_details<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b str>>>(&self, type_: MessageType, domain: /*Ignored*/glib::Quark, code: i32, text: P, debug: Q, file: &str, function: &str, line: i32, structure: /*Ignored*/&mut Structure) {
//fn message_full_with_details<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b str>>>(&self, type_: /*Ignored*/MessageType, domain: /*Ignored*/glib::Quark, code: i32, text: P, debug: Q, file: &str, function: &str, line: i32, structure: /*Ignored*/&mut Structure) {
// unsafe { TODO: call ffi::gst_element_message_full_with_details() }
//}
......
This diff is collapsed.
......@@ -4,67 +4,6 @@
use ffi;
use glib::translate::*;
bitflags! {
pub struct MessageType: u32 {
const MESSAGE_UNKNOWN = 0;
const MESSAGE_EOS = 1;
const MESSAGE_ERROR = 2;
const MESSAGE_WARNING = 4;
const MESSAGE_INFO = 8;
const MESSAGE_TAG = 16;
const MESSAGE_BUFFERING = 32;
const MESSAGE_STATE_CHANGED = 64;
const MESSAGE_STATE_DIRTY = 128;
const MESSAGE_STEP_DONE = 256;
const MESSAGE_CLOCK_PROVIDE = 512;
const MESSAGE_CLOCK_LOST = 1024;
const MESSAGE_NEW_CLOCK = 2048;
const MESSAGE_STRUCTURE_CHANGE = 4096;
const MESSAGE_STREAM_STATUS = 8192;
const MESSAGE_APPLICATION = 16384;
const MESSAGE_ELEMENT = 32768;
const MESSAGE_SEGMENT_START = 65536;
const MESSAGE_SEGMENT_DONE = 131072;
const MESSAGE_DURATION_CHANGED = 262144;
const MESSAGE_LATENCY = 524288;
const MESSAGE_ASYNC_START = 1048576;
const MESSAGE_ASYNC_DONE = 2097152;
const MESSAGE_REQUEST_STATE = 4194304;
const MESSAGE_STEP_START = 8388608;
const MESSAGE_QOS = 16777216;
const MESSAGE_PROGRESS = 33554432;
const MESSAGE_TOC = 67108864;
const MESSAGE_RESET_TIME = 134217728;
const MESSAGE_STREAM_START = 268435456;
const MESSAGE_NEED_CONTEXT = 536870912;
const MESSAGE_HAVE_CONTEXT = 1073741824;
const MESSAGE_EXTENDED = 2147483648;
const MESSAGE_DEVICE_ADDED = 2147483649;
const MESSAGE_DEVICE_REMOVED = 2147483650;
const MESSAGE_PROPERTY_NOTIFY = 2147483651;
const MESSAGE_STREAM_COLLECTION = 2147483652;
const MESSAGE_STREAMS_SELECTED = 2147483653;
const MESSAGE_REDIRECT = 2147483654;
const MESSAGE_ANY = 4294967295;
}
}
#[doc(hidden)]
impl ToGlib for MessageType {
type GlibType = ffi::GstMessageType;
fn to_glib(&self) -> ffi::GstMessageType {
ffi::GstMessageType::from_bits_truncate(self.bits())
}
}
#[doc(hidden)]
impl FromGlib<ffi::GstMessageType> for MessageType {
fn from_glib(value: ffi::GstMessageType) -> MessageType {
MessageType::from_bits_truncate(value.bits())
}
}
bitflags! {
pub struct SeekFlags: u32 {
const SEEK_FLAG_NONE = 0;
......
......@@ -43,57 +43,24 @@ pub use self::u_r_i_handler::URIHandler;
pub use self::u_r_i_handler::URIHandlerExt;
mod enums;
pub use self::enums::BufferingMode;
pub use self::enums::CoreError;
pub use self::enums::FlowReturn;
pub use self::enums::Format;
pub use self::enums::LibraryError;
pub use self::enums::PadDirection;
pub use self::enums::ParseError;
pub use self::enums::PluginError;
pub use self::enums::ResourceError;
pub use self::enums::SeekType;
pub use self::enums::State;
pub use self::enums::StateChange;
pub use self::enums::StateChangeReturn;
pub use self::enums::StreamError;
pub use self::enums::URIError;
pub use self::enums::URIType;
mod flags;
pub use self::flags::MessageType;
pub use self::flags::MESSAGE_UNKNOWN;
pub use self::flags::MESSAGE_EOS;
pub use self::flags::MESSAGE_ERROR;
pub use self::flags::MESSAGE_WARNING;
pub use self::flags::MESSAGE_INFO;
pub use self::flags::MESSAGE_TAG;
pub use self::flags::MESSAGE_BUFFERING;
pub use self::flags::MESSAGE_STATE_CHANGED;
pub use self::flags::MESSAGE_STATE_DIRTY;
pub use self::flags::MESSAGE_STEP_DONE;
pub use self::flags::MESSAGE_CLOCK_PROVIDE;
pub use self::flags::MESSAGE_CLOCK_LOST;
pub use self::flags::MESSAGE_NEW_CLOCK;
pub use self::flags::MESSAGE_STRUCTURE_CHANGE;
pub use self::flags::MESSAGE_STREAM_STATUS;
pub use self::flags::MESSAGE_APPLICATION;
pub use self::flags::MESSAGE_ELEMENT;
pub use self::flags::MESSAGE_SEGMENT_START;
pub use self::flags::MESSAGE_SEGMENT_DONE;
pub use self::flags::MESSAGE_DURATION_CHANGED;
pub use self::flags::MESSAGE_LATENCY;
pub use self::flags::MESSAGE_ASYNC_START;
pub use self::flags::MESSAGE_ASYNC_DONE;
pub use self::flags::MESSAGE_REQUEST_STATE;
pub use self::flags::MESSAGE_STEP_START;
pub use self::flags::MESSAGE_QOS;
pub use self::flags::MESSAGE_PROGRESS;
pub use self::flags::MESSAGE_TOC;
pub use self::flags::MESSAGE_RESET_TIME;
pub use self::flags::MESSAGE_STREAM_START;
pub use self::flags::MESSAGE_NEED_CONTEXT;
pub use self::flags::MESSAGE_HAVE_CONTEXT;
pub use self::flags::MESSAGE_EXTENDED;
pub use self::flags::MESSAGE_DEVICE_ADDED;
pub use self::flags::MESSAGE_DEVICE_REMOVED;
pub use self::flags::MESSAGE_PROPERTY_NOTIFY;
pub use self::flags::MESSAGE_STREAM_COLLECTION;
pub use self::flags::MESSAGE_STREAMS_SELECTED;
pub use self::flags::MESSAGE_REDIRECT;
pub use self::flags::MESSAGE_ANY;
pub use self::flags::SeekFlags;
pub use self::flags::SEEK_FLAG_NONE;
pub use self::flags::SEEK_FLAG_FLUSH;
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment