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

Side by Side Diff: services/media/framework/models/active_multistream_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
« no previous file with comments | « services/media/framework/metadata.cc ('k') | services/media/framework/models/active_sink.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 MOJO_MEDIA_MODELS_ACTIVE_MULTISTREAM_SINK_H_
6 #define MOJO_MEDIA_MODELS_ACTIVE_MULTISTREAM_SINK_H_
7
8 #include "services/media/framework/models/demand.h"
9 #include "services/media/framework/models/part.h"
10 #include "services/media/framework/packet.h"
11
12 namespace mojo {
13 namespace media {
14
15 // Host for ActiveMultistreamSink.
16 class ActiveMultistreamSinkHost {
17 public:
18 virtual ~ActiveMultistreamSinkHost() {}
19
20 // TODO(dalesat): Revisit allocation semantics.
21
22 // Allocates an input and returns its index.
23 virtual size_t AllocateInput() = 0;
24
25 // Releases a previously-allocated input and returns the container size
26 // required to hold the remaining inputs (i.e. max input index + 1). The
27 // return value can be used to resize the caller's input container.
28 virtual size_t ReleaseInput(size_t index) = 0;
29
30 // Updates demand for the specified input.
31 virtual void UpdateDemand(size_t input_index, Demand demand) = 0;
32 };
33
34 // Synchronous sink of packets for multiple streams.
35 class ActiveMultistreamSink : public Part {
36 public:
37 ~ActiveMultistreamSink() override {}
38
39 // Sets the host callback interface.
40 virtual void SetHost(ActiveMultistreamSinkHost* host) = 0;
41
42 // Initiates demand.
43 virtual void Prime() = 0;
44
45 // Supplies a packet to the sink, returning the new demand for the input.
46 virtual Demand SupplyPacket(size_t input_index, PacketPtr packet) = 0;
47 };
48
49 } // namespace media
50 } // namespace mojo
51
52 #endif // MOJO_MEDIA_MODELS_ACTIVE_MULTISTREAM_SINK_H_
OLDNEW
« no previous file with comments | « services/media/framework/metadata.cc ('k') | services/media/framework/models/active_sink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698