| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CHROMECAST_BROWSER_MEDIA_MEDIA_PIPELINE_HOST_H_ | 5 #ifndef CHROMECAST_BROWSER_MEDIA_MEDIA_PIPELINE_HOST_H_ |
| 6 #define CHROMECAST_BROWSER_MEDIA_MEDIA_PIPELINE_HOST_H_ | 6 #define CHROMECAST_BROWSER_MEDIA_MEDIA_PIPELINE_HOST_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/threading/thread_checker.h" | 14 #include "base/threading/thread_checker.h" |
| 15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
| 16 #include "chromecast/common/media/cma_ipc_common.h" | 16 #include "chromecast/common/media/cma_ipc_common.h" |
| 17 #include "chromecast/media/cma/backend/media_pipeline_device.h" |
| 17 #include "chromecast/media/cma/pipeline/load_type.h" | 18 #include "chromecast/media/cma/pipeline/load_type.h" |
| 18 #include "media/base/pipeline_status.h" | 19 #include "media/base/pipeline_status.h" |
| 19 | 20 |
| 20 namespace base { | 21 namespace base { |
| 21 class SharedMemory; | 22 class SharedMemory; |
| 22 class SingleThreadTaskRunner; | 23 class SingleThreadTaskRunner; |
| 23 } | 24 } |
| 24 | 25 |
| 25 namespace media { | 26 namespace media { |
| 26 class AudioDecoderConfig; | 27 class AudioDecoderConfig; |
| 27 class VideoDecoderConfig; | 28 class VideoDecoderConfig; |
| 28 } | 29 } |
| 29 | 30 |
| 30 namespace chromecast { | 31 namespace chromecast { |
| 31 namespace media { | 32 namespace media { |
| 32 struct AvPipelineClient; | 33 struct AvPipelineClient; |
| 33 class BrowserCdmCast; | 34 class BrowserCdmCast; |
| 34 struct MediaPipelineClient; | 35 struct MediaPipelineClient; |
| 35 class MediaPipelineImpl; | 36 class MediaPipelineImpl; |
| 36 struct VideoPipelineClient; | 37 struct VideoPipelineClient; |
| 37 | 38 |
| 38 class MediaPipelineHost { | 39 class MediaPipelineHost { |
| 39 public: | 40 public: |
| 40 MediaPipelineHost(); | 41 MediaPipelineHost(); |
| 41 ~MediaPipelineHost(); | 42 ~MediaPipelineHost(); |
| 42 | 43 |
| 43 void Initialize(LoadType load_type, | 44 void Initialize( |
| 44 const MediaPipelineClient& client); | 45 LoadType load_type, |
| 46 const MediaPipelineClient& client, |
| 47 const media::CreatePipelineDeviceCB& create_pipeline_device_cb); |
| 45 | 48 |
| 46 void SetAvPipe(TrackId track_id, | 49 void SetAvPipe(TrackId track_id, |
| 47 scoped_ptr<base::SharedMemory> shared_mem, | 50 scoped_ptr<base::SharedMemory> shared_mem, |
| 48 const base::Closure& pipe_read_activity_cb, | 51 const base::Closure& pipe_read_activity_cb, |
| 49 const base::Closure& av_pipe_set_cb); | 52 const base::Closure& av_pipe_set_cb); |
| 50 void AudioInitialize(TrackId track_id, | 53 void AudioInitialize(TrackId track_id, |
| 51 const AvPipelineClient& client, | 54 const AvPipelineClient& client, |
| 52 const ::media::AudioDecoderConfig& config, | 55 const ::media::AudioDecoderConfig& config, |
| 53 const ::media::PipelineStatusCB& status_cb); | 56 const ::media::PipelineStatusCB& status_cb); |
| 54 void VideoInitialize(TrackId track_id, | 57 void VideoInitialize(TrackId track_id, |
| (...skipping 21 matching lines...) Expand all Loading... |
| 76 typedef std::map<TrackId, MediaTrackHost*> MediaTrackMap; | 79 typedef std::map<TrackId, MediaTrackHost*> MediaTrackMap; |
| 77 MediaTrackMap media_track_map_; | 80 MediaTrackMap media_track_map_; |
| 78 | 81 |
| 79 DISALLOW_COPY_AND_ASSIGN(MediaPipelineHost); | 82 DISALLOW_COPY_AND_ASSIGN(MediaPipelineHost); |
| 80 }; | 83 }; |
| 81 | 84 |
| 82 } // namespace media | 85 } // namespace media |
| 83 } // namespace chromecast | 86 } // namespace chromecast |
| 84 | 87 |
| 85 #endif // CHROMECAST_BROWSER_MEDIA_MEDIA_PIPELINE_HOST_H_ | 88 #endif // CHROMECAST_BROWSER_MEDIA_MEDIA_PIPELINE_HOST_H_ |
| 86 | |
| OLD | NEW |