custom video capture devide

Лухнов Андрей Олегович
Fri, Jun 26, 2020 2:45 PM

Hello!

I'm developing a custom video capture device to be used instead of a camera during video call.

Colorbar was of a great help during this journey, but however, I'm facing a problem:

in my case capabilities of a stream (width, height, fps, colour format), that would be captured, become only available after actual stream is created. And I would like the stream to define device caps, not the other way around as I'm struggling to avoid any kind of video resampling (cropping, scaling, etc). I need to keep video stream as close as possible to the original.

So, it is not yet clear, how to populate device params as
pj_status_t (*default_param)(pj_pool_t *pool, pjmedia_vid_dev_factory *f, unsigned index, pjmedia_vid_dev_param *param); is called much earlier than
pj_status_t (*create_stream)(pjmedia_vid_dev_factory *f, pjmedia_vid_dev_param *param, const pjmedia_vid_dev_cb *cb, void *user_data, pjmedia_vid_dev_stream **p_vid_strm);

I would appreciate any hints on how to overcome this situation!

Best,
Andrey

P.S.: also, I've noticed that get_param, get_cap or set_cap of pjmedia_vid_dev_stream_op are never called during video call.. (I have some logging there, but never find those lines in the log file)

Hello! I'm developing a custom video capture device to be used instead of a camera during video call. Colorbar was of a great help during this journey, but however, I'm facing a problem: in my case capabilities of a stream (width, height, fps, colour format), that would be captured, become only available after actual stream is created. And I would like the stream to define device caps, not the other way around as I'm struggling to avoid any kind of video resampling (cropping, scaling, etc). I need to keep video stream as close as possible to the original. So, it is not yet clear, how to populate device params as pj_status_t (*default_param)(pj_pool_t *pool, pjmedia_vid_dev_factory *f, unsigned index, pjmedia_vid_dev_param *param); is called much earlier than pj_status_t (*create_stream)(pjmedia_vid_dev_factory *f, pjmedia_vid_dev_param *param, const pjmedia_vid_dev_cb *cb, void *user_data, pjmedia_vid_dev_stream **p_vid_strm); I would appreciate any hints on how to overcome this situation! Best, Andrey P.S.: also, I've noticed that get_param, get_cap or set_cap of pjmedia_vid_dev_stream_op are never called during video call.. (I have some logging there, but never find those lines in the log file)