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

mp4a: Support DecoderSpecificDescriptor profiles > 30 #125

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

petzeb
Copy link

@petzeb petzeb commented Oct 17, 2023

Adds support for reading and writing AAC audio specific info when profile (object type) is larger than 30.

Descriptions may require different amount of bytes to serialize
depending on content of fields. In preparation of supporing reading and
writing DecoderSpecificDescriptor::profiles (audio object type) values
larger than 30.
Adds support for reading and writing AAC audio specific info when
profile (object type) is larger than 30.
@petzeb petzeb force-pushed the support_writing_extended_aots branch from e1ec2f3 to 0a3973b Compare October 17, 2023 07:53
write_desc(writer, Self::desc_tag(), size)?;

writer.write_u8((self.profile << 3) + (self.freq_index >> 1))?;
writer.write_u8((self.freq_index << 7) + (self.chan_conf << 3))?;
if self.profile < 31 {
Copy link
Author

@petzeb petzeb Oct 17, 2023

Choose a reason for hiding this comment

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

A potential option could be to use some crate like:
https://docs.rs/bitstream-io/1.7.0/bitstream_io/
for this bit packing (and unpacking)

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.

1 participant