search for: ogg_sync_pageout

Displaying 20 results from an estimated 40 matches for "ogg_sync_pageout".

2005 Jun 22
2
ogg_sync_pageout
It seems to me that running ogg_sync_pageout doesn't automatically advance the page. This is good if you haven't worked with the given page, makes coding somewhat easier. However, when does a page advance. Is it after a call to ogg_stream_pagein? On a side note, I need to do seeking on top of libvorbis, I'd love to use vorbisfile...
2008 Apr 29
2
More trival questions
...;r"); if (feof(source) != 0) { printf("Empty file\n"); fclose(source); return 0; } ogg_sync_init(&the_ogg_sync_state); ogg_stream_init(&the_ogg_stream_state, 0); do { if (ogg_sync_pageout(&the_ogg_sync_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);...
2009 May 12
2
compile error of libtheora example
...yer_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 reference to `ogg_sync_pageout' player_example.c:(.text+0x102f): undefined reference to `theora_decode_header' player_example.c:(.text+0x10a2): undefined reference to `ogg_stream_packetout' player_example.c:(.text+0x1112): undefined reference to `vorbis_synthesis_headerin' player_example.c:(.text+0x1187): undefin...
2007 Apr 12
1
Seek problem 2 - reinitialization of the decoder
...people, Next issue at hand here is after I have done a seek in a theora file. At this point, I have to reinitialize the decoder so the viewing can continue. Again, I have code that works most of the time, but, well... Just after the last file position seek, this code is run: while ((result = ogg_sync_pageout(&sync, &page)) == 0) bufferData(); while (ogg_page_serialno(&page) != tstream.serialno) if (ogg_sync_pageout(&sync, &page) <= 0) // Find a Theora page, not Vorbis. bufferData(); (Same code as pasted in the the seek problem 1 mail) Now, I need to get back int...
2006 Aug 06
0
Newbie: How to rewind a videostream (long)
...eam until we have the INITIAL PAGES of the theora stream for (bool doneScanningHeaders=false; ! doneScanningHeaders; ) { if (buffer_data ()==0) throw "Error: VideoStreamTheora::initMovie: Couldn't get initial packets."; while (ogg_sync_pageout (&oggSyncState, &oggPage)>0) { ogg_stream_state testStreamState; if (! ogg_page_bos (&oggPage)) { queue_page (&oggPage); doneScanningHeaders = true; break;...
2006 Dec 07
2
page syncing and magic OggS
I may be missing something, but is there a good way of finding the start position of an ogg page in a bitstream? Pages have to start with 'OggS', but this could also turn up elsewhere in the bitstream, so is there a simple strategy using the libogg API to find out which ones are the start of pages? (Other than trying to decode from successive 'OggS' markers and noting when the
2000 Sep 13
1
my vorbis comments
...A way to compute page length. In order to compute the page length, I've been adding header_len and body_len - which is currently correct - but it's not part of the spec as far as I can tell. ogg_sync_pageseek would tell me the page length, but if I should use that, then who needs ogg_sync_pageout? 4. analysis/synthesis: a. I wouldn't mind if vorbis didn't use separated channel buffers, but since I don't understand the compression details, they might be really important. b. I also wouldn't mind if there were vorbis_read_header /_write_header functions which...
2008 Aug 28
0
Error while cross compiling libvorbis 1.2.0
...unction `main': decoder_example.o(.text+0x18): undefined reference to `ogg_sync_init' decoder_example.o(.text+0x3c): undefined reference to `ogg_sync_buffer' decoder_example.o(.text+0x64): undefined reference to `ogg_sync_wrote' decoder_example.o(.text+0x70): undefined reference to `ogg_sync_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_str...
2004 Sep 18
5
possible libogg bug holding up Ogg FLAC
...nd following packets not shown): 5 6 7 8 +------------+-------------+-------------+------------+ | xxxxxx|xxxxxxxxxxxxx|xxxxxxxxxxxxx|xxxxxxx | ^ | Say I reset the sync/stream states and fseek to where the arrow is. Then I ogg_sync_pageout() and fill the sync buffer until it syncs on page 6 and ogg_sync_pageout() returns > 0. Then I ogg_stream_pagein(). It recognizes that a reset happened -- "if(pageno!=os->pageno){" -- then inside checks the 'continued' flag and eats up all the segments of the packet in pag...
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...
2009 May 18
2
clearification
Greetings, How does the ogg_page_bos function work? I call this function directly after calling ogg_sync_pageout. It works. Then I place a guard around it until the start of a new stream (chain mode). If this is the start of a new stream, should it return zero after the next call. I looked in ogg_page structure to see if there is a member named b_o_s, but I did not see anything. What is being used to determin...
2007 Apr 12
0
Seek problem 1 - can't find frame number
...g to a new place in the file: // Clear the current ogg buffers, find a new page, and fill the buffers again int result; ogg_sync_reset(&sync); while ((result = ogg_sync_pageseek(&sync, &page)) <= 0) if (result == 0) bufferData(); // Find the next theora page while ((result = ogg_sync_pageout(&sync, &page)) == 0) bufferData(); while (ogg_page_serialno(&page) != tstream.serialno) if (ogg_sync_pageout(&sync, &page) <= 0) bufferData(); const ogg_int64_t actualFrame = theora_granule_frame(&decoder, ogg_page_granulepos(&page)); With some files, this co...
2013 Dec 04
1
possible regression in libogg
Am 03.12.2013 23:49, schrieb Monty Montgomery: > Any time code is stuck in a loop calling ogg_sync_pageseek() or > ogg_sync_pageout(), you'll see most of the time sunk into checksum > calculation. It's the only thing in libogg that _can_ take much time. > This is not likely a libogg bug, but a bug in the code calling libogg > in a tight loop. > > Looking at the file listed in the bug, there's a pag...
1999 Oct 04
3
Detailed decoder pseudocode (was: Re: ETA?)
...mall and only contain the Vorbis stream initial header) We need the first page to get the stream serialno. */ /* submit a 4k block (safe size) to libvorbis */ buffer=ogg_sync_buffer(&oy,4096); bytes=read(STDIN_FILENO,buffer,4096); ogg_sync_wrote(&oy,bytes); /* Get the first page. */ if(ogg_sync_pageout(&oy,&og)!=1){ /* error case. Must not be Vorbis data */} /* Get the serial number and use it to set up a logical stream */ ogg_stream_init(&os,ogg_page_serialno(&og)); /* extract the initial header from the first page and verify that the Ogg bitstream is in fact Vorbis data */...
2013 Dec 03
2
possible regression in libogg
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hello devs, since this bug affect gstreamer and vlc, i assume it is libogg regression. Please take a look at this bug report: https://bugzilla.gnome.org/show_bug.cgi?id=719615 - -- Regards, Oleksij -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
2006 Aug 06
2
Speex + Ogg package
..._id; packet_id++; ogg_stream_packetin(&os, &op); ogg_stream_flush(&os, &audio_page); return audio_page; } As for the decoder I have this. //Incoming data from udp is on buffer char *buffer=ogg_sync_buffer(&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_pagei...
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 al...
2009 May 13
2
Speex seek with high precision
...ult it's 16386 and there is a delay between the playback and the moment where it should start. Only when I seek to position 0 I get the desired result. I've also used ogg_page_granulepos for seeking but it seems more difficult to use. I use something like this: do { while (ogg_sync_pageout(&oy, &og) != 1) { data = ogg_sync_buffer(&oy, 512); readbytes = fread(data, 1, 512, spxfile); ogg_sync_wrote(&oy, readbytes); } //printf("ogg_page_granulepos: %lld\n", ogg_page_granulepos(&og)); } whil...
2001 Apr 05
1
decoder_example -- event driven?
...der stuff in the same way as decoder_example. From the third packet on, I send it to a bunch of code: float **pcm; int samples; buffer=ogg_sync_buffer(&oy,4096); bytes = 4096; buffer = memcpy (buffer, data, bytes); ogg_sync_wrote(&oy,bytes); ogg_sync_pageout(&oy,&og); ogg_stream_pagein(&os,&og); /* can safely ignore errors at this point */ /* we have a packet. Decode it */ if(vorbis_synthesis(&vb,&op)==0) /* test for success! */ vorbis_synthesis_blocki...
2007 Feb 16
1
AW: How to do Theora playback efficiently ?
...tand why these ogg_stream_pagein() calls take so much time... sometimes more than theora decoding. Now I try to use a second thread which task is to store as many pages as needed, to have at least one audio page ready. I think this is a good attempt but currently it is not working right... because ogg_sync_pageout() can only reserve memory for 2 pages... nothing about those things are in the ogg documentation, that's very frustrating. Storing packets makes so sense in my opinion... because if there are no new vorbis pages (only all those theora pages) you don't get any new packets and so run out of d...