GstDateTime

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

GstDateTime

Russel Winder
I need to be able to add a number of minutes to a start date/time.
Clearly the instances of a GstDateTime are immutable, nothing wrong
there, but unlike JodaTime (and thus JSR310) in the Javaverse, there
appear to be no methods for creating a new value from an old value and
a delta. For example plusMinutes(40).

Is this something no-one has ever wanted to do in GStreamer, or have I
just missed something (very likely).

--
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:[hidden email]
41 Buckmaster Road    m: +44 7770 465 077   xmpp: [hidden email]
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: GstDateTime

Dirk-Jan C. Binnema

On Saturday Feb 18 2017, Russel Winder wrote:

> I need to be able to add a number of minutes to a start date/time.
> Clearly the instances of a GstDateTime are immutable, nothing wrong
> there, but unlike JodaTime (and thus JSR310) in the Javaverse, there
> appear to be no methods for creating a new value from an old value and
> a delta. For example plusMinutes(40).
>
> Is this something no-one has ever wanted to do in GStreamer, or have I
> just missed something (very likely).

You can use the GDateTime[1], and convert using
gst_date_time_new_from_g_date_time / gst_data_time_to_g_date_time

[1] https://developer.gnome.org/glib/stable/glib-GDateTime.html#g-date-time-add-minutes

Kind regards,
Dirk.

--
Dirk-Jan C. Binnema                  Helsinki, Finland
e:[hidden email]           w:www.djcbsoftware.nl
pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: GstDateTime

Russel Winder
On Sat, 2017-02-18 at 19:59 +0200, Dirk-Jan C. Binnema wrote:
> […]
> You can use the GDateTime[1], and convert using
> gst_date_time_new_from_g_date_time / gst_data_time_to_g_date_time
>
> [1] https://developer.gnome.org/glib/stable/glib-GDateTime.html#g-dat
> e-time-add-minutes

Dirk,

Apologies for the delay in replying. I had missed the "*_add_*" calls
in the GDateTime class. Your email made me read the list more
carefully. :-) I think we have the necessary success. :-)

--
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:[hidden email]
41 Buckmaster Road    m: +44 7770 465 077   xmpp: [hidden email]
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: GstDateTime

Russel Winder
On Wed, 2017-02-22 at 10:18 +0000, Russel Winder wrote:
[…]
> Dirk,
>
> Apologies for the delay in replying. I had missed the "*_add_*" calls
> in the GDateTime class. Your email made me read the list more
> carefully. :-) I think we have the necessary success. :-)

I will have to be honest I actually used a Glib::DateTime :-)

--
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:[hidden email]
41 Buckmaster Road    m: +44 7770 465 077   xmpp: [hidden email]
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (849 bytes) Download Attachment