1 #include "include/dvr/dvr_pose.h" 2 3 #include <memory> 4 5 #include <private/dvr/buffer_hub_queue_client.h> 6 #include <private/dvr/pose_client_internal.h> 7 8 #include "dvr_buffer_queue_internal.h" 9 10 using android::dvr::ConsumerQueue; 11 dvrPoseClientGetDataReader(DvrPoseClient * client,uint64_t data_type,DvrReadBufferQueue ** queue_out)12int dvrPoseClientGetDataReader(DvrPoseClient* client, uint64_t data_type, 13 DvrReadBufferQueue** queue_out) { 14 if (!client || !queue_out) 15 return -EINVAL; 16 17 ConsumerQueue* consumer_queue; 18 int status = android::dvr::dvrPoseClientGetDataReaderHandle(client, 19 data_type, 20 &consumer_queue); 21 if (status != 0) { 22 ALOGE("dvrPoseClientGetDataReader: Failed to get queue: %d", status); 23 return status; 24 } 25 26 std::shared_ptr<ConsumerQueue> consumer_queue_ptr{consumer_queue}; 27 *queue_out = new DvrReadBufferQueue(consumer_queue_ptr); 28 return 0; 29 } 30