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

Side by Side Diff: chromecast/media/cma/backend/media_sink_default.h

Issue 2583213003: [chromecast] Adds MediaSinkDefault. (Closed)
Patch Set: simple sink Created 3 years, 11 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
(Empty)
1 // Copyright 2016 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 CHROMECAST_MEDIA_CMA_BACKEND_MEDIA_SINK_DEFAULT_H_
6 #define CHROMECAST_MEDIA_CMA_BACKEND_MEDIA_SINK_DEFAULT_H_
7
8 #include "base/cancelable_callback.h"
9 #include "base/macros.h"
10 #include "base/time/default_tick_clock.h"
11 #include "chromecast/public/media/media_pipeline_backend.h"
12 #include "media/base/time_delta_interpolator.h"
13
14 namespace chromecast {
15 namespace media {
16
17 class MediaSinkDefault {
18 public:
19 MediaSinkDefault(MediaPipelineBackend::Decoder::Delegate* delegate,
20 base::TimeDelta start_pts);
21 ~MediaSinkDefault();
22
23 void SetPlaybackRate(float rate);
24 base::TimeDelta GetCurrentPts();
25 MediaPipelineBackend::BufferStatus PushBuffer(CastDecoderBuffer* buffer);
26
27 private:
28 void ScheduleEndOfStreamTask();
29
30 MediaPipelineBackend::Decoder::Delegate* delegate_;
31 base::DefaultTickClock tick_clock_;
32 ::media::TimeDeltaInterpolator time_interpolator_;
33 float playback_rate_;
34 base::TimeDelta last_frame_pts_;
35 bool received_eos_;
36 base::CancelableClosure eos_task_;
37
38 DISALLOW_COPY_AND_ASSIGN(MediaSinkDefault);
39 };
40
41 } // namespace media
42 } // namespace chromecast
43
44 #endif // CHROMECAST_MEDIA_CMA_BACKEND_MEDIA_SINK_DEFAULT_H_
OLDNEW
« no previous file with comments | « chromecast/media/cma/backend/media_pipeline_backend_default.cc ('k') | chromecast/media/cma/backend/media_sink_default.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698