syntax = "proto3";

package rv.data;

option cc_enable_arenas = true;
option csharp_namespace = "Pro.SerializationInterop.RVProtoData";
option swift_prefix = "RVData_";

import "proApiV1Size.proto";
import "uuid.proto";

message API_v1_CaptureSettings {
  .rv.data.UUID source = 1;
  repeated .rv.data.API_v1_AudioRouting audio_routing = 2;
  oneof Destination {
    .rv.data.API_v1_DiskCapture disk = 3;
    .rv.data.API_v1_RTMPCapture rtmp = 4;
    .rv.data.API_v1_ResiCapture resi = 5;
  }
}

message API_v1_AudioRouting {
  repeated uint32 map = 1;
}

message API_v1_DiskCapture {
  string file_location = 1;
  string codec = 2;
  .rv.data.API_v1_Size resolution = 3;
  double frame_rate = 4;
}

message API_v1_RTMPCapture {
  string server = 1;
  string key = 2;
  string encoding = 3;
  bool save_local = 4;
  string file_location = 5;
}

message API_v1_ResiCapture {
  string event_name = 1;
  string event_description = 2;
  string destination_group = 3;
  string encoding = 4;
}

message API_v1_Capture_Request {
  message Status {
  }

  message Operation {
    enum CaptureOperation {
      start = 0;
      stop = 1;
    }

    .rv.data.API_v1_Capture_Request.Operation.CaptureOperation operation = 1;
  }

  message GetSettings {
  }

  message SetSettings {
    .rv.data.API_v1_CaptureSettings settings = 1;
  }

  message Encodings {
    .rv.data.API_v1_CaptureDestination type = 1;
  }

  oneof Request {
    .rv.data.API_v1_Capture_Request.Status get_status = 1;
    .rv.data.API_v1_Capture_Request.Operation operation = 2;
    .rv.data.API_v1_Capture_Request.GetSettings get_settings = 3;
    .rv.data.API_v1_Capture_Request.SetSettings set_settings = 4;
    .rv.data.API_v1_Capture_Request.Encodings get_encodings = 5;
  }
}

message API_v1_Capture_Response {
  message GetStatus {
    .rv.data.API_v1_CaptureStatus status = 1;
    string capture_time = 2;
    string status_text = 3;
  }

  message Operation {
  }

  message GetSettings {
    .rv.data.API_v1_CaptureSettings settings = 1;
  }

  message SetSettings {
  }

  message Encodings {
    repeated string encodings = 1;
  }

  oneof Response {
    .rv.data.API_v1_Capture_Response.GetStatus get_status = 1;
    .rv.data.API_v1_Capture_Response.Operation operation = 2;
    .rv.data.API_v1_Capture_Response.GetSettings get_settings = 3;
    .rv.data.API_v1_Capture_Response.SetSettings set_settings = 4;
    .rv.data.API_v1_Capture_Response.Encodings get_encodings = 5;
  }
}

enum API_v1_CaptureDestination {
  disk = 0;
  rtmp = 1;
  resi = 2;
}

enum API_v1_CaptureStatus {
  active = 0;
  inactive = 1;
  caution = 2;
  error = 3;
}

