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

Unified Diff: services/media/framework_mojo/audio_track_producer.h

Issue 1692443002: Motown: Framework parts for mojo transport (producer/consumer/mediapipe) and control (audiotrack). (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Added comments to AudioTrackController::SetRate regarding the proper way to implement it. Created 4 years, 10 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: services/media/framework_mojo/audio_track_producer.h
diff --git a/services/media/framework_mojo/audio_track_producer.h b/services/media/framework_mojo/audio_track_producer.h
new file mode 100644
index 0000000000000000000000000000000000000000..4795822eee9459f44d0212e5dacbad5a2d967c5b
--- /dev/null
+++ b/services/media/framework_mojo/audio_track_producer.h
@@ -0,0 +1,45 @@
+// 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 SERVICES_MEDIA_FRAMEWORK_MOJO_AUDIO_TRACK_PRODUCER_H_
+#define SERVICES_MEDIA_FRAMEWORK_MOJO_AUDIO_TRACK_PRODUCER_H_
+
+#include "services/media/framework_mojo/push_producer_base.h"
+
+namespace mojo {
+namespace media {
+
+// Delivers a stream to an audio track's MediaPipe.
+class AudioTrackProducer : public PushProducerBase {
+ public:
+ using FlushPipeCallback = mojo::Callback<void()>;
+
+ static std::shared_ptr<AudioTrackProducer> Create(
+ MediaPipePtr pipe) {
+ return std::shared_ptr<AudioTrackProducer>(
+ new AudioTrackProducer(pipe.Pass()));
+ }
+
+ ~AudioTrackProducer() override;
+
+ // Tells the connected pipe to flush.
+ void FlushPipe(const FlushPipeCallback& callback);
+
+ protected:
+ // PushProducerBase overrrides.
+ bool IsConnected() override;
+
+ void PushPacketInternal(Packet* packet_raw_ptr, MediaPacketPtr media_packet)
+ override;
+
+ private:
+ AudioTrackProducer(MediaPipePtr pipe);
+
+ MediaPipePtr pipe_;
+};
+
+} // namespace media
+} // namespace mojo
+
+#endif // SERVICES_MEDIA_FRAMEWORK_MOJO_AUDIO_TRACK_PRODUCER_SINK_H_
« no previous file with comments | « services/media/framework_mojo/audio_track_controller.cc ('k') | services/media/framework_mojo/audio_track_producer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698