Skip to content

Look into SDL_TEXTUREACCESS_STREAMING #10

@bseto

Description

@bseto

This article shows how to use it: http://lazyfoo.net/tutorials/SDL/42_texture_streaming/index.php
Didn't really look into it, but it might be something worth looking into :)

Current Implementation

Currently the BackupCamera uses the main thread to render the texture onto the main screen, and "streams" the video from another thread using OpenCV.

To communicate the image from the OpenCV thread to the main thread, we use a triple buffer rather than a mutex, which would halt our main thread and defeat the purpose of the threading.

We could use two buffers and apply a mutex and we won't be blocked too often, but with 3 buffers, we can just eliminate the need of a mutex - I think :).

Section with the buffer:

void VideoStream::ThreadFunction()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions