Skip to content

Commit

Permalink
disable dropping frame
Browse files Browse the repository at this point in the history
  • Loading branch information
mpromonet committed Apr 5, 2021
1 parent 3ab790a commit c71f6e0
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"configurations": [
{
"includePath": [
"${workspaceFolder}/**",
"/${workspaceFolder}/../webrtc/src"
],
"intelliSenseMode": "linux-gcc-x64",
"compilerPath": "/usr/bin/gcc",
"cStandard": "gnu11",
"cppStandard": "gnu++14"
}
],
"version": 4
}
2 changes: 1 addition & 1 deletion inc/NullEncoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class NullEncoder : public webrtc::VideoEncoder {
return WEBRTC_VIDEO_CODEC_OK;
}
void SetRates(const RateControlParameters& parameters) override {
RTC_LOG(LS_WARNING) << "SetRates() " << parameters.target_bitrate.ToString() << " " << parameters.bitrate.ToString() << " " << parameters.bandwidth_allocation.kbps() << " " << parameters.framerate_fps;
RTC_LOG(LS_VERBOSE) << "SetRates() " << parameters.target_bitrate.ToString() << " " << parameters.bitrate.ToString() << " " << parameters.bandwidth_allocation.kbps() << " " << parameters.framerate_fps;
}

int32_t Encode(const webrtc::VideoFrame& frame, const std::vector<webrtc::VideoFrameType>* frame_types) override {
Expand Down
5 changes: 5 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#include "p2p/base/basic_packet_socket_factory.h"
#include "p2p/base/turn_server.h"

#include "system_wrappers/include/field_trial.h"

#include "PeerConnectionManager.h"
#include "HttpServerRequestHandler.h"

Expand Down Expand Up @@ -189,6 +191,9 @@ int main(int argc, char* argv[])
iceServerList.push_back(std::string("turn:")+turnurl);
}

// init trials fields
webrtc::field_trial::InitFieldTrialsFromString("WebRTC-FrameDropper/Disabled/");

webRtcServer = new PeerConnectionManager(iceServerList, config["urls"], audioLayer, publishFilter, localWebrtcUdpPortRange, useNullCodec);
if (!webRtcServer->InitializePeerConnection())
{
Expand Down

0 comments on commit c71f6e0

Please sign in to comment.