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

Enable Date tag and GDataTime support for GstDateTime

parent 594418e1
This diff is collapsed.
......@@ -65,6 +65,7 @@ generate = [
manual = [
"GLib.Error",
"GLib.Source",
"GLib.DateTime",
"GObject.Object",
"Gst.Structure",
"Gst.Iterator",
......
// This file was generated by gir (f00d658) from gir-files (???)
// This file was generated by gir (ef05cf1) from gir-files (???)
// DO NOT EDIT
#[allow(unused_imports)]
......
// This file was generated by gir (f00d658) from gir-files (???)
// This file was generated by gir (ef05cf1) from gir-files (???)
// DO NOT EDIT
use ChildProxy;
......
// This file was generated by gir (f00d658) from gir-files (???)
// This file was generated by gir (ef05cf1) from gir-files (???)
// DO NOT EDIT
use ClockTime;
......
// This file was generated by gir (f00d658) from gir-files (???)
// This file was generated by gir (ef05cf1) from gir-files (???)
// DO NOT EDIT
use ffi;
......
// This file was generated by gir (f00d658) from gir-files (???)
// This file was generated by gir (ef05cf1) from gir-files (???)
// DO NOT EDIT
use ClockTime;
......
// This file was generated by gir (f00d658) from gir-files (???)
// This file was generated by gir (ef05cf1) from gir-files (???)
// DO NOT EDIT
use ffi;
use glib;
use glib::translate::*;
use glib_ffi;
use gobject_ffi;
......@@ -26,9 +27,12 @@ impl DateTime {
}
}
//pub fn new_from_g_date_time(dt: /*Ignored*/&glib::DateTime) -> DateTime {
// unsafe { TODO: call ffi::gst_date_time_new_from_g_date_time() }
//}
pub fn new_from_g_date_time(dt: &glib::DateTime) -> DateTime {
assert_initialized_main_thread!();
unsafe {
from_glib_full(ffi::gst_date_time_new_from_g_date_time(dt.to_glib_full()))
}
}
pub fn new_from_iso8601_string(string: &str) -> DateTime {
assert_initialized_main_thread!();
......@@ -171,9 +175,11 @@ impl DateTime {
}
}
//pub fn to_g_date_time(&self) -> /*Ignored*/Option<glib::DateTime> {
// unsafe { TODO: call ffi::gst_date_time_to_g_date_time() }
//}
pub fn to_g_date_time(&self) -> Option<glib::DateTime> {
unsafe {
from_glib_full(ffi::gst_date_time_to_g_date_time(self.to_glib_none().0))
}
}
pub fn to_iso8601_string(&self) -> Option<String> {
unsafe {
......
// This file was generated by gir (f00d658) from gir-files (???)
// This file was generated by gir (ef05cf1) from gir-files (???)
// DO NOT EDIT
use Caps;
......
// This file was generated by gir (f00d658) from gir-files (???)
// This file was generated by gir (ef05cf1) from gir-files (???)
// DO NOT EDIT
use Bus;
......
// This file was generated by gir (f00d658) from gir-files (???)
// This file was generated by gir (ef05cf1) from gir-files (???)
// DO NOT EDIT
use Bus;
......
// This file was generated by gir (f00d658) from gir-files (???)
// This file was generated by gir (ef05cf1) from gir-files (???)
// DO NOT EDIT
use DeviceProvider;
......
// This file was generated by gir (f00d658) from gir-files (???)
// This file was generated by gir (ef05cf1) from gir-files (???)
// DO NOT EDIT
use Bus;
......
// This file was generated by gir (f00d658) from gir-files (???)
// This file was generated by gir (ef05cf1) from gir-files (???)
// DO NOT EDIT
use Caps;
......
// This file was generated by gir (f00d658) from gir-files (???)
// This file was generated by gir (ef05cf1) from gir-files (???)
// DO NOT EDIT
use ffi;
......
// This file was generated by gir (f00d658) from gir-files (???)
// This file was generated by gir (ef05cf1) from gir-files (???)
// DO NOT EDIT
use ffi;
......
// This file was generated by gir (f00d658) from gir-files (???)
// This file was generated by gir (ef05cf1) from gir-files (???)
// DO NOT EDIT
use Bin;
......
// This file was generated by gir (f00d658) from gir-files (???)
// This file was generated by gir (ef05cf1) from gir-files (???)
// DO NOT EDIT
use Object;
......
// This file was generated by gir (f00d658) from gir-files (???)
// This file was generated by gir (ef05cf1) from gir-files (???)
// DO NOT EDIT
mod bin;
......
// This file was generated by gir (f00d658) from gir-files (???)
// This file was generated by gir (ef05cf1) from gir-files (???)
// DO NOT EDIT
use Caps;
......
// This file was generated by gir (f00d658) from gir-files (???)
// This file was generated by gir (ef05cf1) from gir-files (???)
// DO NOT EDIT
use Caps;
......
// This file was generated by gir (f00d658) from gir-files (???)
// This file was generated by gir (ef05cf1) from gir-files (???)
// DO NOT EDIT
use Bin;
......
// This file was generated by gir (f00d658) from gir-files (???)
// This file was generated by gir (ef05cf1) from gir-files (???)
// DO NOT EDIT
use Error;
......
// This file was generated by gir (f00d658) from gir-files (???)
// This file was generated by gir (ef05cf1) from gir-files (???)
// DO NOT EDIT
use ffi;
......
// This file was generated by gir (f00d658) from gir-files (???)
// This file was generated by gir (ef05cf1) from gir-files (???)
// DO NOT EDIT
use Iterator;
......
// This file was generated by gir (f00d658) from gir-files (???)
// This file was generated by gir (ef05cf1) from gir-files (???)
// DO NOT EDIT
#[cfg(feature = "v1_10")]
......
// This file was generated by gir (f00d658) from gir-files (???)
// This file was generated by gir (ef05cf1) from gir-files (???)
// DO NOT EDIT
use Object;
......
// This file was generated by gir (f00d658) from gir-files (???)
// This file was generated by gir (ef05cf1) from gir-files (???)
// DO NOT EDIT
use Element;
......
// This file was generated by gir (f00d658) from gir-files (???)
// This file was generated by gir (ef05cf1) from gir-files (???)
// DO NOT EDIT
use Error;
......
......@@ -47,8 +47,7 @@ impl_tag!(Album, &'a str, *TAG_ALBUM);
impl_tag!(AlbumSortname, &'a str, *TAG_ALBUM_SORTNAME);
impl_tag!(AlbumArtist, &'a str, *TAG_ALBUM_ARTIST);
impl_tag!(AlbumArtistSortname, &'a str, *TAG_ALBUM_ARTIST_SORTNAME);
// https://github.com/gtk-rs/glib/pull/208
//impl_tag!(Date, glib::Date, *TAG_DATE);
impl_tag!(Date, glib::Date, *TAG_DATE);
impl_tag!(DateTime, ::auto::DateTime, *TAG_DATE_TIME);
impl_tag!(Genre, &'a str, *TAG_GENRE);
impl_tag!(Comment, &'a str, *TAG_COMMENT);
......
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