Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1006)

Side by Side Diff: media/formats/mp4/hevc.h

Issue 816353010: Implemented HEVC video demuxing and parsing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added hevc handling in media/base/android/media_codec_bridge.cc Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MEDIA_FORMATS_MP4_HEVC_H_
6 #define MEDIA_FORMATS_MP4_HEVC_H_
7
8 #include <vector>
9
10 #include "base/basictypes.h"
11 #include "media/base/media_export.h"
12
13 namespace media {
14
15 struct SubsampleEntry;
16
17 namespace mp4 {
18
19 struct HEVCDecoderConfigurationRecord;
20
21 class MEDIA_EXPORT HEVC {
22 public:
23 static bool ConvertConfigToAnnexB(
24 const HEVCDecoderConfigurationRecord& hevc_config,
25 std::vector<uint8>* buffer);
26
27 static bool InsertParamSetsAnnexB(
28 const HEVCDecoderConfigurationRecord& hevc_config,
29 std::vector<uint8>* buffer,
30 std::vector<SubsampleEntry>* subsamples);
31
32 // Verifies that the contents of |buffer| conform to
33 // Section 7.4.2.4.4 of ISO/IEC 23008-2.
34 // |subsamples| contains the information about what parts of the buffer are
35 // encrypted and which parts are clear.
36 // Returns true if |buffer| contains conformant Annex B data
37 // TODO(servolk): Remove the std::vector version when we can use,
38 // C++11's std::vector<T>::data() method.
39 static bool IsValidAnnexB(const std::vector<uint8>& buffer,
40 const std::vector<SubsampleEntry>& subsamples);
41 static bool IsValidAnnexB(const uint8* buffer, size_t size,
42 const std::vector<SubsampleEntry>& subsamples);
43 };
44
45 } // namespace mp4
46 } // namespace media
47
48 #endif // MEDIA_FORMATS_MP4_HEVC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698