call-signaling.proto 1.8 KB

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