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

Directly expose WebRTCPeerConnection::create_data_channel() to GDExtension #78237

Merged

Conversation

dsnopek
Copy link
Contributor

@dsnopek dsnopek commented Jun 14, 2023

Due to godot-cpp bug godotengine/godot-cpp#652, rather than directly exposing WebRTCPeerConnection::create_data_channel(), an alternate version which returned an Object * (instead of Ref<T>) was exposed, with a custom create_data_channel() that called it.

Since that bug is now fixed, we can remove the workaround, and directly expose it!

I think this breaks compatibility, but since we're thoroughly breaking GDExtension compatibility for Godot 4.1 anyway, this seems like a good time to change this. :-)

@dsnopek dsnopek added this to the 4.1 milestone Jun 14, 2023
@dsnopek dsnopek requested review from Faless, akien-mga and a team June 14, 2023 18:41
@dsnopek dsnopek requested a review from a team as a code owner June 14, 2023 18:41
@akien-mga akien-mga changed the title Directly expose WebRTCPeerConnection::create_data_channel() to GDExtension Directly expose WebRTCPeerConnection::create_data_channel() to GDExtension Jun 14, 2023
@dsnopek
Copy link
Contributor Author

dsnopek commented Jun 14, 2023

Here's a corresponding PR for webrtc-native to adjust to these changes: godotengine/webrtc-native#101

I tested webrtc-native and this PR using the webrtc_minimal and webrtc_signaling demos in https://github.com/godotengine/godot-demo-projects - it's working great for me!

@dsnopek dsnopek force-pushed the webrtc-gdextension-create-data-channel branch from 19c1d3c to 24136d6 Compare June 14, 2023 18:51
@RedworkDE
Copy link
Member

Validate extension JSON: Error: Field 'classes/WebRTCPeerConnectionExtension/methods/_create_data_channel/return_value': type changed value in new API, from "Object" to "WebRTCDataChannel". needs to be added to misc/extension_api_validation/4.0-stable.expected

@dsnopek dsnopek force-pushed the webrtc-gdextension-create-data-channel branch from 24136d6 to 1b9364b Compare June 14, 2023 19:31
@dsnopek dsnopek requested a review from a team as a code owner June 14, 2023 19:31
@dsnopek
Copy link
Contributor Author

dsnopek commented Jun 14, 2023

@RedworkDE Thanks! Should be fixed in my latest push

@akien-mga akien-mga merged commit fe1aa26 into godotengine:master Jun 15, 2023
@akien-mga
Copy link
Member

Thanks!

@dsnopek dsnopek deleted the webrtc-gdextension-create-data-channel branch July 22, 2024 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants