21 #include <opencv2/opencv.hpp> 32 void pf_video_postrender_callback (
void* p_video_data, uint8_t* p_pixel_buffer,
int width,
int height,
int pixel_pitch,
size_t size, libvlc_time_t pts );
35 void pf_audio_postrender_callback (
void* p_audio_data, uint8_t* p_pcm_buffer,
unsigned int channels,
unsigned int rate,
unsigned int nb_samples,
unsigned int bits_per_sample,
size_t size, libvlc_time_t pts );
48 VlcCapture(std::string url =
"",
int input_buffer_ms = 10);
52 void open(std::string &url);
58 bool read(cv::Mat &image);
80 void prerender_callback(
void* p_video_data, uint8_t** pp_pixel_buffer,
size_t size);
81 void postrender_callback(
void* p_video_data, uint8_t* p_pixel_buffer,
int width,
int height,
int pixel_pitch,
size_t size, libvlc_time_t pts );
91 char smem_options[256];
94 char str_smem_vid_prerender[100], str_smem_vid_postrender[100];
95 char str_smem_aud_prerender[100], str_smem_aud_postrender[100];
96 char str_smem_data[100],str_netbuf[100];
98 libvlc_instance_t *vlc;
99 libvlc_media_player_t *vlcmp;
100 libvlc_media_t *vlcm;
virtual void imageCallback()=0
unsigned int buffersize
Definition: VlcCapture.h:73
std::vector< VlcCaptureConsumer * > callbacks
Definition: VlcCapture.h:83
void pf_audio_postrender_callback(void *p_audio_data, uint8_t *p_pcm_buffer, unsigned int channels, unsigned int rate, unsigned int nb_samples, unsigned int bits_per_sample, size_t size, libvlc_time_t pts)
Definition: VlcCapture.cpp:141
std::string _url
Definition: VlcCapture.h:77
bool imageAvailable
Definition: VlcCapture.h:75
int width
Definition: VlcCapture.h:69
void pf_video_prerender_callback(void *p_video_data, uint8_t **pp_pixel_buffer, size_t size)
Definition: VlcCapture.cpp:103
uint8_t * buffer
Definition: VlcCapture.h:72
Definition: VlcCapture.h:46
static pthread_mutex_t callbackmutex
Definition: VlcCapture.h:67
void pf_video_postrender_callback(void *p_video_data, uint8_t *p_pixel_buffer, int width, int height, int pixel_pitch, size_t size, libvlc_time_t pts)
Definition: VlcCapture.cpp:119
pthread_mutex_t imagemutex
Definition: VlcCapture.h:65
void pf_audio_prerender_callback(void *p_audio_data, uint8_t **pp_pcm_buffer, size_t size)
Definition: VlcCapture.cpp:133
Definition: VlcCapture.h:38