<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
&nbsp;&nbsp;&nbsp; Thanks Wim,<br>
<br>
I have implemented that pipeline in C code, and I try to do a clean
shut down for the pipeline as you have suggested me (I am not able to
use the last command-line version with -c option) with no improvement.
But I am almost sure that you're right and my problem is that I am
doing wrong the EOS propagation throught the pipeline. <br>
<br>
&nbsp;&nbsp;&nbsp; I do this to stop the pipeline (when I press certain key):<br>
<br>
GstEvent* eos_event = NULL;<br>
eos_event = gst_event_new_eos( );<br>
r = gst_element_send_event( pipeline, eos_event );<br>
<br>
&nbsp;&nbsp;&nbsp; Where the code that is running is:<br>
<br>
pipeline = gst_pipeline_new( "pipe" );<br>
video_src = gst_element_factory_make( "v4lsrc", "video-source" );<br>
.....<br>
audio_src = gst_element_factory_make( "alsasrc", "audio-source" );<br>
.....<br>
gst_bin_add_many( GST_BIN( pipeline ), video_src, video_enc,
video_parse, audio_src, audio_enc, muxer, sink, NULL );<br>
gst_element_link_with_filter( video_src, video_enc );<br>
gst_element_link( video_enc, video_parse );<br>
.....<br>
gst_element_set_state( gpipeline, GST_STATE_PLAYING );<br>
g_main_loop_run( gloop );<br>
.....<br>
<br>
&nbsp;&nbsp;&nbsp; Should I send the EOS in other way??? I am doing something wrong???<br>
<br>
&nbsp;&nbsp;&nbsp; Thank you very much.<br>
&nbsp;&nbsp;&nbsp; LD.<br>
<br>
<br>
Wim Taymans wrote:
<blockquote cite="mid:1244036154.29979.109.camel@metal" type="cite">
  <pre wrap="">On Wed, 2009-06-03 at 11:17 +0200, ldac wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">   Hi all,

I am launching the following pipe to record audio and video into an
AVI file. When I stop the pipeline and I play the file, audio goes too
fast and video has some interruptions and also goes faster. But if I
run "half" pipeline just with the audio goes fine, and the other half
with the video too ...

gst-launch-0.10 v4lsrc capture-width=720 capture-height=576 fps-n=25
fps-d=1 ! \
   'video/x-raw-yuv,width=720,heigh=576,framerate=(fraction)25/1' ! \
   videoencoder width=720 height=576 codec-type=std_avc qp=20 !
h264parse ! mux.\
   alsasrc ! ffenc_mp2 ! mux. \
   avimux name=mux ! filesink location=test.avi

    I guess that "queues" can fix the problem, but I have tried
placing them in some positions, but without improvement. Could someone
tell me how/where/why should I use/place the "queues"??? Is there
something else wrong "conceptually" talking? Which clock are both
branches (video and audio) using? Is a muxer problem?
    </pre>
  </blockquote>
  <pre wrap=""><!---->
You are probably not shutting down the pipeline cleanly (you need to
send EOS down the pipeline before shutting it down so that the muxer can
write the headers correctly).

Newer gst-launch versions also have the -e option to perform controlled
shutdown.

Wim
  </pre>
  <blockquote type="cite">
    <pre wrap="">    Thanks.
    All the best.
    LD.



------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: <a class="moz-txt-link-freetext" href="http://p.sf.net/sfu/opensolaris-get">http://p.sf.net/sfu/opensolaris-get</a>
_______________________________________________ gstreamer-devel mailing list <a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a>
    </pre>
  </blockquote>
  <pre wrap=""><!---->

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: <a class="moz-txt-link-freetext" href="http://p.sf.net/sfu/opensolaris-get">http://p.sf.net/sfu/opensolaris-get</a>
_______________________________________________
gstreamer-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a>
  </pre>
</blockquote>
<br>
</body>
</html>