syntax = "proto3";

package rv.data;

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

import "digitalAudio.proto";
import "url.proto";
import "uuid.proto";

message Recording {
  message SettingsDocument {
    repeated .rv.data.Recording.Stream streams = 1;
    repeated .rv.data.Recording.Preset presets = 2;
    .rv.data.Recording.Preset active_preset = 3;
  }

  message Preset {
    .rv.data.UUID id = 1;
    string name = 2;
    repeated .rv.data.Recording.Stream streams = 3;
  }

  message Stream {
    message Encoder {
      .rv.data.Recording.Stream.Codec codec = 1;
      uint32 video_width = 2;
      uint32 video_height = 3;
      bool is_interlaced = 4;
      .rv.data.Recording.Stream.FrameRate frameRate = 5;
      uint32 video_bitrate = 6;
      uint32 audio_bitrate = 7;
    }

    message OutputScreenSource {
      .rv.data.UUID screen_id = 1;
      string screen_name = 2;
    }

    message DiskDestination {
      .rv.data.URL location = 1;
      .rv.data.Recording.Stream.Container container = 2;
    }

    message RTMPDestination {
      string address = 1;
      string key = 2;
    }

    message Destination {
      message Resi {
        .rv.data.UUID destination_group_id = 1;
        .rv.data.UUID encoder_profile_id = 2;
      }

      oneof Destination {
        .rv.data.Recording.Stream.DiskDestination disk = 1;
        .rv.data.Recording.Stream.RTMPDestination rtmp = 2;
        .rv.data.Recording.Stream.Destination.Resi resi = 3;
      }
    }

    enum Container {
      CONTAINER_UNKNOWN = 0;
      CONTAINER_MOV = 1;
      CONTAINER_MP4 = 2;
    }

    enum Codec {
      CODEC_AUTOMATIC = 0;
      CODEC_H264 = 1;
      CODEC_H265 = 2;
      CODEC_PRORES_422_PROXY = 3;
      CODEC_PRORES_422_LT = 4;
      CODEC_PRORES_422 = 5;
      CODEC_PRORES_422_HQ = 6;
      CODEC_PRORES_4444 = 7;
      CODEC_PRORES_4444_XQ = 8;
      CODEC_HAP = 9;
      CODEC_HAP_ALPHA = 10;
      CODEC_HAP_Q = 11;
      CODEC_HAP_Q_ALPHA = 12;
      CODEC_NOTCH = 13;
      CODEC_H264_SOFTWARE = 14;
      CODEC_H265_SOFTWARE = 15;
    }

    enum FrameRate {
      FRAME_RATE_UNKNOWN = 0;
      FRAME_RATE_24 = 1;
      FRAME_RATE_25 = 2;
      FRAME_RATE_29_97 = 3;
      FRAME_RATE_30 = 4;
      FRAME_RATE_50 = 5;
      FRAME_RATE_59_94 = 6;
      FRAME_RATE_60 = 7;
    }

    .rv.data.UUID id = 1;
    .rv.data.Recording.Stream.Encoder encoder = 3;
    repeated .rv.data.Recording.Stream.Destination destinations = 4;
    repeated .rv.data.DigitalAudio.Device.Map audio_map = 5;
    bool isAudioCustomMapped = 6;
    oneof Source {
      .rv.data.Recording.Stream.OutputScreenSource output_screen = 2;
    }
  }

}

