mpegtsmux: allow to disable SCTE NULL by setting interval to 0

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6284>
This commit is contained in:
Jurijs Satcs 2024-03-07 12:28:58 +01:00 committed by GStreamer Marge Bot
parent d3fba31da0
commit 6a9bf8592a
3 changed files with 5 additions and 5 deletions

View file

@ -220960,14 +220960,14 @@
"writable": true
},
"scte-35-null-interval": {
"blurb": "Set the interval (in ticks of the 90kHz clock) for writing SCTE-35 NULL (heartbeat) packets. (only valid if scte-35-pid is different from 0)",
"blurb": "Set the interval (in ticks of the 90kHz clock) for writing SCTE-35 NULL (heartbeat) packets. 0=disable (only valid if scte-35-pid is different from 0)",
"conditionally-available": false,
"construct": false,
"construct-only": false,
"controllable": false,
"default": "27000000",
"max": "-1",
"min": "1",
"min": "0",
"mutable": "null",
"readable": true,
"type": "guint",

View file

@ -2860,8 +2860,8 @@ gst_base_ts_mux_class_init (GstBaseTsMuxClass * klass)
g_object_class_install_property (G_OBJECT_CLASS (klass),
PROP_SCTE_35_NULL_INTERVAL, g_param_spec_uint ("scte-35-null-interval",
"SCTE-35 NULL packet interval",
"Set the interval (in ticks of the 90kHz clock) for writing SCTE-35 NULL (heartbeat) packets."
" (only valid if scte-35-pid is different from 0)", 1, G_MAXUINT,
"Set the interval (in ticks of the 90kHz clock) for writing SCTE-35 NULL (heartbeat) packets. 0=disable"
" (only valid if scte-35-pid is different from 0)", 0, G_MAXUINT,
TSMUX_DEFAULT_SCTE_35_NULL_INTERVAL,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));

View file

@ -1460,7 +1460,7 @@ rewrite_si (TsMux * mux, gint64 cur_ts)
next_pcr = get_current_pcr (mux, cur_ts);
}
if (program->scte35_pid != 0) {
if (program->scte35_pid != 0 && program->scte35_null_interval != 0) {
gboolean write_scte_null = FALSE;
if (program->next_scte35_pcr == -1)
write_scte_null = TRUE;