Skip to content

[Video Player] Support gstreamer dmabuf in video_player #64

@makotosato-at

Description

@makotosato-at

Hello.
I have i.MX8MP board and using video_player.
This SoC has a VPU(Video Proccessing Unit) so that it can hardware decode H.264 with gstreamer.
But, 1080p 30fps or 60fps video, the following gst_buffer_extract() is the bottleneck and playback is slow.
(gst_extract_buffer() takes about 60ms.)
gst_video_player.cc:

const uint8_t* GstVideoPlayer::GetFrameBuffer() {
  std::shared_lock<std::shared_mutex> lock(mutex_buffer_);
  if (!gst_.buffer) {
    return nullptr;
  }

  const uint32_t pixel_bytes = width_ * height_ * 4;
  gst_buffer_extract(gst_.buffer, 0, pixels_.get(), pixel_bytes);
  return reinterpret_cast<const uint8_t*>(pixels_.get());
}

I think the availability of dmabuf would solve this problem.
Are there any plans to support gstreamer dmabuf in video_player?
(In my environment, gst_is_dmabuf_memory() returns TRUE, so I can use dmabuf.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions