Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exposing the file with api preference constructor of VideoCapture #1025

Merged
merged 2 commits into from
Jul 3, 2018

Conversation

kwatters
Copy link
Contributor

@kwatters kwatters commented Jul 3, 2018

This is a pull request that exposes the VideoCapture constructor that includes the apiPreference. I think this is what Spawn32 is looking for in #1021

@saudet
Copy link
Member

saudet commented Jul 3, 2018

Looks good, let's do the same for the other constructors!

@kwatters
Copy link
Contributor Author

kwatters commented Jul 3, 2018

I assume you're referring to all of the following:

  VideoCapture capture = new VideoCapture();
  VideoCapture capture = new VideoCapture(BytePointer filename);
  VideoCapture capture = new VideoCapture(int index);
  VideoCapture capture = new VideoCapture(long size);
  VideoCapture capture = new VideoCapture(Pointer p);
  VideoCapture capture = new VideoCapture(String filename);
  VideoCapture capture = new VideoCapture(BytePointer filename, int apiPreference);
  VideoCapture capture = new VideoCapture(String filename, int apiPreference);

I could work some logic into handle each of those case if you want. I don't know if there's much benefit to the new VideoCapture(); constructor. This is probably a slightly larger refactor...

@saudet
Copy link
Member

saudet commented Jul 3, 2018

No, I mean OpenCVFrameGrabber's constructors. We only really need File and deviceNumber.

@saudet
Copy link
Member

saudet commented Jul 3, 2018

Or maybe just File, it doesn't support apiPreference for deviceNumer?

@kwatters
Copy link
Contributor Author

kwatters commented Jul 3, 2018

I'm pretty sure file & device number are mutually exclusive. I added a constructor that allows file + api preference.

@saudet saudet merged commit a57084e into bytedeco:master Jul 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants