get_request_pad from encodebin return None

Thibault Saunier tsaunier at gnome.org
Tue Oct 9 15:26:23 UTC 2018


This is how it should look like:

```
import gi
from time import sleep
from threading import Event

gi.require_version('Gst', '1.0')

from gi.repository import Gst, GstPbutils  # noqa

Gst.init(None)

preset = None

encodebin = Gst.ElementFactory.make('encodebin')

ogg = Gst.Caps.from_string("application/ogg")
cprof = GstPbutils.EncodingContainerProfile("myprofile", None, ogg, None)

vorbis = Gst.Caps.from_string("audio/x-vorbis")
cprof.add_profile(GstPbutils.EncodingAudioProfile(vorbis, preset, vorbis, 0))

encodebin.set_property("profile", cprof)

print(encodebin.emit('request-pad', Gst.Caps('audio/x-vorbis')))
```

Thibault
On Tue, Oct 9, 2018 at 12:21 PM RiccardoCagnasso <riccardo at phascode.org> wrote:
>
> The example is somewhat wrong because it sets up a audio encoder and then
> request a video pad. Buy it yields the same result with
>
> encodebin.get_request_pad('audio_%u') is None
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


More information about the gstreamer-devel mailing list