Hello everyone, I need to know the video duration (time), this is the code:<br><br> gst_element_set_state (pipeline, GST_STATE_PLAYING);<br><br> gdouble length = 0.0;<br> gint64 value;<br><br> query = gst_query_new_duration(GST_FORMAT_TIME);<br>
if (gst_element_query(pipeline, query)) { <br> gst_query_parse_duration(query, NULL, &value);<br> length = (gdouble)value / (gdouble)GST_SECOND;<br> }<br> <br> cout << "duracion" << length << endl;<br>
<br> gst_query_unref(query);<br><br>The fact is that length is 0 and value has set a diffetent value from the actual duration time of the video.<br><br>Where I call this query and what variable "value" has a clueless value in it?<br>
<br>Thanks and regards.<br><br>Rossana<br>