#include <opencv2/core.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/imgproc.hpp>
-
+#ifdef WITH_DA_PROFILE
+#include <mv_common_internal.h>
+#endif
#ifdef MV_3D_POINTCLOUD_IS_AVAILABLE
#include <open3d/Open3D.h>
using namespace open3d;
delete[] static_cast<unsigned char *>(remained->data);
delete[] static_cast<unsigned char *>(remained->extraData);
+#ifdef WITH_DA_PROFILE
+ delete static_cast<da_timestamp_s *>(remained->timestamp);
+#endif
delete remained;
}
input.stride = stride;
input.format = (mWidth == width && mHeight * 2 == height) ?
DFS_DATA_INPUT_FORMAT_COUPLED_TB : DFS_DATA_INPUT_FORMAT_COUPLED_SBS;
-
+#ifdef WITH_DA_PROFILE
+ da_timestamp_s *timestamp = new da_timestamp_s;
+ mv_source_get_timestamp(baseSource, timestamp);
+ input.timestamp = static_cast<void *>(timestamp);
+#endif
if (extraSource)
{
extraBuffer = nullptr;
auto depthData = handle->mDfsAdaptor->getOutputData();
auto leftData = handle->mDfsAdaptor->getLeftData();
+#ifdef WITH_DA_PROFILE
+ int ret = mv_source_fill_by_buffer_da(handle->mInternalSource,
+ static_cast<unsigned char*>(leftData.data),
+ leftData.stride * leftData.height,
+ leftData.width,
+ leftData.height,
+ leftData.stride,
+ leftData.type == DFS_DATA_TYPE_UINT8C3 ? MEDIA_VISION_COLORSPACE_RGB888 :
+ MEDIA_VISION_COLORSPACE_Y800,
+ static_cast<da_timestamp_s*>(pInput->timestamp));
+#else
int ret = mv_source_fill_by_buffer(handle->mInternalSource,
static_cast<unsigned char*>(leftData.data),
leftData.stride * leftData.height,
leftData.height,
leftData.type == DFS_DATA_TYPE_UINT8C3 ? MEDIA_VISION_COLORSPACE_RGB888 :
MEDIA_VISION_COLORSPACE_Y800);
+#endif
if (MEDIA_VISION_ERROR_NONE != ret) {
LOGW("Errors were occurred during source filling %i", ret);
continue;
#endif
delete[] static_cast<unsigned char *>(pInput->data);
delete[] static_cast<unsigned char *>(pInput->extraData);
+#ifdef WITH_DA_PROFILE
+ delete static_cast<da_timestamp_s *>(pInput->timestamp);
+#endif
mv_source_clear(handle->mInternalSource);
}
Name: capi-media-vision
Summary: Media Vision library for Tizen Native API
-Version: 0.23.43
+Version: 0.23.44
Release: 0
Group: Multimedia/Framework
License: Apache-2.0 and BSD-3-Clause
#include <stdlib.h>
#include <unistd.h>
#include <math.h>
+#include <inttypes.h>
#include <opencv2/core.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/imgproc.hpp>
#include "mv_3d.h"
#include <mv_testsuite_common.h>
#include <vision_source.h>
+#ifdef WITH_DA_PROFILE
+#include <mv_common_internal.h>
+#endif
#include <glib-2.0/glib.h>
#include <gst/gst.h>
{
auto mv3d = static_cast<appdata *>(user_data);
+#ifdef WITH_DA_PROFILE
+ printf("_depth_stereo_cb: ");
+ da_timestamp_s timestamp;
+ mv_source_get_timestamp(source, ×tamp);
+ printf("timestamp [%"PRIu64"],\
+ ts_sof[%"PRIu64"],\
+ ts_aux[%"PRIu64"],\
+ ts_eof[%"PRIu64"]\n",
+ timestamp.timestamp,
+ timestamp.ts_sof,
+ timestamp.ts_aux,
+ timestamp.ts_eof);
+#endif
cv::Mat dump(cv::Size(width, height), CV_16U);
for (int y = 0; y < height; y++) {
printf("_vision_source_cb: %lld ms\n", static_cast<long long int>(app->stopWatch.elapsedTime().count()));
+
+#ifdef WITH_DA_PROFILE
+ mv_source_fill_by_buffer_da(app->mv_source,
+ buffer->planes[0].data,
+ buffer->resolution.width * buffer->resolution.height,
+ buffer->resolution.width,
+ buffer->resolution.height,
+ buffer->planes[0].align_width,
+ MEDIA_VISION_COLORSPACE_Y800,
+ static_cast<da_timestamp_s *>(buffer->priv));
+#else
for (unsigned int h = 0; h < buffer->resolution.height; h++) {
memcpy(app->buffer + buffer->resolution.width * h,
buffer->planes[0].data + (buffer->planes[0].align_width * h),
}
mv_source_fill_by_buffer(app->mv_source, app->buffer, app->imgWidth * app->imgHeight,
app->imgWidth, app->imgHeight, MEDIA_VISION_COLORSPACE_Y800);
+#endif
if (isAsync)
mv_3d_run_async(app->mv3d_handle, app->mv_source, nullptr, nullptr);