call-signaling.proto 1.8 KB

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