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

expose libwebrtc's ProhibitLibsrtpInitialization #477

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions webrtc-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ fn main() {
"src/yuv_helper.rs",
"src/audio_resampler.rs",
"src/android.rs",
"src/prohibit_libsrtp_initialization.rs",
]);

builder.files(&[
Expand All @@ -73,6 +74,7 @@ fn main() {
"src/audio_resampler.cpp",
"src/frame_cryptor.cpp",
"src/global_task_queue.cpp",
"src/prohibit_libsrtp_initialization.cpp",
]);

let webrtc_dir = webrtc_sys_build::webrtc_dir();
Expand Down
21 changes: 21 additions & 0 deletions webrtc-sys/include/livekit/prohibit_libsrtp_initialization.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Copyright 2023 LiveKit
*
* Licensed under the Apache License, Version 2.0 (the “License”);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an “AS IS” BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#pragma once

namespace livekit {
void ProhibitLibsrtpInitialization();
}
1 change: 1 addition & 0 deletions webrtc-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ pub mod media_stream;
pub mod media_stream_track;
pub mod peer_connection;
pub mod peer_connection_factory;
pub mod prohibit_libsrtp_initialization;
pub mod rtc_error;
pub mod rtp_parameters;
pub mod rtp_receiver;
Expand Down
23 changes: 23 additions & 0 deletions webrtc-sys/src/prohibit_libsrtp_initialization.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright 2023 LiveKit
*
* Licensed under the Apache License, Version 2.0 (the “License”);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an “AS IS” BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#include "pc/srtp_session.h"

namespace livekit {
void ProhibitLibsrtpInitialization() {
cricket::ProhibitLibsrtpInitialization();
}
}
22 changes: 22 additions & 0 deletions webrtc-sys/src/prohibit_libsrtp_initialization.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright 2023 LiveKit, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#[cxx::bridge(namespace = "livekit")]
pub mod ffi {
unsafe extern "C++" {
include!("livekit/prohibit_libsrtp_initialization.h");

fn ProhibitLibsrtpInitialization();
}
}
Loading