How to convert timestamp in human readable form.

Shubham Shrivastava shubham333vm at gmail.com
Sat Jul 7 06:20:57 UTC 2018


timestamp: 178452710056
stream_time: 178452710056
running_time: 178452710056
offset: 18446744073709551615
offset_end: 18446744073709551615



this type of output i got from

      gst_structure_get_clock_time (s,"timestamp",&timestamp);
        g_print("timestamp: %llu \n", timestamp);
         // g_print ("timestamp------------ %s",&timestamp);
        gst_structure_get_clock_time (s,"stream-time",&stream_time);
        g_print("stream_time: %llu \n", stream_time);
        gst_structure_get_clock_time (s,"running-time",&running_time);
        g_print("running_time: %llu \n", running_time);
        gst_structure_get_uint64(s, "offset", &offset);
        g_print("offset: %llu \n", offset);
        gst_structure_get_uint64(s, "offset-end", &offset_end);
        g_print("offset_end: %llu \n", offset_end);


So to convert  it to human readable form when i did it like this

    strptime("178452710056", "%s", &tm);
    strftime(buf, sizeof(buf), "%d %h %H:%M %Y", &tm);

It shows wrong date and time.

Plz suggest.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20180707/655cd1c5/attachment.html>


More information about the gstreamer-devel mailing list