summaryrefslogtreecommitdiff
path: root/gst/mpegtsdemux
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2011-07-19 09:36:53 +0200
committerEdward Hervey <bilboed@bilboed.com>2011-07-19 09:49:40 +0200
commita960e72efac1d51631b8cc8b550ef675011fce07 (patch)
tree434da8d94f0c969956036931380857edb7b07176 /gst/mpegtsdemux
parent2b127601e917e24bee62bd0ff57a0c0c15fd8292 (diff)
mpegtsbase/tsdemux: Add more comments and removal unused variable
Diffstat (limited to 'gst/mpegtsdemux')
-rw-r--r--gst/mpegtsdemux/mpegtsbase.c13
-rw-r--r--gst/mpegtsdemux/tsdemux.c3
2 files changed, 12 insertions, 4 deletions
diff --git a/gst/mpegtsdemux/mpegtsbase.c b/gst/mpegtsdemux/mpegtsbase.c
index 534b108d7..46e06cb12 100644
--- a/gst/mpegtsdemux/mpegtsbase.c
+++ b/gst/mpegtsdemux/mpegtsbase.c
@@ -369,6 +369,9 @@ mpegts_base_add_program (MpegTSBase * base,
{
MpegTSBaseProgram *program;
+ GST_DEBUG_OBJECT (base, "program_number : %d, pmt_pid : %d",
+ program_number, pmt_pid);
+
program = g_malloc0 (base->program_size);
program->program_number = program_number;
program->pmt_pid = pmt_pid;
@@ -456,6 +459,8 @@ mpegts_base_remove_program (MpegTSBase * base, gint program_number)
MpegTSBaseProgram *program;
MpegTSBaseClass *klass = GST_MPEGTS_BASE_GET_CLASS (base);
+ GST_DEBUG_OBJECT (base, "program_number : %d", program_number);
+
if (klass->program_stopped) {
program =
(MpegTSBaseProgram *) g_hash_table_lookup (base->programs,
@@ -464,7 +469,6 @@ mpegts_base_remove_program (MpegTSBase * base, gint program_number)
klass->program_stopped (base, program);
}
g_hash_table_remove (base->programs, GINT_TO_POINTER (program_number));
-
}
static MpegTSBaseStream *
@@ -535,6 +539,8 @@ mpegts_base_deactivate_pmt (MpegTSBase * base, MpegTSBaseProgram * program)
const GValue *value;
MpegTSBaseClass *klass = GST_MPEGTS_BASE_GET_CLASS (base);
+ GST_DEBUG_OBJECT (base, "Deactivating PMT");
+
if (program->pmt_info) {
/* Inform subclasses we're deactivating this program */
if (klass->program_stopped)
@@ -732,6 +738,8 @@ mpegts_base_apply_pmt (MpegTSBase * base,
return;
}
+ GST_DEBUG ("Applying PMT (pid:0x%04x)", pmt_pid);
+
gst_structure_id_get (pmt_info,
QUARK_PROGRAM_NUMBER, G_TYPE_UINT, &program_number,
QUARK_PCR_PID, G_TYPE_UINT, &pcr_pid, NULL);
@@ -739,6 +747,7 @@ mpegts_base_apply_pmt (MpegTSBase * base,
program = mpegts_base_get_program (base, program_number);
if (program) {
+ GST_DEBUG ("Deactivating old program");
/* deactivate old pmt */ ;
mpegts_base_deactivate_pmt (base, program);
if (program->pmt_info)
@@ -750,6 +759,8 @@ mpegts_base_apply_pmt (MpegTSBase * base,
program = mpegts_base_add_program (base, program_number, pid);
}
+ GST_DEBUG ("Now activating new program");
+
/* activate new pmt */
program->pmt_info = gst_structure_copy (pmt_info);
program->pmt_pid = pmt_pid;
diff --git a/gst/mpegtsdemux/tsdemux.c b/gst/mpegtsdemux/tsdemux.c
index 94b4671f4..9e70073b4 100644
--- a/gst/mpegtsdemux/tsdemux.c
+++ b/gst/mpegtsdemux/tsdemux.c
@@ -92,9 +92,6 @@ struct _TSDemuxStream
GstPad *pad;
- /* set to FALSE before a push and TRUE after */
- gboolean pushed;
-
/* the return of the latest push */
GstFlowReturn flow_return;