Hello everyone, I need to know the video duration (time), this is the code:
gst_element_set_state (pipeline, GST_STATE_PLAYING);
gdouble length = 0.0;
gint64 value;
query = gst_query_new_duration(GST_FORMAT_TIME);
if (gst_element_query(pipeline, query)) {
gst_query_parse_duration(query, NULL, &value);
length = (gdouble)value / (gdouble)GST_SECOND;
}
cout << "duracion" << length << endl;
gst_query_unref(query);
The fact is that length is 0 and value has set a diffetent value from the actual duration time of the video.
Where I call this query and what variable "value" has a clueless value in it?
Thanks and regards.
Rossana
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel