live_streaming.proto 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. /* live_streaming.proto/Open GoPro, Version 2.0 (C) Copyright 2021 GoPro, Inc. (http://gopro.com/OpenGoPro). */
  2. /* This copyright was auto-generated on Mon Nov 4 18:00:55 UTC 2024 */
  3. /***********************************************************************************************************************
  4. *
  5. * This file is automatically generated!!! Do not modify manually.
  6. *
  7. **********************************************************************************************************************/
  8. /**
  9. * Defines the structure of protobuf messages for working with Live Streams
  10. */
  11. syntax = "proto2";
  12. package open_gopro;
  13. enum EnumLens {
  14. LENS_WIDE = 0;
  15. LENS_LINEAR = 4;
  16. LENS_SUPERVIEW = 3;
  17. }
  18. enum EnumLiveStreamError {
  19. LIVE_STREAM_ERROR_NONE = 0; // No error (success)
  20. LIVE_STREAM_ERROR_NETWORK = 1; // General network error during the stream
  21. LIVE_STREAM_ERROR_CREATESTREAM = 2; // Startup error: bad URL or valid with live stream server
  22. LIVE_STREAM_ERROR_OUTOFMEMORY = 3; // Not enough memory on camera to complete task
  23. LIVE_STREAM_ERROR_INPUTSTREAM = 4; // Failed to get stream from low level camera system
  24. LIVE_STREAM_ERROR_INTERNET = 5; // No internet access detected on startup of streamer
  25. LIVE_STREAM_ERROR_OSNETWORK = 6; // Error occured in linux networking stack. Usually means the server closed the connection
  26. LIVE_STREAM_ERROR_SELECTEDNETWORKTIMEOUT = 7; // Timed out attemping to connect to the wifi network when attemping live stream
  27. LIVE_STREAM_ERROR_SSL_HANDSHAKE = 8; // SSL handshake failed (commonly caused due to incorrect time / time zone)
  28. LIVE_STREAM_ERROR_CAMERA_BLOCKED = 9; // Low level camera system rejected attempt to start live stream
  29. LIVE_STREAM_ERROR_UNKNOWN = 10; // Unknown
  30. LIVE_STREAM_ERROR_SD_CARD_FULL = 40; // Can not perform livestream because sd card is full
  31. LIVE_STREAM_ERROR_SD_CARD_REMOVED = 41; // Livestream stopped because sd card was removed
  32. }
  33. enum EnumLiveStreamStatus {
  34. LIVE_STREAM_STATE_IDLE = 0; // Initial status. Livestream has not yet been configured
  35. LIVE_STREAM_STATE_CONFIG = 1; // Livestream is being configured
  36. LIVE_STREAM_STATE_READY = 2; // Livestream has finished configuration and is ready to start streaming
  37. LIVE_STREAM_STATE_STREAMING = 3; // Livestream is actively streaming
  38. LIVE_STREAM_STATE_COMPLETE_STAY_ON = 4; // Live stream is exiting. No errors occured.
  39. LIVE_STREAM_STATE_FAILED_STAY_ON = 5; // Live stream is exiting. An error occurred.
  40. LIVE_STREAM_STATE_RECONNECTING = 6; // An error occurred during livestream and stream is attempting to reconnect.
  41. LIVE_STREAM_STATE_UNAVAILABLE = 7; // Live stream setup is unavailable due to camera lens configuration
  42. }
  43. enum EnumRegisterLiveStreamStatus {
  44. REGISTER_LIVE_STREAM_STATUS_STATUS = 1;
  45. REGISTER_LIVE_STREAM_STATUS_ERROR = 2;
  46. REGISTER_LIVE_STREAM_STATUS_MODE = 3;
  47. REGISTER_LIVE_STREAM_STATUS_BITRATE = 4;
  48. }
  49. enum EnumWindowSize {
  50. WINDOW_SIZE_480 = 4;
  51. WINDOW_SIZE_720 = 7;
  52. WINDOW_SIZE_1080 = 12;
  53. }
  54. /**
  55. * Live Stream status
  56. *
  57. * Sent either:
  58. *
  59. * - As a synchronous response to initial @ref RequestGetLiveStreamStatus
  60. * - As an asynchronous notifications registered for via @ref RequestGetLiveStreamStatus
  61. */
  62. message NotifyLiveStreamStatus {
  63. optional EnumLiveStreamStatus live_stream_status = 1; // Live stream status
  64. optional EnumLiveStreamError live_stream_error = 2; // Live stream error
  65. optional bool live_stream_encode = 3; // Is live stream encoding?
  66. optional int32 live_stream_bitrate = 4; // Live stream bitrate (Kbps)
  67. repeated EnumWindowSize live_stream_window_size_supported_array = 5; // Set of currently supported resolutions
  68. optional bool live_stream_encode_supported = 6; // Does the camera support encoding while live streaming?
  69. optional bool live_stream_max_lens_unsupported = 7; // Is the Max Lens feature NOT supported?
  70. optional int32 live_stream_minimum_stream_bitrate = 8; // Camera-defined minimum bitrate (static) (Kbps)
  71. optional int32 live_stream_maximum_stream_bitrate = 9; // Camera-defined maximum bitrate (static) (Kbps)
  72. optional bool live_stream_lens_supported = 10; // Does camera support setting lens for live streaming?
  73. repeated EnumLens live_stream_lens_supported_array = 11; // Set of currently supported FOV options
  74. optional bool live_stream_protune_supported = 13; // Does the camera support live stream protune settings
  75. }
  76. /**
  77. * Get the current livestream status (and optionally register for future status changes)
  78. *
  79. * Response: @ref NotifyLiveStreamStatus
  80. *
  81. * Notification: @ref NotifyLiveStreamStatus
  82. */
  83. message RequestGetLiveStreamStatus {
  84. repeated EnumRegisterLiveStreamStatus register_live_stream_status = 1; // Array of live stream statuses to be notified about
  85. repeated EnumRegisterLiveStreamStatus unregister_live_stream_status = 2; // Array of live stream statuses to stop being notified about
  86. }
  87. /**
  88. * Configure Live Streaming
  89. *
  90. * Response: @ref ResponseGeneric
  91. */
  92. message RequestSetLiveStreamMode {
  93. optional string url = 1; // RTMP(S) URL used for live stream
  94. optional bool encode = 2; // Save media to sdcard while streaming?
  95. /**
  96. * Resolution to use for live stream
  97. *
  98. * The set of supported resolutions is only available from the `live_stream_window_size_supported_array`
  99. * in @ref NotifyLiveStreamStatus.
  100. */
  101. optional EnumWindowSize window_size = 3;
  102. optional bytes cert = 6; // Certificate for servers that require it in PEM format
  103. optional int32 minimum_bitrate = 7; // Minimum desired bitrate (may or may not be honored)
  104. optional int32 maximum_bitrate = 8; // Maximum desired bitrate (may or may not be honored)
  105. optional int32 starting_bitrate = 9; // Starting bitrate
  106. /**
  107. * Lens to use for live stream
  108. *
  109. * The set of supported lenses is only available from the `live_stream_lens_supported_array`
  110. * in @ref NotifyLiveStreamStatus.
  111. */
  112. optional EnumLens lens = 10;
  113. }