Displaying 20 results from an estimated 28 matches for "body_len".
2004 Nov 16
0
metadata switches for ffmpeg2theora
...cketin (&info->to, &info->op);
+ if (ogg_stream_pageout (&info->to, &info->og) != 1){
fprintf (stderr, "Internal Ogg library error.\n");
exit (1);
}
- fwrite (info.og.header, 1, info.og.header_len, info.outfile);
- fwrite (info.og.body, 1, info.og.body_len, info.outfile);
+ fwrite (info->og.header, 1, info->og.header_len, info->outfile);
+ fwrite (info->og.body, 1, info->og.body_len, info->outfile);
/* create the remaining theora headers */
- theora_comment_init (&info.tc);
- theora_comment_add_tag (&info.tc, "...
2008 Apr 29
2
More trival questions
...issed in the documentation.
Neil
>>>
#include <stdio.h>
#include "ogg/ogg.h"
#define BUF_SIZE 4096
int magic_check( unsigned char test, oggpack_buffer* buffer) {
return (long) test == oggpack_read(buffer, 8);
}
void send_to_my_decoder(unsigned char *body, long body_len) {
oggpack_buffer buffer;
long bits_read;
oggpack_readinit(&buffer, body, body_len);
bits_read = oggpack_read(&buffer, 8);
if ( bits_read == 0x80 || bits_read == 0x81 || bits_read == 0x82 ) {
if ( magic_check( 't', &buff...
2006 Aug 02
2
[PATCH][RFC] permit domU userspace to watch xenstore
...ken);
+ kfree(watch);
+}
+
+static void watch_fired(struct xenbus_watch *watch,
+ const char **vec,
+ unsigned int len)
+{
+ struct watch_adapter *adap =
+ container_of(watch, struct watch_adapter, watch);
+ struct xsd_sockmsg hdr;
+ const char *path, *token;
+ int path_len, tok_len, body_len;
+
+ path = vec[XS_WATCH_PATH];
+ token = adap->token;
+
+ path_len = strlen(path) + 1;
+ tok_len = strlen(token) + 1;
+ body_len = path_len + tok_len;
+
+ hdr.type = XS_WATCH_EVENT;
+ hdr.len = body_len;
+
+ queue_reply(adap->dev_data, (char *)&hdr, sizeof(hdr));
+ queue_reply(adap->...
2005 Oct 05
1
Simple encodig sample...
...&td, &op );
ogg_stream_packetin( &to, &op );
if( ogg_stream_pageout( &to, &og ) != 1 )
{
fprintf( stderr, "Internal Ogg library error.\n" );
exit( 1 );
}
fwrite( og.header, 1, og.header_len, outfile );
fwrite( og.body, 1, og.body_len, outfile );
/* create the remaining theora headers */
theora_comment_init( &tc );
theora_encode_comment( &tc, &op );
ogg_stream_packetin( &to, &op );
theora_encode_tables( &td, &op );
ogg_stream_packetin( &to, &op );
/* Flush the rest of our...
2001 Oct 01
2
Average Bitrate Calculation
Michael Smith wrote:
> If you're just ignoring chained streams, then the length of
> the logical stream is obviously equal to the length of the file.
Thanks for your reply.
So there is no data block size anywhere. In that case I will have to at
least subtract the size of any comments since it could be considerable. Can
you please help with determining the size of the comment header
2009 Dec 12
1
Skipping of sample in ogg writing
...ogg_stream_packetin (&os, &op);
for (;;)
{
if (ogg_stream_pageout (&os, &og) == 0)
break;
mywrite (og.header, og.header_len);
mywrite (og.body, og.body_len);
if (ogg_page_eos (&og))
break;
}
}
}
return true;
}
//==============================================================================
Thanks and Regards,
Charan D'Souza
2009 Dec 12
1
Skipping of sample in ogg writing
...ogg_stream_packetin (&os, &op);
for (;;)
{
if (ogg_stream_pageout (&os, &og) == 0)
break;
mywrite (og.header, og.header_len);
mywrite (og.body, og.body_len);
if (ogg_page_eos (&og))
break;
}
}
}
return true;
}
//==============================================================================
Thanks and Regards,
Charan D'Souza
2006 Aug 06
2
Speex + Ogg package
...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(gcnew String(m));
int t=((int *)datos)[0];
for(int i=0;i<FRAMES_PACKET;i++)
speex_jitter_put(&jitte...
2005 Sep 26
2
encoder_example.c Questions
...into the bitstream */
ogg_stream_packetin(&os,&op);
/* write out pages (if any) */
while(!eos){
int result=ogg_stream_pageout(&os,&og);
if(result==0)break;
fwrite(og.header,1,og.header_len,stdout);
fwrite(og.body,1,og.body_len,stdout);
/* this could be set above, but for illustrative purposes, I do
it here (to show that vorbis does know where the stream
ends) */
if(ogg_page_eos(&og))eos=1;
}
}
Can anyone elaborate on what is happening in these two sections of
code?...
2006 Oct 06
0
V4L + Theora small app...
...m_pageout( &tOGGstreamState, &tOGGpage ) != 1 )
{
fprintf( stderr, "### Internal Ogg library error \n" );
iRet = -2;
goto OGG_OpenClip_quit;
}
fwrite( tOGGpage.header, 1, tOGGpage.header_len, pfOGGclip );
fwrite( tOGGpage.body, 1, tOGGpage.body_len, pfOGGclip );
/* create the remaining theora headers */
theora_comment_init( &tTheoraComment );
theora_encode_comment( &tTheoraComment, &tOGGpacket );
ogg_stream_packetin( &tOGGstreamState, &tOGGpacket );
_ogg_free( tOGGpacket.packet ); /* !!! correct ? sm...
2003 Nov 08
2
Encoding in Delphi - Help
...i don't know why. Could anyone help me???
----------------------------------------------------------------------------------
result := ogg_stream_flush(os, og);
while result <> 0 do
begin
OutFile.Write(Pointer(og.header)^, og.header_len);
OutFile.Write(Pointer(og.body)^, og.body_len);
result := ogg_stream_flush(os, og);
end;
eos := false;
while not eos do
begin
bytes := InFile.Read(readbuffer, SAMPLES*4);
if bytes = 0 then
begin
fix;
vorbis_analysis_wrote(vd,0);
end
else
begin
fix;
buffer := vorbis_analysis_...
2006 Mar 21
2
[PATCH] initramfs: CPIO unpacking fix
...de) ||
S_ISFIFO(mode) || S_ISSOCK(mode)) {
+ sys_unlink(collected);
if (maybe_link() == 0) {
sys_mknod(collected, mode, rdev);
sys_chown(collected, uid, gid);
@@ -291,6 +293,7 @@ static int __init do_copy(void)
static int __init do_symlink(void)
{
collected[N_ALIGN(name_len) + body_len] = '\0';
+ sys_unlink(collected);
sys_symlink(collected + N_ALIGN(name_len), collected);
sys_lchown(collected, uid, gid);
state = SkipIt;
2015 Oct 17
1
Why does this code not generate a valid opus file?
...1; //Second packet.
ogg_stream_packetin(&os,&header_comm);
//***************
//Write everything out.
while(1){
int result=ogg_stream_flush(&os,&og);
if(result==0)break;
fwrite(og.header,1,og.header_len,fout);
fwrite(og.body,1,og.body_len,fout);
}
//And clean up.
ogg_stream_clear(&os);
fclose(fout);
printf("Done.\n");
return 0;
}
//Sincerely
Daniel Armyr
Beginner opus user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/...
2004 Jun 18
5
Patch to stop vcut from generating broken streams
Skipped content of type multipart/mixed-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://westfish.xiph.org/pipermail/vorbis-dev/attachments/20040618/e7bee431/attachment.pgp
2004 Sep 22
3
copying an ogg stream
...packet.packetno=global_packetno++
write_packet(packet)
the write_packet function looks like this:
def write_packet(packet):
ogg_stream_packetin(os, packet)
ogg_page page;
while (ogg_stream_pageout(os, page)):
fwrite(page.header, page.header_len, f)
fwrite(page.body, page.body_len, f)
(if the e_o_s flag is set, then i use ogg_stream_flush() instead of
ogg_stream_pageout())
my problem is: when i look at the original file, it differs from the
copied file. this is the output of the first few lines with oggzdump:
original file:
0000003a: serialno 1295053610, granulepos 0,...
2000 Sep 13
1
my vorbis comments
...hat?
e. The other stuff I'm _sure_ you folks are already working on, for
example:
i. A more general way to choose an info struct
2. vorbisfile:
Write capability.
3. ogg_page:
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...
2006 Aug 06
0
Speex + Ogg package
...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(gcnew String(m));
>
> int t=((int *)datos)[0];
> for(int i=0;i<FRAMES_PACKET;i++...
2008 Jul 11
0
Speex issue
...gg_stream_packetin(&oggStream, &oggPacket);
while (((lastFrame) ? ogg_stream_flush(&oggStream, &oggPage) :
ogg_stream_pageout(&oggStream,&oggPage)) != 0)
{
file.write((char*)oggPage.header,oggPage.header_len);
file.write((char*)oggPage.body, oggPage.body_len);
}
I know this is a long shot, but any advice would be appreciated--I'm
desperate!
Thank you,
Philip Bliss
Disclaimer: http://www.peralex.com/disclaimer.html
2008 Nov 30
1
ogg_stream_pageout function...
...fer);
while(theora_encode_packetout(&m_encoder, isLastFrame, &packet))
ogg_stream_packetin(&m_oggStream, &packet);
while (ogg_stream_pageout(&m_oggStream, &page))
{
fwrite(page.header,page.header_len, 1, m_oggFile);
fwrite(page.body,page.body_len, 1, m_oggFile);
}
This piece of code runs in real-time. I want to remove the last while block
and save theora packets directly to a temporary file. Then when capture is
finished I read packets from temp file and send them to ogg_stream_pageout.
Does this solution improve performance?
---------...
2006 Aug 24
1
trying to encode/decode videos using libtheora
I'm trying to learn how to use libtheora but I'm having some
problems:
I believe to have encoded a video, but I can't decode it. I've
tried 2 things: to record a .ogg file and to write a libtheora
decoder, using the encoded ogg_packets present in memory.
The source code is here:
http://opensvn.csie.org/ribamar/projects/streaming/cvaenc.c
(it has a makefile in