Hello
I am writing an application for the camera DM368, which operates on the camera and reads from her frames, and encodes them. How do I add dvsdk to the project? What do I need to add object modules from dvsdk?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello
I am writing an application for the camera DM368, which operates on the camera and reads from her frames, and encodes them. How do I add dvsdk to the project? What do I need to add object modules from dvsdk?
P.s. My code is:
#include <xdc/std.h>
#include <ti/sdo/dmai/Dmai.h>
#include <ti/sdo/dmai/Cpu.h>
#include <ti/sdo/dmai/BufTab.h>
#include <ti/sdo/dmai/Capture.h>
#include <ti/sdo/dmai/BufferGfx.h>
#include <ti/sdo/dmai/Buffer.h>
void* CaptureThread(void* param)
{
ThreadParameters* params = (ThreadParameters*)param;
Capture_Attrs cAttrs = Capture_Attrs_DM6467_DEFAULT;
Capture_Handle hCapture;
Dmai_init();
hCapture = Capture_create(NULL, &cAttrs);
if(hCapture == NULL)
{printf("Failed to create capture device\n")
return NULL;
}
int i = 100;
while(i>0)
{
Capture_get(hCapture, params->output_buf);
printf("Capture: get %d\n", Buffer_getNumBytesUsed(*(params->output_buf)));
timespec ts;
ts.tv_sec = 0;
ts.tv_nsec = (long int)(1E9/24);
nanosleep(&ts, NULL);
i--;
}
if(hCapture)
Capture_delete(hCapture);
return NULL;
}
int main()
{
CaptureThread(NULL);
}
I'm using follow string to build this:
arm_v5t_le-g++ -I/root/Desktop/dvsdk_3_10_00_19/dvsdk_3_10_00_19/dmai_2_10_00_12/packages -I/root/Desktop/dvsdk_3_10_00_19/dvsdk_3_10_00_19/xdctools_3_16_01_27/packages -I/root/Desktop/dvsdk_3_10_00_19/dvsdk_3_10_00_19/framework_components_2_25_02_06/packages -I/root/Desktop/dvsdk_3_10_00_19/dvsdk_3_10_00_19/codec_engine_2_25_05_16/packages -lpthread main.cpp VideoCapture.cpp VideoEncode.cpp dmai_linux_dm365.a gt.a osal_linux_470.a cmem.a TraceUtil.a -Dxdc_target_types__=ti/targets/std.h
but i have follow errors:
osal_linux_470.a(Memory_cmem.o470uC): In function `Memory_getBufferVirtualAddress':
Memory_cmem.c:(.text+0x390): undefined reference to `Memory_skipVirtualAddressTranslation'
osal_linux_470.a(Memory_cmem.o470uC): In function `addContigBuf':
Memory_cmem.c:(.text+0xd68): undefined reference to `Memory_maxCbListSize'
osal_linux_470.a(Memory_cmem.o470uC): In function `Memory_getBufferPhysicalAddress':
Memory_cmem.c:(.text+0x109c): undefined reference to `Memory_skipVirtualAddressTranslation'
osal_linux_470.a(Global_noOS.o470uC): In function `Global_init':
Global_noOS.c:(.text+0xc8): undefined reference to `Global_buildInfo'