-
Notifications
You must be signed in to change notification settings - Fork 118
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
Lock mutex error #217
Comments
Edit : I've added
Now I don't have the warning anymore, and can successfully call |
I've also tried to set the format to
I'm sending video as NAL decoded with libx264 (annex B enabled), so it should be spec-compliant. |
Agent comment from Leon in Zendesk ticket #120335: °°° |
Ok I didn't know that (I don't think it's written in the docs). So what is DJI-H264 ? It looks like it's NAL H264 concatenated with audio ( // x264 param
x264_param_default_preset(¶m, "ultrafast", NULL)
param.i_bitdepth = 8;
param.i_csp = X264_CSP_I422;
param.b_vfr_input = 0;
param.b_repeat_headers = 1;
param.b_annexb = 1;
param.i_bframe = 0;
param.b_cabac = 0;
param.b_deblocking_filter = 0;
param.i_bframe_adaptive = 0;
param.analyse.b_transform_8x8 = 0;
param.analyse.i_me_method = X264_ME_DIA;
param.analyse.i_trellis = 0;
param.rc.b_mb_tree = 0;
param.i_sync_lookahead = 0;
param.rc.i_lookahead = 0; |
Agent comment from Leon in Zendesk ticket #120335: °°° |
Hi, I can't manage to get it to work. I'm streaming the same video file as in your sample code (PSDK0005.h264), but somehow nothing is showing. I have set the format to |
Agent comment from Leon in Zendesk ticket #120335: °°° |
Hi, sorry for the delay, here are the logs:
And that's the relevant code int main() {
// Handle Ctrl-C
signal(SIGTERM, exitHandler);
DjiErrorCode code = setupDJISDK();
if (code != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Couldn't setup DJI SDK");
return 1;
}
printf("DJI READY\n");
// Test LiveView
T_DjiReturnCode ret = DjiPayloadCamera_Init();
if (ret != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Couldn't init camera");
return 1;
}
const T_DjiDataChannelBandwidthProportionOfHighspeedChannel bandwidthProportionOfHighspeedChannel =
{10, 60, 30};
ret = DjiHighSpeedDataChannel_SetBandwidthProportion(bandwidthProportionOfHighspeedChannel);
if (ret != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Couldn't set high speed proportion");
return 1;
}
DjiLowSpeedDataChannel_Init();
T_DjiCameraCommonHandler mockHandler = {
.GetSystemState = MockGetSystemState,
.SetMode = MockSetMode,
.GetMode = MockGetMode,
.StartRecordVideo = MockStartRecordVideo,
.StopRecordVideo = MockStopRecordVideo,
.StartShootPhoto = MockStartShootPhoto,
.StopShootPhoto = MockStopShootPhoto,
.SetShootPhotoMode = MockSetShootPhotoMode,
.GetShootPhotoMode = MockGetShootPhotoMode,
.SetPhotoBurstCount = MockSetPhotoBurstCount,
.GetPhotoBurstCount = MockGetPhotoBurstCount,
.SetPhotoTimeIntervalSettings = MockSetPhotoTimeIntervalSettings,
.GetPhotoTimeIntervalSettings = MockGetPhotoTimeIntervalSettings,
.GetSDCardState = MockGetSDCardState,
.FormatSDCard = MockFormatSDCard
};
ret = DjiPayloadCamera_RegCommonHandler(&mockHandler);
if (ret != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Couldn't register camera common handler");
return 1;
}
ret = DjiPayloadCamera_SetVideoStreamType(DJI_CAMERA_VIDEO_STREAM_TYPE_H264_DJI_FORMAT);
if (ret != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("Set stream type error");
return DJI_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
ret = DjiCore_ApplicationStart();
if (ret != DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
USER_LOG_ERROR("start sdk application error");
return DJI_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
// char ipAddr[DJI_IP_ADDR_STR_SIZE_MAX] = {0};
// uint16_t port = 0;
// ret = DjiPayloadCamera_GetVideoStreamRemoteAddress(ipAddr, &port);
// if (ret == DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
// USER_LOG_INFO("Get video stream remote address: %s, port: %d", ipAddr, port);
// } else {
// USER_LOG_ERROR("get video stream remote address error.");
// return 1;
// }
// Send video stream
T_DjiTaskHandle *task;
T_DjiOsalHandler *handler = DjiPlatform_GetOsalHandler();
handler->TaskCreate("liveview", startMockLiveView, 2048, NULL, task);
printf("Press enter to finish\n");
std::cin.ignore();
finish();
printf("Done.\n");
return 0;
} |
I have tried the PSDK demo again, and it stopped working. I'm seeing the same behavior, with no liveview on DJI Pilot. I don't know if it's related but I have a warning in the HMS : "Gimbal 1 payload voltage too low". Is it because the UART should be connected with 5V ? It's currently using 3.3V as it is connected to a Raspberry Pi |
Agent comment from Leon in Zendesk ticket #120335: °°° |
Hi, yes I'm tried the sample file, and even the sample code. As I mentioned above it didn't work, and only shows a black screen on DJI Pilot. |
Agent comment from Leon in Zendesk ticket #120335: °°° |
I'm trying to connect a Canon camera to a M350 via the PSDK. However, I'm struggling with the live view, with the following message
I have the same error when I call
DjiPayloadCamera_GetVideoStreamState
Here is basically the code that I'm running
I'm seeing a similar issue in the PSDK demo :
Do you know what is going wrong ? Thanks
The text was updated successfully, but these errors were encountered: