Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support multi video stream info and add camera cap flags #330

Closed
wants to merge 3 commits into from

Conversation

tbago
Copy link
Contributor

@tbago tbago commented Feb 22, 2024

This PR contain the following features:

  • The camera proto video stream info contain more detail about the stream info, so the camera server proto need use the same video stream info define;
  • the camera can have multi lens (e.g. one Visible light one Infrared). So need support multi video stream info;
  • the camera cap flags is important for clint to check the camera capability;
  • unify the camera information int camera and camera server;

@tbago
Copy link
Contributor Author

tbago commented Feb 22, 2024

The pull request to MAVSDK will come soon

 * unify the camera and camera server stream info;
 * support multi camera video stream info;
 * add camera video stream id in camera proto VideoStreamInfo message;
@tbago tbago force-pushed the add_video_stream_info branch from 5b15f81 to a257e2d Compare February 23, 2024 03:04
 * make the camera information same define as camera server information
@tbago tbago changed the title add more camera video stream info support multi video stream info and add camera cap flags Feb 27, 2024
Comment on lines +425 to +453
enum CameraCapFlags {
CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 0; // Camera is able to record video
CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 1; // Camera is able to capture images
CAMERA_CAP_FLAGS_HAS_MODES =
2; // Camera has separate Video and Image/Photo modes
// (MAV_CMD_SET_CAMERA_MODE)
CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE =
3; // Camera can capture images while in video mode
CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE =
4; // Camera can capture videos while in Photo/Image mode
CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE =
5; // Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)
CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM =
6; // Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)
CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS =
7; // Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)
CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM =
8; // Camera has video streaming capabilities (request
// VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for
// video streaming info)
CAMERA_CAP_FLAGS_HAS_TRACKING_POINT =
9; // Camera supports tracking of a point on the camera view.
CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE =
10; // Camera supports tracking of a selection rectangle on the
// camera view.
CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS =
11; // Camera supports tracking geo status
// (CAMERA_TRACKING_GEO_STATUS).
};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The capture flags should only be internally used. They should not be visible to the user. And if we need to expose specific ones, then they have to just be boolean flags.

Comment on lines +465 to +468
uint32 definition_file_version =
10; // Camera definition file version (iteration)
string definition_file_uri =
11; // Camera definition URI (http or mavlink ftp)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also only to be used internally.

@@ -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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this work when it's repeated? Do you get multiple video stream infos, one per video stream?

@tbago tbago closed this Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants