Multiplex codec cleanups
This CL performs some cleanups on multiplex files: - Adds more comments to factory about usage. - Moves image packer outside /include as it doesn't need to be public. - Other small lint issues. Bug: webrtc:9632 Change-Id: I2e2e6929ea13645aee5483a3697199d1e6184b32 Reviewed-on: https://webrtc-review.googlesource.com/98700 Commit-Queue: Emircan Uysaler <emircan@webrtc.org> Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24615}
This commit is contained in:

committed by
Commit Bot

parent
6a4fd19bbd
commit
ed425d12c4
@ -16,6 +16,7 @@
|
||||
#include "common_video/include/video_frame_buffer.h"
|
||||
#include "common_video/libyuv/include/webrtc_libyuv.h"
|
||||
#include "modules/video_coding/codecs/multiplex/include/augmented_video_frame_buffer.h"
|
||||
#include "modules/video_coding/codecs/multiplex/multiplex_encoded_image_packer.h"
|
||||
#include "rtc_base/keep_ref_until_done.h"
|
||||
#include "rtc_base/logging.h"
|
||||
|
||||
@ -181,14 +182,14 @@ void MultiplexDecoderAdapter::Decoded(AlphaCodecStream stream_idx,
|
||||
decoded_data_.find(decoded_image->timestamp());
|
||||
const auto& augmenting_data_it =
|
||||
decoded_augmenting_data_.find(decoded_image->timestamp());
|
||||
const bool has_augmenting_data =
|
||||
augmenting_data_it != decoded_augmenting_data_.end();
|
||||
if (other_decoded_data_it != decoded_data_.end()) {
|
||||
uint16_t augmenting_data_size =
|
||||
augmenting_data_it == decoded_augmenting_data_.end()
|
||||
? 0
|
||||
: augmenting_data_it->second.size_;
|
||||
has_augmenting_data ? augmenting_data_it->second.size_ : 0;
|
||||
std::unique_ptr<uint8_t[]> augmenting_data =
|
||||
augmenting_data_size == 0 ? NULL
|
||||
: std::move(augmenting_data_it->second.data_);
|
||||
has_augmenting_data ? std::move(augmenting_data_it->second.data_)
|
||||
: nullptr;
|
||||
auto& other_image_data = other_decoded_data_it->second;
|
||||
if (stream_idx == kYUVStream) {
|
||||
RTC_DCHECK_EQ(kAXXStream, other_image_data.stream_idx_);
|
||||
@ -205,7 +206,7 @@ void MultiplexDecoderAdapter::Decoded(AlphaCodecStream stream_idx,
|
||||
std::move(augmenting_data), augmenting_data_size);
|
||||
}
|
||||
decoded_data_.erase(decoded_data_.begin(), other_decoded_data_it);
|
||||
if (supports_augmenting_data_) {
|
||||
if (has_augmenting_data) {
|
||||
decoded_augmenting_data_.erase(decoded_augmenting_data_.begin(),
|
||||
augmenting_data_it);
|
||||
}
|
||||
|
Reference in New Issue
Block a user