openframeworks / openframeworks/openFrameworks

ofGstVideoGrabber::listDevices() : ofVideoDevice::format is empty if device is not initialize:

Open
#5,283 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Description

This is on Linux 16.04.1 with of 0.9.3 and ofGstVideoGrabber
Calling ofVideoGrabber::listDevices() before ofVideoGrabber::setup() return empty vector for each video device.
Calling setup a second time to set the video format doesn't work.
As a workaround we can initialize a temporary ofVideoDevice, initialize it with a small resolution, get it's video format, delete it and create a new one the chosen video format.

But I think ofGstVideoGrabber should handle this silently and return video format even if device is not initialized.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting ofGstVideoGrabber::listDevices() and the ofVideoGrabber::setup() entry point on Linux. Reproduce the uninitialized-device case, then verify that each listed device has a populated ofVideoFormat and that a second setup with the selected format works without the temporary-device workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, linux
Domain
audio-video-rtc
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.