[theora-dev] Audio from fifo

Kenneth C. Arnold ken at arnoldnet.net
Thu Oct 3 15:28:12 PDT 2002



I haven't tried it, but here's an extremely trivial patch for encoder_example 
that should make it work. It's been mentioned many times that Theora isn't 
production code, but this could help with testing:

--cut--
--- encoder_example.c.~1.6.~    2002-09-27 19:51:01.000000000 -0400
+++ encoder_example.c   2002-10-03 18:25:18.000000000 -0400
@@ -597,11 +597,11 @@
     ogg_page audiopage;
     ogg_page videopage;

-    /* is there an audio page flushed?  If not, fetch one if possible */
-    
audioflag=fetch_and_process_audio(audio,&audiopage,&vo,&vd,&vb,audioflag);
-
     /* is there a video page flushed?  If not, fetch one if possible */
     videoflag=fetch_and_process_video(video,&videopage,&to,&td,videoflag);
+
+    /* is there an audio page flushed?  If not, fetch one if possible */
+    
audioflag=fetch_and_process_audio(audio,&audiopage,&vo,&vd,&vb,audioflag);

     /* no pages of either?  Must be end of stream. */
     if(!audioflag && !videoflag)break;
--cut--

--Ken

On Thursday 03 October 2002 02:48 am, Caspian Maclean wrote:
> My first guess about the problem would be that the programs want
> to process the stuff in a different order, e.g. mplayer wants to
> output some sound before anymore video and encoder_example wants
> to receive some video before anymore sound.  This could easily
> depend on the order of stuff in the file mplayer is reading.
>
> I guess something similar could happen for opening the pipes as
> well.
>
> The easiest solution I can think of would be to run 2 mplayer
> processes, one for video and one for audio.

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'theora-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Theora-dev mailing list