mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
h264parse: support for handling of config-interval = -1
Added support for handling of config-interval = -1. config-inteval = -1 represents resending SPS and PPS for each I-/IDR-frame. https://bugzilla.gnome.org/show_bug.cgi?id=766803
This commit is contained in:
parent
bf0d952387
commit
a0876aa750
1 changed files with 15 additions and 2 deletions
|
@ -132,8 +132,9 @@ gst_h264_parse_class_init (GstH264ParseClass * klass)
|
||||||
g_param_spec_int ("config-interval",
|
g_param_spec_int ("config-interval",
|
||||||
"SPS PPS Send Interval",
|
"SPS PPS Send Interval",
|
||||||
"Send SPS and PPS Insertion Interval in seconds (sprop parameter sets "
|
"Send SPS and PPS Insertion Interval in seconds (sprop parameter sets "
|
||||||
"will be multiplexed in the data stream when detected.) (0 = disabled)",
|
"will be multiplexed in the data stream when detected.) "
|
||||||
0, 3600, DEFAULT_CONFIG_INTERVAL,
|
"(0 = disabled, -1 = send with every IDR frame)",
|
||||||
|
-1, 3600, DEFAULT_CONFIG_INTERVAL,
|
||||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
|
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
/* Override BaseParse vfuncs */
|
/* Override BaseParse vfuncs */
|
||||||
|
@ -2370,6 +2371,18 @@ gst_h264_parse_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
|
||||||
h264parse->last_report = new_ts;
|
h264parse->last_report = new_ts;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* we pushed whatever we had */
|
||||||
|
h264parse->push_codec = FALSE;
|
||||||
|
h264parse->have_sps = FALSE;
|
||||||
|
h264parse->have_pps = FALSE;
|
||||||
|
h264parse->state &= GST_H264_PARSE_STATE_VALID_PICTURE_HEADERS;
|
||||||
|
}
|
||||||
|
} else if (h264parse->interval == -1) {
|
||||||
|
if (h264parse->idr_pos >= 0) {
|
||||||
|
GST_LOG_OBJECT (h264parse, "IDR nal at offset %d", h264parse->idr_pos);
|
||||||
|
|
||||||
|
gst_h264_parse_handle_sps_pps_nals (h264parse, buffer, frame);
|
||||||
|
|
||||||
/* we pushed whatever we had */
|
/* we pushed whatever we had */
|
||||||
h264parse->push_codec = FALSE;
|
h264parse->push_codec = FALSE;
|
||||||
h264parse->have_sps = FALSE;
|
h264parse->have_sps = FALSE;
|
||||||
|
|
Loading…
Reference in a new issue