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

Fix warnings with GCC on Ubuntu 20.04 #149

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
27 changes: 20 additions & 7 deletions .github/workflows/cpp-python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-22.04, macos-12]
python-version: ["3.8", "3.9", "3.10"]
build-type: [Debug, Release]
os: [macos-13]
# os: [ubuntu-20.04, ubuntu-22.04, macos-13]
python-version: ["3.10"]
# python-version: ["3.8", "3.9", "3.10"]
build-type: [Debug]
# build-type: [Debug, Release]
enable-gstreamer: [ON, OFF]
enable-system-opencv: [OFF]
exclude:
- os: macos-11
enable-gstreamer: ON
- os: macos-12
- os: macos-13
enable-gstreamer: ON

steps:
Expand Down Expand Up @@ -143,7 +144,19 @@ jobs:
-DPython_ROOT_DIR="${{ env.pythonLocation }}" \
-DOPENTERA_WEBRTC_ENABLE_GSTREAMER=${{ matrix.enable-gstreamer }} \
-DOPENTERA_WEBRTC_USE_SYSTEM_OPENCV=${{ matrix.enable-system-opencv }}
make

file opentera-webrtc-native-client/3rdParty/webrtc_native/webrtc-native-build-6422.8505a9.224-Debug/lib/libboringssl.a
file opentera-webrtc-native-client/3rdParty/webrtc_native/webrtc-native-build-6422.8505a9.224-Debug/lib/libyuv_internal.a

