1 /* 2 * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. 3 * 4 * Use of this source code is governed by a BSD-style license 5 * that can be found in the LICENSE file in the root of the source 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 #include "modules/video_coding/codecs/multiplex/include/augmented_video_frame_buffer.h" 12 13 #include <stdint.h> 14 15 #include <utility> 16 17 #include "api/video/video_frame_buffer.h" 18 19 namespace webrtc { 20 AugmentedVideoFrameBuffer(const rtc::scoped_refptr<VideoFrameBuffer> & video_frame_buffer,std::unique_ptr<uint8_t[]> augmenting_data,uint16_t augmenting_data_size)21AugmentedVideoFrameBuffer::AugmentedVideoFrameBuffer( 22 const rtc::scoped_refptr<VideoFrameBuffer>& video_frame_buffer, 23 std::unique_ptr<uint8_t[]> augmenting_data, 24 uint16_t augmenting_data_size) 25 : augmenting_data_size_(augmenting_data_size), 26 augmenting_data_(std::move(augmenting_data)), 27 video_frame_buffer_(video_frame_buffer) {} 28 29 rtc::scoped_refptr<VideoFrameBuffer> GetVideoFrameBuffer() const30AugmentedVideoFrameBuffer::GetVideoFrameBuffer() const { 31 return video_frame_buffer_; 32 } 33 GetAugmentingData() const34uint8_t* AugmentedVideoFrameBuffer::GetAugmentingData() const { 35 return augmenting_data_.get(); 36 } 37 GetAugmentingDataSize() const38uint16_t AugmentedVideoFrameBuffer::GetAugmentingDataSize() const { 39 return augmenting_data_size_; 40 } 41 type() const42VideoFrameBuffer::Type AugmentedVideoFrameBuffer::type() const { 43 return video_frame_buffer_->type(); 44 } 45 width() const46int AugmentedVideoFrameBuffer::width() const { 47 return video_frame_buffer_->width(); 48 } 49 height() const50int AugmentedVideoFrameBuffer::height() const { 51 return video_frame_buffer_->height(); 52 } 53 ToI420()54rtc::scoped_refptr<I420BufferInterface> AugmentedVideoFrameBuffer::ToI420() { 55 return video_frame_buffer_->ToI420(); 56 } 57 } // namespace webrtc 58