How to get all packets of ogg file |
![]() ![]() |
How to get all packets of ogg file |
Jun 12 2012, 03:52
Post
#1
|
|
|
Group: Members Posts: 4 Joined: 6-June 12 Member No.: 100455 |
I want to get all the vorbis packets of ogg file and put it into a list and I don't want to decode it right now.
now I have do this: CODE ogg_sync_state oy; ogg_stream_state os; ogg_page og; ogg_packet op; vorbis_info vi; vorbis_comment vc; vorbis_dsp_state vd; vorbis_block vb; vorbis_synthesis_init(&vd,&vi); vorbis_block_init(&vd,&vb); ogg_sync_pageout(&oy,&og); ogg_stream_pagein(&os,&og); ogg_stream_packetout(&os,&op); //decode packet right now. if I don't decode it right now then will skip this step /* vorbis_synthesis(&vb,&op) vorbis_synthesis_pcmout(&vd,&pcm) vorbis_synthesis_read */ //continue to get packet if I decode packet right now then I can continue to get packets. But if I don't decode it and I just want to put they into List then I cannot to get the packets. How should I do? |
|
|
|
Oct 28 2012, 18:42
Post
#2
|
|
![]() Group: Members Posts: 89 Joined: 3-November 04 Member No.: 17971 |
I've never used libogg, but maybe ogg_sync_pageseek()?
|
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 24th May 2013 - 15:17 |