mirror of
https://github.com/games-on-whales/gst-interpipe.git
synced 2026-10-15 12:51:56 +00:00
[PR #1] Forward context queries #2
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
games-on-whales/gst-interpipe#2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/games-on-whales/gst-interpipe/pull/1
Author: @ABeltramo
Created: 10/17/2025
Status: 🔄 Open
Base:
master← Head:forward-queries📝 Commits (1)
4f0330ffeat: forwarding queries from src->sink📊 Changes
7 files changed (+217 additions, -69 deletions)
View changed files
📝
.gitignore(+2 -0)📝
common(+1 -1)📝
gst/interpipe/gstinterpipeinode.c(+17 -6)📝
gst/interpipe/gstinterpipeinode.h(+3 -0)📝
gst/interpipe/gstinterpipesink.c(+44 -31)📝
gst/interpipe/gstinterpipesrc.c(+149 -30)📝
meson_options.txt(+1 -1)📄 Description
Tried to implement sharing context (mostly aiming at CUDA) between pipelines, but I'm hitting a hard wall here. It seems that the
CONTEXTquery comes very early, before the two src/sink element can link to each other. The link seems to be done via setting the propertylisten-toin the sink element.My plan was to listen to the queries in
interpipesrc, save them in a queue then, once connected to a sink, relay the queries upstream tointerpipesink. If we get a hit we can get theGstContextfrom upstream. Now, the problem is that I'm not sure how to pass that context to the element that originally started the query. I've tried withbut I end up with
when running the following example pipeline:
Because
nvh265enc0queries for the context before we've managed to connectinterpipesrcandinterpipesink, so it sends the NEED CONTEXT message and ultimately just creates a CUDA context. After that, there's no point in manually setting the pipeline element context since it's too late..See for example: gstcudabasetransform.c#L179-L197: by the time we set ask for context (and ultimately create one)
filter->streamhas already be assigned, so changing the context afterwards doesn't do anything..I'm going to park this for now and try implementing what was suggested in https://github.com/RidgeRun/gst-interpipe/issues/111: managing the context from the "outside" directly in Wolf by listening to the
NEED/HAVE_CONTEXTmessages on both buses.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.