mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
gst/mpegtsparse/mpegtspacketizer.c: Parsed and added network name to the nit structure sent in the bus message.
Original commit message from CVS: * gst/mpegtsparse/mpegtspacketizer.c: Parsed and added network name to the nit structure sent in the bus message.
This commit is contained in:
parent
0884acd8ce
commit
450442adae
2 changed files with 28 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2008-01-22 Zaheer Abbas Merali <zaheerabbas at merali dot org>
|
||||||
|
|
||||||
|
* gst/mpegtsparse/mpegtspacketizer.c:
|
||||||
|
Parsed and added network name to the nit structure sent
|
||||||
|
in the bus message.
|
||||||
|
|
||||||
2008-01-22 Zaheer Abbas Merali <zaheerabbas at merali dot org>
|
2008-01-22 Zaheer Abbas Merali <zaheerabbas at merali dot org>
|
||||||
|
|
||||||
* gst/mpegtsparse/mpegtspacketizer.c:
|
* gst/mpegtsparse/mpegtspacketizer.c:
|
||||||
|
|
|
@ -606,6 +606,28 @@ mpegts_packetizer_parse_nit (MpegTSPacketizer * packetizer,
|
||||||
gst_structure_free (nit);
|
gst_structure_free (nit);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
guint8 *networkname_descriptor;
|
||||||
|
GstMPEGDescriptor *mpegdescriptor =
|
||||||
|
gst_mpeg_descriptor_parse (data, descriptors_loop_length);
|
||||||
|
networkname_descriptor =
|
||||||
|
gst_mpeg_descriptor_find (mpegdescriptor, DESC_DVB_NETWORK_NAME);
|
||||||
|
if (networkname_descriptor != NULL) {
|
||||||
|
gchar *networkname_tmp;
|
||||||
|
guint networkname_length =
|
||||||
|
DESC_DVB_NETWORK_NAME_length (networkname_descriptor);
|
||||||
|
gchar *networkname =
|
||||||
|
(gchar *) DESC_DVB_NETWORK_NAME_text (networkname_descriptor);
|
||||||
|
if (networkname[0] < 0x20) {
|
||||||
|
networkname_length -= 1;
|
||||||
|
networkname += 1;
|
||||||
|
}
|
||||||
|
networkname_tmp = g_strndup (networkname, networkname_length);
|
||||||
|
gst_structure_set (nit, "network-name", G_TYPE_STRING, networkname_tmp,
|
||||||
|
NULL);
|
||||||
|
g_free (networkname_tmp);
|
||||||
|
}
|
||||||
|
|
||||||
|
gst_mpeg_descriptor_free (mpegdescriptor);
|
||||||
|
|
||||||
descriptors = g_value_array_new (0);
|
descriptors = g_value_array_new (0);
|
||||||
if (!mpegts_packetizer_parse_descriptors (packetizer,
|
if (!mpegts_packetizer_parse_descriptors (packetizer,
|
||||||
|
|
Loading…
Reference in a new issue