| Index: media/formats/mp4/hevc.h
|
| diff --git a/media/formats/mp4/hevc.h b/media/formats/mp4/hevc.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..0c2435c7547e522c885bfea449df09acd53caf66
|
| --- /dev/null
|
| +++ b/media/formats/mp4/hevc.h
|
| @@ -0,0 +1,48 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef MEDIA_FORMATS_MP4_HEVC_H_
|
| +#define MEDIA_FORMATS_MP4_HEVC_H_
|
| +
|
| +#include <vector>
|
| +
|
| +#include "base/basictypes.h"
|
| +#include "media/base/media_export.h"
|
| +
|
| +namespace media {
|
| +
|
| +struct SubsampleEntry;
|
| +
|
| +namespace mp4 {
|
| +
|
| +struct HEVCDecoderConfigurationRecord;
|
| +
|
| +class MEDIA_EXPORT HEVC {
|
| + public:
|
| + static bool ConvertConfigToAnnexB(
|
| + const HEVCDecoderConfigurationRecord& hevc_config,
|
| + std::vector<uint8>* buffer);
|
| +
|
| + static bool InsertParamSetsAnnexB(
|
| + const HEVCDecoderConfigurationRecord& hevc_config,
|
| + std::vector<uint8>* buffer,
|
| + std::vector<SubsampleEntry>* subsamples);
|
| +
|
| + // Verifies that the contents of |buffer| conform to
|
| + // Section 7.4.2.4.4 of ISO/IEC 23008-2.
|
| + // |subsamples| contains the information about what parts of the buffer are
|
| + // encrypted and which parts are clear.
|
| + // Returns true if |buffer| contains conformant Annex B data
|
| + // TODO(servolk): Remove the std::vector version when we can use,
|
| + // C++11's std::vector<T>::data() method.
|
| + static bool IsValidAnnexB(const std::vector<uint8>& buffer,
|
| + const std::vector<SubsampleEntry>& subsamples);
|
| + static bool IsValidAnnexB(const uint8* buffer, size_t size,
|
| + const std::vector<SubsampleEntry>& subsamples);
|
| +};
|
| +
|
| +} // namespace mp4
|
| +} // namespace media
|
| +
|
| +#endif // MEDIA_FORMATS_MP4_HEVC_H_
|
|
|