I write this small piece of code, that get pixels and encode them:<br><br> ogg_page page;<br> ogg_packet packet;<br><br> m_frameSource.getYUVBits(m_buffer.y, m_buffer.u, m_buffer.v);<br> <br> theora_encode_YUVin(&m_encoder, &m_buffer);<br>
<br> while(theora_encode_packetout(&m_encoder, isLastFrame, &packet))<br> ogg_stream_packetin(&m_oggStream, &packet);<br><br> while (ogg_stream_pageout(&m_oggStream, &page)) <br> {<br>
fwrite(page.header,page.header_len, 1, m_oggFile);<br> fwrite(page.body,page.body_len, 1, m_oggFile);<br> }<br><br>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?<br>