demuxer_stream_player_params.h revision 5d1f7b1de12d16ceb2c938c56701a3e8bfa558f7
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.
4
5#ifndef MEDIA_BASE_ANDROID_DEMUXER_STREAM_PLAYER_PARAMS_H_
6#define MEDIA_BASE_ANDROID_DEMUXER_STREAM_PLAYER_PARAMS_H_
7
8#include <vector>
9
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/size.h"
16
17namespace media {
18
19struct MEDIA_EXPORT DemuxerConfigs {
20  DemuxerConfigs();
21  ~DemuxerConfigs();
22
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
29  VideoCodec video_codec;
30  gfx::Size video_size;
31  bool is_video_encrypted;
32  std::vector<uint8> video_extra_data;
33
34  int duration_ms;
35};
36
37struct MEDIA_EXPORT AccessUnit {
38  AccessUnit();
39  ~AccessUnit();
40
41  DemuxerStream::Status status;
42  bool end_of_stream;
43  // TODO(ycheo): Use the shared memory to transfer the block data.
44  std::vector<uint8> data;
45  base::TimeDelta timestamp;
46  std::vector<char> key_id;
47  std::vector<char> iv;
48  std::vector<media::SubsampleEntry> subsamples;
49};
50
51struct MEDIA_EXPORT DemuxerData {
52  DemuxerData();
53  ~DemuxerData();
54
55  DemuxerStream::Type type;
56  std::vector<AccessUnit> access_units;
57};
58
59};  // namespace media
60
61#endif  // MEDIA_BASE_ANDROID_DEMUXER_STREAM_PLAYER_PARAMS_H_
62