blob: 39729272f16799587493693cbb21d9bae0b5bf7c [file] [log] [blame]
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
[DartPackage="mojo_services"]
module mojo.media;
import "mojo/services/media/common/interfaces/media_metadata.mojom";
import "mojo/services/media/common/interfaces/media_transport.mojom";
import "mojo/services/media/common/interfaces/media_types.mojom";
// Demuxes content to produce media streams.
interface MediaDemux {
// Special value for GetMetadata version_last_seen parameter to get the
// current metadata immediately.
const uint64 kInitialMetadata = 0;
// Describes the demux.
Describe() => (array<MediaType> stream_types);
// Gets the producer for the specified stream.
GetProducer(uint32 stream_index, MediaProducer& producer);
// Gets the metadata. To get the metadata immediately, call
// GetMetadata(kInitialMetadata). To get updates thereafter, pass the version
// sent in the previous callback.
GetMetadata(uint64 version_last_seen) =>
(uint64 version, MediaMetadata? metadata);
// Primes the demux and downstream components.
Prime() => ();
// Flushes the demux and downstream components.
Flush() => ();
// Seeks to the specified position, specified in nanoseconds.
Seek(int64 position) => ();
};