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

Can you make the class public? #9

Closed
Mrgaton opened this issue Oct 27, 2021 · 8 comments
Closed

Can you make the class public? #9

Mrgaton opened this issue Oct 27, 2021 · 8 comments

Comments

@Mrgaton
Copy link

Mrgaton commented Oct 27, 2021

I want to make the class public for acces the webcam from diferents files of codes thanks

@secile
Copy link
Owner

secile commented Nov 21, 2021

Thank you for your request and sorry for late reply.

I want to confirm.
What you request is that UsbCamera class's access modifier is currently 'internal' and change it to 'public'?

Could you tell me the reason. Are you going to make UsbCamera class to dll?
Thank you.

@Mrgaton
Copy link
Author

Mrgaton commented Nov 21, 2021

i mean i like to put the class in my Data.cs And make Public class for acces the camera class from other parts of code

@Mrgaton
Copy link
Author

Mrgaton commented Nov 21, 2021

image

@Mrgaton
Copy link
Author

Mrgaton commented Nov 21, 2021

all thath tring to do this
image

@Mrgaton
Copy link
Author

Mrgaton commented Nov 21, 2021

i use your class to my c# webcam online server and is so good

@secile
Copy link
Owner

secile commented Nov 22, 2021

To make UsbCamera class public, you have to make DirectShow class (in line 772) public too.
Could you try it?

@Mrgaton
Copy link
Author

Mrgaton commented Nov 23, 2021

oh yea it works thanks man one question how i can get the device max frame ratte?

or someshimg like
image

@secile
Copy link
Owner

secile commented Nov 25, 2021

You can get max/min frame interval from Caps.MinFrameInterval and Caps.MaxFrameInterval in VideoFormat member.
The value means duration in 100-nanosecond unit. You can translate into frame rates as follows.

frame rate = 10,000,000 / frame duration.
(for example, value=333333 means 30 fps.)

You can change frame interval by modifying TimePerFrame value in VideoFormat member from MinFrameInterval to MaxFrameInterval, but as long as I tested, devices all I have returns same value in MinFrameInterval and MaxFrameInterval.

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

No branches or pull requests

2 participants