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

feat: MediaInfo additions #270

Merged
merged 4 commits into from
May 23, 2024
Merged

Conversation

alkalinecoffee
Copy link

@alkalinecoffee alkalinecoffee commented May 17, 2024

To merge into #141

Adds some new methods per the requirements doc.

The highlights are:

  • For consistency, resolution now always refers to a resolution defined in pixels as width/height (e.g. [1920, 1080])
  • For consistency, video mode now always refers to the shorthand resolution and optional frame rate (e.g. 1080p60)

Newly added methods

AudioOutput

  • mode: Return the audio output mode currently supported by the platform, e.g. stereo

Device

  • audioFormatSupported: Check whether content of a given audio format is supported by the device's current configuration, e.g. bool
  • hdcpVersion: Get the latest HDCP version supported by the device, e.g. 2.2
  • hdrProfile: Returns the current HDR profile set on the device, e.g. hdr10
  • hdrProfiles: Returns all HDR profiles supported by the device, e.g. [hdr10, hdr10plus, hlg]
  • sourceFrameRateUsed: Check whether the HDMI output frame rate is set to follow the video source frame rate.
  • videoFormatSupported: Whether video content of the given format is supported by the device's current configuration, returns bool
  • videoMode: Returns the current video output mode of the device, e.g. 1080p60
  • videoModes: Returns an array of all valid video output modes that the device supports, regardless of any connected display, e.g. [1080p50, 1080p60].

Display

  • size: Get the width and height of the display panel (in centimeters), e.g. [157, 91]
  • colorDepth: Get the supported color depth of the display panel in bits, e.g. 10
  • hdrProfiles: Returns all HDR profiles supported by the display, e.g. [hdr10, hdr10plus, hlg]
  • refreshRate: Get the native refresh rate of the display device (in Hz), e.g. 60
  • resolution: Get the resolution of the display device in pixels, e.g. [1920, 1080]
  • resolutionName: Get a user-friendly resolution name of the display device, e.g. uhd

Media Info

  • activeAudioFormats: Get a list of the active audio formats currently used across all media pipelines, returns an array of MediaInfo.AudioFormat objects
  • activeVideoFormats: Get a list of the active video formats currently used across all media pipelines, returns an array of MediaInfo.VideoFormat objects
  • audioFormat: Get the audio format currently used by the specified media pipeline, returns MediaInfo.AudioFormat
  • onActiveAudioFormatsChanged: Get notified when the active audio formats used across all media pipelines starts, stops, or changes, returns an array of MediaInfo.AudioFormat objects
  • onActiveVideoFormatsChanged: Get notified when the active video formats used across all media pipelines starts, stops, or changes, returns an array of MediaInfo.VideoFormat objects
  • videoFormat: Get the video format currently used by the specified media pipeline, returns MediaInfo.VideoFormat

Deprecated Methods

  • Device.hdcp: Get the supported HDCP versions available for content transmission. Team decided to deprecate boolean map methods. Superceded by Device.hdcpVersion
  • Device.hdr: Returns an array of valid HDR profiles that the device supports. Team decided to deprecate booleanMap methods. Superceded by Device.hdrProfiles
  • Device.screenResolution: Removed in favor of the more descriptive Device.videoResolution or Display.resolution

Notes

  • Some methods (such as Device.hdrProfiles and Display.hdrProfiles) are domain-specific, in that they only return values for the device or display respectively, putting the onus on the developer to determine what content works on the customer's equipment
    • Should we consider new methods to evaluate capabilities of the user's entire AV chain / system? This might include the device, display, AV receiver, physical connections, etc
    • Note thatDevice.videoModes is one such method that is currently specced to consider capabilities of both the device and display
  • How are errors expected to be handled? For instance, if a Display method is called but no display is present, should the method return successfully with a null-ish value, or should the SDK return an error?

Copy link
Contributor

@jlacivita jlacivita left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some change requests and some comments for consideration.

requirements/specifications/media/media-info.md Outdated Show resolved Hide resolved
requirements/specifications/media/media-info.md Outdated Show resolved Hide resolved
requirements/specifications/media/media-info.md Outdated Show resolved Hide resolved
requirements/specifications/media/media-info.md Outdated Show resolved Hide resolved
requirements/specifications/media/media-pipeline.md Outdated Show resolved Hide resolved
requirements/style-guide-and-template.md Outdated Show resolved Hide resolved
requirements/style-guide-and-template.md Show resolved Hide resolved
Copy link
Contributor

@jlacivita jlacivita left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alkalinecoffee alkalinecoffee merged commit 37914c1 into feature/media-info May 23, 2024
3 of 4 checks passed
@alkalinecoffee alkalinecoffee deleted the feature/media-info-joe branch June 3, 2024 16:03
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