-
Notifications
You must be signed in to change notification settings - Fork 2
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
gst.wasm: fix g_list_deep_copy GCopyFunc signature mismatch #46
base: wasm-main-function-pointer
Are you sure you want to change the base?
Conversation
532eb2e
to
d28311d
Compare
This PR must point to a feature branch of https://github.com/fluendo/gst.wasm/blob/main/guw/gstreamer.gst.wasm.toml |
This should target wasm-main-function-pointer, IMO |
@@ -3633,7 +3638,7 @@ gst_element_get_contexts (GstElement * element) | |||
g_return_val_if_fail (GST_IS_ELEMENT (element), NULL); | |||
|
|||
GST_OBJECT_LOCK (element); | |||
ret = g_list_copy_deep (element->contexts, (GCopyFunc) gst_context_ref, NULL); | |||
ret = g_list_copy_deep (element->contexts, gst_context_gcopy_proxy, 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.
What do you think about creating a function in gstcontext.c/.h named gst_context_ref_with_data?
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.
Ready to agree with any of the ways, but I think this might bring problems at the moment of upstreaming, since it would be a new API, and new API also needs documentation, bindings generated, etc.
Maybe we could create a private header like gstemscripten.h or put into gstcompat.h macro like
#define GST_GCOPY(func) gst_gcopy_with_##func
#define GST_DEFINE_GCOPY_WITH(func) \
static gpointer \
gst_gcopy_with_##func (gconstpointer src, gpointer data) { \
return func (src); \
}
GST_DEFINE_GCOPY(gst_context_ref);
GST_DEFINE_GCOPY(gst_buffer_ref);
GST_DEFINE_GCOPY(g_strdup);
...
so the code in this file would be
ret = g_list_copy_deep (element->contexts, GST_GCOPY(gst_context_ref), 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 like the idea (cc @turran). Should we do it on this PR, @aslobodeniuk ?
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 think not here, otherwise we have to fix several stuff. So I just approve.
cda9bb2
to
79d71ae
Compare
Wrong target branch. Watch out! |
d28311d
to
406bcfe
Compare
406bcfe
to
0c631cd
Compare
No description provided.