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

Side by Side Diff: media/base/video_codecs.h

Issue 2495193004: Refactor VP9 codec string parsing (Closed)
Patch Set: Added a new test in chunk_demuxer_unittest Created 4 years 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
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_BASE_VIDEO_CODECS_H_ 5 #ifndef MEDIA_BASE_VIDEO_CODECS_H_
6 #define MEDIA_BASE_VIDEO_CODECS_H_ 6 #define MEDIA_BASE_VIDEO_CODECS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string> 9 #include <string>
10 #include "media/base/media_export.h" 10 #include "media/base/media_export.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 HEVCPROFILE_MAIN = HEVCPROFILE_MIN, 71 HEVCPROFILE_MAIN = HEVCPROFILE_MIN,
72 HEVCPROFILE_MAIN10 = 17, 72 HEVCPROFILE_MAIN10 = 17,
73 HEVCPROFILE_MAIN_STILL_PICTURE = 18, 73 HEVCPROFILE_MAIN_STILL_PICTURE = 18,
74 HEVCPROFILE_MAX = HEVCPROFILE_MAIN_STILL_PICTURE, 74 HEVCPROFILE_MAX = HEVCPROFILE_MAIN_STILL_PICTURE,
75 VIDEO_CODEC_PROFILE_MAX = HEVCPROFILE_MAX, 75 VIDEO_CODEC_PROFILE_MAX = HEVCPROFILE_MAX,
76 }; 76 };
77 77
78 std::string MEDIA_EXPORT GetCodecName(VideoCodec codec); 78 std::string MEDIA_EXPORT GetCodecName(VideoCodec codec);
79 std::string MEDIA_EXPORT GetProfileName(VideoCodecProfile profile); 79 std::string MEDIA_EXPORT GetProfileName(VideoCodecProfile profile);
80 80
81 // ParseNewStyleVp9CodecID handles parsing of new style vp9 codec IDs per VP
82 // Codec ISO Media File Format Binding specification:
ddorwin 2016/11/29 23:48:51 maybe add "proposed".
kqyang 2016/11/30 02:31:17 Done.
83 // https://storage.googleapis.com/downloads.webmproject.org/docs/vp9/vp-codec- iso-media-file-format-binding-20160516-draft.pdf
84 // ParseLegacyVp9CodecID handles parsing of legacy VP9 codec strings defined
85 // for WebM.
86 // TODO(kqyang): Consolidate the two functions once we addressed
ddorwin 2016/11/29 23:48:51 nit: address
kqyang 2016/11/30 02:31:17 Done.
87 // http://crbug.com/667834
88 MEDIA_EXPORT bool ParseNewStyleVp9CodecID(const std::string& codec_id,
89 VideoCodecProfile* profile,
90 uint8_t* level_idc);
91 MEDIA_EXPORT bool ParseLegacyVp9CodecID(const std::string& codec_id,
92 VideoCodecProfile* profile,
93 uint8_t* level_idc);
94
81 // Handle parsing AVC/H.264 codec ids as outlined in RFC 6381 and ISO-14496-10. 95 // Handle parsing AVC/H.264 codec ids as outlined in RFC 6381 and ISO-14496-10.
82 MEDIA_EXPORT bool ParseAVCCodecId(const std::string& codec_id, 96 MEDIA_EXPORT bool ParseAVCCodecId(const std::string& codec_id,
83 VideoCodecProfile* profile, 97 VideoCodecProfile* profile,
84 uint8_t* level_idc); 98 uint8_t* level_idc);
85 99
86 #if BUILDFLAG(ENABLE_HEVC_DEMUXING) 100 #if BUILDFLAG(ENABLE_HEVC_DEMUXING)
87 MEDIA_EXPORT bool ParseHEVCCodecId(const std::string& codec_id, 101 MEDIA_EXPORT bool ParseHEVCCodecId(const std::string& codec_id,
88 VideoCodecProfile* profile, 102 VideoCodecProfile* profile,
89 uint8_t* level_idc); 103 uint8_t* level_idc);
90 #endif 104 #endif
91 105
92 MEDIA_EXPORT VideoCodec StringToVideoCodec(const std::string& codec_id); 106 MEDIA_EXPORT VideoCodec StringToVideoCodec(const std::string& codec_id);
93 107
94 } // namespace media 108 } // namespace media
95 109
96 #endif // MEDIA_BASE_VIDEO_CODECS_H_ 110 #endif // MEDIA_BASE_VIDEO_CODECS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698