Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit e161a86

Browse files
authored
Merge pull request #36 from daijh/rtcp-fov-fb
Implement rtcp fov feedback
2 parents 97bad84 + c608ebc commit e161a86

File tree

6 files changed

+641
-3
lines changed

6 files changed

+641
-3
lines changed

WebRTC-Sample/owt-linux-player/build_webrtc_linux_client_sdk.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ ROOT=`pwd`/webrtc_linux_client_sdk
44
BUILD=${ROOT}/Build
55
PREFIX=${ROOT}/release
66
DEPS=${BUILD}/deps
7+
PATCHES=${ROOT}/../patches
78

89
install_dependencies() {
910
sudo -E apt-get update
@@ -108,7 +109,11 @@ install_owt_client_native () {
108109
sed -i 's/2fa91a1fc71b324ab46483777d7e6da90c57d3c6/28f5c7fd13db33267dcd7ad18851e9750c59d69a/g' DEPS
109110

110111
gclient sync --no-history
112+
cd third_party/webrtc
113+
patch -p1 < ${PATCHES}/webrtc-Implement-FOV-RTCP-feedback.patch
114+
cd -
111115

116+
patch -p1 < ${PATCHES}/sdk-Implement-FOV-RTCP-feedback.patch
112117
sed -i 's/rtc_use_h264=true/rtc_use_h264=false/g' scripts/build_linux.py
113118

114119
python scripts/build_linux.py --gn_gen --sdk --arch x64 --ssl_root ${PREFIX} --scheme release --output_path "out"
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
From 2dbf35985d047749b0396d960864f21240d1e2b0 Mon Sep 17 00:00:00 2001
2+
From: Jianhui Dai <[email protected]>
3+
Date: Wed, 30 Sep 2020 13:08:08 +0800
4+
Subject: [PATCH] Implement FOV RTCP feedback
5+
6+
---
7+
.../sdk/base/customizedvideodecoderproxy.cc | 21 ++++++++++++++++++-
8+
.../cpp/owt/base/videodecoderinterface.h | 10 +++++++++
9+
2 files changed, 30 insertions(+), 1 deletion(-)
10+
11+
diff --git a/talk/owt/sdk/base/customizedvideodecoderproxy.cc b/talk/owt/sdk/base/customizedvideodecoderproxy.cc
12+
index 6fef4ee..f2ba857 100644
13+
--- a/talk/owt/sdk/base/customizedvideodecoderproxy.cc
14+
+++ b/talk/owt/sdk/base/customizedvideodecoderproxy.cc
15+
@@ -9,7 +9,9 @@ namespace base {
16+
17+
CustomizedVideoDecoderProxy::CustomizedVideoDecoderProxy(VideoCodecType type,
18+
VideoDecoderInterface* external_video_decoder)
19+
- : codec_type_(type), decoded_image_callback_(nullptr), external_decoder_(external_video_decoder) {}
20+
+ : codec_type_(type), decoded_image_callback_(nullptr), external_decoder_(external_video_decoder) {
21+
+ external_decoder_->SetCustomizedVideoDecoderProxy(this);
22+
+ }
23+
24+
CustomizedVideoDecoderProxy::~CustomizedVideoDecoderProxy() {
25+
if (external_decoder_) {
26+
@@ -88,5 +90,22 @@ CustomizedVideoDecoderProxy::Create(VideoCodecType type,
27+
VideoDecoderInterface* external_video_decoder) {
28+
return absl::make_unique<CustomizedVideoDecoderProxy>(type, external_video_decoder);
29+
}
30+
+
31+
+void VideoDecoderInterface::SetCustomizedVideoDecoderProxy(void *customized_video_decoder_proxy)
32+
+{
33+
+ customized_video_decoder_proxy_ = customized_video_decoder_proxy;
34+
+}
35+
+
36+
+void *VideoDecoderInterface::GetCustomizedVideoDecoderProxy(void)
37+
+{
38+
+ return customized_video_decoder_proxy_;
39+
+}
40+
+
41+
+void VideoDecoderInterface::SendFOVFeedback(uint16_t yaw, uint16_t pitch)
42+
+{
43+
+ if (customized_video_decoder_proxy_)
44+
+ static_cast<CustomizedVideoDecoderProxy *>(customized_video_decoder_proxy_)->SendFOVFeedback(yaw, pitch);
45+
+}
46+
+
47+
}
48+
}
49+
diff --git a/talk/owt/sdk/include/cpp/owt/base/videodecoderinterface.h b/talk/owt/sdk/include/cpp/owt/base/videodecoderinterface.h
50+
index dced0fe..02cc35b 100644
51+
--- a/talk/owt/sdk/include/cpp/owt/base/videodecoderinterface.h
52+
+++ b/talk/owt/sdk/include/cpp/owt/base/videodecoderinterface.h
53+
@@ -26,6 +26,8 @@ struct VideoEncodedFrame {
54+
*/
55+
class VideoDecoderInterface {
56+
public:
57+
+ VideoDecoderInterface() : customized_video_decoder_proxy_(nullptr) {}
58+
+
59+
/**
60+
@brief Destructor
61+
*/
62+
@@ -51,6 +53,14 @@ class VideoDecoderInterface {
63+
@brief This function generates the customized decoder for each peer connection
64+
*/
65+
virtual VideoDecoderInterface* Copy() = 0;
66+
+
67+
+ void SetCustomizedVideoDecoderProxy(void *customized_video_decoder_proxy);
68+
+ void *GetCustomizedVideoDecoderProxy(void);
69+
+
70+
+ void SendFOVFeedback(uint16_t yaw, uint16_t pitch);
71+
+
72+
+ private:
73+
+ void *customized_video_decoder_proxy_;
74+
};
75+
}
76+
}
77+
--
78+
2.17.1
79+

0 commit comments

Comments
 (0)