https://wiki.xiph.org/api.php?action=feedcontributions&user=Fog08&feedformat=atomXiphWiki - User contributions [en]2024-03-28T15:12:22ZUser contributionsMediaWiki 1.40.1https://wiki.xiph.org/index.php?title=Etheora&diff=8599Etheora2008-02-25T21:50:31Z<p>Fog08: etheora_dec_configure doesn't exist in etheora.c, the name of the function is etheora_dec_setup</p>
<hr />
<div>'''Etheora''' is a a simplified API for programming theora video encoding/decoding applications with ogg containers. It uses and encapsulates libtheora + libogg API and structures, so users need to know very few about video and data containers.<br />
<br />
<br />
<br />
== Overview - Encoding == <br />
<br />
An encoding process is made by these steps:<br />
<br />
/* a context declaration. */<br />
etheora_ctx ec;<br />
<br />
/* encoder configuration. */<br />
etheora_enc_configure(&ec, width, height, ETHEORA_ASPECT_NORMAL,<br />
fopen("output-video.ogv"), fopen("debug_info.txt"));<br />
<br />
/* encoder start. */<br />
etheora_enc_start(&ec);<br />
<br />
/* drawing next frame, by puting a r,g,b or y,u,v pixel in (i,j) coordinate */<br />
etheora_enc_rgb_draw(&ec, i, j, r, g, b);<br />
/* alternative: etheora_enc_yuv_draw()) */<br />
<br />
/* submiting frame to encoding. */<br />
etheora_enc_nextframe(&ec);<br />
<br />
/* submiting last frame to encoding by finishing the process. */<br />
etheora_enc_finish(&ec);<br />
<br />
The functions _yuv_ and _rgb_ works transparently with OC_PF_420, OC_PF_422 and OC_PF_PF_444, having the libtheora version used support for them or not.<br />
<br />
== Overview - Decoding == <br />
<br />
The decoding process is quite similar.<br />
<br />
/* a context declaration. */<br />
etheora_ctx ec;<br />
<br />
/* decoder configuration. */<br />
etheora_dec_setup(&ec, fopen("input-video.ogv"), fopen("debug_info.txt")); <br />
<br />
/* decoder start. */<br />
etheora_dec_start(&ec); <br />
<br />
/* reading video data. */<br />
etheora_get_width(&ec);<br />
etheora_get_heigth(&ec);<br />
etheora_get_fps_numerator(&ec);<br />
etheora_get_fps_denominator(&ec);<br />
etheora_get_aspect_numerator(&ec);<br />
etheora_get_aspect_denominator(&ec);<br />
<br />
/* getting next frame by decoding it. */<br />
etheora_dec_nextframe(&ec); <br />
<br />
/* getting frame data, by reading a r,g,b or y,u,v pixel in (i,j) coordinate*/<br />
etheora_dec_rgb_read(&ec, i, j, &r, &g, &b)<br />
/* alternative: etheora_dec_yuv_read()) */<br />
<br />
/* finishing the process. */<br />
etheora_dec_finish(&ec);<br />
<br />
The functions _yuv_ and _rgb_ works transparently with OC_PF_420, OC_PF_422 and OC_PF_PF_444, having the libtheora version used support for them or not.<br />
<br />
== Overview - Going Futher == <br />
<br />
Etheora is documented here:<br />
http://svn.xiph.org/branches/etheora-0.1/doc/etheora_documentation.pdf<br />
<br />
Etheora code is here:<br />
http://svn.xiph.org/branches/etheora-0.1/src/<br />
<br />
Etheora very simple examples are found here:<br />
http://svn.xiph.org/branches/etheora-0.1/examples/<br />
<br />
Etheora still doesn't have audio/speech support. (Although it can get video data from videos with audio). And uses internally the old libtheora API (ie, not the theora-exp).<br />
<br />
== TODO == <br />
<br />
* Vorbis support<br />
* Speex support<br />
* Skeleton support<br />
<br />
== See also == <br />
{{Template:Theora}}<br />
<br />
[[Category:Theora]]</div>Fog08https://wiki.xiph.org/index.php?title=Etheora&diff=8598Etheora2008-02-25T21:49:05Z<p>Fog08: I think we must declare a context not a pointer to a context. If we were doing , we should allocate memory with malloc</p>
<hr />
<div>'''Etheora''' is a a simplified API for programming theora video encoding/decoding applications with ogg containers. It uses and encapsulates libtheora + libogg API and structures, so users need to know very few about video and data containers.<br />
<br />
<br />
<br />
== Overview - Encoding == <br />
<br />
An encoding process is made by these steps:<br />
<br />
/* a context declaration. */<br />
etheora_ctx ec;<br />
<br />
/* encoder configuration. */<br />
etheora_enc_configure(&ec, width, height, ETHEORA_ASPECT_NORMAL,<br />
fopen("output-video.ogv"), fopen("debug_info.txt"));<br />
<br />
/* encoder start. */<br />
etheora_enc_start(&ec);<br />
<br />
/* drawing next frame, by puting a r,g,b or y,u,v pixel in (i,j) coordinate */<br />
etheora_enc_rgb_draw(&ec, i, j, r, g, b);<br />
/* alternative: etheora_enc_yuv_draw()) */<br />
<br />
/* submiting frame to encoding. */<br />
etheora_enc_nextframe(&ec);<br />
<br />
/* submiting last frame to encoding by finishing the process. */<br />
etheora_enc_finish(&ec);<br />
<br />
The functions _yuv_ and _rgb_ works transparently with OC_PF_420, OC_PF_422 and OC_PF_PF_444, having the libtheora version used support for them or not.<br />
<br />
== Overview - Decoding == <br />
<br />
The decoding process is quite similar.<br />
<br />
/* a context declaration. */<br />
etheora_ctx ec;<br />
<br />
/* decoder configuration. */<br />
etheora_dec_configure(&ec, fopen("input-video.ogv"), fopen("debug_info.txt")); <br />
<br />
/* decoder start. */<br />
etheora_dec_start(&ec); <br />
<br />
/* reading video data. */<br />
etheora_get_width(&ec);<br />
etheora_get_heigth(&ec);<br />
etheora_get_fps_numerator(&ec);<br />
etheora_get_fps_denominator(&ec);<br />
etheora_get_aspect_numerator(&ec);<br />
etheora_get_aspect_denominator(&ec);<br />
<br />
/* getting next frame by decoding it. */<br />
etheora_dec_nextframe(&ec); <br />
<br />
/* getting frame data, by reading a r,g,b or y,u,v pixel in (i,j) coordinate*/<br />
etheora_dec_rgb_read(&ec, i, j, &r, &g, &b)<br />
/* alternative: etheora_dec_yuv_read()) */<br />
<br />
/* finishing the process. */<br />
etheora_dec_finish(&ec);<br />
<br />
The functions _yuv_ and _rgb_ works transparently with OC_PF_420, OC_PF_422 and OC_PF_PF_444, having the libtheora version used support for them or not.<br />
<br />
== Overview - Going Futher == <br />
<br />
Etheora is documented here:<br />
http://svn.xiph.org/branches/etheora-0.1/doc/etheora_documentation.pdf<br />
<br />
Etheora code is here:<br />
http://svn.xiph.org/branches/etheora-0.1/src/<br />
<br />
Etheora very simple examples are found here:<br />
http://svn.xiph.org/branches/etheora-0.1/examples/<br />
<br />
Etheora still doesn't have audio/speech support. (Although it can get video data from videos with audio). And uses internally the old libtheora API (ie, not the theora-exp).<br />
<br />
== TODO == <br />
<br />
* Vorbis support<br />
* Speex support<br />
* Skeleton support<br />
<br />
== See also == <br />
{{Template:Theora}}<br />
<br />
[[Category:Theora]]</div>Fog08