Shaka Packager SDK
Loading...
Searching...
No Matches
decoder_configuration_record.cc
1// Copyright 2016 Google LLC. All rights reserved.
2//
3// Use of this source code is governed by a BSD-style
4// license that can be found in the LICENSE file or at
5// https://developers.google.com/open-source/licenses/bsd
6
7#include <packager/media/codecs/decoder_configuration_record.h>
8
9#include <cstddef>
10#include <cstdint>
11
12#include <packager/media/codecs/nalu_reader.h>
13
14namespace shaka {
15namespace media {
16
17DecoderConfigurationRecord::DecoderConfigurationRecord() = default;
18DecoderConfigurationRecord::~DecoderConfigurationRecord() = default;
19
20bool DecoderConfigurationRecord::Parse(const uint8_t* data, size_t data_size) {
21 data_.assign(data, data + data_size);
22 nalu_.clear();
23 return ParseInternal();
24}
25
27 nalu_.push_back(nalu);
28}
29
30} // namespace media
31} // namespace shaka
void AddNalu(const Nalu &nalu)
Adds the given Nalu to the configuration.
bool Parse(const std::vector< uint8_t > &data)
All the methods that are virtual are virtual for mocking.