blob: 60b80915dfe18d9206d89506680ce51031045934 [file] [log] [blame]
// Copyright 2021 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.media2;
using zx;
/// Describes when a transport control operation is to occur using
/// a time value that is comprehensible when the transport is
/// stopped.
type RealTime = flexible union {
1: system_time zx.time;
2: reference_time zx.time;
};
/// Describes when a transport control operation is to occur using
/// a time value that is comprehensible when the transport is
/// progressing. This is intended for renderers and consumers,
/// which recognize presentation time.
type RealOrPresentationTime = flexible union {
1: system_time zx.time;
2: reference_time zx.time;
3: presentation_time zx.duration;
};
/// Type returned by `Consumer.WatchPacketLeadTime` and `Producer.WatchBufferLeadTime`.
type WatchLeadTimeResult = flexible union {
/// A lead time value. Negative values indicate starvation.
1: value zx.duration;
/// Indicates starvation. This value is used when the service cannot determine how late the
/// packet/buffer arrival is.
2: underflow struct {};
/// Indicates that no arrival value has ever been reported for the service. This may be returned
/// when a new request causes a old request to respond before any value has been reported.
3: no_value struct {};
};
type StartError = flexible enum {
CANCELED = 1;
ALREADY_STARTED = 2;
PRECEDES_PENDING_STOP = 3;
};
type StopError = flexible enum {
CANCELED = 1;
ALREADY_STOPPED = 2;
PRECEDES_PENDING_START = 3;
};
type SetRateError = flexible enum {
NOT_SUPPORTED = 1;
CANCELED = 2;
SCHEDULED_IN_PAST = 3;
};
type AmendPresentationError = flexible enum {
CANCELED = 1;
SCHEDULED_IN_PAST = 2;
NOT_STARTED = 3;
};