Skip to content

Commit

Permalink
Merge pull request #48 from shiguredo/feature/update-libwebrtc
Browse files Browse the repository at this point in the history
libwebrtc を m120 にあげる
  • Loading branch information
miosakuma authored Dec 11, 2023
2 parents af93aa3 + 4865a7c commit 3c7a625
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 17 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,11 @@ jobs:
- macos_arm64
- ios
name: Build sora-cpp-sdk for ${{ matrix.name }}
runs-on: macos-12
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- name: Select Xcode 14.3.1
run: sudo xcode-select --switch /Applications/Xcode_14.3.1.app/Contents/Developer
- name: Env to output
run: |
echo "user=`users`" >> $GITHUB_OUTPUT
Expand Down
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@

## develop

- [UPDATE] WebRTC を `m120.6099.1.1` に上げる
- `m120.6099.1.1` より x86 シミュレータビルドがなくなったため、CI で ios の test ビルドを行わなくした
- @melpon @enm10k @torikizi @miosakuma

## 2023.16.1 (2023-12-02)

- [FIX] WebRTC を `m119.6045.2.2` に上げる
Expand Down
4 changes: 2 additions & 2 deletions VERSION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
SORA_CPP_SDK_VERSION=2023.16.1
WEBRTC_BUILD_VERSION=m119.6045.2.2
WEBRTC_BUILD_VERSION=m120.6099.1.1
BOOST_VERSION=1.83.0
CMAKE_VERSION=3.27.7
BAZEL_VERSION=5.3.2
BAZEL_VERSION=5.4.1
LYRA_VERSION=1.3.0
LYRA_COMPATIBLE_VERSION=1.3.0
CUDA_VERSION=10.2.89-1
Expand Down
14 changes: 8 additions & 6 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -1640,6 +1640,7 @@ def main():
target = 'x86_64-apple-darwin' if platform.target.arch == 'x86_64' else 'aarch64-apple-darwin'
cmake_args.append(f'-DCMAKE_SYSTEM_PROCESSOR={platform.target.arch}')
cmake_args.append(f'-DCMAKE_OSX_ARCHITECTURES={platform.target.arch}')
cmake_args.append("-DCMAKE_OSX_DEPLOYMENT_TARGET=10.11")
cmake_args.append(f'-DCMAKE_C_COMPILER_TARGET={target}')
cmake_args.append(f'-DCMAKE_CXX_COMPILER_TARGET={target}')
cmake_args.append(f'-DCMAKE_OBJCXX_COMPILER_TARGET={target}')
Expand Down Expand Up @@ -1734,12 +1735,13 @@ def main():
shutil.copytree(model_src, model_dst)

# iOS の場合は事前に用意したプロジェクトをビルドする
cmd(['xcodebuild', 'build',
'-project', 'test/ios/hello.xcodeproj',
'-target', 'hello',
'-arch', 'x86_64',
'-sdk', 'iphonesimulator',
'-configuration', 'Release'])
# → libwebrtc.a から x64 のビルドが無くなったのでとりあえずビルドを諦める
# cmd(['xcodebuild', 'build',
# '-project', 'test/ios/hello.xcodeproj',
# '-target', 'hello',
# '-arch', 'x86_64',
# '-sdk', 'iphonesimulator',
# '-configuration', 'Release'])
# こっちは signing が必要になるのでやらない
# cmd(['xcodebuild', 'build',
# '-project', 'test/ios/hello.xcodeproj',
Expand Down
6 changes: 3 additions & 3 deletions src/hwenc_jetson/jetson_video_decoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,16 +125,16 @@ int32_t JetsonVideoDecoder::Decode(const webrtc::EncodedImage& input_image,

v4l2_buf.flags |= V4L2_BUF_FLAG_TIMESTAMP_COPY;
v4l2_buf.timestamp.tv_sec =
input_image.Timestamp() / rtc::kNumMicrosecsPerSec;
input_image.RtpTimestamp() / rtc::kNumMicrosecsPerSec;
v4l2_buf.timestamp.tv_usec =
input_image.Timestamp() % rtc::kNumMicrosecsPerSec;
input_image.RtpTimestamp() % rtc::kNumMicrosecsPerSec;

if (decoder_->output_plane.qBuffer(v4l2_buf, nullptr) < 0) {
RTC_LOG(LS_ERROR) << "Failed to qBuffer at encoder output_plane";
return WEBRTC_VIDEO_CODEC_ERROR;
}

RTC_LOG(LS_INFO) << __FUNCTION__ << " timestamp:" << input_image.Timestamp()
RTC_LOG(LS_INFO) << __FUNCTION__ << " timestamp:" << input_image.RtpTimestamp()
<< " bytesused:" << buffer->planes[0].bytesused;
return WEBRTC_VIDEO_CODEC_OK;
}
Expand Down
2 changes: 1 addition & 1 deletion src/hwenc_jetson/jetson_video_encoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ int32_t JetsonVideoEncoder::SendFrame(
return WEBRTC_VIDEO_CODEC_UNINITIALIZED;
}

