-
Notifications
You must be signed in to change notification settings - Fork 65
Add: Async session creation for st40p GStreamer #1149
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
base: main
Are you sure you want to change the base?
Conversation
069f13d
to
bac66d7
Compare
Introduce async session creation for the st40p into GStreamer plugin. Unlike the st30p and st20p plugins, this implementation uses the START signal instead of the capabilities negotiation signal, as the st40p plugin accepts all caps.
return FALSE; | ||
case GST_EVENT_STREAM_START: | ||
if (sink->async_session_create) { | ||
thread_data = malloc(sizeof(GstMtlSt40pTxThreadData)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
handle malloc fail and pthread_create fail cases.
return; | ||
} | ||
if (sink->async_session_create) { | ||
if (sink->session_thread) pthread_join(sink->session_thread, NULL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to deallocate GstMtlSt40pTxThreadData here, after join(), so as not to split the responsibility for memory control between 2 threads, but your way is valid too.
pthread_create(&sink->session_thread, NULL, | ||
gst_mtl_st40p_tx_session_create_thread, thread_data); | ||
} else { | ||
ret = gst_mtl_st40p_tx_session_create(sink); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you know how much later GST_EVENT_STREAM_START is send after gst_mtl_st40p_tx_start() was called? Are we ok with introducing this delay to the case when async_session_create == false?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we absolutly are not
I was under the impression that this signal is being "sent" much faster, it is noooot after the packets starts flowing its being sent
i though that leaving this in signals would be fine but i don't think so no more will move him
Add memory error handling in Gstreamer for mallocs in our Gstreamer plugins. Add error handling for pthread_create and pthread_init
Introduce async session creation for the st40p
into GStreamer plugin.
Unlike the st30p and st20p plugins,
this implementation uses the START signal instead
of the capabilities negotiation signal,
as the st40p plugin accepts all caps.