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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chromecast/media/cma/backend/media_sink_default.h
diff --git a/chromecast/media/cma/backend/media_sink_default.h b/chromecast/media/cma/backend/media_sink_default.h
new file mode 100644
index 0000000000000000000000000000000000000000..89f7c7b6e45920e5a9587a337d83de743feba097
--- /dev/null
+++ b/chromecast/media/cma/backend/media_sink_default.h
@@ -0,0 +1,44 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROMECAST_MEDIA_CMA_BACKEND_MEDIA_SINK_DEFAULT_H_
+#define CHROMECAST_MEDIA_CMA_BACKEND_MEDIA_SINK_DEFAULT_H_
+
+#include "base/cancelable_callback.h"
+#include "base/macros.h"
+#include "base/time/default_tick_clock.h"
+#include "chromecast/public/media/media_pipeline_backend.h"
+#include "media/base/time_delta_interpolator.h"
+
+namespace chromecast {
+namespace media {
+
+class MediaSinkDefault {
+ public:
+ MediaSinkDefault(MediaPipelineBackend::Decoder::Delegate* delegate,
+ base::TimeDelta start_pts);
+ ~MediaSinkDefault();
+
+ void SetPlaybackRate(float rate);
+ base::TimeDelta GetCurrentPts();
+ MediaPipelineBackend::BufferStatus PushBuffer(CastDecoderBuffer* buffer);
+
+ private:
+ void ScheduleEndOfStreamTask();
+
+ MediaPipelineBackend::Decoder::Delegate* delegate_;
+ base::DefaultTickClock tick_clock_;
+ ::media::TimeDeltaInterpolator time_interpolator_;
+ float playback_rate_;
+ base::TimeDelta last_frame_pts_;
+ bool received_eos_;
+ base::CancelableClosure eos_task_;
+
+ DISALLOW_COPY_AND_ASSIGN(MediaSinkDefault);
+};
+
+} // namespace media
+} // namespace chromecast
+
+#endif // CHROMECAST_MEDIA_CMA_BACKEND_MEDIA_SINK_DEFAULT_H_
« 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