Index: libs/libmythtv/ccdecoder.h
===================================================================
--- libs/libmythtv/ccdecoder.h	(revision 8343)
+++ libs/libmythtv/ccdecoder.h	(working copy)
@@ -72,6 +72,16 @@
     // WSS data
     uint            wss_flags;
     bool            wss_valid;
+
+    // XDS data
+    bool            xds_vchip;
+    bool            xds_ptype;
+    bool            xds_stime;
+    bool            xds_plength;
+    bool            xds_pname;
+    QString         xds_ProgramName;
+    int             xds_cnt;
+    int             xds_buf[32];
 };
 
 #endif
Index: libs/libmythtv/ccdecoder.cpp
===================================================================
--- libs/libmythtv/ccdecoder.cpp	(revision 8343)
+++ libs/libmythtv/ccdecoder.cpp	(working copy)
@@ -11,7 +11,8 @@
 CCDecoder::CCDecoder(CCReader *ccr)
     : reader(ccr), rbuf(new unsigned char[sizeof(ccsubtitle)+255]),
       vps_l(0),
-      wss_flags(0), wss_valid(false)
+      wss_flags(0), wss_valid(false), xds_vchip(false), xds_ptype(false),
+      xds_plength(false), xds_pname(false), xds_stime(false)
 {
     for (uint i = 0; i < 2; i++)
     {
@@ -56,6 +57,10 @@
 
     bzero(vps_pr_label, sizeof(vps_pr_label));
     bzero(vps_label,    sizeof(vps_label));
+
+    xds_ProgramName = "";
+    xds_cnt = 0;
+    bzero(xds_buf,      sizeof(xds_buf));
 }
 
 CCDecoder::~CCDecoder(void)
@@ -190,6 +195,7 @@
         int xds_packet = 1;
 
         // TODO: process XDS packets
+        // VERBOSE(VB_VBI, QString("XDS Packet : %1 %2").arg(b1).arg(b2));
         if (b1 == 0x0F)
         {
             // end XDS
@@ -209,7 +215,128 @@
         }
 
         if (xds_packet)
-            goto skip;
+//             goto skip;
+        {
+            // VERBOSE(VB_VBI, QString("XDS Packet : %1 %2").arg(b1).arg(b2));
+            // Detect data packets
+            if (xds_stime) {
+               if (b1 == 0x0F)
+               {
+                   xds_stime = 0;
+                   VERBOSE(VB_VBI, QString("XDS Packet: Start Time/Program ID: End"));
+               } else {
+                   // Process Start Time packets here
+                   VERBOSE(VB_VBI, QString("XDS Packet: Start Time/Program ID: Packet %1 %2").arg(b1).arg(b2));
+               }
+            } else if (xds_plength) {
+               if (b1 == 0x0F)
+               {
+                   xds_plength = 0;
+                   // Payload bytes 1 and 2 are minutes and hours in length
+                   if (xds_cnt > 0)
+                       VERBOSE(VB_VBI, QString("XDS Packet: Program Length: %1 hours, %1 minutes").arg(xds_buf[1]-64).arg(xds_buf[0]-64));
+                   // Payload bytes 3 and 4 are elapsed minutes and hours in length
+                  if (xds_cnt >= 2)
+                       VERBOSE(VB_VBI, QString("XDS Packet: Program Elapsed: %1 hours, %1 mintues").arg(xds_buf[3]-64).arg(xds_buf[2]-64));
+                   // If Payload byte 6 is filler 0x40, then payload byte 5 is elapsed seconds
+                   if ((xds_cnt >= 4) && (xds_buf[5]==0x40))
+                       VERBOSE(VB_VBI, QString("XDS Packet: Program Elapsed: %1 seconds").arg(xds_buf[4]-64));
+
+                   // VERBOSE(VB_VBI, QString("XDS Packet: Program Length/Time in Show: End"));
+               } else {
+                   // Process Program Length packets here
+                   // VERBOSE(VB_VBI, QString("XDS Packet: Program Length/Time in Show: Packet %1 %2").arg(b1).arg(b2));
+                   xds_buf[xds_cnt] = b1;
+                   xds_cnt++;
+                   xds_buf[xds_cnt] = b2;
+                   xds_cnt++;
+               }
+            } else if (xds_pname) {
+               if (b1 == 0x0F)
+               {
+                   xds_pname = 0;
+                   // VERBOSE(VB_VBI, QString("XDS Packet: Program Name: B2 %1").arg(b2));
+                   VERBOSE(VB_VBI, QString("XDS Packet: Program Name: %1").arg(xds_ProgramName));
+                   // VERBOSE(VB_VBI, QString("XDS Packet: Program Name: End"));
+               } else {
+                   // Process Program Name packets here
+                   // VERBOSE(VB_VBI, QString("XDS Packet: Program Name: Packet %1 %2").arg(b1).arg(b2));
+                   xds_ProgramName += CharCC(b1);
+                   xds_ProgramName += CharCC(b2);
+               }
+            } else if (xds_ptype) {
+               if (b1 == 0x0F)
+               {
+                   xds_ptype = 0;
+                   VERBOSE(VB_VBI, QString("XDS Packet: Program Type: End"));
+               } else {
+                   // Process Program Type packets here
+                   if ((b1 == 0xA8) || (b2 == 0xA8))
+                       VERBOSE(VB_VBI, QString("XDS Packet: Program Type: Advertisement"));
+       
+                    VERBOSE(VB_VBI, QString("XDS Packet: Program Type: %1 %2").arg(b1).arg(b2));
+               }
+            } else if (xds_vchip) {
+                if (b1 == 0x0F)
+                {
+                    xds_vchip = 0;
+                    // VERBOSE(VB_VBI, QString("XDS Packet: VChip: End"));
+                } else {
+                    int xds_vchip_mpaa = (b2 & 0x07);
+                    switch (xds_vchip_mpaa) {
+                        case 0x01:
+                            VERBOSE(VB_VBI, QString("XDS Packet: VChip Rating: TV-Y"));
+                            break;
+                        case 0x02:
+                            VERBOSE(VB_VBI, QString("XDS Packet: VChip Rating: TV-Y7"));
+                            break;
+                        case 0x03:
+                            VERBOSE(VB_VBI, QString("XDS Packet: VChip Rating: TV-G"));
+                            break;
+                        case 0x04:
+                            VERBOSE(VB_VBI, QString("XDS Packet: VChip Rating: TV-PG"));
+                            break;
+                        case 0x05:
+                            VERBOSE(VB_VBI, QString("XDS Packet: VChip Rating: TV-14"));
+                            break;
+                        case 0x06:
+                            VERBOSE(VB_VBI, QString("XDS Packet: VChip Rating: TV-MA"));
+                            break;
+                        default:
+                            VERBOSE(VB_VBI, QString("XDS Packet: VChip Rating: None"));
+                            break; 
+                    }
+                    if (b1 & 0x20)
+                        VERBOSE(VB_VBI, QString("XDS Packet: VChip Flag: Suggestive Dialog"));
+                    if (b2 & 0x20)
+                        VERBOSE(VB_VBI, QString("XDS Packet: VChip Flag: Violence"));
+                    if (b2 & 0x08)
+                        VERBOSE(VB_VBI, QString("XDS Packet: VChip Flag: Language"));
+                    if (b2 & 0x10)
+                        VERBOSE(VB_VBI, QString("XDS Packet: VChip Flag: Sexual Situations"));
+                }
+            // Detect start packets 
+            } else if ((b1 == 0x01) && (b2 == 0x01)) {
+                VERBOSE(VB_VBI, QString("XDS Packet: Start Time/Program ID"));
+                xds_stime = 1;
+            } else if ((b1 == 0x01) && (b2 == 0x02)) {
+                // VERBOSE(VB_VBI, QString("XDS Packet: Program Length/Time in Show"));
+                xds_plength = 1;
+                bzero(xds_buf, sizeof(xds_buf));
+                xds_cnt = 0;
+            } else if ((b1 == 0x01) && (b2 == 0x03)) {
+                // VERBOSE(VB_VBI, QString("XDS Packet: Program Name"));
+                xds_pname = 1;
+                xds_ProgramName = "";
+            } else if ((b1 == 0x01) && (b2 == 0x04)) {
+                VERBOSE(VB_VBI, QString("XDS Packet: Program Type"));
+                xds_ptype = 1;
+            } else if ((b1 == 0x01) && (b2 == 0x05)) {
+                // VERBOSE(VB_VBI, QString("XDS Packet: V-Chip"));
+                xds_vchip = 1;
+            } else 
+                VERBOSE(VB_VBI, QString("Unknown XDS Packet : %1 %2").arg(b1).arg(b2));
+        }
     }
 
     if (b1 & 0x60)
