chromium/chromecast/common/mojom/application_media_capabilities.mojom

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

module chromecast.shell.mojom;

// Supported bitstream audio codecs and their associated properties. This is the
// corresponding mojo struct of BitstreamAudioCodecsInfo in
// chromecast/base/bitstream_audio_codecs.h
struct BitstreamAudioCodecsInfo {
  // Bitmap of supported bitstream audio codecs.
  int32 codecs = 0;

  // Bitmap specifying which of the corresponding codecs in |codecs| support
  // spatial rendering.
  int32 spatial_rendering = 0;
};

// Observes changes in an individual application's media capabilities.
// See chromecast/base/bitstream_audio_codecs.h for codec values.
interface ApplicationMediaCapabilitiesObserver {
  // Called when bitstream audio supporting information is changed.
  // |info| contains the latest supported bitstream audio codec information.
  OnSupportedBitstreamAudioCodecsChanged(BitstreamAudioCodecsInfo info);
};

// Media capabilities for an individual application.
interface ApplicationMediaCapabilities {
  AddObserver(pending_remote<ApplicationMediaCapabilitiesObserver> observer);
};