Cannot use "NDIlib_find_get_current_sources_v2()" in ASDK

naeoc

New member
I made code below, by ASDK doc, (23.3.3 FINDING)
Code:
NDIlib_source_v2_t* p_ndi_sources_v2 = NULL;

//find
while(...){
    ...
    p_ndi_sources_v2 = NDIlib_find_get_current_sources_v2(pNDI_find, &no_sources);
}

...
NDIlib_recv_create_v3_t recv_create;

...

// do not work :operand type diff
recv_create.source_to_connect_to = *p_ndi_sources_v2;  

...

// connect
// do not work :operand type diff
NDIlib_recv_connect((*pNDI_recv), p_ndi_sources_v2 + 0);

Q1,
How could I use 'NDIlib_source_v2_t'

Should I make
NDIlib_source_t p_ndi_sources;
and
just copy factors (name & ip) 'NDIlib_source_v2_t' to 'NDIlib_source_t ' then use NDIlib_recv_connect(); ??

Q2.
p_ndi_sources_v2 = NDIlib_find_get_current_sources_v2(pNDI_find, &no_sources);

cannot get metadata yet?
I use,
printf("\np_ndi_sources_v2 meta data:\n%s\n\n", p_ndi_sources_v2->p_metadata);

and nothing printed.
(but NDIlib_recv_capture_v3() can get meta data)
 
Last edited:
You're doing odd things. Is there a specific reason you need NDIlib_find_get_current_sources_v2()? Just call the previous version. Of course NDIlib_source_v2_t is not a compatible structure with NDIlib_source_t, so you adapt one from the other.
 
Thank you for reply. No reasons for use it, just test because written in ASDK DOC, I'm using previous version👍
 
Back
Top