Update V8 to version 4.7.56.
[chromium-blink-merge.git] / media / base / android / demuxer_stream_player_params.h
blob33d8976a2caf752ab53c96fae471f85e96da112f
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef MEDIA_BASE_ANDROID_DEMUXER_STREAM_PLAYER_PARAMS_H_
6 #define MEDIA_BASE_ANDROID_DEMUXER_STREAM_PLAYER_PARAMS_H_
8 #include <vector>
10 #include "media/base/audio_decoder_config.h"
11 #include "media/base/decrypt_config.h"
12 #include "media/base/demuxer_stream.h"
13 #include "media/base/media_export.h"
14 #include "media/base/video_decoder_config.h"
15 #include "ui/gfx/geometry/size.h"
17 namespace media {
19 struct MEDIA_EXPORT DemuxerConfigs {
20 DemuxerConfigs();
21 ~DemuxerConfigs();
23 AudioCodec audio_codec;
24 int audio_channels;
25 int audio_sampling_rate;
26 bool is_audio_encrypted;
27 std::vector<uint8> audio_extra_data;
28 int64 audio_codec_delay_ns;
29 int64 audio_seek_preroll_ns;
31 VideoCodec video_codec;
32 gfx::Size video_size;
33 bool is_video_encrypted;
34 std::vector<uint8> video_extra_data;
36 base::TimeDelta duration;
39 struct MEDIA_EXPORT AccessUnit {
40 AccessUnit();
41 ~AccessUnit();
43 DemuxerStream::Status status;
44 bool is_end_of_stream;
45 // TODO(ycheo): Use the shared memory to transfer the block data.
46 std::vector<uint8> data;
47 base::TimeDelta timestamp;
48 std::vector<char> key_id;
49 std::vector<char> iv;
50 std::vector<media::SubsampleEntry> subsamples;
51 bool is_key_frame;
54 struct MEDIA_EXPORT DemuxerData {
55 DemuxerData();
56 ~DemuxerData();
58 DemuxerStream::Type type;
59 std::vector<AccessUnit> access_units;
60 // If the last entry in |access_units| has a status equal to |kConfigChanged|,
61 // a corresponding DemuxerConfigs is added into this vector. The
62 // DemuxerConfigs should only contain information of the stream that is
63 // specified by |type|. This solves the issue that we need multiple IPCs when
64 // demuxer configs change.
65 std::vector<DemuxerConfigs> demuxer_configs;
68 }; // namespace media
70 // For logging
71 MEDIA_EXPORT
72 std::ostream& operator<<(std::ostream& os, media::DemuxerStream::Type type);
74 MEDIA_EXPORT
75 std::ostream& operator<<(std::ostream& os, const media::AccessUnit& au);
77 MEDIA_EXPORT
78 std::ostream& operator<<(std::ostream& os, const media::DemuxerConfigs& conf);
80 #endif // MEDIA_BASE_ANDROID_DEMUXER_STREAM_PLAYER_PARAMS_H_