feat: Add pixelFormat
field (#559)
* Add `mediaSubType` field to device formats * Create FourCharCode `toString` extension * Move pixelFormat -> `AVCaptureDevice.Format+toDictionary` * `mediaSubType` -> `pixelFormat` + non-optional * ts pixelFormat `string` -> specific formats * Add default pixelFormat value of `420v` on Android Co-authored-by: tcoldwell72 <31568400+tcoldwell72@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import type { CameraPosition } from './CameraPosition';
|
||||
import type { PixelFormat } from './PixelFormat';
|
||||
|
||||
/**
|
||||
* Indentifiers for a physical camera (one that actually exists on the back/front of the device)
|
||||
@@ -171,6 +172,10 @@ export interface CameraDeviceFormat {
|
||||
* All supported video stabilization modes
|
||||
*/
|
||||
videoStabilizationModes: VideoStabilizationMode[];
|
||||
/**
|
||||
* Specifies the pixel format on iOS. e.g. 420v, 420f
|
||||
*/
|
||||
pixelFormat: PixelFormat;
|
||||
}
|
||||
|
||||
/**
|
||||
|
7
src/PixelFormat.ts
Normal file
7
src/PixelFormat.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* Represents the pixel format of a `Frame`.
|
||||
* * `420v`: 420 YpCbCr 8 Bi-Planar Video Range
|
||||
* * `420f`: 420 YpCbCr 8 Bi-Planar Full Range
|
||||
* * `x420`: 420 YpCbCr 10 Bi-Planar Video Range
|
||||
*/
|
||||
export type PixelFormat = '420f' | '420v' | 'x420';
|
Reference in New Issue
Block a user