10000 reland: audio & video player: migrate to common playbin implementation by ardera · Pull Request #483 · ardera/flutter-pi · GitHub
[go: up one dir, main page]

Skip to content

reland: audio & video player: migrate to common playbin implementation #483

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
36a2127
video player: use square BO
ardera Feb 21, 2025
0b3f3a4
video player: use playbin3 instead of uridecodebin
ardera Feb 21, 2025
2298020
video player: don't handle dma_drm video info
ardera Feb 21, 2025
ca1eee4
video player: fix code for gstreamer < 1.24.0
ardera Feb 21, 2025
58663ba
video player: fix parameter in g_object_set
ardera Feb 21, 2025
dc0ff2a
video player: disable hw decoding for gstreamer < 1.22.8
ardera May 8, 2025
ef858c0
video player: make seek flags construction a bit more easier to follow
ardera May 8, 2025
878f39c
util: add khash hashmap implementation
ardera May 8, 2025
0e6b1da
platform channels: helpers for decoding method calls
ardera May 12, 2025
5f65e73
gitignore: ignore .cache
ardera May 12, 2025
63de32b
gstplayer: feature parity with audioplayers player
ardera May 12, 2025
2f37727
audioplayers: migrate to gstplayer
ardera May 9, 2025
0740253
gstplayer: move gstplayer into separate file
ardera May 12, 2025
efab797
modesetting: remove logs if a separate cursor plane couldn't be found
ardera May 12, 2025
436f790
cmake: remove deleted `audioplayers/player.c` file
ardera May 12, 2025
c7a7493
Revert "video player: disable hw decoding for gstreamer < 1.22.8"
ardera May 13, 2025
815ac82
gstplayer: don't use gst_video_info_new_from_caps
ardera May 13, 2025
facc7fc
gstplayer: only define appsink event handler for gstreamer >= 1.20.0
ardera May 13, 2025
5e72346
gstplayer: don't use sd_event_source_disable_unref
ardera May 13, 2025
cd2c8ef
notifier/listener: fix change notifiers notifying on listen
ardera May 16, 2025
1584c59
gstplayer/audio player/video player: various compatibility fixes
ardera May 16, 2025
c2ed358
flutter-pi: allow getting tracer of flutterpi instance
ardera May 16, 2025
d008074
video player: Better feedback when trying to create pipeline video
ardera May 19, 2025
3a95567
gstplayer: re-implement creating video players from pipeline description
ardera Jun 2, 2025
4d29038
style: make bool flag arguments more readable
ardera Jun 2, 2025
98215b1
gstplayer, video player: add tracing
ardera Jun 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
video player: don't handle dma_drm video info
Only supported since gstreamer 1.24.0 and
requires some more work to implement correctly.
  • Loading branch information
ardera committed May 8, 2025
commit 2298020d25875d07e398d7a9e937ca02e6aec6ac
27 changes: 9 additions & 18 deletions src/plugins/gstreamer_video_player/frame.c
Original file line number Diff line number Diff line change
Expand Up @@ -828,14 +828,11 @@ static struct video_frame *frame_new_egl_imported(struct frame_interface *interf
} while (false)
struct video_frame *frame;
struct plane_info planes[MAX_N_PLANES];
GstVideoInfoDmaDrm drm_video_info;
GstVideoInfo video_info;
EGLBoolean egl_ok;
GstBuffer *buffer;
EGLImageKHR egl_image;
gboolean gst_ok;
uint32_t drm_format;
uint64_t drm_modifier;
GstCaps *caps;
GLuint texture;
GLenum gl_error;
Expand All @@ -850,22 +847,20 @@ static struct video_frame *frame_new_egl_imported(struct frame_interface *interf
return NULL;
}

bool is_drm_video_info = false;

// If we don't have an explicit info given, we determine it from the sample caps.
if (info == NULL) {
caps = gst_sample_get_caps(sample);
if (caps == NULL) {
return NULL;
}

is_drm_video_info = gst_video_info_dma_drm_from_caps(&drm_video_info, caps);

gst_ok = gst_video_info_from_caps(&drm_video_info, caps);
gst_ok = gst_video_info_from_caps(&video_info, caps);
if (gst_ok == FALSE) {
LOG_ERROR("Could not get video info from caps.\n");
return NULL;
}

info = &video_info;
} else {
caps = NULL;
}
Expand All @@ -875,17 +870,13 @@ static struct video_frame *frame_new_egl_imported(struct frame_interface *interf
height = GST_VIDEO_INFO_HEIGHT(info);
n_planes = GST_VIDEO_INFO_N_PLANES(info);

if (is_drm_video_info) {
drm_format = drm_video_info.drm_fourcc;
drm_modifier = drm_video_info.drm_modifier;
} else {
drm_modifier = DRM_FORMAT_MOD_LINEAR;
drm_format = drm_format = drm_format_from_gst_info(info);
if (drm_format == DRM_FORMAT_INVALID) {
LOG_ERROR("Video format has no EGL equivalent.\n");
return NULL;
}
uint64_t drm_modifier = DRM_FORMAT_MOD_LINEAR;
uint32_t drm_format = drm_format_from_gst_info(info);
if (drm_format == DRM_FORMAT_INVALID) {
LOG_ERROR("Video format has no EGL equivalent.\n");
return NULL;
}


bool external_only;
for_each_format_in_frame_interface(i, format, interface) {
Expand Down
0