OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_PIPELINE_METADATA_H_ | 5 #ifndef MEDIA_BASE_PIPELINE_METADATA_H_ |
6 #define MEDIA_BASE_PIPELINE_METADATA_H_ | 6 #define MEDIA_BASE_PIPELINE_METADATA_H_ |
7 | 7 |
8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
9 #include "media/base/audio_decoder_config.h" | 9 #include "media/base/audio_decoder_config.h" |
10 #include "media/base/video_decoder_config.h" | 10 #include "media/base/video_decoder_config.h" |
11 #include "media/base/video_rotation.h" | 11 #include "media/base/video_rotation.h" |
12 #include "ui/gfx/geometry/size.h" | 12 #include "ui/gfx/geometry/size.h" |
13 | 13 |
14 namespace media { | 14 namespace media { |
15 | 15 |
16 // Metadata describing a pipeline once it has been initialized. | 16 // Metadata describing a pipeline once it has been initialized. |
17 struct MEDIA_EXPORT PipelineMetadata { | 17 struct MEDIA_EXPORT PipelineMetadata { |
18 PipelineMetadata(); | 18 PipelineMetadata(); |
19 ~PipelineMetadata(); | 19 ~PipelineMetadata(); |
20 | 20 |
21 // Required by Chromium style: Complex class/struct needs an explicit | 21 // Required by Chromium style: Complex class/struct needs an explicit |
22 // out-of-line copy constructor. | 22 // out-of-line copy constructor. |
23 PipelineMetadata(const PipelineMetadata&); | 23 PipelineMetadata(const PipelineMetadata&); |
24 | 24 |
| 25 // On Android, when using the MediaPlayerRenderer, |has_video| and |has_audio| |
| 26 // will be true, but the respective configs will be empty. |
| 27 // Do not make any assumptions on the validity of configs based off of the |
| 28 // presence of audio/video. |
25 bool has_audio; | 29 bool has_audio; |
26 bool has_video; | 30 bool has_video; |
27 AudioDecoderConfig audio_decoder_config; | 31 AudioDecoderConfig audio_decoder_config; |
28 VideoDecoderConfig video_decoder_config; | 32 VideoDecoderConfig video_decoder_config; |
29 gfx::Size natural_size; | 33 gfx::Size natural_size; |
30 VideoRotation video_rotation; | 34 VideoRotation video_rotation; |
31 base::Time timeline_offset; | 35 base::Time timeline_offset; |
32 }; | 36 }; |
33 | 37 |
34 } // namespace media | 38 } // namespace media |
35 | 39 |
36 #endif // MEDIA_BASE_PIPELINE_METADATA_H_ | 40 #endif // MEDIA_BASE_PIPELINE_METADATA_H_ |
OLD | NEW |