Add unit tests covering MultiplexImageComponent

This CL changes some types in MultiplexImage and MultiplexImageComponent. Also,
adds unit test coverage in TestMultiplexAdapter for these structs.

Bug: webrtc:7671
Change-Id: I832d0466dc67d3b6b7fa0d3fb76f02c0190e474f
Reviewed-on: https://webrtc-review.googlesource.com/44081
Commit-Queue: Emircan Uysaler <emircan@webrtc.org>
Reviewed-by: Qiang Chen <qiangchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#21770}
This commit is contained in:
Emircan Uysaler
2018-01-25 16:31:54 -08:00
committed by Commit Bot
parent bbdabe50db
commit 4dc891f5e3
3 changed files with 88 additions and 10 deletions

View File

@ -71,7 +71,7 @@ struct MultiplexImageComponent {
// Identifies which component this frame represent, i.e. YUV frame vs Alpha
// frame.
int component_index;
uint8_t component_index;
// Stores the actual frame data of the encoded image.
EncodedImage encoded_image;
@ -79,11 +79,11 @@ struct MultiplexImageComponent {
// Struct holding the whole frame bundle of components of an image.
struct MultiplexImage {
int image_index;
int component_count;
uint16_t image_index;
uint8_t component_count;
std::vector<MultiplexImageComponent> image_components;
MultiplexImage(int picture_index, int frame_count);
MultiplexImage(uint16_t picture_index, uint8_t component_count);
};
// A utility class providing conversion between two representations of a