[prev in list] [next in list] [prev in thread] [next in thread]
List: theora
Subject: Re: [theora] encoding image from a webcam
From: Mircea Gliga <mgliga () integrasoft ! ro>
Date: 2009-11-26 19:02:15
Message-ID: 4B0ED0B7.50205 () integrasoft ! ro
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
I've created a test class with an encoder and decoder. I'm creating the
theora headers and immediately
add them to the decoder. For the first 2 packets th_decode_headerin
returns positive nr,
at the 3rd packet returns TH_EBADHEADER.
Am I aloud to do that? I'm not using ogg_stream_packetin. I just want to
encode a picture, resulting an
ogg_packet, then decode it on the client side...
ogg_packet op;
th_enc_ctx *td;
th_comment tc,tc1;
th_info theoraInfo,theoraInfo1;
th_setup_info *ts1;
for(;;)
{
int ret = th_encode_flushheader(td,&tc,&op);
int ret2 = th_decode_headerin(&theoraInfo1,&tc1,&ts1,&op);
if(0==ret) break;
}
What am i doing wrong here ?
Mircea Gliga
Mircea Gliga wrote:
>
>
> Mircea Gliga
>
>
>
> Ralph Giles wrote:
>> 2009/11/25 Mircea Gliga <mgliga@integrasoft.ro>:
>>
>>
>>> [...] Then I allocate a th_enc_ctx handle and repeatedly call
>>> th_encode_flushheader().
>>> Do I have to save this header packets? Do i have to provide this header
>>> packets to the decoder when I
>>> initialize it? Because the documentation says Parse the header packets by
>>> repeatedly calling
>>> th_decode_headerin().
>>>
>>
>> Yes, you have to pass the headers into the decoder to configure it to
>> correctly parse the data packets.
>>
>> -r
>>
>>
[Attachment #5 (text/html)]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
I've created a test class with an encoder and decoder. I'm creating the
theora headers and immediately<br>
add them to the decoder. For the first 2 packets th_decode_headerin
returns positive nr,<br>
at the 3rd packet returns TH_EBADHEADER. <br>
Am I aloud to do that? I'm not using ogg_stream_packetin. I just want
to encode a picture, resulting an <br>
ogg_packet, then decode it on the client side...<br>
<br>
ogg_packet op;<br>
th_enc_ctx *td;<br>
th_comment tc,tc1;<br>
th_info theoraInfo,theoraInfo1;<br>
th_setup_info *ts1;<br>
for(;;)<br>
{<br>
int ret = th_encode_flushheader(td,&tc,&op);<br>
<br>
int ret2 =
th_decode_headerin(&theoraInfo1,&tc1,&ts1,&op);<br>
if(0==ret) break;<br>
}<br>
<br>
What am i doing wrong here ?
<pre class="moz-signature" cols="72">Mircea Gliga
</pre>
<br>
<br>
Mircea Gliga wrote:
<blockquote cite="mid:4B0E4BC6.30900@integrasoft.ro" type="cite">
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
<title></title>
<br>
<br>
<pre class="moz-signature" cols="72">Mircea Gliga
</pre>
<br>
<br>
Ralph Giles wrote:
<blockquote
cite="mid:9ec9eb9e0911251430i483ca64va9180be4bbe3318d@mail.gmail.com"
type="cite">
<pre wrap="">2009/11/25 Mircea Gliga <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E" href="mailto:mgliga@integrasoft.ro"><mgliga@integrasoft.ro></a>:
</pre>
<blockquote type="cite">
<pre wrap="">[...] Then I allocate a th_enc_ctx handle and repeatedly call
th_encode_flushheader().
Do I have to save this header packets? Do i have to provide this header
packets to the decoder when I
initialize it? Because the documentation says Parse the header packets by
repeatedly calling
th_decode_headerin().
</pre>
</blockquote>
<pre wrap=""><!---->
Yes, you have to pass the headers into the decoder to configure it to
correctly parse the data packets.
-r
</pre>
</blockquote>
</blockquote>
</body>
</html>
_______________________________________________
theora mailing list
theora@xiph.org
http://lists.xiph.org/mailman/listinfo/theora
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic