From: Tony Houghton Date: Wed, 13 Jul 2011 18:25:08 +0000 (+0100) Subject: Correct satellite delivery descriptor parsing. X-Git-Tag: RELEASE-0.11.93~119 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a996d2f01a894e3d7a6cba94edc5db44aa1ef959;p=platform%2Fupstream%2Fgst-plugins-bad.git Correct satellite delivery descriptor parsing. Original code to parse satellite delivery descriptors to generate "satellite" structures appeared to be copy & pasted from cable's code without amending for satellite. Also added 8PSK to dvbsrc's enum for modulation. https://bugzilla.gnome.org/show_bug.cgi?id=654485 Conflicts: gst/mpegdemux/gstmpegdesc.h gst/mpegdemux/mpegtspacketizer.c --- diff --git a/gst/mpegtsdemux/gstmpegdesc.h b/gst/mpegtsdemux/gstmpegdesc.h index d773f81..2e98a87 100644 --- a/gst/mpegtsdemux/gstmpegdesc.h +++ b/gst/mpegtsdemux/gstmpegdesc.h @@ -293,7 +293,7 @@ #define DESC_DVB_SATELLITE_DELIVERY_SYSTEM_orbital_position(desc) (desc + 6) #define DESC_DVB_SATELLITE_DELIVERY_SYSTEM_west_east_flag(desc) ((desc[8] & 0x80) == 0x80) #define DESC_DVB_SATELLITE_DELIVERY_SYSTEM_polarization(desc) ((desc[8] >> 5) & 0x3) -#define DESC_DVB_SATELLITE_DELIVERY_SYSTEM_modulation(desc) (desc[8] & 0x1F) +#define DESC_DVB_SATELLITE_DELIVERY_SYSTEM_modulation(desc) (desc[8] & 0x3) #define DESC_DVB_SATELLITE_DELIVERY_SYSTEM_symbol_rate(desc) (desc + 9) #define DESC_DVB_SATELLITE_DELIVERY_SYSTEM_fec_inner(desc) (desc[12] & 0x0F) diff --git a/gst/mpegtsdemux/mpegtspacketizer.c b/gst/mpegtsdemux/mpegtspacketizer.c index 16cfc53..45c9fcf 100644 --- a/gst/mpegtsdemux/mpegtspacketizer.c +++ b/gst/mpegtsdemux/mpegtspacketizer.c @@ -1086,25 +1086,20 @@ mpegts_packetizer_parse_nit (MpegTSPacketizer2 * packetizer, } switch (modulation) { case 0x00: - modulation_str = "undefined"; + modulation_str = "auto"; break; case 0x01: - modulation_str = "QAM16"; + modulation_str = "QPSK"; break; case 0x02: - modulation_str = "QAM32"; + modulation_str = "8PSK"; break; case 0x03: - modulation_str = "QAM64"; - break; - case 0x04: - modulation_str = "QAM128"; - break; - case 0x05: - modulation_str = "QAM256"; + modulation_str = "QAM16"; break; default: - modulation_str = "reserved"; + modulation_str = ""; + break; } delivery_structure = gst_structure_new ("satellite", "orbital", G_TYPE_FLOAT, orbital, diff --git a/sys/dvb/gstdvbsrc.c b/sys/dvb/gstdvbsrc.c index a71b9f6..3a83a40 100644 --- a/sys/dvb/gstdvbsrc.c +++ b/sys/dvb/gstdvbsrc.c @@ -155,6 +155,7 @@ gst_dvbsrc_modulation_get_type (void) {QAM_AUTO, "AUTO", "auto"}, {VSB_8, "8VSB", "8vsb"}, {VSB_16, "16VSB", "16vsb"}, + {PSK_8, "8PSK", "8psk"}, {0, NULL, NULL}, };