| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "base/logging.h" | 5 #include "base/logging.h" |
| 6 #include "media/ffmpeg/ffmpeg_common.h" | 6 #include "media/ffmpeg/ffmpeg_common.h" |
| 7 #include "media/filters/ffmpeg_glue.h" | 7 #include "media/filters/ffmpeg_glue.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 9 |
| 10 namespace media { | 10 namespace media { |
| 11 | 11 |
| 12 class FFmpegCommonTest : public testing::Test { | 12 class FFmpegCommonTest : public testing::Test { |
| 13 public: | 13 public: |
| 14 FFmpegCommonTest() { FFmpegGlue::InitializeFFmpeg(); } | 14 FFmpegCommonTest() { FFmpegGlue::InitializeFFmpeg(); } |
| 15 virtual ~FFmpegCommonTest() {}; | 15 ~FFmpegCommonTest() override{}; |
| 16 }; | 16 }; |
| 17 | 17 |
| 18 TEST_F(FFmpegCommonTest, OpusAudioDecoderConfig) { | 18 TEST_F(FFmpegCommonTest, OpusAudioDecoderConfig) { |
| 19 AVCodecContext context = {0}; | 19 AVCodecContext context = {0}; |
| 20 context.codec_type = AVMEDIA_TYPE_AUDIO; | 20 context.codec_type = AVMEDIA_TYPE_AUDIO; |
| 21 context.codec_id = AV_CODEC_ID_OPUS; | 21 context.codec_id = AV_CODEC_ID_OPUS; |
| 22 context.channel_layout = CHANNEL_LAYOUT_STEREO; | 22 context.channel_layout = CHANNEL_LAYOUT_STEREO; |
| 23 context.channels = 2; | 23 context.channels = 2; |
| 24 context.sample_fmt = AV_SAMPLE_FMT_FLT; | 24 context.sample_fmt = AV_SAMPLE_FMT_FLT; |
| 25 | 25 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 for (size_t i = 0; i < arraysize(invalid_date_strings); ++i) { | 118 for (size_t i = 0; i < arraysize(invalid_date_strings); ++i) { |
| 119 const char* date_string = invalid_date_strings[i]; | 119 const char* date_string = invalid_date_strings[i]; |
| 120 base::Time result; | 120 base::Time result; |
| 121 EXPECT_FALSE(FFmpegUTCDateToTime(date_string, &result)) | 121 EXPECT_FALSE(FFmpegUTCDateToTime(date_string, &result)) |
| 122 << "date_string '" << date_string << "'"; | 122 << "date_string '" << date_string << "'"; |
| 123 EXPECT_TRUE(result.is_null()); | 123 EXPECT_TRUE(result.is_null()); |
| 124 } | 124 } |
| 125 } | 125 } |
| 126 | 126 |
| 127 } // namespace media | 127 } // namespace media |
| OLD | NEW |