o2o-call.proto 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. // # 1:1 Calls
  2. syntax = "proto3";
  3. package o2o_call;
  4. option java_package = "ch.threema.protobuf.o2o_call";
  5. option java_multiple_files = true;
  6. option php_namespace = "Threema\\Protocols\\O2oCall";
  7. import "common.proto";
  8. // Root signaling message
  9. message Envelope {
  10. // Random amount of padding (0-255 bytes), ignored by the receiver
  11. bytes padding = 1;
  12. oneof content {
  13. VideoQualityProfile video_quality_profile = 2;
  14. CaptureState capture_state_change = 3;
  15. }
  16. }
  17. // The app switched to a new video quality profile
  18. //
  19. // In order to be forwards-compatible, the raw configuration of the profile
  20. // (bitrate, resolution, etc) should also be included in this message. This
  21. // way, if an unknown enum value is received, the receiver can simply use the
  22. // raw values instead.
  23. message VideoQualityProfile {
  24. // The quality profile
  25. enum QualityProfile {
  26. // Very high quality, used only when explicitly selected by the user
  27. MAX = 0;
  28. // High quality, used by default in non-metered networks
  29. HIGH = 1;
  30. // Low quality, optimize for bandwidth, used by default in metered networks
  31. LOW = 2;
  32. }
  33. QualityProfile profile = 1;
  34. // The max bitrate in kbps
  35. uint32 max_bitrate_kbps = 2;
  36. // The max resolution (in landscape orientation)
  37. common.Resolution max_resolution = 3;
  38. // The max framerate
  39. uint32 max_fps = 4;
  40. }
  41. // Signal changes in the capturing state (e.g. video camera enabled or disabled)
  42. message CaptureState {
  43. // The capture state of a capturing device
  44. enum Mode {
  45. // Off, not sending any data
  46. OFF = 0;
  47. // On, sending data
  48. ON = 1;
  49. }
  50. Mode state = 1;
  51. // The capture device type
  52. enum CaptureDevice {
  53. // Capturing from a camera
  54. CAMERA = 0;
  55. // Capturing from screen sharing (do not use atm)
  56. RESERVED_FOR_SCREEN_SHARE = 1;
  57. // Capturing from a microphone
  58. MICROPHONE = 2;
  59. }
  60. CaptureDevice device = 2;
  61. }