aboutsummaryrefslogtreecommitdiff
path: root/cast
diff options
context:
space:
mode:
authorAlex Leung <alexleung@google.com>2020-10-29 13:56:21 -0700
committerCommit Bot <commit-bot@chromium.org>2020-10-31 01:13:51 +0000
commit1003fa794677907cf89753fe46028573f5a0787c (patch)
treee990a56c76341141960a22e6aacabebdb201cc83 /cast
parentcb2f21d0af42e9ab20cf7446d091a38fdeb2ac73 (diff)
downloadopenscreen-1003fa794677907cf89753fe46028573f5a0787c.tar.gz
Update Cast Media Runtime files that were missed
PiperOrigin-RevId: 339740556 Change-Id: Ic67271022d723ec4a248711b7b2fc4bb69a611a2 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2512404 Reviewed-by: Ryan Keane <rwkeane@google.com> Commit-Queue: Ryan Keane <rwkeane@google.com>
Diffstat (limited to 'cast')
-rw-r--r--cast/cast_core/api/runtime/cast_audio_decoder_service.proto51
-rw-r--r--cast/cast_core/api/runtime/cma_audio_service_client_service.proto24
2 files changed, 22 insertions, 53 deletions
diff --git a/cast/cast_core/api/runtime/cast_audio_decoder_service.proto b/cast/cast_core/api/runtime/cast_audio_decoder_service.proto
index ee222e83..30dd38f2 100644
--- a/cast/cast_core/api/runtime/cast_audio_decoder_service.proto
+++ b/cast/cast_core/api/runtime/cast_audio_decoder_service.proto
@@ -14,6 +14,18 @@ enum PipelineState {
PIPELINE_STATE_PAUSED = 3;
}
+enum CastAudioDecoderMode {
+ // Both multiroom and audio rendering is enabled.
+ CAST_AUDIO_DECODER_MODE_ALL = 0;
+
+ // Only multiroom is enabled and audio rendering is disabled. This should
+ // be used if the runtime is taking over responsibility for rendering audio.
+ CAST_AUDIO_DECODER_MODE_MULTIROOM_ONLY = 1;
+
+ // Only audio rendering is enabled and multiroom is disabled.
+ CAST_AUDIO_DECODER_MODE_AUDIO_ONLY = 2;
+}
+
message AudioConfiguration {
enum AudioCodec {
AUDIO_CODEC_UNKNOWN = 0;
@@ -113,31 +125,22 @@ message RenderingDelay {
message MediaTime {
// The currents PTS that has been rendered.
- int64 pts_micros = 1;
+ int64 current_pts_micros = 1;
+
+ // The end of stream has been rendered.
+ bool end_of_stream = 2;
// Capture time (in microseconds) with respect to the system clock (must be
// CLOCK_MONOTONIC_RAW) at which the delay measurement was taken.
- google.protobuf.Timestamp capture_time = 2;
+ google.protobuf.Timestamp capture_time = 3;
}
message InitializeRequest {
- enum Mode {
- // Both multiroom and audio rendering is enabled.
- MODE_ALL = 0;
-
- // Only multiroom is enabled and audio rendering is disabled. This should
- // be used if the runtime is taking over responsibility for rendering audio.
- MODE_MULTIROOM_ONLY = 1;
-
- // Only audio rendering is enabled and multiroom is disabled.
- MODE_AUDIO_ONLY = 2;
- }
-
// Cast session ID.
string cast_session_id = 1;
// Configures how the server should operate.
- Mode mode = 2;
+ CastAudioDecoderMode mode = 2;
}
message StartRequest {
@@ -183,19 +186,10 @@ message SetVolumeRequest {
// The multiplier is in the range [0.0, 1.0].
float multiplier = 1;
}
-message SetVolumeResponse {
- // Returns true if the last SetVolumeRequest succeeded.
- bool success = 1;
-}
-
message SetPlaybackRateRequest {
// Playback rate greater than 0.
double rate = 1;
}
-message SetPlaybackRateResponse {
- // Returns true if the last SetPlaybackRateResponse succeeded.
- double success = 1;
-}
message GetMediaTimeResponse {
// The current media time that has been rendered.
@@ -210,7 +204,7 @@ message GetMediaTimeResponse {
// - Stopped
// - Paused
//
-// Note tthat the received ordering between different RPC calls is not
+// Note that the received ordering between different RPC calls is not
// guaranteed to match the sent order.
service CastAudioDecoder {
// Initializes the service and places the pipeline into the 'Stopped' state.
@@ -249,18 +243,17 @@ service CastAudioDecoder {
// Sets the volume multiplier for this audio stream.
// The multiplier is in the range [0.0, 1.0]. If not called, a default
- // multiplier of 1.0 is assumed. A SetVolumeResponse message will be
- // be generated.
+ // multiplier of 1.0 is assumed.
//
// May be called in any state, and following this call the state machine
// will be in the same state.
- rpc SetVolume(SetVolumeRequest) returns (SetVolumeResponse);
+ rpc SetVolume(SetVolumeRequest) returns (google.protobuf.Empty);
// Sets the playback rate for this audio stream.
//
// May be called in any state, and following this call the state machine
// will be in the same state.
- rpc SetPlayback(SetPlaybackRateRequest) returns (SetPlaybackRateResponse);
+ rpc SetPlayback(SetPlaybackRateRequest) returns (google.protobuf.Empty);
// Streams decoded bits and responses to the audio service.
//
diff --git a/cast/cast_core/api/runtime/cma_audio_service_client_service.proto b/cast/cast_core/api/runtime/cma_audio_service_client_service.proto
deleted file mode 100644
index 1bf7ce62..00000000
--- a/cast/cast_core/api/runtime/cma_audio_service_client_service.proto
+++ /dev/null
@@ -1,24 +0,0 @@
-syntax = "proto3";
-
-package cast.media.runtime;
-
-import "google/protobuf/empty.proto";
-
-option optimize_for = LITE_RUNTIME;
-
-message EnableOrDisableLocalPlaybackRequest {
- bool enabled = 1;
-}
-
-// This client is used for the following purposes:
-// - Receiving commands that the playback state changes due to an out-of-bound
-// operation (i.e. follower stops playback).
-// - The "silent leader" behavior where the media is still rendered by the
-// runtime but not displayed.
-//
-// This service is implemented by the Cast Web runtime.
-service CmaAudioServiceClient {
- // Enables or disables local playback.
- rpc EnableOrDisableLocalPlayback(EnableOrDisableLocalPlaybackRequest)
- returns (google.protobuf.Empty);
-}