<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Il 29/11/2011 16:07, Nezer Zaidenberg ha scritto:
<blockquote
cite="mid:CAFHPcenVxix8W85AKN3UYsWEdBE-Q7EiBu1+hi_tzdhoLiG9Uw@mail.gmail.com"
type="cite">
<div dir="ltr"><span style="border-collapse: collapse;
font-family: arial,sans-serif; font-size: 13px;">Hi Nicola,
<div><br>
</div>
<div>Thanks, but I have read somewhere that I am better off
using pad-block or appsrc/sink (as you mentioned) since I
want to connect two pipelines in the same process.</div>
<div>(as a side note, I used gdp[de]pay successfully to
implement what I wanted).</div>
<div><br>
</div>
<div>I have considered using the pad-block - but it is too
complicated and it is underdocumented. For instance jokosher
used pad-block not knowing that it needs buffers to have the
signal flushed and they only found it out by a mail in the
mailing list.</div>
<div><br>
</div>
<div>Also, I don't want to stop the whole pipeline to finalize
every one-minute recording - when I try to send an eos to a
regular recording, it usually takes a couple of seconds for
it to finalize - and I don't want the user to experience
this video freeze.</div>
<div><br>
</div>
<div>I would like your opinion about something else (sorry if
I am being too bold) - appsink and appsrc are very general
(good) ideas.</div>
</span></div>
</blockquote>
<br>
in an app of mine I'm using something like this:<br>
<br>
source -> <some other elements> -> appsink<br>
<br>
appsrc -> <some other elements> filesink<br>
<br>
when I stop the second pipeline and change the filesink location I
put the buffer from appsink in a gst_atomic_queue, and when the
second pipeline is ready again I empty the queue.<br>
<br>
I think this is considered an hack too, however works fine for me
and I have all in the same app,<br>
<br>
Nicola<br>
<br>
<blockquote
cite="mid:CAFHPcenVxix8W85AKN3UYsWEdBE-Q7EiBu1+hi_tzdhoLiG9Uw@mail.gmail.com"
type="cite">
<div dir="ltr"><span
style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px">
<div>But what I am really looking for is a way to create a
global queue - and have one pipeline filling it and another
(or others) emptying it.</div>
<div>What I imagine (actually what I plan to implement) is a
"queuesink" that just queues the buffers it gets in a global
queue, and a "queuesrc" that takes a global queue and drains
it.</div>
<div>This would also fit well with all the other pipeline
communication ways like shm{sink,src},
tcp{client,server}{sink,src}, udp{src,sink}, and even
file{src,sink} that use a pipe.</div>
<div><br>
</div>
<div>Now appsink and appsrc involve a lot of hacking to
achieve this (attaching signal handlers and removing them
when a pipeline is destroyed in a synchronized way)
relatively, just to have simple handlers that only save the
buffers in a queue - a concept which plays a central role in
gstreamer already - and thus has a strong stable
implementation already.</div>
<div><br>
</div>
<div>I feel that this simple idea will not gain much by using
the full power of the app{sink,src}, and would rather use an
element that does this job itself.</div>
<div><br>
</div>
<div>Is there any element today in gstreamer that does this?</div>
<div>If not, and if I implement such an element, do you have
any advice/remarks?</div>
<div><br>
</div>
<div>Thanks,</div>
<div> Tomer</div>
</span>
<div class="gmail_quote"><br>
</div>
<div class="gmail_quote">On Mon, Nov 28, 2011 at 4:23 PM,
Mailing List SVR <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:lists@svrinformatica.it" target="_blank">lists@svrinformatica.it</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> Il 28/11/2011 12:34,
Nezer Zaidenberg ha scritto:
<div>
<div>
<blockquote type="cite">
<div dir="ltr">Hi All,
<div><br>
</div>
<div>I have a live source (webcam) that I want to
record continuously without losing any video -
but also be able to playback everything up to
the last minute. I am trying to dump the video
to a fifo and then record it from the fifo one
minute at a time.</div>
<div><br>
</div>
<div>The problem is that it seems there is a
problem with the timestamps. It looks like
gstreamer expects a clock to be supplied by the
filesrc but that doesn't happen. </div>
<div>Specifically when I try to play the pipe
instead of record it, I get choppy video and a
warning is emitted about the timestamps.</div>
<div><br>
</div>
<div>Does anyone know how I could record an mpeg
stream from a fifo?</div>
<div><br>
</div>
<div>For reference, here are the pipelines:</div>
<div>source pipe:</div>
<div>gst-launch rtspsrc location="<webcam>"
! rtpmp4vdepay ! filesink location=pipe</div>
<div><br>
</div>
<div>record pipe:</div>
<div>gst-launch filesrc location=pipe !
'video/mpeg, mpegversion=4, systemstream=false,
width=320, height=240. framerate=(fraction)30/1,
codec_data=...' ! matroskamux ! filesink
location="1.mkv"</div>
<div><br>
</div>
<div>play pipe:</div>
<div>gst-launch filesrc location=pipe !
'video/mpeg, mpegversion=4, systemstream=false,
width=320, height=240. framerate=(fraction)30/1,
codec_data=...' ! ffdec_mpeg4 ! ffmpegcolorspace
! autovideosink</div>
</div>
</blockquote>
<br>
</div>
</div>
try to add do-timestamp=true to the filesrc element (or
sync=false to the videosink), however gstreamer allow to
record and play with only 1 pipeline, no need for this
hack:<br>
<br>
<a moz-do-not-send="true"
href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-plugins/html/gstreamer-plugins-tee.html"
target="_blank">http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-plugins/html/gstreamer-plugins-tee.html</a><br>
<a moz-do-not-send="true"
href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gstreamer-app.html"
target="_blank">http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gstreamer-app.html</a><br>
<br>
Nicola<br>
<br>
<blockquote type="cite">
<div dir="ltr">
<div><br>
</div>
<div>Thanks,</div>
<div> Tomer & Nezer</div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
gstreamer-devel mailing list
<a moz-do-not-send="true" href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a>
<a moz-do-not-send="true" href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
</blockquote>
<br>
</div>
<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a moz-do-not-send="true"
href="mailto:gstreamer-devel@lists.freedesktop.org"
target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a moz-do-not-send="true"
href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel"
target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
gstreamer-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
</blockquote>
<br>
</body>
</html>