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: downloadStill from media pool #167

Merged
merged 5 commits into from
Sep 10, 2024
Merged

feat: downloadStill from media pool #167

merged 5 commits into from
Sep 10, 2024

Conversation

Julusian
Copy link
Member

About the Contributor

This pull request is posted on behalf of myself/Bitfocus Companion

Type of Contribution

This is a Feature

New Behavior

This adds the ability to download still frames from the media pool.

To support this, rle decoding and yuva422 to rgba colour conversion has been implemented too.

Testing Instructions

Other Information

Status

  • PR is ready to be reviewed.
  • The functionality has been tested by the author.
  • Relevant unit tests has been added / updated.
  • Relevant documentation (code comments, system documentation) has been added / updated.

@codecov-commenter
Copy link

codecov-commenter commented Aug 16, 2024

Codecov Report

Attention: Patch coverage is 22.64151% with 82 lines in your changes missing coverage. Please review.

Project coverage is 83.61%. Comparing base (5e62374) to head (0a5abe0).

Files Patch % Lines
src/lib/converters/yuv422ToRgba.ts 5.12% 35 Missing and 2 partials ⚠️
src/dataTransfer/dataTransferDownloadStill.ts 11.11% 23 Missing and 1 partial ⚠️
src/atem.ts 15.00% 13 Missing and 4 partials ⚠️
src/dataTransfer/index.ts 25.00% 3 Missing ⚠️
...DataTransfer/DataTransferDownloadRequestCommand.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #167      +/-   ##
==========================================
- Coverage   84.69%   83.61%   -1.08%     
==========================================
  Files         189      191       +2     
  Lines        5951     6055     +104     
  Branches      887      956      +69     
==========================================
+ Hits         5040     5063      +23     
- Misses        911      960      +49     
- Partials        0       32      +32     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

* @param format The pixel format to return for the downloaded image. 'raw' passes through unchanged, and will be RLE encoded.
* @returns Promise which returns the image once downloaded. If the still slot is not in use, this will throw
*/
public async downloadStill(index: number, format: 'raw' | 'rgba' | 'yuv' = 'rgba'): Promise<Buffer> {
Copy link
Member Author

Choose a reason for hiding this comment

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

I guess that format should probably be replaced with an options object, for future expansion

@Julusian Julusian merged commit 9036d5c into master Sep 10, 2024
15 of 16 checks passed
@Julusian Julusian deleted the feat/download-still branch September 10, 2024 11:34
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.

3 participants