<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Greetings,<DIV>we're facing one subtle problem in our early implementation phase of v4l2 code. This problem deserves some kind of well trained synapses to get in touch with!</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Here it is:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>[..]</DIV><DIV>[07-06-20 01:44:31.498] APP: VideoBase::play() invoked</DIV><DIV>[07-06-20 01:44:31.499] APP: VideoBase::changeVideoState VideoState=2</DIV><DIV>[07-06-20 01:44:31.499] CONFIG: Display subsystem: OGL</DIV><DIV>[07-06-20 01:44:31.499] CONFIG: Display bpp: 24</DIV><DIV>[07-06-20 01:44:31.500] CONFIG: Display fullscreen: false</DIV><DIV>[07-06-20 01:44:31.500] CONFIG: Requested OGL configuration: </DIV><DIV>[07-06-20 01:44:31.500] CONFIG:   POW2 textures: false</DIV><DIV>[07-06-20 01:44:31.501] CONFIG:   Fragment shader YCbCr texture support.</DIV><DIV>[07-06-20 01:44:31.501] CONFIG:   RGB order: false</DIV><DIV>[07-06-20 01:44:31.501] CONFIG:   Use pixel buffers: true</DIV><DIV>[07-06-20 01:44:31.502] CONFIG:   Multisample samples: 1</DIV><DIV>[07-06-20 01:44:31.676] CONFIG: Vertical Refresh Rate: 60.0197</DIV><DIV>[07-06-20 01:44:31.677] CONFIG: Using NVidia texture rectangle extension.</DIV><DIV>[07-06-20 01:44:31.937] CONFIG: OpenGL version: 2.1.1 NVIDIA 100.14.09</DIV><DIV>[07-06-20 01:44:31.938] CONFIG: OpenGL vendor: NVIDIA Corporation</DIV><DIV>[07-06-20 01:44:31.938] CONFIG: OpenGL renderer: GeForce FX 5200/AGP/SSE/3DNOW!</DIV><DIV>[07-06-20 01:44:31.938] CONFIG: Using fragment shader YCbCr texture support.</DIV><DIV>[07-06-20 01:44:31.939] CONFIG: Not using multisampling.</DIV><DIV>[07-06-20 01:44:31.939] APP: VideoBase::changeVideoState VideoState=2</DIV><DIV>[07-06-20 01:44:31.940] APP: V4L2 Device opened, calling initDevice()...</DIV><DIV>[07-06-20 01:44:31.941] APP: V4L2 Entering initDevice()...</DIV><DIV>[07-06-20 01:44:31.941] APP: V4L2 entering init_read()...</DIV><DIV>[07-06-20 01:44:31.941] APP: V4L2 init_read() completed</DIV><DIV>[07-06-20 01:44:31.942] APP: V4L2 Setting channel 1</DIV><DIV>[07-06-20 01:44:31.943] APP: V4L2 initDevice() completed</DIV><DIV>[07-06-20 01:44:31.945] CONFIG: Using pixel buffer objects.</DIV><DIV>[07-06-20 01:44:31.945] ERROR: OpenGL error in OGLSurface::createBitmap: glBufferData(): invalid value (#1281)</DIV><DIV>[07-06-20 01:44:31.945] WARNING: OpenGL error in OGLSurface::createBitmap: glBufferData(): invalid value (#1281) </DIV><DIV>[07-06-20 01:44:31.948] APP: VideoBase::render() m_VideoState=0</DIV><DIV>[..]</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>this chain:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>py camera.play() -&gt; VideoBase::play() -&gt; VideoBase::changeVideoState(Playing)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>in this case special case this follows:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>VideoBase::open() (which spawns V4LCamera::open())</DIV><DIV>addDirtyRect(getVisibleRect())</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>At this point it's quite hard to understand what happens: dirty regions are polished by event driven doFrame() ? What is the bitmap taken? Camera interface is not queried at all (via getImage())</DIV><DIV>The main result of the faced errors is that camera node goes in "Unload" state, put by error handler and video is not displayed at all (render checkpoint skips it due to its state).</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Another interesting point is the following, which happens with the very same situation, but with a fatal error termination (there are no specific reason to this to happen.. it happens someway, 3 times over 5 py execution)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>[07-06-20 01:57:52.758] APP: VideoBase::play() invoked</DIV><DIV>[07-06-20 01:57:52.758] APP: VideoBase::changeVideoState VideoState=2</DIV><DIV>[07-06-20 01:57:52.759] CONFIG: Display subsystem: OGL</DIV><DIV>[07-06-20 01:57:52.759] CONFIG: Display bpp: 24</DIV><DIV>[07-06-20 01:57:52.759] CONFIG: Display fullscreen: false</DIV><DIV>[07-06-20 01:57:52.760] CONFIG: Requested OGL configuration: </DIV><DIV>[07-06-20 01:57:52.760] CONFIG:   POW2 textures: false</DIV><DIV>[07-06-20 01:57:52.760] CONFIG:   Fragment shader YCbCr texture support.</DIV><DIV>[07-06-20 01:57:52.761] CONFIG:   RGB order: false</DIV><DIV>[07-06-20 01:57:52.761] CONFIG:   Use pixel buffers: true</DIV><DIV>[07-06-20 01:57:52.761] CONFIG:   Multisample samples: 1</DIV><DIV>[07-06-20 01:57:53.199] CONFIG: Vertical Refresh Rate: 60.0197</DIV><DIV>[07-06-20 01:57:53.200] CONFIG: Using NVidia texture rectangle extension.</DIV><DIV>[07-06-20 01:57:53.460] CONFIG: OpenGL version: 2.1.1 NVIDIA 100.14.09</DIV><DIV>[07-06-20 01:57:53.460] CONFIG: OpenGL vendor: NVIDIA Corporation</DIV><DIV>[07-06-20 01:57:53.461] CONFIG: OpenGL renderer: GeForce FX 5200/AGP/SSE/3DNOW!</DIV><DIV>[07-06-20 01:57:53.461] CONFIG: Using fragment shader YCbCr texture support.</DIV><DIV>[07-06-20 01:57:53.461] CONFIG: Not using multisampling.</DIV><DIV>[07-06-20 01:57:53.462] APP: VideoBase::changeVideoState VideoState=2</DIV><DIV>[07-06-20 01:57:53.463] APP: V4L2 Device opened, calling initDevice()...</DIV><DIV>[07-06-20 01:57:53.463] APP: V4L2 Entering initDevice()...</DIV><DIV>[07-06-20 01:57:53.464] APP: V4L2 entering init_read()...</DIV><DIV>[07-06-20 01:57:53.464] APP: V4L2 init_read() completed</DIV><DIV>[07-06-20 01:57:53.464] APP: V4L2 Setting channel 1</DIV><DIV>[07-06-20 01:57:53.465] APP: V4L2 initDevice() completed</DIV><DIV>[07-06-20 01:57:53.467] CONFIG: Using pixel buffer objects.</DIV><DIV>[07-06-20 01:57:53.468] CONFIG: Max. texture size is 4096</DIV><DIV>[07-06-20 01:57:53.468] APP: OGLSurface::initTileVertices() started</DIV><DIV>E</DIV><DIV>======================================================================</DIV><DIV>ERROR: test (__main__.CameraTestCase)</DIV><DIV>----------------------------------------------------------------------</DIV><DIV>Traceback (most recent call last):</DIV><DIV>  File "./TestV4lCameraX.py", line 40, in test</DIV><DIV>    Player.play()</DIV><DIV>MemoryError</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>----------------------------------------------------------------------</DIV><DIV>Ran 1 test in 0.716s</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>FAILED (errors=1)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>This exception is raised within the OGLSurface::initTileVertices() method, for some obscure reason, which can surely be lingered with the previous situation.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Any clue?</DIV><DIV>Thanks!</DIV><DIV><BR class="khtml-block-placeholder"><DIV><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV>--</DIV><DIV>OXullo Intersecans</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>0 2 L &gt; Outside Standing Level</DIV><DIV><A href="http://www.02L.net">http://www.02L.net</A></DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></DIV></DIV></BODY></HTML>