<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Hi all, <br>
    from ISO/IEC 13818-1, Annex C, C.2 iii):<br>
    <br>
    "The section_number field allows the sections of a particular table
    to be reassembled in their original order<br>
    by the decoder. There is no obligation within this Recommendation |
    International Standard that sections<br>
    must be transmitted in numerical order, but this is recommended,
    unless it is desired to transmit some<br>
    sections of the table more frequently than others, e.g. due to
    random access considerations."<br>
    <br>
    Regards<br>
    Josep<br>
    <br>
    Al 05/12/2012 09:26, En/na Jean-Paul Saman ha escrit:
    <blockquote
cite="mid:CAK9US3AYdu0Z65od7BfPGhr7oj8xOzGcT8QOx4q7NgQXVvh_nQ@mail.gmail.com"
      type="cite">HI,<br>
      <br>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On Wed, Dec 5, 2012 at 8:45 AM,
          jiangpengfei <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:jiangpengfei@orientview.com" target="_blank">jiangpengfei@orientview.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin: 0px 0px 0px
            0.8ex; border-left: 1px solid rgb(204, 204, 204);
            padding-left: 1ex;">
            <div link="blue" vlink="purple" lang="ZH-CN">
              <div>
                <p class=""><span lang="EN-US">Hi everyone:</span></p>
                <p class="" style="text-indent: 21pt;"><span
                    lang="EN-US">I tested the libdvbpsi v1.0.0 pre2 in
                    my project today, I found there is a problem when
                    libdvbpsi handles a table which split into
                    multi-sections.</span></p>
                <p class="" style="text-indent: 21pt;"><span
                    lang="EN-US">My network is a DVB network, and there
                    is a NIT split into two sections(the last section
                    number is 1). In the test, I found only the
                    information in the last section of NIT had been
                    handled in the most conditions, the sec0’s data
                    couldn’t be handled correctly. After read
                    libdvbpsi’s source code, I found this function:
                    dvbpsi_decoder_psi_sections_completed verifies if a
                    table’s sections have been gathered completely. But
                    I think this
                    condition(p_decoder->i_last_section_number ==
                    p->i_number) is not perfect, because if the first
                    section I received is last section of table, this
                    condition will be true and will active the callback
                    I registered. So I change the function implement to
                    the following:</span></p>
              </div>
            </div>
          </blockquote>
          <div>It does not sound logical to transmit the last part of a
            multi section psi before sending other parts. I'll check
            with the official standards if this behaviour is allowed.<br>
            Does your own equipment generate this transport stream with
            multi-section psi tables?<br>
            <br>
            Could you provide me with a sample file?  <br>
            <br>
            Kind regards,<br>
            <br>
            Jean-Paul Saman.<br>
          </div>
          <blockquote class="gmail_quote" style="margin: 0px 0px 0px
            0.8ex; border-left: 1px solid rgb(204, 204, 204);
            padding-left: 1ex;">
            <div link="blue" vlink="purple" lang="ZH-CN">
              <div>
                <p class="" style="text-indent: 21pt;"><span
                    lang="EN-US"></span></p>
                <p class="" style="text-indent: 21pt;"><span
                    lang="EN-US">bool
                    dvbpsi_decoder_psi_sections_completed(dvbpsi_decoder_t*
                    p_decoder)</span></p>
                <p class="" style="text-indent: 21pt;"><span
                    lang="EN-US">{</span></p>
                <p class="" style="text-indent: 21pt;"><span
                    lang="EN-US">    assert(p_decoder);</span></p>
                <p class="" style="text-indent: 21pt;">
                  <span lang="EN-US">   
                    assert(p_decoder->i_last_section_number <=
                    255);</span></p>
                <p class="" style="text-indent: 21pt;"><span
                    lang="EN-US"> </span></p>
                <p class="" style="text-indent: 21pt;">
                  <span lang="EN-US">    bool b_complete = true;</span></p>
                <p class="" style="text-indent: 21pt;"><span
                    lang="EN-US"> </span></p>
                <p class="" style="text-indent: 21pt;"><span
                    lang="EN-US">/*     dvbpsi_psi_section_t *p =
                    p_decoder->p_sections;</span></p>
                <p class="" style="text-indent: 21pt;"><span
                    lang="EN-US">*     while (p)</span></p>
                <p class="" style="text-indent: 21pt;"><span
                    lang="EN-US">*     {</span></p>
                <p class="" style="text-indent: 21pt;">
                  <span lang="EN-US">*         if
                    (p_decoder->i_last_section_number ==
                    p->i_number)</span></p>
                <p class="" style="text-indent: 21pt;"><span
                    lang="EN-US">*             b_complete = true;</span></p>
                <p class="" style="text-indent: 21pt;"><span
                    lang="EN-US">*         p = p->p_next;</span></p>
                <p class="" style="text-indent: 21pt;"><span
                    lang="EN-US">*     }</span></p>
                <p class="" style="text-indent: 21pt;">
                  <span lang="EN-US">*/</span></p>
                <p class="" style="text-indent: 21pt;"><span
                    lang="EN-US">    int i;</span></p>
                <p class="" style="text-indent: 21pt;"><span
                    lang="EN-US"> </span></p>
                <p class="" style="text-indent: 21pt;">
                  <span lang="EN-US">    for(i = 0; i <=
                    p_decoder->i_last_section_number; i ++)</span></p>
                <p class="" style="text-indent: 21pt;"><span
                    lang="EN-US">    {</span></p>
                <p class="" style="text-indent: 21pt;">
                  <span lang="EN-US">        dvbpsi_psi_section_t * p =
                    p_decoder->p_sections;</span></p>
                <p class="" style="text-indent: 21pt;"><span
                    lang="EN-US"> </span></p>
                <p class="" style="text-indent: 21pt;">
                  <span lang="EN-US">        while(p)</span></p>
                <p class="" style="text-indent: 21pt;"><span
                    lang="EN-US">        {</span></p>
                <p class="" style="text-indent: 21pt;"><span
                    lang="EN-US">            if(i == p->i_number)</span></p>
                <p class="" style="text-indent: 21pt;"><span
                    lang="EN-US">                break;</span></p>
                <p class="" style="text-indent: 21pt;"><span
                    lang="EN-US"> </span></p>
                <p class="" style="text-indent: 21pt;">
                  <span lang="EN-US">            p   =   p->p_next;</span></p>
                <p class="" style="text-indent: 21pt;"><span
                    lang="EN-US">        }</span></p>
                <p class="" style="text-indent: 21pt;"><span
                    lang="EN-US"> </span></p>
                <p class="" style="text-indent: 21pt;"><span
                    lang="EN-US">        if(p == NULL)</span></p>
                <p class="" style="text-indent: 21pt;"><span
                    lang="EN-US">            b_complete  =   false;</span></p>
                <p class="" style="text-indent: 21pt;">
                  <span lang="EN-US">    }</span></p>
                <p class="" style="text-indent: 21pt;"><span
                    lang="EN-US"> </span></p>
                <p class="" style="text-indent: 21pt;"><span
                    lang="EN-US">    return b_complete;</span></p>
                <p class="" style="text-indent: 21pt;"><span
                    lang="EN-US">}</span></p>
                <p class="" style="text-indent: 21pt;"><span
                    lang="EN-US"> </span></p>
                <p class="" style="text-indent: 21pt;"><span
                    lang="EN-US">After recompile, the libdvbpsi can
                    handle my NIT correctly. </span></p>
                <p class="" style="text-indent: 21pt;"><span
                    lang="EN-US">I’m a newer of libdvbpsi, I don’t want
                    change any code of it, so can anyone tell me this is
                    a bug or I misunderstand something?</span></p>
                <p class="" style="text-indent: 21pt;">
                  <span lang="EN-US"> </span></p>
                <p class="" style="text-indent: 21pt;"><span
                    lang="EN-US">Fred from China. </span></p>
              </div>
            </div>
            <br>
            _______________________________________________<br>
            libdvbpsi-devel mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:libdvbpsi-devel@videolan.org">libdvbpsi-devel@videolan.org</a><br>
            <a moz-do-not-send="true"
              href="http://mailman.videolan.org/listinfo/libdvbpsi-devel"
              target="_blank">http://mailman.videolan.org/listinfo/libdvbpsi-devel</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
libdvbpsi-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:libdvbpsi-devel@videolan.org">libdvbpsi-devel@videolan.org</a>
<a class="moz-txt-link-freetext" href="http://mailman.videolan.org/listinfo/libdvbpsi-devel">http://mailman.videolan.org/listinfo/libdvbpsi-devel</a>
</pre>
    </blockquote>
  </body>
</html>