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

Side by Side Diff: services/media/framework/models/active_multistream_source.h

Issue 1833323002: Motown: Add ActiveMultistreamSource model in preparation for the ffmpeg demux with async I/O (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: dalesat Created 4 years, 8 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/graph.h ('k') | services/media/framework/models/multistream_source.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_SOURCE_H_
6 #define MOJO_MEDIA_MODELS_ACTIVE_MULTISTREAM_SOURCE_H_
7
8 #include "services/media/framework/models/part.h"
9 #include "services/media/framework/packet.h"
10
11 namespace mojo {
12 namespace media {
13
14 // Asynchronous source of packets for multiple streams.
15 class ActiveMultistreamSource : public Part {
16 public:
17 using SupplyCallback =
18 std::function<void(size_t output_index, PacketPtr packet)>;
19
20 ~ActiveMultistreamSource() override {}
21
22 // TODO(dalesat): Support dynamic output creation.
23
24 // Returns the number of streams the source produces.
25 virtual size_t stream_count() const = 0;
26
27 // Sets the callback that supplies a packet asynchronously.
28 virtual void SetSupplyCallback(const SupplyCallback& supply_callback) = 0;
29
30 // Requests a packet from the source to be supplied asynchronously via
31 // the supply callback.
32 virtual void RequestPacket() = 0;
33 };
34
35 } // namespace media
36 } // namespace mojo
37
38 #endif // MOJO_MEDIA_MODELS_ACTIVE_MULTISTREAM_SOURCE_H_
OLDNEW
« no previous file with comments | « services/media/framework/graph.h ('k') | services/media/framework/models/multistream_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698