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

Side by Side Diff: services/media/framework/parts/null_sink.h

Issue 1678433002: Motown: Remove LPCM optimizations, fix prepare, add flush, add ActiveMultistreamSink model/stage (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Sync 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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 SERVICES_MEDIA_FRAMEWORK_PARTS_NULL_SINK_H_ 5 #ifndef SERVICES_MEDIA_FRAMEWORK_PARTS_NULL_SINK_H_
6 #define SERVICES_MEDIA_FRAMEWORK_PARTS_NULL_SINK_H_ 6 #define SERVICES_MEDIA_FRAMEWORK_PARTS_NULL_SINK_H_
7 7
8 #include "services/media/framework/models/active_sink.h" 8 #include "services/media/framework/models/active_sink.h"
9 9
10 namespace mojo { 10 namespace mojo {
11 namespace media { 11 namespace media {
12 12
13 class NullSink;
14
15 typedef SharedPtr<NullSink, ActiveSink> NullSinkPtr;
16
17 // Sink that throws packets away. 13 // Sink that throws packets away.
18 class NullSink : public ActiveSink { 14 class NullSink : public ActiveSink {
19 public: 15 public:
20 static NullSinkPtr Create() { return NullSinkPtr(new NullSink()); } 16 static std::shared_ptr<NullSink> Create() {
17 return std::shared_ptr<NullSink>(new NullSink());
18 }
21 19
22 ~NullSink() override; 20 ~NullSink() override;
23 21
24 // ActiveSink implementation. 22 // ActiveSink implementation.
25 bool must_allocate() const override; 23 PayloadAllocator* allocator() override;
26 24
27 Allocator* allocator() override; 25 void SetDemandCallback(const DemandCallback& demand_callback) override;
28
29 void SetDemandCallback(DemandCallback demand_callback) override;
30 26
31 void Prime() override; 27 void Prime() override;
32 28
33 Demand SupplyPacket(PacketPtr packet) override; 29 Demand SupplyPacket(PacketPtr packet) override;
34 30
35 private: 31 private:
36 NullSink(); 32 NullSink();
37 33
38 DemandCallback demand_callback_; 34 DemandCallback demand_callback_;
39 }; 35 };
40 36
41 } // namespace media 37 } // namespace media
42 } // namespace mojo 38 } // namespace mojo
43 39
44 #endif // SERVICES_MEDIA_FRAMEWORK_PARTS_NULL_SINK_H_ 40 #endif // SERVICES_MEDIA_FRAMEWORK_PARTS_NULL_SINK_H_
OLDNEW
« no previous file with comments | « services/media/framework/parts/lpcm_reformatter.cc ('k') | services/media/framework/parts/null_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698