Reland of Add content type information to encoded images and corresponding rtp extension header (patchset #1 id:1 of https://codereview.webrtc.org/2816463002/ )
Reason for revert: Reland with appropriate changes to API to not break depending projects. Original issue's description: > Revert of Add content type information to encoded images and corresponding rtp extension header (patchset #31 id:600001 of https://codereview.webrtc.org/2772033002/ ) > > Reason for revert: > Breaks dependent projects. > > Original issue's description: > > Add content type information to Encoded Images and add corresponding RTP extension header. > > Use it to separate UMA e2e delay metric between screenshare from video. > > Content type extension is set based on encoder settings and processed and decoders. > > > > Also, > > Fix full-stack-tests to calculate RTT correctly, so new metric could be tested. > > > > BUG=webrtc:7420 > > > > Review-Url: https://codereview.webrtc.org/2772033002 > > Cr-Commit-Position: refs/heads/master@{#17640} > > Committed:64e739aeae> > TBR=tommi@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,nisse@webrtc.org,mflodman@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:7420 > > Review-Url: https://codereview.webrtc.org/2816463002 > Cr-Commit-Position: refs/heads/master@{#17644} > Committed:5721866808TBR=tommi@webrtc.org,sprang@webrtc.org,stefan@webrtc.org,nisse@webrtc.org,mflodman@webrtc.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=webrtc:7420 Review-Url: https://codereview.webrtc.org/2812913002 Cr-Commit-Position: refs/heads/master@{#17651}
This commit is contained in:
@ -85,6 +85,7 @@ class H264VideoToolboxEncoder : public H264Encoder {
|
||||
uint32_t encoder_bitrate_bps_;
|
||||
int32_t width_;
|
||||
int32_t height_;
|
||||
VideoCodecMode mode_;
|
||||
const CFStringRef profile_;
|
||||
|
||||
H264BitstreamParser h264_bitstream_parser_;
|
||||
|
||||
@ -364,6 +364,7 @@ int H264VideoToolboxEncoder::InitEncode(const VideoCodec* codec_settings,
|
||||
|
||||
width_ = codec_settings->width;
|
||||
height_ = codec_settings->height;
|
||||
mode_ = codec_settings->mode;
|
||||
// We can only set average bitrate on the HW encoder.
|
||||
target_bitrate_bps_ = codec_settings->startBitrate;
|
||||
bitrate_adjuster_.SetTargetBitrateBps(target_bitrate_bps_);
|
||||
@ -722,6 +723,9 @@ void H264VideoToolboxEncoder::OnEncodedFrame(
|
||||
frame._timeStamp = timestamp;
|
||||
frame.rotation_ = rotation;
|
||||
|
||||
frame.content_type_ =
|
||||
(mode_ == kScreensharing) ? VideoContentType::SCREENSHARE : VideoContentType::UNSPECIFIED;
|
||||
|
||||
h264_bitstream_parser_.ParseBitstream(buffer->data(), buffer->size());
|
||||
h264_bitstream_parser_.GetLastSliceQp(&frame.qp_);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user