Python VideoFilter Plugin. Buffer None in do_transform_frame

Kevron Rees tripzero.kev at gmail.com
Sun Jan 10 13:43:52 PST 2016


On Tue, Jan 5, 2016, 1:31 PM  <hrojas at lacuatro.com.ar> wrote:

> Hello,
>          I am trying to develop a custom video filter plugin but I am
> getting an empty buffer in VideoFrame parameter.
>
> The code is as follows:
>
>      def do_transform_frame_ip(self, f):
>          try:
>              data = f.buffer.extract_dup(0, f.buffer.get_size())
>              bgr = numpy.ndarray((1080, 1920, 3), buffer=data,
> dtype=numpy.uint8)
>              print bgr.shape
>          except Exception as e:
>              print e


Are you by chance using gst with ooencv?  This code looks familiar

>
>          return Gst.FlowReturn.OK
>
> VideoFrame metada is fine, but Buffer is None
>
>
> Testing with the following pipeline:
> (mysink is the example provided in gst-plugin source code)
>
> GST_DEBUG=python:6 gst-launch-1.0 filesrc
> location=/media/storage/videos/Mirch2.avi ! decodebin ! videoconvert !
> miplugin ! mysink
> Estableciendo el conducto a PAUSA ?
> El conducto está PREPARÁNDOSE ?
> libva info: VA-API version 0.38.1
> libva info: va_getDriverName() returns 0
> libva info: Trying to open /usr/X11/lib/dri/i965_drv_video.so
> libva info: Found init function __vaDriverInit_0_38
> libva info: va_openDriver() returns 0
> Got context from element 'vaapidecode': gst.vaapi.Display=context,
> gst.vaapi.Display=(GstVaapiDisplay)NULL;
> Redistribuir latencia?
> 0:00:00.421544040 28703 0x7f0464005a80 ERROR                  libav :0::
> Context scratch buffers could not be allocated due to unknown size.
>
>
> Buffer is reaching OK at the method do_render() in mysink which
> implements BaseSink()
>
> Any help will be much appreciated.
>
> Hernando
>
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160110/ac7fb491/attachment.html>


More information about the gstreamer-devel mailing list