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

Side by Side 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, 9 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 SERVICES_MEDIA_FRAMEWORK_MOJO_AUDIO_TRACK_PRODUCER_H_
6 #define SERVICES_MEDIA_FRAMEWORK_MOJO_AUDIO_TRACK_PRODUCER_H_
7
8 #include "services/media/framework_mojo/push_producer_base.h"
9
10 namespace mojo {
11 namespace media {
12
13 // Delivers a stream to an audio track's MediaPipe.
14 class AudioTrackProducer : public PushProducerBase {
15 public:
16 using FlushPipeCallback = mojo::Callback<void()>;
17
18 static std::shared_ptr<AudioTrackProducer> Create(
19 MediaPipePtr pipe) {
20 return std::shared_ptr<AudioTrackProducer>(
21 new AudioTrackProducer(pipe.Pass()));
22 }
23
24 ~AudioTrackProducer() override;
25
26 // Tells the connected pipe to flush.
27 void FlushPipe(const FlushPipeCallback& callback);
28
29 protected:
30 // PushProducerBase overrrides.
31 bool IsConnected() override;
32
33 void PushPacketInternal(Packet* packet_raw_ptr, MediaPacketPtr media_packet)
34 override;
35
36 private:
37 AudioTrackProducer(MediaPipePtr pipe);
38
39 MediaPipePtr pipe_;
40 };
41
42 } // namespace media
43 } // namespace mojo
44
45 #endif // SERVICES_MEDIA_FRAMEWORK_MOJO_AUDIO_TRACK_PRODUCER_SINK_H_
OLDNEW
« 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