<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt">Hello ,<br><br>I am working on transport stream analyzer using QtGstreamer Library.<br><br>I have implemented a pipeline with tsdemux for decoding transport stream.<br><br>The application is able to capture syncrhonous message structure with "pat" name<br><br>Trying to extract the info in the "pat". How to parse the info from this property. The examples given on QtGstreamer freedesktop does not suggest any method to parsing this pat structure.  The pat info is in the Message QGst::Structure. I can retrieve only the top level name and programs fields. But do not know how to reference the pid value and program numbers inside the fields. It is a list but there is no list contract mentioned in QtGstreamer classes. Tried using QGst::Value , not successful. All the information on the internet points to some list of Value elements,
 but could not find any in the QGst library. <br><br>I have tried using QGst::ProbeProperty but that did not help either. it could not find the pat or pat-info property in tsdemux<br><br> if (QString(message->internalStructure()->name())==QString("pat"))<br>    {<br>        qDebug() << "pat table values";<br><br>//        QGst::PropertyProbePtr mmm = message.dynamicCast<QGst::PropertyProbe>();<br>//        QList<QGlib::Value> devices = mmm->probeAndGetValues("programs");<br><br>        //qDebug() << devices;<br><br>        qDebug() << message->typeName();<br><br>        qDebug() << message->internalStructure()->toString();<br><br>       
 QGst::StructurePtr xyz;<br>        xyz= message->internalStructure();<br>        qDebug() << xyz->value("transport-stream-id").toInt(); // works ok<br><br>        qDebug() << xyz->value("programs"); // works ok<br><br><br>        qDebug() <<"number of fields" << xyz->numberOfFields(); // works ok<br><br>        for (int i=1;i <= xyz->numberOfFields();i++)<br>        {<br>            QString fieldname=xyz->fieldName(i);<span class="tab">    </span><span class="tab">    </span><span class="tab">    // works o.k</span><br>            qDebug() <<
 fieldname;<br>         //   QGlib::Type fieldtype=xyz->fieldType("programs").;<span class="tab">    </span>// not able to understand how to get the program numbers and pids based on these fields?<br>          //  qDebug() << fieldtype;<span class="tab">    </span><span class="tab">    </span><span class="tab">    </span><span class="tab">    </span><span class="tab">    </span><span class="tab">    </span><span class="tab">    </span><span class="tab">    </span><span class="tab">    </span><span class="tab">    </span><span class="tab">    </span><span class="tab">    </span><span class="tab">    // or how to use the field type to get the
 elements. </span><br><br>         //   QList<QGlib::Value> prg=xyz->value("programs");<br><br>        }<br><br>output of this program shown below. Could not understand how to map this GstValueList in QtGstreamer wrappers. Or is there a easy way to get the pat info. <br><br>
<style type="text/css">
p, li { white-space: pre-wrap; }
</style>
<div style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monospace'; font-size:9pt; color:#9d9d9d;">"element" </span></div>
<div style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monospace'; font-size:9pt; color:#9d9d9d;">"pat, transport-stream-id=(uint)5, programs=(structure){ "program-4\,\ program-number\=\(uint\)4\,\ pid\=\(uint\)32\;", "program-0\,\ program-number\=\(uint\)0\,\ pid\=\(uint\)16\;" };" </span></div>
<div style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monospace'; font-size:9pt; color:#9d9d9d;">5 </span></div>
<div style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monospace'; font-size:9pt; color:#9d9d9d;">QGlib::Value("GstValueList", "{ program-4, program-number=(uint)4, pid=(uint)32;, program-0, program-number=(uint)0, pid=(uint)16; }") </span></div>
<div style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monospace'; font-size:9pt; color:#9d9d9d;">number of fields 2 </span></div>
<div style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monospace'; font-size:9pt; color:#9d9d9d;">"programs" </span></div>
<div style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Monospace'; font-size:9pt; color:#9d9d9d;">"" </span></div><br><br>Please help.<br><br>Thanks and regards<br>Trinadh<br><br><br><br><br><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> </div> </div>  </div></body></html>