Using the gstreamer ( https://gstreamer.freedesktop.org ) framework would hide the details how to encode ( JPEG, H.264 ) the frames on the various platforms ( Intel/ARM ... ).
Such a GStreamer pipeline needs to have elements for the following steps:
- OpenGL texture as source
- converter to NV12
- encoder
One reason why gstreamer has not been used in the first place is that I couldn't find an existing solution for a pipeline that feeds the encoder with a libva surface ( NV12 ) without transferring the frame to the CPU. If it turns out that the required functionality is actually not available it might make sense to implement the missing gstreamer elements instead of building our own platform specific pipelines.
Using the gstreamer ( https://gstreamer.freedesktop.org ) framework would hide the details how to encode ( JPEG, H.264 ) the frames on the various platforms ( Intel/ARM ... ).
Such a GStreamer pipeline needs to have elements for the following steps:
One reason why gstreamer has not been used in the first place is that I couldn't find an existing solution for a pipeline that feeds the encoder with a libva surface ( NV12 ) without transferring the frame to the CPU. If it turns out that the required functionality is actually not available it might make sense to implement the missing gstreamer elements instead of building our own platform specific pipelines.