Skip to content

Commit ade40de

Browse files
committed
update webrtc sdk
1 parent 9a90421 commit ade40de

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

.github/workflows/cpp-macos.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ jobs:
1515
- run: git fetch --prune --unshallow --tags
1616

1717
- name: pkg
18-
run: |
19-
brew install p7zip openssl rtmpdump && brew link --force openssl
18+
run: brew install p7zip openssl rtmpdump && brew link --force openssl
2019

2120
- name: depot_tools
2221
run: |

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ project (webrtc-streamer)
44
set (WEBRTCROOT "${CMAKE_CURRENT_SOURCE_DIR}/../webrtc" CACHE STRING "WEBRTC root directory")
55
set (WEBRTCDESKTOPCAPTURE "ON" CACHE STRING "WEBRTC Desktop capture")
66
set (WEBRTCCHROMEBRANDED "ON" CACHE STRING "WEBRTC Chrome branded")
7-
set (WEBRTCVERSION "a02f9fcedaf3ec73b05cc79c9e645a0ed0cceab0" CACHE STRING "WEBRTC version")
7+
set (WEBRTCVERSION "cc24329a5ad386e2736a476f3fc72995cdb2bae3" CACHE STRING "WEBRTC version")
88
set (WEBRTCSTREAMERRESSOURCE "./html" CACHE STRING "WEBRTC ressource directory")
99

1010
if(NOT CMAKE_BUILD_TYPE)
@@ -200,7 +200,7 @@ MESSAGE("WEBRTCSTREAMERRESSOURCE = ${WEBRTCSTREAMERRESSOURCE}")
200200
FILE(GLOB_RECURSE WEBRTJSONCPPCOBJS ${WEBRTCOBJS}/third_party/jsoncpp/jsoncpp/*${CMAKE_C_OUTPUT_EXTENSION} ${WEBRTCOBJS}/rtc_base/rtc_json/*${CMAKE_C_OUTPUT_EXTENSION})
201201
FILE(GLOB_RECURSE WEBRTP2POBJ ${WEBRTCOBJS}/p2p/p2p_server_utils/*${CMAKE_C_OUTPUT_EXTENSION})
202202
SET (WEBRTCEXTRAOBJS ${WEBRTJSONCPPCOBJS} ${WEBRTP2POBJ} ${WEBRTCCOMOBJ})
203-
FILE(GLOB SOURCE src/*.cpp ${WEBRTCROOT}/src/rtc_base/third_party/base64/base64.cc)
203+
FILE(GLOB SOURCE src/*.cpp)
204204
add_executable (${CMAKE_PROJECT_NAME} ${SOURCE} ${WEBRTCEXTRAOBJS})
205205
target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE inc)
206206

inc/VideoDecoder.h

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include "api/environment/environment_factory.h"
1818
#include "modules/video_coding/include/video_error_codes.h"
1919
#include "modules/video_coding/h264_sprop_parameter_sets.h"
20-
#include "rtc_base/third_party/base64/base64.h"
20+
#include "rtc_base/base64.h"
2121

2222
#include "SessionSink.h"
2323
#include "VideoScaler.h"
@@ -67,8 +67,14 @@ class VideoDecoder : public webrtc::VideoSourceInterface<webrtc::VideoFrame>, pu
6767
{
6868
value.erase(pos);
6969
}
70-
webrtc::Base64::DecodeFromArray(value.data(), value.size(), webrtc::Base64::DO_STRICT, &binary, nullptr);
71-
binary.insert(binary.begin(), H26X_marker, H26X_marker+sizeof(H26X_marker));
70+
std::optional<std::string> binaryResult = webrtc::Base64Decode(value);
71+
if (!binaryResult) {
72+
RTC_LOG(LS_ERROR) << "Cannot decode:" << value;
73+
} else {
74+
const std::string& decodedString = binaryResult.value();
75+
binary.assign(decodedString.begin(), decodedString.end());
76+
binary.insert(binary.begin(), H26X_marker, H26X_marker+sizeof(H26X_marker));
77+
}
7278

7379
return binary;
7480
}

0 commit comments

Comments
 (0)