syntax = "proto3";

package sabr.videostreaming;

import "sabr/videostreaming/client_abr_state.proto";
import "sabr/misc/common.proto";
import "sabr/videostreaming/buffered_range.proto";
import "sabr/videostreaming/streamer_context.proto";
import "sabr/videostreaming/time_range.proto";

option java_multiple_files = true;
option java_package = "com.google.android.exoplayer2.source.sabr.protos.videostreaming";
option optimize_for = LITE_RUNTIME;

message VideoPlaybackAbrRequest {
  optional ClientAbrState client_abr_state = 1;
  repeated sabr.misc.FormatId selected_format_ids = 2;
  repeated BufferedRange buffered_ranges = 3;
  optional int64 player_time_ms = 4; // `osts` (Onesie Start Time Seconds) param on Onesie requests.
  optional bytes video_playback_ustreamer_config = 5;
  optional UnknownMessage1 field6 = 6;
  repeated sabr.misc.FormatId preferred_audio_format_ids = 16; // `pai` (Preferred Audio Itags) param on Onesie requests.
  repeated sabr.misc.FormatId preferred_video_format_ids = 17; // `pvi` (Preferred Video Itags) param on Onesie requests.
  repeated sabr.misc.FormatId preferred_subtitle_format_ids = 18;
  optional StreamerContext streamer_context = 19;
  optional UnknownMessage2 field21 = 21;
  optional int32 field22 = 22;
  optional int32 field23 = 23;
  repeated UnknownMessage3 field1000 = 1000;
}

message UnknownMessage1 {
  optional sabr.misc.FormatId format_id = 1;
  optional sint64 lmt = 2;
  optional int32 sequence_number = 3;
  optional TimeRange time_range = 4;
  optional int32 field5 = 5;
}

message UnknownMessage2 {
  repeated string field1 = 1;
  optional bytes field2 = 2;
  optional string field3 = 3;
  optional int32 field4 = 4;
  optional int32 field5 = 5;
  optional string field6 = 6;
}

message UnknownMessage3 {
  repeated sabr.misc.FormatId format_ids = 1;
  repeated BufferedRange ud = 2;
  optional string clip_id = 3;
}