Autor Thema: MediaTV Pro and chromium/webrtc not working  (Gelesen 9695 mal)

Christopher

  • Newbie
  • *
  • Beiträge: 4
    • Profil anzeigen
MediaTV Pro and chromium/webrtc not working
« am: Juli 07, 2016, 02:30:08 Nachmittag »
Hi, I'm trying to use chromium/webrtc to view video from the dongle, but without any luck. I have the dongle with gstreamer and Firefox and both these works as expected. I have also tested another UVC compatible dongle with chromium/webrtc and that works too.

If I log stream dimentions from javascript in chromium I get 2x2pix, and after adding some log prints in chromium webrtc code it looks like all preseeding v4l ioctl calls succeds but mmap call fails just before ioctl VIDIOC_QBUF.

Is this a know issue? Are there any know patches for chromium that could help?

Thanks in advance...



Sundtek

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 8604
    • Profil anzeigen
Re:MediaTV Pro and chromium/webrtc not working
« Antwort #1 am: Juli 07, 2016, 05:09:04 Nachmittag »
Hi,

I have never heard about that (and no one here knows what chromium/webrtc does), can you give us more information about that?

Maybe via chat http://chat.sundtek.de
Failure is a good thing! I'll fix it

Christopher

  • Newbie
  • *
  • Beiträge: 4
    • Profil anzeigen
Re:MediaTV Pro and chromium/webrtc not working
« Antwort #2 am: Juli 07, 2016, 05:46:01 Nachmittag »
Hi, not 100% sure chromium is doing everything correct either, chromium tries to open the device as a standard v4l2 device, doing varoius ioctl calls and then trying to mmap buffers, and mmap fails with errno 19 ENODEV.

The code I'm testing with looks like this and it's the mmap on line 467 that fails:
https://chromium.googlesource.com/chromium/src.git/+/40.0.2214.91/media/video/capture/linux/video_capture_device_linux.cc

I have compared the code involving settting up the v4l2 device against various v4l2 examples and gstreamer v4l2src and as far as I can see it looks ok. And as I said it works with a different v4l2 compatible device that i also have for testing.


Christopher

  • Newbie
  • *
  • Beiträge: 4
    • Profil anzeigen
Re:MediaTV Pro and chromium/webrtc not working
« Antwort #3 am: Juli 08, 2016, 10:18:32 Vormittag »
We were able to get video working with MediaTv Pro in chromium, it seems that chromium itself overrides mmap calls and performs syscalls directly.

https://chromium.googlesource.com/chromium/src.git/+/40.0.2214.91/third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h

By simply removing this override we were able to get playback working, I guess chromium's override of mmap interferes with the libmediaclient.so ld-preload.

I guess it works the same way in newer chromium releases but haven't checked.

Sundtek

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 8604
    • Profil anzeigen
Re:MediaTV Pro and chromium/webrtc not working
« Antwort #4 am: Juli 08, 2016, 10:38:17 Vormittag »
What do you need that for actually?
Failure is a good thing! I'll fix it

Christopher

  • Newbie
  • *
  • Beiträge: 4
    • Profil anzeigen
Re:MediaTV Pro and chromium/webrtc not working
« Antwort #5 am: Juli 08, 2016, 12:45:12 Nachmittag »
We are looking into the possibility to use this device in a commercial product where we use a browser to display various other information and with the option to also also display an analog video source. We are running this on an arm platform and need chromium for HW-acceleration of video.