The first working video, still nasty
Esse commit está contido em:
@@ -95,7 +95,7 @@ void ARDroneDriver::run()
|
||||
}
|
||||
if (true) //(current_frame_id != last_frame_id)
|
||||
{
|
||||
//publish_video();
|
||||
publish_video();
|
||||
publish_navdata();
|
||||
last_frame_id = current_frame_id;
|
||||
}
|
||||
|
||||
@@ -70,10 +70,12 @@ extern "C" {
|
||||
params->post_processing_stages_list = driver_post_stages;
|
||||
params->needSetPriority = 0;
|
||||
params->priority = 0;
|
||||
|
||||
// Using the provided threaded pipeline implementation from SDK
|
||||
START_THREAD(video_stage, params);
|
||||
video_stage_init();
|
||||
START_THREAD(video_update_thread, 0);
|
||||
// Threads do not start automatically
|
||||
video_stage_resume_thread();
|
||||
//START_THREAD(video_update_thread, 0);
|
||||
//START_THREAD(mani, 0);
|
||||
return C_OK;
|
||||
}
|
||||
@@ -96,7 +98,7 @@ extern "C" {
|
||||
|
||||
BEGIN_THREAD_TABLE
|
||||
THREAD_TABLE_ENTRY(video_stage, 20)
|
||||
THREAD_TABLE_ENTRY(video_update_thread, 20)
|
||||
//THREAD_TABLE_ENTRY(video_update_thread, 20)
|
||||
//THREAD_TABLE_ENTRY(mani, 20)
|
||||
THREAD_TABLE_ENTRY(navdata_update, 20)
|
||||
THREAD_TABLE_ENTRY(ATcodec_Commands_Client, 20)
|
||||
|
||||
+10
-10
@@ -16,17 +16,17 @@ extern "C" C_RESULT export_stage_open( void *cfg, vp_api_io_data_t *in, vp_api_i
|
||||
|
||||
extern "C" C_RESULT export_stage_transform( void *cfg, vp_api_io_data_t *in, vp_api_io_data_t *out)
|
||||
{
|
||||
|
||||
PRINT("In Transform before copy\n");
|
||||
vp_os_mutex_lock(&video_update_lock);
|
||||
/* Get a reference to the last decoded picture */
|
||||
pixbuf_data = (uint8_t*)in->buffers[0];
|
||||
/* Copy the entire buffer, TODO: can we movet this to the thread to make the transform faster?*/
|
||||
// PRINT("In Transform before copy\n");
|
||||
// printf("The size of buffer is %d\n", in->size);
|
||||
// vp_os_mutex_lock(&video_update_lock);
|
||||
// /* Get a reference to the last decoded picture */
|
||||
// pixbuf_data = (uint8_t*)in->buffers[0];
|
||||
// /* Copy the entire buffer, TODO: can we movet this to the thread to make the transform faster?*/
|
||||
memcpy(buffer, in->buffers[0], STREAM_WIDTH * STREAM_HEIGHT * 3);
|
||||
//memcpy(buffer, in->buffers[0], in->size);
|
||||
vp_os_mutex_unlock(&video_update_lock);
|
||||
PRINT("In Transform after copy\n");
|
||||
current_frame_id++;
|
||||
// //memcpy(buffer, in->buffers[0], in->size);
|
||||
// vp_os_mutex_unlock(&video_update_lock);
|
||||
// PRINT("In Transform after copy\n");
|
||||
// current_frame_id++;
|
||||
return (SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário