Hi Ben,<div><br></div><div>I'm away from my dev computer so just commenting off the top of my. FFmpegImageStream should be double buffered so that the ffmpeg thread writing to the image will be writing to one part of the data, while the other half is available to be read by the graphics thread. This should avoid threading issues.</div><div><br></div><div>The threading used by the ffmpeg plugin is separate from the viewer threading so settings related to the viewer won't be important, nor will general settings of the scene graph.</div><div><br></div><div>You should be able to just add the ffmpeg genearted imagestream to a texture, start the steam going and then largely forget about it.</div><div><br></div><div>Robert.<br><br></div><div class="gmail_quote"><div dir="auto" class="gmail_attr">On Friday, 31 July 2020 at 20:15:45 UTC+1 bjs.me...@gmail.com wrote:<br></div><blockquote class="gmail_quote" style="margin: 0 0 0 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div dir="ltr"><div>Hi,</div><div><br></div><div>I was just looking at FFmpegImageStream, I am not very familiar with this code, but I have some questions.</div><div><br></div><div>It is not immediately clear to me how FFmpegImageStream::publishNewFrame is thread safe.</div><div>It seems like the image data is set (setImage) from the video decoder thread.</div><div>The image then uses a pointer to one of the buffers of the video decoder (of which the contents might also change ?).</div><div><br></div><div>FFmpegImageStream also doesn't seem to override requiresUpdateCall, which I believe will result in the texture not being dynamic (Texture2D::setImage).</div><div>Which could be used, for example in StateSet::computeDataVariance(), to determine whether the StateSet should be dynamic (which is needed for multithreaded rendering).</div><div><br></div><div>If anyone could shed more light on this subject, it would be very much appreciated.</div><div><br></div><div>Thank you.</div><div><br></div><div>Cheers,</div><div><br></div><div>Ben</div></div></blockquote></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:osg-users+unsubscribe@googlegroups.com">osg-users+unsubscribe@googlegroups.com</a>.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/osg-users/386b2bdb-9924-4d01-bc42-98565c685ac0n%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/osg-users/386b2bdb-9924-4d01-bc42-98565c685ac0n%40googlegroups.com</a>.<br />