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
This commit is contained in:
Tony Houghton 2011-07-13 19:25:08 +01:00 committed by Sebastian Dröge
parent b8f32811ca
commit a996d2f01a
3 changed files with 8 additions and 12 deletions

View file

@ -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)

View file

@ -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,

View file

@ -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},
};