Is it possible to seek different Ogg Vorbis encoded packets from the File?

Niranjan Udipi <[email protected]>
Newsgroups gmane.comp.multimedia.ogg.vorbis.devel
Message-ID <[email protected]>
Hi All,

    I am trying to program the 'Tremor' decoder onto an array of Processors.
I am using four Processors.

    I did this experiment: I split the while(!eof){} in the main() in to
four tasks using if(!eof) statements. In this modification, each if()
decodes one packet of data at-a-time, sequentially. Then, I ran the code on
a single Processor and the decoding was successful. The changes in the
ivorbisfile_example.c are as follows:

while(!eof){
    long ret=ov_read(&vf,pcmout,sizeof(pcmout),&current_section);
    if (ret == 0) {
      /* EOF */
      eof=1;
    } else if (ret < 0) {
      /* error in the stream.  Not a problem, just reporting it in
     case we (the app) cares.  In this case, we don't. */
    } else {
      /* we don't bother dealing with sample rate changes, etc, but
     you'll have to*/
      fwrite(pcmout,1,ret,fp1);
    }
    if(eof)
    {
        break;
    }
    else
    {
     long ret=ov_read(&vf,pcmout,sizeof(pcmout),&current_section);
    if (ret == 0) {
      /* EOF */
      eof=1;
    } else if (ret < 0) {
      /* error in the stream.  Not a problem, just reporting it in
     case we (the app) cares.  In this case, we don't. */
    } else {
      /* we don't bother dealing with sample rate changes, etc, but
     you'll have to*/
      fwrite(pcmout,1,ret,fp1);
    }
}
if(eof)
    {
        break;
    }
    else
    {
     long ret=ov_read(&vf,pcmout,sizeof(pcmout),&current_section);
    if (ret == 0) {
      /* EOF */
      eof=1;
    } else if (ret < 0) {
      /* error in the stream.  Not a problem, just reporting it in
     case we (the app) cares.  In this case, we don't. */
    } else {
      /* we don't bother dealing with sample rate changes, etc, but
     you'll have to*/
      fwrite(pcmout,1,ret,fp1);
    }
}
if(eof)
    {
        break;
    }
    else
    {
     long ret=ov_read(&vf,pcmout,sizeof(pcmout),&current_section);
    if (ret == 0) {
      /* EOF */
      eof=1;
    } else if (ret < 0) {
      /* error in the stream.  Not a problem, just reporting it in
     case we (the app) cares.  In this case, we don't. */
    } else {
      /* we don't bother dealing with sample rate changes, etc, but
     you'll have to*/
      fwrite(pcmout,1,ret,fp1);
    }
}


     However, in order to run the decoder parallely on four Processors, I
need to run the ov_read() function on each Processor independently. In order
to do that each Processor should be able to seek next encoded packet of data
and there should not be duplication of packet decoding.

     Is it known apriori, how many Ogg-Vorbis packets are there and their
corresponding locations in the File/stream? If yes, then each Processor can
be pointed to its packet to-be-decoded. Please suggest how I can go ahead?

Thanks,
Niranjan

_______________________________________________
Vorbis-dev mailing list
[email protected]
http://lists.xiph.org/mailman/listinfo/vorbis-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.