#include "third_party/blink/renderer/modules/webcodecs/video_decoder_helper.h"
#if BUILDFLAG(USE_PROPRIETARY_CODECS)
#include "media/filters/h264_to_annex_b_bitstream_converter.h"
#include "media/formats/mp4/box_definitions.h"
#if BUILDFLAG(ENABLE_PLATFORM_HEVC)
#include "media/filters/h265_to_annex_b_bitstream_converter.h"
#include "media/formats/mp4/hevc.h"
#endif
#endif
#include "media/base/media_types.h"
namespace blink {
std::unique_ptr<VideoDecoderHelper> VideoDecoderHelper::Create(
media::VideoType video_type,
const uint8_t* configuration_record,
int configuration_record_size,
Status* status_out) { … }
VideoDecoderHelper::VideoDecoderHelper(media::VideoType video_type) { … }
VideoDecoderHelper::~VideoDecoderHelper() = default;
VideoDecoderHelper::Status VideoDecoderHelper::Initialize(
const uint8_t* configuration_record,
int configuration_record_size) { … }
uint32_t VideoDecoderHelper::CalculateNeededOutputBufferSize(
const uint8_t* input,
uint32_t input_size,
bool is_first_chunk) const { … }
VideoDecoderHelper::Status VideoDecoderHelper::ConvertNalUnitStreamToByteStream(
const uint8_t* input,
uint32_t input_size,
uint8_t* output,
uint32_t* output_size,
bool is_first_chunk) { … }
}