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

Expose name of devices along with UID for macOS #488

Merged
merged 2 commits into from
Mar 31, 2023

Conversation

martha-johnston
Copy link
Contributor

Description

As it is currently implemented, the only way to identify a device plugged into a Darwin system is by UID even though many other forms of identification exist for each device, as explained in this Identifying a Device section of the AVFoundation documentation. This change exposes the localizedName and adds it as Name to the avfoundation.Device type struct. Additionally, the name is added to the driver.Info type struct so that it is included when registering a device.

Reasoning

While the UID that is currently registered for each device is helpful, it is not human readable, unlike localizedName. For example, when discovering the devices on a MacBook, the built in webcam's UID is a string of numbers, letters, and dashes, but it's localizedName is "FaceTime HD Camera". Exposing this name would be helpful for any human interactive use cases, but UID will also remain available for any other use cases in which it is better suited.

@codecov
Copy link

codecov bot commented Mar 31, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (b9ce5bb) 58.83% compared to head (00b05ed) 58.83%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #488   +/-   ##
=======================================
  Coverage   58.83%   58.83%           
=======================================
  Files          62       62           
  Lines        3741     3741           
=======================================
  Hits         2201     2201           
  Misses       1413     1413           
  Partials      127      127           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@edaniels edaniels merged commit dc8aeea into pion:master Mar 31, 2023
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