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

Consider moving codec parsers to separate crate #74

Open
knopp opened this issue Apr 15, 2024 · 3 comments
Open

Consider moving codec parsers to separate crate #74

knopp opened this issue Apr 15, 2024 · 3 comments

Comments

@knopp
Copy link

knopp commented Apr 15, 2024

Hi,

it would be very useful to have access to codec parsers separately from the main crate.

I'm wondering if splitting the crate in two would be worth considering?

@dwlsalmeida
Copy link
Collaborator

I wonder if a feature to just build the parsers wouldn't suffice?

@knopp
Copy link
Author

knopp commented Apr 15, 2024

I forked the crate for the time being as I'm not sure my idea for codec parsers crate and cros-codecs are aligned, i.e. I'd want to add mpeg2 and mpeg4 parsers in future which I feel has very little value for cros-codecs. So I'm going to close the issue for now.

@knopp knopp closed this as completed Apr 15, 2024
@Gnurou
Copy link
Collaborator

Gnurou commented Apr 17, 2024

Hi - before forking and making things maybe difficult to merge back, I'd like to make sure we have discussed all options.

First, I have nothing against merging mpeg2 and mpeg4 parsers to cros-codecs - as long as they are built behind a feature (like all codecs should be), this should not cause any issue.

As for disabling the non-parsers parts of this case, as @dwlsalmeida said, we could put this behind a feature. Actually, if we put every backend behind a feature, we should be able to achieve that exact result.

There is also the fact that IIUC the Rust compiler will just link the code from cros-codecs that your own crate is using, and thus won't include any decoder or encoder stuff unless your code explicitly references it.

Can you elaborate on your use-case for these parsers?

@Gnurou Gnurou reopened this Apr 17, 2024
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

No branches or pull requests

3 participants