Home | History | Annotate | Download | only in android
      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 <string>
      9 #include <vector>
     10 
     11 #include "media/base/audio_decoder_config.h"
     12 #include "media/base/decrypt_config.h"
     13 #include "media/base/demuxer_stream.h"
     14 #include "media/base/media_export.h"
     15 #include "media/base/video_decoder_config.h"
     16 #include "ui/gfx/size.h"
     17 
     18 namespace media {
     19 
     20 struct MEDIA_EXPORT MediaPlayerHostMsg_DemuxerReady_Params {
     21   MediaPlayerHostMsg_DemuxerReady_Params();
     22   ~MediaPlayerHostMsg_DemuxerReady_Params();
     23 
     24   AudioCodec audio_codec;
     25   int audio_channels;
     26   int audio_sampling_rate;
     27   bool is_audio_encrypted;
     28   std::vector<uint8> audio_extra_data;
     29 
     30   VideoCodec video_codec;
     31   gfx::Size video_size;
     32   bool is_video_encrypted;
     33   std::vector<uint8> video_extra_data;
     34 
     35   int duration_ms;
     36   std::string key_system;
     37 };
     38 
     39 struct MEDIA_EXPORT AccessUnit {
     40   AccessUnit();
     41   ~AccessUnit();
     42 
     43   DemuxerStream::Status status;
     44   bool 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 };
     52 
     53 struct MEDIA_EXPORT MediaPlayerHostMsg_ReadFromDemuxerAck_Params {
     54   MediaPlayerHostMsg_ReadFromDemuxerAck_Params();
     55   ~MediaPlayerHostMsg_ReadFromDemuxerAck_Params();
     56 
     57   DemuxerStream::Type type;
     58   std::vector<AccessUnit> access_units;
     59 };
     60 
     61 };  // namespace media
     62 
     63 #endif  // MEDIA_BASE_ANDROID_DEMUXER_STREAM_PLAYER_PARAMS_H_
     64