After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 706508 - video: respect the event seqnum forwading the ForceKeyUnit events
video: respect the event seqnum forwading the ForceKeyUnit events
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
unspecified
Other All
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-08-21 15:29 UTC by Andoni Morales
Modified: 2013-08-21 17:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
video: respect the event seqnum forwading the ForceKeyUnit events (2.58 KB, patch)
2013-08-21 15:29 UTC, Andoni Morales
needs-work Details | Review

Description Andoni Morales 2013-08-21 15:29:23 UTC
Downstream elements might rely in the event seqnum to determine
if it's same event they have forwarded downstream
Comment 1 Andoni Morales 2013-08-21 15:29:27 UTC
Created attachment 252610 [details] [review]
video: respect the event seqnum forwading the ForceKeyUnit events
Comment 2 Andoni Morales 2013-08-21 15:37:39 UTC
(In reply to comment #0)
> Downstream elements might rely in the event seqnum to determine
> if it's same event they have forwarded downstream
This should be read: "forwarded upstream"
Comment 3 Sebastian Dröge (slomo) 2013-08-21 16:11:29 UTC
It should be the same sequence number as the one of the last seek. All events after a seek should have the sequence number of that seek event, nothing else.

What are you trying to do here?
Comment 4 Andoni Morales 2013-08-21 16:38:46 UTC
The sequence number is different for each event created in the sink and pushed upstream with  gst_video_event_new_upstream_force_key_unit.
I just need a way to determine whether an event is the same when going back downstream to know if it's a duplicate.
The scenario is the following:
x264enc ! mp4dashmux ! dashsink name=sink lamemp3enc ! mp4dashmux ! sink.

The sink sends a unique event upstream for each new fragment.
In the case of the h264 encoder, the event is collected in the encoder and forwarded downstream, so the muxer sees 2 event, the upstream one and the downstream one.
In the case of the audio encoder, the encoder does not forward back the upstream event, so we only have one event queued in the muxer, the upstream one.

Because audio encoders does not forward GstForceKeyUnit events downstream, we can't rely only in downstream events in the muxer.
And when there is a video encoder, the event is forwarded downstream so I just need a way to know is the same event (same segnum) to treat it as a duplicate.
Comment 5 Sebastian Dröge (slomo) 2013-08-21 17:16:23 UTC
I think that's what the count field of the event is intended for:

> count : integer that can be used to number key units
Comment 6 Andoni Morales 2013-08-21 17:18:24 UTC
(In reply to comment #5)
> I think that's what the count field of the event is intended for:
> 
> > count : integer that can be used to number key units

Indeed, I am really stupid :)