I am using waylandsink to play h264 file. My decoder gives output in NV12 format, But my wayland accepts only BGRA, BGRx, RGB16. So I am using a video convertor. I cannot use a software video convert as its very slow. I want to use hardware video convert.
Pipeline using software video convert :
gst-launch-1.0 filesrc location=/home/root/VSS/video_with_display.h264 ! h264parse ! vpudec ! videoconvert ! waylandsink -v
Pipeline using hardware video convert :
gst-launch-1.0 filesrc location=/home/root/VSS/video_with_display.h264 ! h264parse ! vpudec ! imxvideoconvert_ipu ! waylandsink -v
I am using gstreamer1.0-plugins-bad, version : 1.6.0
You could get it from here : https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.6.0.tar.xz
But when I use hardware video convert, the buffer release function, which is a call back, is not getting called. There fore, I am not able to pick next buffers in pipeline.
Code flow as I understood.
In gst_wayland_sink_render (in gstwaylandsink.c ) function, we will get the buffer from pipeline.
- For the first time, we have to create the wlbuffer and add register with sink display. This is done using gst_buffer_add_wl_buffer (in wlbuffer.c ) function. Here we will add a listener buffer_listener for this buffer, which in turn calls buffer_release (void *data, struct wl_buffer *wl_buffer) and releases the buffer and unref it.
- Then we will replace sink's last buffer with this buffer to be rendered and call render_last_buffer. At end we calls gst_wl_window_render (in wlwindow.c), here we will attach our buffer to window video surface using gst_wl_buffer_attach. Then we will call wl_display_flush (window->display->display);
When I use hardware video convert, I am able to see that data is coming upto gst_wl_buffer_attach, but buffer releasing is not done.
What can be the reason ?
I am attaching the logs taken for both software videoconvert and hardware videoconvert, And our gst-plugins-bad-1.6.0 code with my own debug logs added. I have added the logs containing ** VSS ** .
Original Attachment has been moved to: Logs-using-hardware-videoconvert.txt.zip
Original Attachment has been moved to: Logs-using-software-video-convert.txt.zip