Remove usage of webrtc::RTPFragmentationHeader from objc wrappers
Bug: webrtc:6471 Change-Id: Ibe4ce280a9f1aea53016f131d1d235337fe71a4f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182502 Reviewed-by: Kári Helgason <kthelgason@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/master@{#32022}
This commit is contained in:
committed by
Commit Bot
parent
c2302e8e2e
commit
090049c546
@ -19,7 +19,6 @@
|
||||
#endif
|
||||
#import "RTCCodecSpecificInfoH264.h"
|
||||
#import "RTCH264ProfileLevelId.h"
|
||||
#import "api/peerconnection/RTCRtpFragmentationHeader+Private.h"
|
||||
#import "api/peerconnection/RTCVideoCodecInfo+Private.h"
|
||||
#import "base/RTCCodecSpecificInfo.h"
|
||||
#import "base/RTCI420Buffer.h"
|
||||
@ -32,7 +31,6 @@
|
||||
#include "common_video/h264/h264_bitstream_parser.h"
|
||||
#include "common_video/h264/profile_level_id.h"
|
||||
#include "common_video/include/bitrate_adjuster.h"
|
||||
#include "modules/include/module_common_types.h"
|
||||
#include "modules/video_coding/include/video_error_codes.h"
|
||||
#include "rtc_base/buffer.h"
|
||||
#include "rtc_base/logging.h"
|
||||
@ -783,16 +781,8 @@ NSUInteger GetMaxSampleRate(const webrtc::H264::ProfileLevelId &profile_level_id
|
||||
}
|
||||
|
||||
__block std::unique_ptr<rtc::Buffer> buffer = std::make_unique<rtc::Buffer>();
|
||||
RTC_OBJC_TYPE(RTCRtpFragmentationHeader) * header;
|
||||
{
|
||||
std::unique_ptr<webrtc::RTPFragmentationHeader> header_cpp;
|
||||
bool result =
|
||||
H264CMSampleBufferToAnnexBBuffer(sampleBuffer, isKeyframe, buffer.get(), &header_cpp);
|
||||
header = [[RTC_OBJC_TYPE(RTCRtpFragmentationHeader) alloc]
|
||||
initWithNativeFragmentationHeader:header_cpp.get()];
|
||||
if (!result) {
|
||||
return;
|
||||
}
|
||||
if (!webrtc::H264CMSampleBufferToAnnexBBuffer(sampleBuffer, isKeyframe, buffer.get())) {
|
||||
return;
|
||||
}
|
||||
|
||||
RTC_OBJC_TYPE(RTCEncodedImage) *frame = [[RTC_OBJC_TYPE(RTCEncodedImage) alloc] init];
|
||||
@ -818,6 +808,8 @@ NSUInteger GetMaxSampleRate(const webrtc::H264::ProfileLevelId &profile_level_id
|
||||
_h264BitstreamParser.GetLastSliceQp(&qp);
|
||||
frame.qp = @(qp);
|
||||
|
||||
RTC_OBJC_TYPE(RTCRtpFragmentationHeader) *header =
|
||||
[[RTC_OBJC_TYPE(RTCRtpFragmentationHeader) alloc] init];
|
||||
BOOL res = _callback(frame, codecSpecificInfo, header);
|
||||
if (!res) {
|
||||
RTC_LOG(LS_ERROR) << "Encode callback failed";
|
||||
|
||||
Reference in New Issue
Block a user