mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
rtpklvdepay: add the SPARSE flag to the outgoing stream-start event
This commit is contained in:
parent
264be35e3c
commit
8ad0baccc2
1 changed files with 22 additions and 0 deletions
|
@ -68,6 +68,8 @@ static gboolean gst_rtp_klv_depay_setcaps (GstRTPBaseDepayload * depayload,
|
|||
GstCaps * caps);
|
||||
static GstBuffer *gst_rtp_klv_depay_process (GstRTPBaseDepayload * depayload,
|
||||
GstRTPBuffer * rtp);
|
||||
static gboolean gst_rtp_klv_depay_handle_event (GstRTPBaseDepayload * depay,
|
||||
GstEvent * ev);
|
||||
|
||||
static void gst_rtp_klv_depay_reset (GstRtpKlvDepay * klvdepay);
|
||||
|
||||
|
@ -97,6 +99,7 @@ gst_rtp_klv_depay_class_init (GstRtpKlvDepayClass * klass)
|
|||
|
||||
rtpbasedepayload_class->set_caps = gst_rtp_klv_depay_setcaps;
|
||||
rtpbasedepayload_class->process_rtp_packet = gst_rtp_klv_depay_process;
|
||||
rtpbasedepayload_class->handle_event = gst_rtp_klv_depay_handle_event;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -127,6 +130,25 @@ gst_rtp_klv_depay_reset (GstRtpKlvDepay * klvdepay)
|
|||
klvdepay->last_rtp_ts = -1;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_rtp_klv_depay_handle_event (GstRTPBaseDepayload * depay, GstEvent * ev)
|
||||
{
|
||||
switch (GST_EVENT_TYPE (ev)) {
|
||||
case GST_EVENT_STREAM_START:{
|
||||
GstStreamFlags flags;
|
||||
|
||||
ev = gst_event_make_writable (ev);
|
||||
gst_event_parse_stream_flags (ev, &flags);
|
||||
gst_event_set_stream_flags (ev, flags | GST_STREAM_FLAG_SPARSE);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return GST_RTP_BASE_DEPAYLOAD_CLASS (parent_class)->handle_event (depay, ev);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_rtp_klv_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue