[gstreamer-bugs] [Bug 561224] Plugin resettime: Subtract a base time from the timestamps of passing buffers.
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Mon Sep 13 03:23:52 PDT 2010
https://bugzilla.gnome.org/show_bug.cgi?id=561224
GStreamer | gst-plugins-bad | git
Miguel Angel Cabrera <mad_aluche> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mad_aluche at hotmail.com
--- Comment #21 from Miguel Angel Cabrera <mad_aluche at hotmail.com> 2010-09-13 10:23:45 UTC ---
I cannot post full code but i do something similar to what is requested in post
number 3.
I have this function that inserts a new segment when it is not the first
request pad in a tee
def insert_new_segment_cb(pad, buffer, data):
# Wait for keyframe
if buffer.flag_is_set(gst.BUFFER_FLAG_DELTA_UNIT):
return False
pad.remove_buffer_probe(data['id'])
try:
position, _ = pipeline.query_position(gst.FORMAT_TIME)
except gst.QueryError:
return True
if position != -1:
event = gst.event_new_new_segment(False, 1.0,
gst.FORMAT_TIME, position, -1, 0)
pad.get_peer().send_event(event)
return True
And before I have a custom element that resets timestamps to 0 and inserts
metadata in the stream if it is necessary. The metadata is stored in a custom
source.
Very hackish, but it works.
Would be great to have this implemented officially in GStreamer.
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the Gstreamer-bugs
mailing list