Skip to content
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

Fix: gstreamer top left corruption and states #1019

Merged
merged 5 commits into from
Dec 13, 2024

Conversation

DawidWesierski4
Copy link
Collaborator

@DawidWesierski4 DawidWesierski4 commented Dec 11, 2024

Fix 73-byte corruption in the top left corner
The issue was caused by using void pointers
instead of the proper GStreamer memory
management functions. This led to memory
structures being saved in the output stream,
causing corruption in the top left corner.

Cleanup the code
Make the _chain function much simpler without
any lingering frames in the _mtltxsink
structure.

Add support for framebuffer argument
Add support for fps argument that overrides the
framerate of the capabilities.

Fix Ensure Gstreamer plugin reaches PLAYING state
Force the Gstreamer plugin into the PLAYING state
to prevent reinitialization of the pipeline.
This is achieved by disabling ASYNC state handling
and manually setting the state to PLAYING.
Additionally, send EOS when it is received,
to signal the end of processing.

Example usage:
gst-launch-1.0 videotestsrc location=$INPUT !
video/x-raw,format=I420,width=640,height=480 !
gstmtltxsink tx-queues=4 tx-udp-port=20000
tx-payload-type=112 dev-ip="192.168.96.3"
tx-ip="239.168.75.30" dev-port="$DPDK_PORT"
tx-fps=60

fixes: ed91d38c38b1b1571ec84826154c3ff8b8695ced

Fix 73-byte corruption in the top left corner
  The issue was caused by using void pointers
  instead of the proper GStreamer memory
  management functions. This led to memory
  structures being saved in the output stream,
  causing corruption in the top left corner.

Cleanup the code
  Make the _chain function much simpler without
  any lingering frames in the _mtltxsink
  structure.

Add support for framebuffer argument
Add support for fps argument that overrides the
  framerate of the capabilites.

Example usage:
gst-launch-1.0 videotestsrc location=$INPUT ! \
  video/x-raw,format=I420,width=640,height=480 ! \
  gstmtltxsink tx-queues=4 tx-udp-port=20000 \
    tx-payload-type=112 dev-ip="192.168.96.3" \
    tx-ip="239.168.75.30" dev-port="$DPDK_PORT" \
    tx-fps=60

fixes: ed91d38c38b1b1571ec84826154c3ff8b8695ced
Force the Gstreamer plugin into the PLAYING state
to prevent reinitialization of the pipeline.
This is achieved by disabling ASYNC state handling
and manually setting the state to PLAYING.
Additionally, send EOS when it is received,
to signal the end of processing.
@DawidWesierski4 DawidWesierski4 changed the title Fix: Top left corruption Fix: gstreamer top left corruption and states Dec 12, 2024
@DawidWesierski4 DawidWesierski4 marked this pull request as ready for review December 12, 2024 12:53
Dereference buffers inside mtl to improve memory
efficiency of the pipeline.
Copy link
Contributor

@MateuszGrabuszynski MateuszGrabuszynski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good for me. My C is not good enough to read between the lines but I am fine with how it looks, overall.

ecosystem/gstreamer_plugin/gstmtltxsink.c Show resolved Hide resolved
@DawidWesierski4 DawidWesierski4 merged commit 371d2b0 into OpenVisualCloud:main Dec 13, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants