1.)How can i determine the number of pages in one stream? 2.)Whether size of page is same with in the whole stream? kindly answer these questions as early as possible. Nagaraj C L Flextronics Software System Desk: 41069445 Mobile:9886695116 *********************** FSS-Unclassified *********************** "DISCLAIMER: This message is proprietary to Flextronics Software Systems (FSS) and is intended solely for the use of the individual to whom it is addressed. It may contain privileged or confidential information and should not be circulated or used for any purpose other than for what it is intended. If you have received this message in error, please notify the originator immediately. If you are not the intended recipient, you are notified that you are strictly prohibited from using, copying, altering, or disclosing the contents of this message. FSS accepts no responsibility for loss or damage arising from the use of the information transmitted by this email including damage from virus." -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/vorbis/attachments/20061009/5c019aba/attachment.html
On 10/9/06, Nagaraj.CG@flextronicssoftware.com <Nagaraj.CG@flextronicssoftware.com> wrote:> > 1.)How can i determine the number of pages in one stream?If you assume there are no gaps, you can look at the sequence number of the final page in the stream, and that gives you the number of pages in total. It's very common to have a gap between the end of the headers, and the start of the data, though, so you might want to read the first page after the headers, and subtract off the sequence number of that page (then add back on the number of header pages). To get a completely accurate result, of course, you'll need to scan the entire stream; it's possible to have gaps at any point.> 2.)Whether size of page is same with in the whole stream?Are you asking if each page in the stream has a constant size? Then no; typically every page will have a slightly different size. Mike
I am doing Ogg player ,where i am using standard Ogg parser from your side and Decoder is separate entity which is not from your side, I have different API's in Decoder they are Create,Reset,Delete Decoder,Get Code Book,Get Comment Book,Decode Packet etc........... Now i am able to play the song with your Parser and our Decoder. I want to implement Forward and Backward but without your using Parser API,because up to now i was using "granular position " obtained from parser API to implement FW and BW ,where i have to use File read API ,which is consuming more time to read from file which is not diserable to us. So i want to use only file seek functionality in forward and backward. So i am planning to use this formula present_require_file_offset = (total_file_size * 20 )/Total_time_of_stream(which i know) If i seek my file pointer to value of "present_require_file_offset" ,whether i will be at 20 sec duration of song or not,I know it cant be accurate ,but it is ok for me if i am at 19th or 21st second also. Is it ok if i use this formula,is there is any other way for this,kindly reply to this as early as possible. Nagaraj C L Flextronics Software System Desk: 41069445 Mobile:9886695116 *********************** FSS-Unclassified *********************** "DISCLAIMER: This message is proprietary to Flextronics Software Systems (FSS) and is intended solely for the use of the individual to whom it is addressed. It may contain privileged or confidential information and should not be circulated or used for any purpose other than for what it is intended. If you have received this message in error, please notify the originator immediately. If you are not the intended recipient, you are notified that you are strictly prohibited from using, copying, altering, or disclosing the contents of this message. FSS accepts no responsibility for loss or damage arising from the use of the information transmitted by this email including damage from virus." -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/vorbis/attachments/20061009/c6b0f5c4/attachment.htm
On 10/9/06, Nagaraj.CG@flextronicssoftware.com < Nagaraj.CG@flextronicssoftware.com> wrote:> > > So i want to use only file seek functionality in forward and backward. > So i am planning to use this formula > > present_require_file_offset = (total_file_size * 20 > )/Total_time_of_stream(which i know) > > If i seek my file pointer to value of "present_require_file_offset" > ,whether i will be at 20 sec duration of song or not,I know it cant be > accurate ,but it is ok for > me if i am at 19th or 21st second also.Yes, that is acceptible. Our vorbisfile also implements a similar fast seek. You can seek to an approximate raw location in the compressed data, then simply report the next valid time seen from granule position when playback resumes. Monty -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/vorbis/attachments/20061009/a292910e/attachment.html
I am designing an Ogg Player,in which i don't want to play the Chained stream. How can i recognize the chained stream without parsing whole file? what i am thinking is ,once i get the first page Serial Number ,i will store it and i will seek to the end of file,there i will extract the last page serial number, if this is same as the one i stored previously,then the file is not chained else it is chained,is it correct or not???????? or else do you have any easy method to recognize. Nagaraj C L Flextronics Software System Desk: 41069445 Mobile:9886695116 *********************** FSS-Restricted *********************** "DISCLAIMER: This message is proprietary to Flextronics Software Systems (FSS) and is intended solely for the use of the individual to whom it is addressed. It may contain privileged or confidential information and should not be circulated or used for any purpose other than for what it is intended. If you have received this message in error, please notify the originator immediately. If you are not the intended recipient, you are notified that you are strictly prohibited from using, copying, altering, or disclosing the contents of this message. FSS accepts no responsibility for loss or damage arising from the use of the information transmitted by this email including damage from virus." -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/vorbis/attachments/20061011/4976f2e1/attachment.html