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

Side by Side Diff: services/media/framework/models/multistream_source.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 MOJO_MEDIA_MODELS_MULTISTREAM_PACKET_SOURCE_H_ 5 #ifndef MOJO_MEDIA_MODELS_MULTISTREAM_SOURCE_H_
6 #define MOJO_MEDIA_MODELS_MULTISTREAM_PACKET_SOURCE_H_ 6 #define MOJO_MEDIA_MODELS_MULTISTREAM_SOURCE_H_
7 7
8 #include <memory> 8 #include "services/media/framework/models/part.h"
9
10 #include "services/media/framework/packet.h" 9 #include "services/media/framework/packet.h"
11 10
12 namespace mojo { 11 namespace mojo {
13 namespace media { 12 namespace media {
14 13
15 // Synchronous source of packets for multiple streams. This is currently used 14 // Synchronous source of packets for multiple streams. This is currently used
16 // by Demux, though it would be better if Demux were asynchronous. 15 // by Demux, though it would be better if Demux were asynchronous.
17 class MultiStreamPacketSource { 16 class MultistreamSource : public Part {
18 public: 17 public:
19 virtual ~MultiStreamPacketSource() {} 18 ~MultistreamSource() override {}
20 19
21 // Returns the number of streams the source produces. 20 // Returns the number of streams the source produces.
22 virtual uint32_t stream_count() const = 0; 21 virtual size_t stream_count() const = 0;
23 22
24 // Gets a packet for the stream indicated via stream_index_out. This call 23 // Gets a packet for the stream indicated via stream_index_out. This call
25 // should always produce a packet until end-of-stream. The caller is 24 // should always produce a packet until end-of-stream. The caller is
26 // responsible for releasing the packet. 25 // responsible for releasing the packet.
27 virtual PacketPtr PullPacket(uint32_t *stream_index_out) = 0; 26 virtual PacketPtr PullPacket(size_t *stream_index_out) = 0;
28 }; 27 };
29 28
30 typedef std::shared_ptr<MultiStreamPacketSource> MultiStreamPacketSourcePtr;
31
32 } // namespace media 29 } // namespace media
33 } // namespace mojo 30 } // namespace mojo
34 31
35 #endif // MOJO_MEDIA_MODELS_MULTISTREAM_PACKET_SOURCE_H_ 32 #endif // MOJO_MEDIA_MODELS_MULTISTREAM_SOURCE_H_
OLDNEW
« no previous file with comments | « services/media/framework/models/multistream_packet_source.h ('k') | services/media/framework/models/packet_transform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698