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

Unified Diff: mojo/dart/packages/mojo_services/lib/mojo/media/media_transport.mojom.dart

Issue 1823833003: Take advantage of MojoGetBufferInformation (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebase and fix a type mismatch which the android build caught 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | mojo/services/media/common/cpp/circular_buffer_media_pipe_adapter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/dart/packages/mojo_services/lib/mojo/media/media_transport.mojom.dart
diff --git a/mojo/dart/packages/mojo_services/lib/mojo/media/media_transport.mojom.dart b/mojo/dart/packages/mojo_services/lib/mojo/media/media_transport.mojom.dart
index c8ffc41e4e217712e466eb2e05238b9a11e7cc6b..14b2d3a3c3da4804aa57410d41aeb6d7e1f7ed3e 100644
--- a/mojo/dart/packages/mojo_services/lib/mojo/media/media_transport.mojom.dart
+++ b/mojo/dart/packages/mojo_services/lib/mojo/media/media_transport.mojom.dart
@@ -769,10 +769,9 @@ class _MediaPullModeProducerReleasePacketParams extends bindings.Struct {
class _MediaConsumerSetBufferParams extends bindings.Struct {
static const List<bindings.StructDataHeader> kVersions = const [
- const bindings.StructDataHeader(24, 0)
+ const bindings.StructDataHeader(16, 0)
];
core.MojoSharedBuffer buffer = null;
- int size = 0;
_MediaConsumerSetBufferParams() : super(kVersions.last.size);
@@ -813,10 +812,6 @@ class _MediaConsumerSetBufferParams extends bindings.Struct {
result.buffer = decoder0.decodeSharedBufferHandle(8, false);
}
- if (mainDataHeader.version >= 0) {
-
- result.size = decoder0.decodeUint64(16);
- }
return result;
}
@@ -829,19 +824,11 @@ class _MediaConsumerSetBufferParams extends bindings.Struct {
"buffer of struct _MediaConsumerSetBufferParams: $e";
rethrow;
}
- try {
- encoder0.encodeUint64(size, 16);
- } on bindings.MojoCodecError catch(e) {
- e.message = "Error encountered while encoding field "
- "size of struct _MediaConsumerSetBufferParams: $e";
- rethrow;
- }
}
String toString() {
return "_MediaConsumerSetBufferParams("
- "buffer: $buffer" ", "
- "size: $size" ")";
+ "buffer: $buffer" ")";
}
Map toJson() {
@@ -1906,7 +1893,7 @@ class _MediaConsumerServiceDescription implements service_describer.ServiceDescr
abstract class MediaConsumer {
static const String serviceName = null;
- dynamic setBuffer(core.MojoSharedBuffer buffer,int size,[Function responseFactory = null]);
+ dynamic setBuffer(core.MojoSharedBuffer buffer,[Function responseFactory = null]);
dynamic sendPacket(MediaPacket packet,[Function responseFactory = null]);
dynamic prime([Function responseFactory = null]);
dynamic flush([Function responseFactory = null]);
@@ -2032,10 +2019,9 @@ class _MediaConsumerProxyCalls implements MediaConsumer {
_MediaConsumerProxyImpl _proxyImpl;
_MediaConsumerProxyCalls(this._proxyImpl);
- dynamic setBuffer(core.MojoSharedBuffer buffer,int size,[Function responseFactory = null]) {
+ dynamic setBuffer(core.MojoSharedBuffer buffer,[Function responseFactory = null]) {
var params = new _MediaConsumerSetBufferParams();
params.buffer = buffer;
- params.size = size;
return _proxyImpl.sendMessageWithRequestId(
params,
_mediaConsumerMethodSetBufferName,
@@ -2177,7 +2163,7 @@ class MediaConsumerStub extends bindings.Stub {
case _mediaConsumerMethodSetBufferName:
var params = _MediaConsumerSetBufferParams.deserialize(
message.payload);
- var response = _impl.setBuffer(params.buffer,params.size,_mediaConsumerSetBufferResponseParamsFactory);
+ var response = _impl.setBuffer(params.buffer,_mediaConsumerSetBufferResponseParamsFactory);
if (response is Future) {
return response.then((response) {
if (response != null) {
« no previous file with comments | « no previous file | mojo/services/media/common/cpp/circular_buffer_media_pipe_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698