for file in opentera-webrtc-native-client/3rdParty/webrtc_native/webrtc-native-build-6422.8505a9.224-Debug/lib/libboringssl/*; do
file "$file"
done

for file in opentera-webrtc-native-client/3rdParty/webrtc_native/webrtc-native-build-6422.8505a9.224-Debug/lib/libyuv_internal/*; do
file "$file"
done

VERBOSE=1 make
make install

- name: Python native_client build cleanup
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.5
1.2.6
1 change: 1 addition & 0 deletions opentera-webrtc-native-client/3rdParty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ set(OPENSSL_INCLUDE_DIR ${boringssl_INCLUDE})
set(OPENSSL_LIBRARIES ${boringssl_LIBRARY})
add_subdirectory(IXWebSocket)
set_property(TARGET ixwebsocket PROPERTY CXX_STANDARD 17)
target_compile_options(ixwebsocket PRIVATE -w)

if (OPENTERA_WEBRTC_ENABLE_TESTS)
add_subdirectory(googletest)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ py::object opentera::jsonToPyObject(const nlohmann::json& json)
}
return dict;
}

case nlohmann::detail::value_t::discarded:
return py::none();
}

return py::none();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,22 @@ void PeerConnectionHandler::OnIceCandidate(const webrtc::IceCandidateInterface*
m_signalingClient.sendIceCandidate(candidate->sdp_mid(), candidate->sdp_mline_index(), sdp, m_peerClient.id());
}

void PeerConnectionHandler::OnDataChannel(rtc::scoped_refptr<webrtc::DataChannelInterface> dataChannel) {}
void PeerConnectionHandler::OnDataChannel([[maybe_unused]] rtc::scoped_refptr<webrtc::DataChannelInterface> dataChannel)
{
}

void PeerConnectionHandler::OnTrack(rtc::scoped_refptr<webrtc::RtpTransceiverInterface> transceiver) {}
void PeerConnectionHandler::OnTrack([[maybe_unused]] rtc::scoped_refptr<webrtc::RtpTransceiverInterface> transceiver) {}

void PeerConnectionHandler::OnRemoveTrack(rtc::scoped_refptr<webrtc::RtpReceiverInterface> receiver) {}
void PeerConnectionHandler::OnRemoveTrack([[maybe_unused]] rtc::scoped_refptr<webrtc::RtpReceiverInterface> receiver) {}

void PeerConnectionHandler::OnSignalingChange(webrtc::PeerConnectionInterface::SignalingState newState) {}
void PeerConnectionHandler::OnSignalingChange([[maybe_unused]] webrtc::PeerConnectionInterface::SignalingState newState)
{
}

void PeerConnectionHandler::OnIceGatheringChange(webrtc::PeerConnectionInterface::IceGatheringState newState) {}
void PeerConnectionHandler::OnIceGatheringChange(
[[maybe_unused]] webrtc::PeerConnectionInterface::IceGatheringState newState)
{
}

void PeerConnectionHandler::OnCreateSessionDescriptionObserverSuccess(webrtc::SessionDescriptionInterface* desc)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ StreamPeerConnectionHandler::StreamPeerConnectionHandler(
move(onClientConnected),
move(onClientDisconnected),
move(onClientConnectionFailed)),
m_offerToReceiveAudio(hasOnMixedAudioFrameReceivedCallback || onAudioFrameReceived),
m_offerToReceiveVideo(static_cast<bool>(onVideoFrameReceived)),
m_offerToReceiveAudio(hasOnMixedAudioFrameReceivedCallback || onAudioFrameReceived),
m_videoTrack(move(videoTrack)),
m_audioTrack(move(audioTrack)),
m_onAddRemoteStream(move(onAddRemoteStream)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void OpenteraAudioDeviceModule::sendFrame(
newMicLevel); // New mic volume (not used)
}

int32_t OpenteraAudioDeviceModule::ActiveAudioLayer(AudioLayer* audioLayer) const
int32_t OpenteraAudioDeviceModule::ActiveAudioLayer([[maybe_unused]] AudioLayer* audioLayer) const
{
return 0;
}
Expand Down Expand Up @@ -113,7 +113,7 @@ int16_t OpenteraAudioDeviceModule::RecordingDevices()
}

int32_t OpenteraAudioDeviceModule::PlayoutDeviceName(
uint16_t index,
[[maybe_unused]] uint16_t index,
char name[webrtc::kAdmMaxDeviceNameSize],
char guid[webrtc::kAdmMaxGuidSize])
{
Expand All @@ -123,7 +123,7 @@ int32_t OpenteraAudioDeviceModule::PlayoutDeviceName(
}

int32_t OpenteraAudioDeviceModule::RecordingDeviceName(
uint16_t index,
[[maybe_unused]] uint16_t index,
char name[webrtc::kAdmMaxDeviceNameSize],
char guid[webrtc::kAdmMaxGuidSize])
{
Expand All @@ -132,7 +132,7 @@ int32_t OpenteraAudioDeviceModule::RecordingDeviceName(
return 0;
}

int32_t OpenteraAudioDeviceModule::SetPlayoutDevice(uint16_t index)
int32_t OpenteraAudioDeviceModule::SetPlayoutDevice([[maybe_unused]] uint16_t index)
{
if (m_isPlayoutInitialized)
{
Expand All @@ -141,7 +141,7 @@ int32_t OpenteraAudioDeviceModule::SetPlayoutDevice(uint16_t index)
return 0;
}

int32_t OpenteraAudioDeviceModule::SetPlayoutDevice(WindowsDeviceType device)
int32_t OpenteraAudioDeviceModule::SetPlayoutDevice([[maybe_unused]] WindowsDeviceType device)
{
if (m_isPlayoutInitialized)
{
Expand All @@ -151,7 +151,7 @@ int32_t OpenteraAudioDeviceModule::SetPlayoutDevice(WindowsDeviceType device)
return 0;
}

int32_t OpenteraAudioDeviceModule::SetRecordingDevice(uint16_t index)
int32_t OpenteraAudioDeviceModule::SetRecordingDevice([[maybe_unused]] uint16_t index)
{
if (m_isRecordingInitialized)
{
Expand All @@ -161,7 +161,7 @@ int32_t OpenteraAudioDeviceModule::SetRecordingDevice(uint16_t index)
return 0;
}

int32_t OpenteraAudioDeviceModule::SetRecordingDevice(WindowsDeviceType device)
int32_t OpenteraAudioDeviceModule::SetRecordingDevice([[maybe_unused]] WindowsDeviceType device)
{
if (m_isRecordingInitialized)
{
Expand Down Expand Up @@ -277,22 +277,22 @@ int32_t OpenteraAudioDeviceModule::SpeakerVolumeIsAvailable(bool* available)
return 0;
}

int32_t OpenteraAudioDeviceModule::SetSpeakerVolume(uint32_t volume)
int32_t OpenteraAudioDeviceModule::SetSpeakerVolume([[maybe_unused]] uint32_t volume)
{
return -1;
}

int32_t OpenteraAudioDeviceModule::SpeakerVolume(uint32_t* volume) const
int32_t OpenteraAudioDeviceModule::SpeakerVolume([[maybe_unused]] uint32_t* volume) const
{
return -1;
}

int32_t OpenteraAudioDeviceModule::MaxSpeakerVolume(uint32_t* maxVolume) const
int32_t OpenteraAudioDeviceModule::MaxSpeakerVolume([[maybe_unused]] uint32_t* maxVolume) const
{
return -1;
}

int32_t OpenteraAudioDeviceModule::MinSpeakerVolume(uint32_t* minVolume) const
int32_t OpenteraAudioDeviceModule::MinSpeakerVolume([[maybe_unused]] uint32_t* minVolume) const
{
return -1;
}
Expand All @@ -303,22 +303,22 @@ int32_t OpenteraAudioDeviceModule::MicrophoneVolumeIsAvailable(bool* available)
return 0;
}

int32_t OpenteraAudioDeviceModule::SetMicrophoneVolume(uint32_t volume)
int32_t OpenteraAudioDeviceModule::SetMicrophoneVolume([[maybe_unused]] uint32_t volume)
{
return -1;
}

int32_t OpenteraAudioDeviceModule::MicrophoneVolume(uint32_t* volume) const
int32_t OpenteraAudioDeviceModule::MicrophoneVolume([[maybe_unused]] uint32_t* volume) const
{
return -1;
}

int32_t OpenteraAudioDeviceModule::MaxMicrophoneVolume(uint32_t* maxVolume) const
int32_t OpenteraAudioDeviceModule::MaxMicrophoneVolume([[maybe_unused]] uint32_t* maxVolume) const
{
return -1;
}

int32_t OpenteraAudioDeviceModule::MinMicrophoneVolume(uint32_t* minVolume) const
int32_t OpenteraAudioDeviceModule::MinMicrophoneVolume([[maybe_unused]] uint32_t* minVolume) const
{
return -1;
}
Expand All @@ -329,12 +329,12 @@ int32_t OpenteraAudioDeviceModule::SpeakerMuteIsAvailable(bool* available)
return 0;
}

int32_t OpenteraAudioDeviceModule::SetSpeakerMute(bool enable)
int32_t OpenteraAudioDeviceModule::SetSpeakerMute([[maybe_unused]] bool enable)
{
return -1;
}

int32_t OpenteraAudioDeviceModule::SpeakerMute(bool* enabled) const
int32_t OpenteraAudioDeviceModule::SpeakerMute([[maybe_unused]] bool* enabled) const
{
return -1;
}
Expand All @@ -345,12 +345,12 @@ int32_t OpenteraAudioDeviceModule::MicrophoneMuteIsAvailable(bool* available)
return 0;
}

int32_t OpenteraAudioDeviceModule::SetMicrophoneMute(bool enable)
int32_t OpenteraAudioDeviceModule::SetMicrophoneMute([[maybe_unused]] bool enable)
{
return -1;
}

int32_t OpenteraAudioDeviceModule::MicrophoneMute(bool* enabled) const
int32_t OpenteraAudioDeviceModule::MicrophoneMute([[maybe_unused]] bool* enabled) const
{
return -1;
}
Expand All @@ -361,12 +361,12 @@ int32_t OpenteraAudioDeviceModule::StereoPlayoutIsAvailable(bool* available) con
return 0;
}

int32_t OpenteraAudioDeviceModule::SetStereoPlayout(bool enable)
int32_t OpenteraAudioDeviceModule::SetStereoPlayout([[maybe_unused]] bool enable)
{
return -1;
}

int32_t OpenteraAudioDeviceModule::StereoPlayout(bool* enabled) const
int32_t OpenteraAudioDeviceModule::StereoPlayout([[maybe_unused]] bool* enabled) const
{
return -1;
}
Expand All @@ -377,12 +377,12 @@ int32_t OpenteraAudioDeviceModule::StereoRecordingIsAvailable(bool* available) c
return 0;
}

int32_t OpenteraAudioDeviceModule::SetStereoRecording(bool enable)
int32_t OpenteraAudioDeviceModule::SetStereoRecording([[maybe_unused]] bool enable)
{
return -1;
}

int32_t OpenteraAudioDeviceModule::StereoRecording(bool* enabled) const
int32_t OpenteraAudioDeviceModule::StereoRecording([[maybe_unused]] bool* enabled) const
{
return -1;
}
Expand All @@ -408,17 +408,17 @@ bool OpenteraAudioDeviceModule::BuiltInNSIsAvailable() const
return false;
}

int32_t OpenteraAudioDeviceModule::EnableBuiltInAEC(bool enable)
int32_t OpenteraAudioDeviceModule::EnableBuiltInAEC([[maybe_unused]] bool enable)
{
return -1;
}

int32_t OpenteraAudioDeviceModule::EnableBuiltInAGC(bool enable)
int32_t OpenteraAudioDeviceModule::EnableBuiltInAGC([[maybe_unused]] bool enable)
{
return -1;
}

int32_t OpenteraAudioDeviceModule::EnableBuiltInNS(bool enable)
int32_t OpenteraAudioDeviceModule::EnableBuiltInNS([[maybe_unused]] bool enable)
{
return -1;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ AudioSource::AudioSource(
/**
* Do nothing.
*/
void AudioSource::AddSink(webrtc::AudioTrackSinkInterface* sink) {}
void AudioSource::AddSink([[maybe_unused]] webrtc::AudioTrackSinkInterface* sink) {}

/**
* Do nothing.
*/
void AudioSource::RemoveSink(webrtc::AudioTrackSinkInterface* sink) {}
void AudioSource::RemoveSink([[maybe_unused]] webrtc::AudioTrackSinkInterface* sink) {}

/**
* @brief Indicates if this source is remote
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ unique_ptr<PeerConnectionHandler>
rtc::scoped_refptr<webrtc::VideoTrackInterface> videoTrack = nullptr;
if (m_videoSource != nullptr)
{
videoTrack = m_peerConnectionFactory->CreateVideoTrack("stream_video", m_videoSource.get());
videoTrack = m_peerConnectionFactory->CreateVideoTrack(
rtc::scoped_refptr<webrtc::VideoTrackSourceInterface>(m_videoSource.get()),
"stream_video");
videoTrack->set_enabled(!m_isLocalVideoMuted);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ bool WebrtcClient::getCallAcceptance(const string& id)
}

unique_ptr<PeerConnectionHandler>
WebrtcClient::createConnection(const string& peerId, const Client& peerClient, bool isCaller)
WebrtcClient::createConnection([[maybe_unused]] const string& peerId, const Client& peerClient, bool isCaller)
{
return callSync(
m_internalClientThread.get(),
Expand Down
Loading
Loading