mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-05 15:08:48 +00:00
tsdemux: Disable smart program update
The goal of this code was, for programs which were updates (i.e. adding/removing streams but not completely changing) to allow dynamic addition/removal of streams without completely removing everything. But this wasn't 100% tested and there are a bunch of issues which make it fail in plenty of ways. For now disable that feature and force the legacy "add all pads again and then remove old ones" behaviour to make it switch. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6708>
This commit is contained in:
parent
210a225ad2
commit
228c75a336
1 changed files with 9 additions and 1 deletions
|
@ -684,6 +684,7 @@ mpegts_base_program_remove_stream (MpegTSBase * base,
|
|||
program->streams[pid] = NULL;
|
||||
}
|
||||
|
||||
#if 0 /* Smart-update disabled */
|
||||
/* Check if pmtstream is already present in the program */
|
||||
static inline gboolean
|
||||
_stream_in_pmt (const GstMpegtsPMT * pmt, MpegTSBaseStream * stream)
|
||||
|
@ -768,7 +769,7 @@ mpegts_base_update_program (MpegTSBase * base, MpegTSBaseProgram * program,
|
|||
g_list_free (toremove);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static gboolean
|
||||
_stream_is_private_section (const GstMpegtsPMT * pmt,
|
||||
|
@ -862,6 +863,7 @@ mpegts_base_is_same_program (MpegTSBase * base, MpegTSBaseProgram * oldprogram,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
#if 0 /* Smart-update disabled */
|
||||
/* Return TRUE if program is an update
|
||||
*
|
||||
* A program is equal if:
|
||||
|
@ -923,6 +925,7 @@ mpegts_base_is_program_update (MpegTSBase * base,
|
|||
GST_DEBUG ("Program is not an update of the previous one");
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
mpegts_base_deactivate_program (MpegTSBase * base, MpegTSBaseProgram * program)
|
||||
|
@ -1208,6 +1211,8 @@ mpegts_base_apply_pmt (MpegTSBase * base, GstMpegtsSection * section)
|
|||
pmt)))
|
||||
goto same_program;
|
||||
|
||||
#if 0
|
||||
/* parsebin doesn't support program update properly. Disable this feature for now */
|
||||
if (base->streams_aware
|
||||
&& mpegts_base_is_program_update (base, old_program, section->pid, pmt)) {
|
||||
GST_FIXME ("We are streams_aware and new program is an update");
|
||||
|
@ -1215,6 +1220,7 @@ mpegts_base_apply_pmt (MpegTSBase * base, GstMpegtsSection * section)
|
|||
mpegts_base_update_program (base, old_program, section, pmt);
|
||||
goto beach;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* If the current program is active, this means we have a new program */
|
||||
if (old_program->active) {
|
||||
|
@ -1247,7 +1253,9 @@ mpegts_base_apply_pmt (MpegTSBase * base, GstMpegtsSection * section)
|
|||
mpegts_base_activate_program (base, program, section->pid, section, pmt,
|
||||
initial_program);
|
||||
|
||||
#if 0 /* Smart-update disabled */
|
||||
beach:
|
||||
#endif
|
||||
GST_DEBUG ("Done activating program");
|
||||
return TRUE;
|
||||
|
||||
|
|
Loading…
Reference in a new issue