PDA

View Full Version : difference between two video send functions?



Nithin Pradeep
04-03-2018, 07:35 AM
what is the difference between the NDI video send functions like

NDIlib_send_send_video_async_v2

NDIlib_send_send_video_v2

does it have anything to do with the AV sync or memory allocation ,also which is the best to use while sending long duration streams ?

please help...

livepad
04-04-2018, 11:09 AM
what is the difference between the NDI video send functions like

NDIlib_send_send_video_async_v2

NDIlib_send_send_video_v2

does it have anything to do with the AV sync or memory allocation ,also which is the best to use while sending long duration streams ?

please help...

NDIlib_send_send_video_async_v2 returns immediately, allowing asynchronous operations. It gives your code a chance to do something else, then it will hold on the call until the next frame edge. This is an efficient way to work.

So its an Asynchronous version of NDIlib_send_send_video_v2

Nithin Pradeep
04-05-2018, 05:26 AM
NDIlib_send_send_video_async_v2 returns immediately, allowing asynchronous operations. It gives your code a chance to do something else, then it will hold on the call until the next frame edge. This is an efficient way to work.

So its an Asynchronous version of NDIlib_send_send_video_v2


I am using:
gst_buffer_map (pas_buffer,&ps_self->info,GST_MAP_READ);
ps_self->p1_output_ndi->s_video_frame.p_data = ps_self->info.data;
NDIlib_send_send_video_async_v2(ps_self->p1_output_ndi->pv_send_instance, &ps_self->p1_output_ndi->s_video_frame);
NDIlib_send_send_video_async_v2(ps_self->p1_output_ndi->pv_send_instance, NULL);
gst_buffer_unmap (pas_buffer,&ps_self->info);
to send video and

gst_buffer_map (ps_buffer,&ps_self->info,GST_MAP_READ);
NDIlib_util_send_send_audio_interleaved_32f(ps_sel f->p1_output_ndi->pv_send_instance, &(ps_self->p1_output_ndi->s_float_32_audio_frame));
gst_buffer_unmap (ps_buffer,&ps_self->info);

to send audio

but after some time i am getting audio video synchronization issue,
which is the correct function to use in order to rectify this?

livepad
04-06-2018, 02:21 AM
I am using:
gst_buffer_map (pas_buffer,&ps_self->info,GST_MAP_READ);
ps_self->p1_output_ndi->s_video_frame.p_data = ps_self->info.data;
NDIlib_send_send_video_async_v2(ps_self->p1_output_ndi->pv_send_instance, &ps_self->p1_output_ndi->s_video_frame);
NDIlib_send_send_video_async_v2(ps_self->p1_output_ndi->pv_send_instance, NULL);
gst_buffer_unmap (pas_buffer,&ps_self->info);
to send video and

gst_buffer_map (ps_buffer,&ps_self->info,GST_MAP_READ);
NDIlib_util_send_send_audio_interleaved_32f(ps_sel f->p1_output_ndi->pv_send_instance, &(ps_self->p1_output_ndi->s_float_32_audio_frame));
gst_buffer_unmap (ps_buffer,&ps_self->info);

to send audio

but after some time i am getting audio video synchronization issue,
which is the correct function to use in order to rectify this?

You may want to investigate the NDI options to clock with video or audio.

Nithin Pradeep
04-06-2018, 04:28 AM
You may want to investigate the NDI options to clock with video or audio.

Alreade my pipeline buffer is pushing both audio and video in sync to the next element aka. NDI sink ,so do i need to use
clock_video ,clock_audio
again in my NDI code ,
if not what is the use of it.