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

Side by Side Diff: media/base/assert_matching_enums.cc

Issue 418193003: Using PROFILE_ANY for vp8 and vp9 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
amogh.bihani 2014/07/30 10:22:41 This should avoid anyone accidentally changing ent
xhwang 2014/07/30 21:21:41 I think we are doing the conversion explicitly in
amogh.bihani 2014/07/31 05:07:40 Acknowledged. I'll remove this :).
3 // found in the LICENSE file.
4
5 #include "base/macros.h"
6 #include "media/base/video_decoder_config.h"
7 #include "ppapi/c/dev/pp_video_dev.h"
8
9 namespace {
10
11 #define COMPILE_ASSERT_MATCHING_ENUM(expected, actual) \
12 COMPILE_ASSERT(int(expected) == int(actual), mismatching_enums)
13
14 // PPAPI contains a "none" H.264 profile that doesn't correspond to any codec
15 // profile in H.264
16 const int kH264PROFILE_NONE_OFFSET = 1;
17
18 // Video codecs
19 COMPILE_ASSERT_MATCHING_ENUM(PP_VIDEODECODER_PROFILE_UNKNOWN,
20 media::VIDEO_CODEC_PROFILE_UNKNOWN);
21 COMPILE_ASSERT_MATCHING_ENUM(PP_VIDEODECODER_H264PROFILE_BASELINE,
22 media::H264PROFILE_BASELINE + kH264PROFILE_NONE_OFFSET);
23 COMPILE_ASSERT_MATCHING_ENUM(PP_VIDEODECODER_H264PROFILE_MAIN,
24 media::H264PROFILE_MAIN + kH264PROFILE_NONE_OFFSET);
25 COMPILE_ASSERT_MATCHING_ENUM(PP_VIDEODECODER_H264PROFILE_EXTENDED,
26 media::H264PROFILE_EXTENDED + kH264PROFILE_NONE_OFFSET);
27 COMPILE_ASSERT_MATCHING_ENUM(PP_VIDEODECODER_H264PROFILE_HIGH,
28 media::H264PROFILE_HIGH + kH264PROFILE_NONE_OFFSET);
29 COMPILE_ASSERT_MATCHING_ENUM(PP_VIDEODECODER_H264PROFILE_HIGH10PROFILE,
30 media::H264PROFILE_HIGH10PROFILE + kH264PROFILE_NONE_OFFSET);
31 COMPILE_ASSERT_MATCHING_ENUM(PP_VIDEODECODER_H264PROFILE_HIGH422PROFILE,
32 media::H264PROFILE_HIGH422PROFILE + kH264PROFILE_NONE_OFFSET);
33 COMPILE_ASSERT_MATCHING_ENUM(
34 PP_VIDEODECODER_H264PROFILE_HIGH444PREDICTIVEPROFILE,
35 media::H264PROFILE_HIGH444PREDICTIVEPROFILE + kH264PROFILE_NONE_OFFSET);
36 COMPILE_ASSERT_MATCHING_ENUM(PP_VIDEODECODER_H264PROFILE_SCALABLEBASELINE,
37 media::H264PROFILE_SCALABLEBASELINE + kH264PROFILE_NONE_OFFSET);
38 COMPILE_ASSERT_MATCHING_ENUM(PP_VIDEODECODER_H264PROFILE_SCALABLEHIGH,
39 media::H264PROFILE_SCALABLEHIGH + kH264PROFILE_NONE_OFFSET);
40 COMPILE_ASSERT_MATCHING_ENUM(PP_VIDEODECODER_H264PROFILE_STEREOHIGH,
41 media::H264PROFILE_STEREOHIGH + kH264PROFILE_NONE_OFFSET);
42 COMPILE_ASSERT_MATCHING_ENUM(PP_VIDEODECODER_H264PROFILE_MULTIVIEWHIGH,
43 media::H264PROFILE_MULTIVIEWHIGH + kH264PROFILE_NONE_OFFSET);
44 COMPILE_ASSERT_MATCHING_ENUM(PP_VIDEODECODER_VP8PROFILE_MAIN,
45 media::VP8PROFILE_MAIN + kH264PROFILE_NONE_OFFSET);
46
47 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698