search for: ogg_stream_packetout

Displaying 20 results from an estimated 49 matches for "ogg_stream_packetout".

2001 Feb 04
2
Am I missing something?
Hey all, If my understanding is right, there's a serious big in vorbisfile.c, in the routine _fetch_headers(), which will only show up when comment packet spans multiple pages. The code to read the first 3 Vorbis packets ogg_stream_pagein() once, then calls ogg_stream_packetout(). The problem is that ogg_stream_pagein() only adds a single page to the ogg stream state, whereas ogg_stream_packetout(), loops until it finds a non-255 lacing value. So, if the comment packet is larger than one page, all lacing values will be 255, and ogg_stream_packetout will start reading u...
2001 Feb 11
2
ogg_stream_packetout() and stream mixing
Just to make sure, if I'm mixing 2 streams at the page level, and using ogg_stream_pagein() and ogg_stream_packetout() to extract them, I need two ogg_stream_states, one for each logical stream, and I need to ensure that each ogg_stream_state only sees pages of it's own type, is that right? - Martin --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ T...
2008 Apr 29
2
More trival questions
...ync_state, &the_ogg_page) == 1) { printf("Decode Page\n"); send_to_my_decoder( the_ogg_page.body, the_ogg_page.body_len ); ogg_stream_pagein(&the_ogg_stream_state, &the_ogg_page); ogg_stream_packetout(&the_ogg_stream_state, &the_ogg_packet); printf("Decode Packet\n"); send_to_my_decoder( the_ogg_packet.packet, the_ogg_packet.bytes ); } buffer = ogg_sync_buffer(&the_ogg_sync_state, BUF_SIZE);...
2009 May 12
2
compile error of libtheora example
...bos' player_example.c:(.text+0xeb1): undefined reference to `ogg_page_serialno' player_example.c:(.text+0xec3): undefined reference to `ogg_stream_init' player_example.c:(.text+0xed9): undefined reference to `ogg_stream_pagein' player_example.c:(.text+0xef1): undefined reference to `ogg_stream_packetout' player_example.c:(.text+0xf18): undefined reference to `theora_decode_header' player_example.c:(.text+0xf6d): undefined reference to `vorbis_synthesis_headerin' player_example.c:(.text+0xfa9): undefined reference to `ogg_stream_clear' player_example.c:(.text+0xfbd): undefined refer...
2002 Apr 24
2
ov_open error
...al C++ 6.0 project that uses the code from vorbisfile_example.c. I open an ogg file in binary mode and when ov_open gets called, it always fails. I then put together another project and compiled vorbisfile so I could see where the error was occuring. It is happening in _fetch_headers when it calls ogg_stream_packetout. The return values is -1, which means there is a bad header. I took the same ogg file and then I tried using it with code from decoder_example.c and when it calls ogg_stream_packetout it is fine. Any suggestions? Thanks -Elliot <p><p>--- >8 ---- List archives: http://www.xiph.org...
2001 Dec 06
1
packet over several pages
Hello everyone, I'm programming something using ogg vorbis and i was wondering how I could get a packet from a logical bitstream when this packet is over several pages. let's say I made a call to ogg_stream_pagein, then ogg_stream_packetout, but the packet is incomplete and continued in the next page(s). If I get the following page and I call ogg_stream_pagein again, how can i get the beginning of my packet back. It seems to that only one page is accessible at a time through an ogg_stream_state... ******************* Pierre-Henr...
2009 May 16
2
Speex seek with high precision
Hello Conrad, I'm trying to seek the way you told but I'm facing a problem. ogg_page_packets returns 164 and following code returns 189. Shouldn't it be the same, what does that means ? int res; while (true) { res = ogg_stream_packetout(&os, &op); if (res == 1) nPackets++; if (res == -1) printf("out of sync\n"); if (res == 0) // we need another page break; } Thanky you, Arnau -------------- next pa...
2017 May 18
4
Strange behavior with OGG packets?
...auses what seems to be some sort of packet corruption. The OpusHead packet is never found, but in it's place we have a packet at b_o_s=256 (which is where OpusHead usually lives), but the byte size is reported to be 0 and e_o_s=0 as well. (This is generated by parsing the packets via ogg's *ogg_stream_packetout* function. It appears a matrix larger than 7x16 causes this issue. (The matrix values are all signed short vals, so >224 bytes seems to fail. I'm not very familiar with ogg internals so any advice would be greatly appreciated! Thanks so much! :) Cheers, Drew -------------- next part ------...
2005 Nov 15
2
OggPCM2 : chunked vs interleaved data
...nd has insignificant additional >overhead, to de-interleave as you read it into a packet buffer. > > > Could you elaborate on this? I'm not familiar enough with the ogg API, but as far as I can tell, the way you'd do this would be to get the whole interleaved packet out with ogg_stream_packetout and then walk through it to de-interleave it into another buffer (or in place, I suppose). My feeling is that if you're working with files, the time it takes to interleave/deinterleave is probably negligible with respect to the i/o time, but if you're working with pipes or some other lo...
2009 May 16
1
Speex seek with high precision
...printf("ogg_page_packets: %d\n", ogg_page_packets(&og)); // Add page to the bitstream ogg_stream_pagein(&os, &og); printf("ogg_page_packets: %d\n", ogg_page_packets(&og)); /* Packet counter */ int res; while (true) { res = ogg_stream_packetout(&os, &op); if (res == 1) nPackets++; if (res == -1) printf("out of sync\n"); if (res == 0) break; } printf("nPackets: %d\n", nPackets); } Output is: ogg_page_granulepos: 164 ogg_page_granulepos: 164...
2008 Jan 04
2
ogg packets get lost
...command line tools to cut/cat video-files and to extract and join the video and audio stream etc. However, I started the project and found some very strange behaviors: I stored some ogg_packet objects (which are created on the heap) in a list. When I make several calls to ogg_stream_pagein() and ogg_stream_packetout(), the packets are accidentally overwritten by some nonsense. I am not sure what really happens, but I guess the libogg writers wanted to reduce the memory copy to a minimum, so that there are pointers (packet), which will be reused or whatever. My question is: how do you (other developers) so...
2008 Aug 28
0
Error while cross compiling libvorbis 1.2.0
...pageout' decoder_example.o(.text+0x8c): undefined reference to `ogg_page_serialno' decoder_example.o(.text+0xa8): undefined reference to `ogg_stream_init' decoder_example.o(.text+0xc8): undefined reference to `ogg_stream_pagein' decoder_example.o(.text+0xe0): undefined reference to `ogg_stream_packetout' decoder_example.o(.text+0x114): undefined reference to `ogg_sync_pageout' decoder_example.o(.text+0x138): undefined reference to `ogg_sync_buffer' decoder_example.o(.text+0x168): undefined reference to `ogg_sync_wrote' decoder_example.o(.text+0x238): undefined reference to `ogg_str...
2008 Feb 25
3
eos on continued page
On 25-Feb-08, at 9:34 AM, xiphmont@xiph.org wrote: > I'd say both; libogg should ignore the incomplete packet or flag a > structural error, and the spec should be clarified. I guess libogg should return -1 if you try to ogg_stream_packetout() after the eos packet. The eos flag pretty clearly applies to the *page* not the packet, so I think how that gets translated into the corresponding ogg_packet structure is a matter for the libogg api documentation, not the spec. -r
2006 Aug 06
0
Newbie: How to rewind a videostream (long)
...queue_page (&oggPage); doneScanningHeaders = true; break; } ogg_stream_init (&testStreamState, ogg_page_serialno (&oggPage)); ogg_stream_pagein (&testStreamState, &oggPage); ogg_stream_packetout (&testStreamState, &oggPacket); if(theoraPageCount==0 && theora_decode_header (&theoraInfo,&theoraComment, &oggPacket) >= 0) { memcpy (&theoraStreamState, &testStreamState,sizeof(testStreamState));...
2001 Sep 22
3
retrieving &quot;instant&quot; bitrate without vo_open?
ok, I'm aware that vo_open cant be used at the same time as other functions such as ogg_sync_wrote, ogg_sync_pageout, ogg_stream_pagein, ogg_stream_packetout and vorbis_synthesis_headerin. In order to get information from the bitstream i've been using this method because it's fast and doesn't require decoding of the stream. But, i can only retrieve the average bitrate of the ogg stream with the vorbis_info struct. I tried using vo_op...
2002 Jun 24
1
packetno, granulepos, streaming and framing
...e 0 2 Large 0 3 Large 0 4 3 0 5 4 576 In the second scenario, ogg_packets has additional been processed through a) ogg_stream_packetin() b) ogg_stream_pageout() c) saved into an .ogg file. d) read from an .ogg file e) ogg_stream_pagein() f) ogg_stream_packetout() This produces ogg_packets with packetno and granulepos as listed below. Case #2 : Generated ogg_packets Packet # packetno granulepos --------------------------------------------- 1 0 0 2 1 -1 3 2 0 4 3 -1 5 4 -1 .................................. 44 43 16320 Now here comes my firs...
1999 Oct 04
3
Detailed decoder pseudocode (was: Re: ETA?)
...ree Vorbis headers at once because reading the initial header is an easy way to identify a Vorbis bitstream and it's useful to see that functionality seperated out. */ vorbis_info_init(&vi); if(ogg_stream_pagein(&os,&og)<0){ /* error; stream version mismatch perhaps */} if(ogg_stream_packetout(&os,&op)!=1){ /* no page? must not be vorbis */} if(vorbis_info_headerin(&vi,&op)<0){ /* error case; not a vorbis header */} /* At this point, we're sure we're Vorbis. We've set up the logical (Ogg) bitstream decoder. Get the comment and codebook headers and...
2006 Aug 06
2
Speex + Ogg package
...mp;oy,4096); memcpy(buffer,buff,len); ogg_sync_wrote(&oy,len); while(ogg_sync_pageout(&oy,&audio_page)>0) { if (stream_init == 0) { ogg_stream_init(&os, ogg_page_serialno(&audio_page)); stream_init = 1; } queue_page(&audio_page); while(ogg_stream_packetout(&os,&op)>0) { int b; ogg_stream_pagein(&os, &audio_page); int len=(audio_page.body_len-4)/FRAMES_PACKET; char *datos=(char*)op.packet; char m[100]; sprintf(m,"paq %d",op.packetno); System::Console::WriteLine(g...
2004 Nov 01
1
compile libvorbis using mingw?
...ference to `ogg_stream_reset_serialno' .libs/vorbisfile.o(.text+0x6f6):vorbisfile.c: undefined reference to `ogg_stream_init' .libs/vorbisfile.o(.text+0x6fe):vorbisfile.c: undefined reference to `ogg_stream_reset' .libs/vorbisfile.o(.text+0x71c):vorbisfile.c: undefined reference to `ogg_stream_packetout' .libs/vorbisfile.o(.text+0x748):vorbisfile.c: undefined reference to `ogg_stream_packetout' .libs/vorbisfile.o(.text+0x784):vorbisfile.c: undefined reference to `ogg_page_serialno' .libs/vorbisfile.o(.text+0x7be):vorbisfile.c: undefined reference to `ogg_stream_clear' .libs/vorb...
2004 Sep 22
3
copying an ogg stream
dear list, i am trying to write a small program which reads an ogg file and writes it to another ogg file (and changes serial number, granulepos etc on the fly). reading the ogg file is ok (ogg_sync_pageout, ogg_stream_pagein, ogg_stream_packetout). but writing the file doesn't work - the granulepos and page structures don't match with the original file. here's what i am doing. (python-like pseudo-code). First i create copies of all packets in a page, store them in 'list'; i also save the granule-position of this page...