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

Add RFC: Codec Identifiers #63

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

derrod
Copy link
Member

@derrod derrod commented Jun 20, 2024

Description

This RFC intends to facilitate discussion to find a way to move away from storing codec identifiers as strings. This is to avoid string comparisons and remove some redundancies such as outputs defining their own codec enumerations.

Motivation and Context

String comparisons are slow, error prone (case sensitivity, typos, etc.), and generally ugly. Most outputs convert from strings to internal enumerations anyway which could be made redundant by providing them in the first place.

Link to RFC

@derrod derrod force-pushed the no-codec-strings-attached branch from 48bfd05 to 2977f18 Compare June 20, 2024 06:45

#### Drawbacks

- Requires libobs API changes to add new codecs
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't all three solutions require libobs API changes?

Copy link
Contributor

@tytan652 tytan652 Jun 20, 2024

Choose a reason for hiding this comment

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

The third requires to modify the API at each codec addition unlike the two others that relies on a third-party enum or FourCC (not an enum but integers).

@derrod derrod force-pushed the no-codec-strings-attached branch from 2977f18 to 83b8cdb Compare June 20, 2024 07:05
@derrod derrod force-pushed the no-codec-strings-attached branch from 83b8cdb to dd3528d Compare June 20, 2024 14:46
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