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

Side by Side Diff: mojo/services/media/common/interfaces/media_transport.mojom

Issue 1814553002: Motown: Improvements to packet definition (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Added a comment. 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 [DartPackage="mojo_services"] 5 [DartPackage="mojo_services"]
6 module mojo.media; 6 module mojo.media;
7 7
8 import "mojo/services/media/common/interfaces/media_common.mojom"; 8 import "mojo/services/media/common/interfaces/media_common.mojom";
9 import "mojo/services/media/common/interfaces/media_types.mojom"; 9 import "mojo/services/media/common/interfaces/media_types.mojom";
10 10
(...skipping 12 matching lines...) Expand all
23 // sent across a media pipe. MediaPackets consist of the metadata for the unit 23 // sent across a media pipe. MediaPackets consist of the metadata for the unit
24 // of media, as well as the set of offset/lengths in the pipe's shared buffer 24 // of media, as well as the set of offset/lengths in the pipe's shared buffer
25 // which define the payload of the packet itself. 25 // which define the payload of the packet itself.
26 struct MediaPacket { 26 struct MediaPacket {
27 const int64 kNoTimestamp = 0x7fffffffffffffff; 27 const int64 kNoTimestamp = 0x7fffffffffffffff;
28 28
29 // Presentation Time Stamp. Time at which the media should be presented, 29 // Presentation Time Stamp. Time at which the media should be presented,
30 // according to the media timeline. 30 // according to the media timeline.
31 int64 pts = kNoTimestamp; 31 int64 pts = kNoTimestamp;
32 32
33 // Duration represented by the packet.
34 uint64 duration;
35
36 // Indicates whether this is the last packet in the stream. 33 // Indicates whether this is the last packet in the stream.
37 bool end_of_stream; 34 bool end_of_stream;
38 35
39 // Bookkeeping to determine where this MediaPacket's payload exists in its 36 // Bookkeeping to determine where this MediaPacket's payload exists in its
40 // MediaPipe's shared buffer. 37 // MediaPipe's shared buffer.
41 // 38 //
42 // For simple cases, only the payload field is used. It provides the offset 39 // For simple cases, only the payload field is used. It provides the offset
43 // into the shared buffer for the payload, as well as its length. In more 40 // into the shared buffer for the payload, as well as its length. In more
44 // complicated cases (circular buffer, arbitrary scatter-gather), additional 41 // complicated cases (circular buffer, arbitrary scatter-gather), additional
45 // regions may be described in the extra_payload array. Logically, the 42 // regions may be described in the extra_payload array. Logically, the
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 SendPacket(MediaPacket packet) => (SendResult result); 126 SendPacket(MediaPacket packet) => (SendResult result);
130 127
131 // Primes the stream. The callback signals that the prime operation is 128 // Primes the stream. The callback signals that the prime operation is
132 // complete. 129 // complete.
133 Prime() => (); 130 Prime() => ();
134 131
135 // Flushes the stream. The callback signals that the flush operation is 132 // Flushes the stream. The callback signals that the flush operation is
136 // complete. 133 // complete.
137 Flush() => (); 134 Flush() => ();
138 }; 135 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698