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

Side by Side Diff: media/base/pipeline.h

Issue 1906423005: Replace scoped_ptr with std::unique_ptr in //media/base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-media-base: android Created 4 years, 7 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
« no previous file with comments | « media/base/null_video_sink_unittest.cc ('k') | media/base/pipeline_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 MEDIA_BASE_PIPELINE_H_ 5 #ifndef MEDIA_BASE_PIPELINE_H_
6 #define MEDIA_BASE_PIPELINE_H_ 6 #define MEDIA_BASE_PIPELINE_H_
7 7
8 #include <memory>
9
8 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
9 #include "base/time/time.h" 11 #include "base/time/time.h"
10 #include "media/base/buffering_state.h" 12 #include "media/base/buffering_state.h"
11 #include "media/base/cdm_context.h" 13 #include "media/base/cdm_context.h"
12 #include "media/base/media_export.h" 14 #include "media/base/media_export.h"
13 #include "media/base/pipeline_status.h" 15 #include "media/base/pipeline_status.h"
14 #include "media/base/ranges.h" 16 #include "media/base/ranges.h"
15 #include "media/base/text_track.h" 17 #include "media/base/text_track.h"
16 #include "media/base/video_rotation.h" 18 #include "media/base/video_rotation.h"
17 #include "ui/gfx/geometry/size.h" 19 #include "ui/gfx/geometry/size.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // video in supported formats are known. 56 // video in supported formats are known.
55 // |buffering_state_cb| will be executed whenever there are changes in the 57 // |buffering_state_cb| will be executed whenever there are changes in the
56 // overall buffering state of the pipeline. 58 // overall buffering state of the pipeline.
57 // |duration_change_cb| optional callback that will be executed whenever the 59 // |duration_change_cb| optional callback that will be executed whenever the
58 // presentation duration changes. 60 // presentation duration changes.
59 // |add_text_track_cb| will be executed whenever a text track is added. 61 // |add_text_track_cb| will be executed whenever a text track is added.
60 // |waiting_for_decryption_key_cb| will be executed whenever the key needed 62 // |waiting_for_decryption_key_cb| will be executed whenever the key needed
61 // to decrypt the stream is not available. 63 // to decrypt the stream is not available.
62 // It is an error to call this method after the pipeline has already started. 64 // It is an error to call this method after the pipeline has already started.
63 virtual void Start(Demuxer* demuxer, 65 virtual void Start(Demuxer* demuxer,
64 scoped_ptr<Renderer> renderer, 66 std::unique_ptr<Renderer> renderer,
65 const base::Closure& ended_cb, 67 const base::Closure& ended_cb,
66 const PipelineStatusCB& error_cb, 68 const PipelineStatusCB& error_cb,
67 const PipelineStatusCB& seek_cb, 69 const PipelineStatusCB& seek_cb,
68 const PipelineMetadataCB& metadata_cb, 70 const PipelineMetadataCB& metadata_cb,
69 const BufferingStateCB& buffering_state_cb, 71 const BufferingStateCB& buffering_state_cb,
70 const base::Closure& duration_change_cb, 72 const base::Closure& duration_change_cb,
71 const AddTextTrackCB& add_text_track_cb, 73 const AddTextTrackCB& add_text_track_cb,
72 const base::Closure& waiting_for_decryption_key_cb) = 0; 74 const base::Closure& waiting_for_decryption_key_cb) = 0;
73 75
74 // Asynchronously stops the pipeline, executing |stop_cb| when the pipeline 76 // Asynchronously stops the pipeline, executing |stop_cb| when the pipeline
(...skipping 21 matching lines...) Expand all
96 // last rendered frame. 98 // last rendered frame.
97 // 99 //
98 // It is an error to call this method if the pipeline has not started or is 100 // It is an error to call this method if the pipeline has not started or is
99 // seeking. 101 // seeking.
100 virtual void Suspend(const PipelineStatusCB& suspend_cb) = 0; 102 virtual void Suspend(const PipelineStatusCB& suspend_cb) = 0;
101 103
102 // Resume the pipeline with a new renderer, and initialize it with a seek. 104 // Resume the pipeline with a new renderer, and initialize it with a seek.
103 // 105 //
104 // It is an error to call this method if the pipeline has not finished 106 // It is an error to call this method if the pipeline has not finished
105 // suspending. 107 // suspending.
106 virtual void Resume(scoped_ptr<Renderer> renderer, 108 virtual void Resume(std::unique_ptr<Renderer> renderer,
107 base::TimeDelta timestamp, 109 base::TimeDelta timestamp,
108 const PipelineStatusCB& seek_cb) = 0; 110 const PipelineStatusCB& seek_cb) = 0;
109 111
110 // Returns true if the pipeline has been started via Start(). If IsRunning() 112 // Returns true if the pipeline has been started via Start(). If IsRunning()
111 // returns true, it is expected that Stop() will be called before destroying 113 // returns true, it is expected that Stop() will be called before destroying
112 // the pipeline. 114 // the pipeline.
113 virtual bool IsRunning() const = 0; 115 virtual bool IsRunning() const = 0;
114 116
115 // Gets the current playback rate of the pipeline. When the pipeline is 117 // Gets the current playback rate of the pipeline. When the pipeline is
116 // started, the playback rate will be 0.0. A rate of 1.0 indicates 118 // started, the playback rate will be 0.0. A rate of 1.0 indicates
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 // Gets the current pipeline statistics. 155 // Gets the current pipeline statistics.
154 virtual PipelineStatistics GetStatistics() const = 0; 156 virtual PipelineStatistics GetStatistics() const = 0;
155 157
156 virtual void SetCdm(CdmContext* cdm_context, 158 virtual void SetCdm(CdmContext* cdm_context,
157 const CdmAttachedCB& cdm_attached_cb) = 0; 159 const CdmAttachedCB& cdm_attached_cb) = 0;
158 }; 160 };
159 161
160 } // namespace media 162 } // namespace media
161 163
162 #endif // MEDIA_BASE_PIPELINE_H_ 164 #endif // MEDIA_BASE_PIPELINE_H_
OLDNEW
« no previous file with comments | « media/base/null_video_sink_unittest.cc ('k') | media/base/pipeline_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698