Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set default color depth to 8 in nplb tests #4729

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions starboard/android/shared/test_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@
# TODO: Filter this test on a per-device basis.
'SbMediaCanPlayMimeAndKeySystem.MinimumSupport',

# TODO: b/292319097 Make this test work on lab devices consistently.
'SbPlayerTest.MaxVideoCapabilities',

# TODO: b/280432564 Make this test work on lab devices consistently.
'SbAudioSinkTest.ContinuousAppend',

Expand Down
1 change: 1 addition & 0 deletions starboard/nplb/player_creation_param_helpers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ VideoStreamInfo CreateVideoStreamInfo(SbMediaVideoCodec codec) {

video_stream_info.mime = "";
video_stream_info.max_video_capabilities = "";
video_stream_info.color_metadata.bits_per_channel = 8;
video_stream_info.color_metadata.primaries = kSbMediaPrimaryIdBt709;
video_stream_info.color_metadata.transfer = kSbMediaTransferIdBt709;
video_stream_info.color_metadata.matrix = kSbMediaMatrixIdBt709;
Expand Down
2 changes: 2 additions & 0 deletions starboard/shared/starboard/media/media_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,8 @@ bool IsSDRVideo(int bit_depth,
SbMediaPrimaryId primary_id,
SbMediaTransferId transfer_id,
SbMediaMatrixId matrix_id) {
SB_DCHECK(bit_depth == 8 || bit_depth == 10);

if (bit_depth != 8) {
return false;
}
Expand Down
14 changes: 7 additions & 7 deletions starboard/shared/starboard/media/media_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ struct AudioStreamInfo {
// of `SbMediaAudioStreamInfo` for more details.
SbMediaAudioCodec codec = kSbMediaAudioCodecNone;
std::string mime;
uint16_t number_of_channels;
uint32_t samples_per_second;
uint16_t bits_per_sample;
uint16_t number_of_channels = 0;
uint32_t samples_per_second = 0;
uint16_t bits_per_sample = 0;
std::vector<uint8_t> audio_specific_config;
};

Expand Down Expand Up @@ -111,9 +111,9 @@ struct VideoStreamInfo {
SbMediaVideoCodec codec = kSbMediaVideoCodecNone;
std::string mime;
std::string max_video_capabilities;
int frame_width;
int frame_height;
SbMediaColorMetadata color_metadata;
int frame_width = 0;
int frame_height = 0;
SbMediaColorMetadata color_metadata = {};
};

bool operator==(const VideoStreamInfo& left, const VideoStreamInfo& right);
Expand Down Expand Up @@ -141,7 +141,7 @@ struct VideoSampleInfo {
// `SbMediaVideoSampleInfo` defined in `media.h`. Please refer to the comment
// of `SbMediaVideoSampleInfo` for more details.
VideoStreamInfo stream_info;
bool is_key_frame;
bool is_key_frame = false;
};

std::ostream& operator<<(std::ostream& os, const VideoSampleInfo& stream_info);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ media::VideoStreamInfo CreateVideoStreamInfo(SbMediaVideoCodec codec) {
video_stream_info.mime = "";
video_stream_info.max_video_capabilities = "";

video_stream_info.color_metadata.bits_per_channel = 8;
video_stream_info.color_metadata.primaries = kSbMediaPrimaryIdBt709;
video_stream_info.color_metadata.transfer = kSbMediaTransferIdBt709;
video_stream_info.color_metadata.matrix = kSbMediaMatrixIdBt709;
Expand Down
Loading