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

g_signal_emit_by_name won't accept correct argument type #110

Closed
maxmcd opened this issue Jun 3, 2018 · 3 comments

Comments

@maxmcd
Copy link
Contributor

commented Jun 3, 2018

This fails with BoolError("Incompatible argument types")

let opus_caps = gst::Caps::from_str(&rtp_caps_opus).unwrap();
webrtc
    .emit("add-transceiver", &[&3i32, &opus_caps])
    .unwrap();

add-transceiver accepts direction and caps.

I've tried a few values for the direction:

gstreamer_webrtc_sys::GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_RECVONLY
&(gstreamer_webrtc_sys::GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_RECVONLY).to_value()
&(gstreamer_webrtc_sys::GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_RECVONLY
    as gstreamer_webrtc_sys::GstWebRTCRTPTransceiverDirection)
    .to_value(),
// etc....

Wondering if I'm missing a way to pass the type.

@maxmcd

This comment has been minimized.

Copy link
Contributor Author

commented Jun 3, 2018

Hmm, this issue also might be better suited on gtk-rs/sys happy to move it over there if that's suggested.

@maxmcd

This comment has been minimized.

Copy link
Contributor Author

commented Jun 4, 2018

fwiw, it sucessfully sets the caps if I simply remove the type check: object.rs#L888

@sdroege sdroege closed this in b6a5686 Jun 4, 2018

@sdroege

This comment has been minimized.

Copy link
Owner

commented Jun 4, 2018

The problem here is that the enum was not included in the bindings. You should now be able to simply use &gst_webrtc::WebRTCRTPTransceiverDirection::Recvonly

charlie-ht added a commit to charlie-ht/gstreamer-rs that referenced this issue Oct 28, 2018
Add various other WebRTC related enums/flags types to the bindings
While they are not used by the types we have, they are used by the
webrtcbin element and are required for setting properties.

Fixes sdroege#110
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.