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

Support ranged media constraints #151

Closed
at-wat opened this issue Apr 23, 2020 · 3 comments · Fixed by #168
Closed

Support ranged media constraints #151

at-wat opened this issue Apr 23, 2020 · 3 comments · Fixed by #168
Assignees

Comments

@at-wat
Copy link
Member

at-wat commented Apr 23, 2020

Pixel format is scored by complete match at now.
For example, I want to select one of YUY2 and UYVY but not want to use JPEG.

// Video represents a video's properties
type Video struct {
Width, Height int
FrameRate float32
FrameFormat frame.Format
}
// Audio represents an audio's properties
type Audio struct {
ChannelCount int
Latency time.Duration
SampleRate int
SampleSize int
}

@at-wat at-wat changed the title Select media source by multiple pixel formats Support ranged media constraints Apr 29, 2020
@at-wat
Copy link
Member Author

at-wat commented Apr 29, 2020

https://developer.mozilla.org/en-US/docs/Web/API/Media_Streams_API/Constraints
In WebAPI, constraints can have min, ideal, max, and exact.

For pixel format case, oneof maybe needed as a extension. (or exact: ["YUY2", "UYVY"])

@at-wat
Copy link
Member Author

at-wat commented May 21, 2020

POC implementation for int propaties: #168
@lherman-cs what do you think about this?

@lherman-cs
Copy link
Member

@at-wat I just commented on the PR itself. Overall, it looks really good!

@at-wat at-wat self-assigned this May 22, 2020
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 a pull request may close this issue.

2 participants