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

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

Issue 246853005: Fix SPS/PPS insertion logic in MP4StreamParser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address CR comments Created 6 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_FORMATS_MP4_AVC_H_ 5 #ifndef MEDIA_FORMATS_MP4_AVC_H_
6 #define MEDIA_FORMATS_MP4_AVC_H_ 6 #define MEDIA_FORMATS_MP4_AVC_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "media/base/decrypt_config.h"
11 #include "media/base/media_export.h" 12 #include "media/base/media_export.h"
12 13
13 namespace media { 14 namespace media {
14 namespace mp4 { 15 namespace mp4 {
15 16
16 struct AVCDecoderConfigurationRecord; 17 struct AVCDecoderConfigurationRecord;
17 18
18 class MEDIA_EXPORT AVC { 19 class MEDIA_EXPORT AVC {
19 public: 20 public:
20 static bool ConvertFrameToAnnexB(int length_size, std::vector<uint8>* buffer); 21 static bool ConvertFrameToAnnexB(int length_size, std::vector<uint8>* buffer);
21 22
23 // Inserts the SPS & PPS data from |avc_config| into |buffer|.
24 // |buffer| is expected to contain AnnexB conformant data.
25 // |subsamples| contains the SubsampleEntry info if |buffer| contains
26 // encrypted data.
27 // Returns true if the param sets were successfully inserted.
28 static bool InsertParamSetsAnnexB(
29 const AVCDecoderConfigurationRecord& avc_config,
30 std::vector<uint8>* buffer,
31 std::vector<SubsampleEntry>* subsamples);
damienv1 2014/04/24 00:03:58 nit: From http://www.chromium.org/developers/codin
acolwell GONE FROM CHROMIUM 2014/04/24 23:52:15 Done.
32
22 static bool ConvertConfigToAnnexB( 33 static bool ConvertConfigToAnnexB(
23 const AVCDecoderConfigurationRecord& avc_config, 34 const AVCDecoderConfigurationRecord& avc_config,
24 std::vector<uint8>* buffer); 35 std::vector<uint8>* buffer,
36 std::vector<SubsampleEntry>* subsamples);
37
38 // Verifies that the contents of |buffer| conform to
39 // Section 7.4.1.2.3 of ISO/IEC 14496-10.
40 // Returns true if |buffer| contains conformant AnnexB data.
41 static bool IsValidAnnexB(const std::vector<uint8>& buffer);
25 }; 42 };
26 43
27 } // namespace mp4 44 } // namespace mp4
28 } // namespace media 45 } // namespace media
29 46
30 #endif // MEDIA_FORMATS_MP4_AVC_H_ 47 #endif // MEDIA_FORMATS_MP4_AVC_H_
OLDNEW
« no previous file with comments | « media/filters/h264_parser.h ('k') | media/formats/mp4/avc.cc » ('j') | media/formats/mp4/avc.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698