blob: e778b7888f55f36ffd8d5dd7b168769c1e7ef85a [file] [log] [blame]
// Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef STARBOARD_SHARED_STARBOARD_MEDIA_MEDIA_UTIL_H_
#define STARBOARD_SHARED_STARBOARD_MEDIA_MEDIA_UTIL_H_
#include <string>
#include "starboard/media.h"
#include "starboard/shared/internal_only.h"
namespace starboard {
namespace shared {
namespace starboard {
namespace media {
bool IsAudioOutputSupported(SbMediaAudioCodingType coding_type, int channels);
// Turns |eotf| into value of SbMediaTransferId. If |eotf| isn't recognized the
// function returns kSbMediaTransferIdReserved0.
// This function supports all eotfs required by YouTube TV HTML5 Technical
// Requirements (2018).
SbMediaTransferId GetTransferIdFromString(const std::string& eotf);
int GetBytesPerSample(SbMediaAudioSampleType sample_type);
} // namespace media
} // namespace starboard
} // namespace shared
} // namespace starboard
#endif // STARBOARD_SHARED_STARBOARD_MEDIA_MEDIA_UTIL_H_