encoded_image_.SetTimestamp(params->timestamp_rtp);
encoded_image_.SetRtpTimestamp(params->timestamp_rtp);
encoded_image_.SetColorSpace(params->color_space);
encoded_image_._encodedWidth = params->width;
encoded_image_._encodedHeight = params->height;
Expand Down
2 changes: 1 addition & 1 deletion src/hwenc_nvcodec/nvcodec_h264_encoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ int32_t NvCodecH264EncoderImpl::Encode(
? webrtc::VideoContentType::SCREENSHARE
: webrtc::VideoContentType::UNSPECIFIED;
encoded_image_.timing_.flags = webrtc::VideoSendTiming::kInvalid;
encoded_image_.SetTimestamp(frame.timestamp());
encoded_image_.SetRtpTimestamp(frame.timestamp());
encoded_image_.ntp_time_ms_ = frame.ntp_time_ms();
encoded_image_.capture_time_ms_ = frame.render_time_ms();
encoded_image_.rotation_ = frame.rotation();
Expand Down
2 changes: 1 addition & 1 deletion src/hwenc_nvcodec/nvcodec_video_decoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ int32_t NvCodecVideoDecoder::Decode(const webrtc::EncodedImage& input_image,
output_info_ = true;
}

uint32_t pts = input_image.Timestamp();
uint32_t pts = input_image.RtpTimestamp();

for (int i = 0; i < frame_count; i++) {
auto* frame = decoder_->GetLockedFrame();
Expand Down
2 changes: 1 addition & 1 deletion src/hwenc_vpl/vpl_video_decoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ int32_t VplVideoDecoderImpl::Decode(const webrtc::EncodedImage& input_image,
}

// これだとキューイングしたデータとずれるので、本当は surface と一緒に保存して利用するべき
uint64_t pts = input_image.Timestamp();
uint64_t pts = input_image.RtpTimestamp();

mfxStatus sts;
mfxSyncPoint syncp;
Expand Down
2 changes: 1 addition & 1 deletion src/hwenc_vpl/vpl_video_encoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ int32_t VplVideoEncoderImpl::Encode(
? webrtc::VideoContentType::SCREENSHARE
: webrtc::VideoContentType::UNSPECIFIED;
encoded_image_.timing_.flags = webrtc::VideoSendTiming::kInvalid;
encoded_image_.SetTimestamp(frame.timestamp());
encoded_image_.SetRtpTimestamp(frame.timestamp());
encoded_image_.ntp_time_ms_ = frame.ntp_time_ms();
encoded_image_.capture_time_ms_ = frame.render_time_ms();
encoded_image_.rotation_ = frame.rotation();
Expand Down

0 comments on commit 3c7a625

Please sign in to comment.