Skip to content

Commit

Permalink
Fix build for m104
Browse files Browse the repository at this point in the history
  • Loading branch information
davidliu committed Jul 21, 2022
1 parent 50a3302 commit a828846
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sdk/objc/api/peerconnection/RTCPeerConnectionFactory.mm
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ - (instancetype)init {
nativeAudioDecoderFactory:webrtc::CreateBuiltinAudioDecoderFactory()
nativeVideoEncoderFactory:std::move(native_encoder_factory)
nativeVideoDecoderFactory:std::move(native_decoder_factory)
audioDeviceModule:[self audioDeviceModule:bypassVoiceProcessing]
audioDeviceModule:[self audioDeviceModule:bypassVoiceProcessing].get()
audioProcessingModule:nullptr];
#endif
}
Expand Down
16 changes: 16 additions & 0 deletions video/frame_buffer_proxy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ class FrameBuffer2Proxy : public FrameBufferProxy {
});
}

void StartOnWorker() override {
RTC_DCHECK_RUN_ON(&worker_sequence_checker_);
decode_queue_->PostTask([this] {
frame_buffer_.Start();
decode_safety_->SetAlive();
});
}

void SetProtectionMode(VCMVideoProtection protection_mode) override {
RTC_DCHECK_RUN_ON(&worker_sequence_checker_);
frame_buffer_.SetProtectionMode(kProtectionNackFEC);
Expand Down Expand Up @@ -234,6 +242,14 @@ class FrameBuffer3Proxy : public FrameBufferProxy {
});
}

void StartOnWorker() override {
RTC_DCHECK_RUN_ON(&worker_sequence_checker_);
decode_queue_->PostTask([this] {
RTC_DCHECK_RUN_ON(decode_queue_);
decode_safety_->SetAlive();
});
}

void SetProtectionMode(VCMVideoProtection protection_mode) override {
RTC_DCHECK_RUN_ON(&worker_sequence_checker_);
protection_mode_ = kProtectionNackFEC;
Expand Down
1 change: 1 addition & 0 deletions video/frame_buffer_proxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class FrameBufferProxy {

// Run on the worker thread.
virtual void StopOnWorker() = 0;
virtual void StartOnWorker() = 0;
virtual void SetProtectionMode(VCMVideoProtection protection_mode) = 0;
virtual void Clear() = 0;
virtual absl::optional<int64_t> InsertFrame(
Expand Down
2 changes: 1 addition & 1 deletion video/video_receive_stream2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ void VideoReceiveStream2::Start() {
return;
}

frame_buffer_->Start();
frame_buffer_->StartOnWorker();
const bool protected_by_fec = config_.rtp.protected_by_flexfec ||
rtp_video_stream_receiver_.IsUlpfecEnabled();

Expand Down

0 comments on commit a828846

Please sign in to comment.