Skip to content

Commit

Permalink
add more camera video stream info
Browse files Browse the repository at this point in the history
 * unify the camera and camera server stream info;
 * support multi camera video stream info;
  • Loading branch information
tbago committed Feb 22, 2024
1 parent 736bc2a commit 5b15f81
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 6 deletions.
2 changes: 1 addition & 1 deletion protos/camera/camera.proto
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ message ModeResponse {

message SubscribeVideoStreamInfoRequest {}
message VideoStreamInfoResponse {
VideoStreamInfo video_stream_info = 1; // Video stream info
repeated VideoStreamInfo video_stream_infos = 1; // Video stream infos
}

message SubscribeCaptureInfoRequest {}
Expand Down
36 changes: 31 additions & 5 deletions protos/camera_server/camera_server.proto
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ message SetInformationResponse {
}

message SetVideoStreamingRequest {
VideoStreaming video_streaming = 1; // information about the video stream
repeated VideoStreamInfo video_stream_infos = 1; // Video stream infos
}

message SetVideoStreamingResponse {
Expand Down Expand Up @@ -249,10 +249,36 @@ message Information {
string definition_file_uri = 11; // Camera definition URI (http or mavlink ftp)
}

// Type to represent video streaming settings
message VideoStreaming {
bool has_rtsp_server = 1; // True if the capture was successful
string rtsp_uri = 2; // RTSP URI (e.g. rtsp://192.168.1.42:8554/live)
// Type for video stream settings.
message VideoStreamSettings {
float frame_rate_hz = 1; // Frames per second
uint32 horizontal_resolution_pix = 2; // Horizontal resolution (in pixels)
uint32 vertical_resolution_pix = 3; // Vertical resolution (in pixels)
uint32 bit_rate_b_s = 4; // Bit rate (in bits per second)
uint32 rotation_deg = 5; // Video image rotation (clockwise, 0-359 degrees)
string uri = 6; // Video stream URI
float horizontal_fov_deg = 7; // Horizontal fov in degrees
}

// Information about the video stream.
message VideoStreamInfo {
// Video stream status type.
enum VideoStreamStatus {
VIDEO_STREAM_STATUS_NOT_RUNNING = 0; // Video stream is not running
VIDEO_STREAM_STATUS_IN_PROGRESS = 1; // Video stream is running
}

// Video stream light spectrum type
enum VideoStreamSpectrum {
VIDEO_STREAM_SPECTRUM_UNKNOWN = 0; // Unknown
VIDEO_STREAM_SPECTRUM_VISIBLE_LIGHT = 1; // Visible light
VIDEO_STREAM_SPECTRUM_INFRARED = 2; // Infrared
}

int32 stream_id = 1; // stream unique id
VideoStreamSettings settings = 2; // Video stream settings
VideoStreamStatus status = 3; // Current status of video streaming
VideoStreamSpectrum spectrum = 4; // Light-spectrum of the video stream
}

// Position type in global coordinates.
Expand Down

0 comments on commit 5b15f81

Please sign in to comment.