Ensure camera accepts stream start command

This commit is contained in:
QuantumEntangledAndy committed 2021-10-03 14:50:13 +07:00
1 parent 982d7aa199
commit 7ec17c0cc5
1 file changed
+12
+12
View File
@@ -120,6 +120,18 @@ impl BcCamera {
sub_video.send(start_video)?;
let msg = sub_video.rx.recv_timeout(RX_TIMEOUT)?;
if let BcMeta {
response_code: 200, ..
} = msg.meta
{
} else {
return Err(Error::UnintelligibleReply {
reply: msg,
why: "The camera did not accept the stream start command.",
});
}
let mut media_sub = BinarySubscriber::from_bc_sub(&sub_video);
let result;