Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(185)

Side by Side Diff: chromecast/media/cma/pipeline/video_pipeline_impl.h

Issue 1257013003: Load CMA backend from shared library (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_MEDIA_CMA_BASE_VIDEO_PIPELINE_IMPL_H_ 5 #ifndef CHROMECAST_MEDIA_CMA_BASE_VIDEO_PIPELINE_IMPL_H_
6 #define CHROMECAST_MEDIA_CMA_BASE_VIDEO_PIPELINE_IMPL_H_ 6 #define CHROMECAST_MEDIA_CMA_BASE_VIDEO_PIPELINE_IMPL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "base/threading/thread_checker.h" 13 #include "base/threading/thread_checker.h"
14 #include "chromecast/media/cma/pipeline/video_pipeline.h" 14 #include "chromecast/media/cma/pipeline/video_pipeline.h"
15 #include "chromecast/media/cma/pipeline/video_pipeline_client.h" 15 #include "chromecast/media/cma/pipeline/video_pipeline_client.h"
16 #include "chromecast/public/media/stream_id.h" 16 #include "chromecast/public/media/stream_id.h"
17 17 #include "chromecast/public/media/video_pipeline_device.h"
18 namespace gfx {
19 class Size;
20 }
21 18
22 namespace media { 19 namespace media {
23 class AudioDecoderConfig; 20 class AudioDecoderConfig;
24 class VideoDecoderConfig; 21 class VideoDecoderConfig;
25 } 22 }
26 23
27 namespace chromecast { 24 namespace chromecast {
25 struct Size;
28 namespace media { 26 namespace media {
29 class AvPipelineImpl; 27 class AvPipelineImpl;
30 class BrowserCdmCast; 28 class BrowserCdmCast;
31 class BufferingState; 29 class BufferingState;
32 class CodedFrameProvider; 30 class CodedFrameProvider;
33 class VideoPipelineDevice; 31 class VideoPipelineDevice;
34 32
35 class VideoPipelineImpl : public VideoPipeline { 33 class VideoPipelineImpl : public VideoPipeline {
36 public: 34 public:
37 // |buffering_controller| can be NULL. 35 // |buffering_controller| can be NULL.
(...skipping 16 matching lines...) Expand all
54 void Flush(const ::media::PipelineStatusCB& status_cb); 52 void Flush(const ::media::PipelineStatusCB& status_cb);
55 void Stop(); 53 void Stop();
56 54
57 // Update the playback statistics for this video stream. 55 // Update the playback statistics for this video stream.
58 void UpdateStatistics(); 56 void UpdateStatistics();
59 57
60 // VideoPipeline implementation. 58 // VideoPipeline implementation.
61 void SetClient(const VideoPipelineClient& client) override; 59 void SetClient(const VideoPipelineClient& client) override;
62 60
63 private: 61 private:
62 class DeviceClientImpl;
63 friend class DeviceClientImpl;
64
64 void OnFlushDone(const ::media::PipelineStatusCB& status_cb); 65 void OnFlushDone(const ::media::PipelineStatusCB& status_cb);
65 void OnUpdateConfig(StreamId id, 66 void OnUpdateConfig(StreamId id,
66 const ::media::AudioDecoderConfig& audio_config, 67 const ::media::AudioDecoderConfig& audio_config,
67 const ::media::VideoDecoderConfig& video_config); 68 const ::media::VideoDecoderConfig& video_config);
68 void OnNaturalSizeChanged(const gfx::Size& size); 69 void OnNaturalSizeChanged(const Size& size);
69 70
70 VideoPipelineDevice* video_device_; 71 VideoPipelineDevice* video_device_;
71 72
72 scoped_ptr<AvPipelineImpl> av_pipeline_impl_; 73 scoped_ptr<AvPipelineImpl> av_pipeline_impl_;
73 VideoPipelineClient video_client_; 74 VideoPipelineClient video_client_;
74 75
75 ::media::PipelineStatistics previous_stats_; 76 ::media::PipelineStatistics previous_stats_;
76 77
77 base::WeakPtr<VideoPipelineImpl> weak_this_; 78 base::WeakPtr<VideoPipelineImpl> weak_this_;
78 base::WeakPtrFactory<VideoPipelineImpl> weak_factory_; 79 base::WeakPtrFactory<VideoPipelineImpl> weak_factory_;
79 80
80 DISALLOW_COPY_AND_ASSIGN(VideoPipelineImpl); 81 DISALLOW_COPY_AND_ASSIGN(VideoPipelineImpl);
81 }; 82 };
82 83
83 } // namespace media 84 } // namespace media
84 } // namespace chromecast 85 } // namespace chromecast
85 86
86 #endif // CHROMECAST_MEDIA_CMA_BASE_VIDEO_PIPELINE_IMPL_H_ 87 #endif // CHROMECAST_MEDIA_CMA_BASE_VIDEO_PIPELINE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698