vtenc: eliminate gst_video_frame_copy on iOS in non-CVPixelBuffer case
Submitted by Ilya Konstantinov
Link to original bug (#747222)
Description
In gst_vtenc_encode_frame, we do:
meta = gst_buffer_get_core_media_meta (frame->input_buffer);
if (meta != NULL) {
pbuf = gst_core_media_buffer_get_pixel_buffer (frame->input_buffer);
}
#ifdef HAVE_IOS
if (pbuf == NULL) {
...
/* FIXME: iOS has special stride requirements that we don't know yet.
* Copy into a newly allocated pixelbuffer for now. Probably makes
* sense to create a buffer pool around these at some point.
*/
...
if (!gst_video_frame_copy (&outframe, &inframe)) {
...
The gst_video_frame_copy is a performance issue.
Case in point, in OpenWebRTC we have avfvideosrc upstream, so the pixel layout should be Apple-compatible. The need for this gst_video_frame_copy should be reevaluated.