fdsrc and textoverlay not working with custom fd

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

fdsrc and textoverlay not working with custom fd

Username
exec 3<> /tmp/foo
echo "testfdstr" >&3

gst-launch-1.0 fdsrc fd=3 do-timestamp=true ! text/x-raw,format=utf8 ! txt.
videotestsrc !  textoverlay  name=txt shaded-background=yes font-desc="Serif
40" wait-text=false !  glimagesink

Did not show anything.

But if fd=0 and I print to terminal a string is show.

All on MacOS.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: fdsrc and textoverlay not working with custom fd

Antonio Ospite-2
On Mon, 30 Apr 2018 23:28:50 -0700 (MST)
Username <[hidden email]> wrote:

> exec 3<> /tmp/foo
> echo "testfdstr" >&3

The offset of the file descriptor is 10 at this point.

>
> gst-launch-1.0 fdsrc fd=3 do-timestamp=true ! text/x-raw,format=utf8 ! txt.
> videotestsrc !  textoverlay  name=txt shaded-background=yes font-desc="Serif
> 40" wait-text=false !  glimagesink
>
> Did not show anything.
>

fdsrc reads from the current offset of the file descriptor, so it will
skip the stuff you wrote previously.

> But if fd=0 and I print to terminal a string is show.
>

This works because:

  1. fd 0 is non-seekable, so fdsrc waits, see with GST_DEBUG=fdsrc:6
  2. you write stuff _after_ you launched the pipeline

Ciao,
   Antonio

--
Antonio Ospite
https://ao2.it
https://twitter.com/ao2it

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel