Skip to content

Make source video size properties public, or discuss returning SourceProbe from the Load API #28

@strangeliu

Description

@strangeliu

What should the engine do?

After loading a source, the video size is available via the sourceVideoWidth and sourceVideoHeight properties — but they’re currently private. There are two ways forward:

Option A: Simply make sourceVideoWidth and sourceVideoHeight public.

Option B: Return SourceProbe from the Load API. The Load API already fetches SourceProbe data internally. Returning it to the caller would provide video size along with other useful metadata in one shot.

The signature could be changed to:

@discardableResult
public func load(
    source: MediaSource,
    startPosition: Double? = nil,
    options: LoadOptions = .init(),
    audioSourceStreamIndex: Int32? = nil
) async throws -> SourceProbe

This is fully backward-compatible thanks to @discardableResult.

Motivating media or use case

Able to access video size after load.

Area

Public API surface

Host app / integration context

No response

Would you be willing to open a PR?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions