<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 8/11/2015 11:32 PM, Self User wrote:<br>
    </div>
    <blockquote
cite="mid:CALZKj1NXHCT4On60BmhNck9ZM30xWbHsY5wMpb1wHRfAvTCYhg@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi and thanks for the comment.
        <div><br>
        </div>
        <div>I tried to do it but it is not helped me...</div>
        <div><br>
        </div>
        <div>The flow you wrote helps when I am decoding packets/frames.</div>
        <div><br>
        </div>
        <div>looks likes the read packet/frame methods are for the
          codecs themselves.</div>
        <div><br>
        </div>
        <div>I am trying to find some code that gives me the == TS
          packets == and its fields (continuity counter, scramble bit
          etc...)</div>
        <div><br>
        </div>
        <div>Also, the example that I saw under doc/sample in the ffmpeg
          package are mostly for decode/transcode/encode and I didnt see</div>
        <div><br>
        </div>
        <div>any API that gives me handling of the TS packets
          themselves.</div>
        <div><br>
        </div>
        <div>can you please be more specific with some example that I
          can look on.</div>
        <div><br>
        </div>
        <div>Thank you very much</div>
        <div><br>
        </div>
        <div><br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Tue, Aug 4, 2015 at 9:05 PM, Talgorn
          François-Xavier <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:fxtalgorn-at-yahoo.fr@ffmpeg.org"
              target="_blank">fxtalgorn-at-yahoo.fr@ffmpeg.org</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div style="word-wrap:break-word">Hi,
              <div><br>
              </div>
              <div>In avcodec library, the AVPacket structure seems to
                provide your needs.</div>
              <div><br>
              </div>
              <div><a moz-do-not-send="true"
                  href="https://www.ffmpeg.org/doxygen/2.5/structAVPacket.html"
                  target="_blank">https://www.ffmpeg.org/doxygen/2.5/structAVPacket.html</a></div>
              <div><br>
              </div>
              <div>To parse each packet you'll need to:</div>
              <div>- Register codecs</div>
              <div>- Open file</div>
              <div>- Read frame (AVFrame structure)</div>
              <div>- Read packet</div>
              <div>- Extract what you need.</div>
              <div><br>
              </div>
              <div>Plenty of examples in the FFMPEG sources.</div>
              <div><br>
              </div>
              <div>Good luck.</div>
              <div><br>
              </div>
              <div>Fixta.</div>
              <div><br>
                <div>
                  <div>
                    <div>
                      <div class="h5">
                        <div>Le 4 août 2015 à 13:42, Self User <<a
                            moz-do-not-send="true"
                            href="mailto:selfuser@gmail.com"
                            target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:selfuser@gmail.com">selfuser@gmail.com</a></a>> a
                          écrit :</div>
                        <br>
                      </div>
                    </div>
                    <blockquote type="cite">
                      <div>
                        <div class="h5">
                          <div dir="ltr">
                            <p class="MsoNormal">Hi all,</p>
                            <div> <br>
                            </div>
                            <p class="MsoNormal">I am using c++ code
                              under redgat/ubuntu.</p>
                            <div> <br>
                            </div>
                            <p class="MsoNormal">My goaI is to parse
                              each TS packet (each 188 bytes) and for
                              each extract its field values.</p>
                            <div> <br>
                            </div>
                            <p class="MsoNormal">What lib function
                              should I use ?</p>
                            <div> <br>
                            </div>
                            <p class="MsoNormal">Can you give an example
                              for this kind of parsing?</p>
                            <p class="MsoNormal"><br>
                            </p>
                            <p class="MsoNormal">Thanks</p>
                            <p class="MsoNormal"><br>
                            </p>
                            <p class="MsoNormal">LibUser</p>
                          </div>
                        </div>
                      </div>
                      _______________________________________________<br>
                      Libav-user mailing list<br>
                      <a moz-do-not-send="true"
                        href="mailto:Libav-user@ffmpeg.org"
                        target="_blank">Libav-user@ffmpeg.org</a><br>
                      <a moz-do-not-send="true"
                        href="http://ffmpeg.org/mailman/listinfo/libav-user"
                        target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
                    </blockquote>
                  </div>
                  <br>
                </div>
              </div>
            </div>
            <br>
            _______________________________________________<br>
            Libav-user mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
            <a moz-do-not-send="true"
              href="http://ffmpeg.org/mailman/listinfo/libav-user"
              rel="noreferrer" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Libav-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a>
<a class="moz-txt-link-freetext" href="http://ffmpeg.org/mailman/listinfo/libav-user">http://ffmpeg.org/mailman/listinfo/libav-user</a>
</pre>
    </blockquote>
    That would be somthing like DVB snoop. with -s ts flag I believe. Or
    MPEG-2 packet analyzer if you need a gui<br>
  </body>
</html>