From 4cf4e321c1371f98696efc42b4be7c7f734b2e1c Mon Sep 17 00:00:00 2001 From: tbago Date: Sat, 17 Jun 2023 09:30:21 +0800 Subject: [PATCH] camera server : add start stop video subscribe (#318) --- protos/camera_server/camera_server.proto | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/protos/camera_server/camera_server.proto b/protos/camera_server/camera_server.proto index 2ea7cca3e..8deeb1871 100644 --- a/protos/camera_server/camera_server.proto +++ b/protos/camera_server/camera_server.proto @@ -19,6 +19,12 @@ service CameraServerService { // Respond to an image capture request from SubscribeTakePhoto. rpc RespondTakePhoto(RespondTakePhotoRequest) returns(RespondTakePhotoResponse) { option (mavsdk.options.async_type) = SYNC; } + + // Subscribe to start video requests. Each request received should response to using StartVideoResponse + rpc SubscribeStartVideo(SubscribeStartVideoRequest) returns(stream StartVideoResponse) { option (mavsdk.options.async_type) = ASYNC; } + + // Subscribe to stop video requests. Each request received should response to using StopVideoResponse + rpc SubscribeStopVideo(SubscribeStopVideoRequest) returns(stream StopVideoResponse) { option (mavsdk.options.async_type) = ASYNC; } } message SetInformationRequest { @@ -38,11 +44,20 @@ message SetInProgressResponse { } message SubscribeTakePhotoRequest {} - message TakePhotoResponse { int32 index = 1; } +message SubscribeStartVideoRequest {} +message StartVideoResponse { + int32 stream_id = 1; // video stream id +} + +message SubscribeStopVideoRequest {} +message StopVideoResponse { + int32 stream_id = 1; // video stream id +} + // Possible results when taking a photo. enum TakePhotoFeedback { TAKE_PHOTO_FEEDBACK_UNKNOWN = 0; // Unknown