<feed xmlns='http://www.w3.org/2005/Atom'>
<title>paraslash/mp4.h, branch master</title>
<subtitle>paraslash - network audio streaming tools</subtitle>
<id>https://git.tue.mpg.de/cgit/paraslash/atom?h=master</id>
<link rel='self' href='https://git.tue.mpg.de/cgit/paraslash/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/'/>
<updated>2023-12-24T21:37:00Z</updated>
<entry>
<title>Compile with -Wsuggest-attribute=malloc.</title>
<updated>2023-12-24T21:37:00Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2023-05-30T22:11:14Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=914ee19c1fd21834fe5f81260daafe76a4475290'/>
<id>urn:sha1:914ee19c1fd21834fe5f81260daafe76a4475290</id>
<content type='text'>
We already employ this attribute extensively to help the compiler
improve optimization. However, a few malloc-like functions were not
yet marked with __malloc. Fix that and enable the warning to make
sure that new malloc-like functions get marked.

Since not all supported compilers know about this warning option, we
need to check at compile time whether the option is supported. Thanks
to the existing cc-option make(1) function, this is a simple one-liner
for Makefile.real.
</content>
</entry>
<entry>
<title>mp4: Doxify the public API.</title>
<updated>2022-06-27T14:58:32Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2021-08-28T20:12:41Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=9beef51a322095b6d31046bf87c44365c88e5745'/>
<id>urn:sha1:9beef51a322095b6d31046bf87c44365c88e5745</id>
<content type='text'>
This adds doxygen comments to all public functions of the mp4 API
and to the macros and enumerations of mp4.c.
</content>
</entry>
<entry>
<title>mp4: Rename mp4_open_read() to mp4_open().</title>
<updated>2022-06-27T14:45:56Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2021-08-28T18:53:23Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=945502385e8261d6921c7e1748fa64f34b7b81fd'/>
<id>urn:sha1:945502385e8261d6921c7e1748fa64f34b7b81fd</id>
<content type='text'>
The function may be called with the intention to update the meta tags
later by calling mp4_update_meta(), albeit mp4_open_meta() is cheaper
if the caller only wants to modify the metadata. The old name is thus
slightly misleading, and it's longer.
</content>
</entry>
<entry>
<title>mp4: Rename mp4_meta_update() to mp4_update_meta().</title>
<updated>2022-06-27T14:45:56Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2021-08-28T18:50:13Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=2c59642d28f83452962d7dea0275aef16d9d003b'/>
<id>urn:sha1:2c59642d28f83452962d7dea0275aef16d9d003b</id>
<content type='text'>
Just to be consistent with mp4_open_meta() and friends.
</content>
</entry>
<entry>
<title>mp4: Assorted trivial cleanups.</title>
<updated>2022-06-27T14:45:56Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2021-08-28T14:40:19Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=1182720326e0392271fa66fe582d5c2be108877b'/>
<id>urn:sha1:1182720326e0392271fa66fe582d5c2be108877b</id>
<content type='text'>
Avoid C++ comments, use int rather than int32_t as the standard return
type, kill a pointless cast and use plain unsigned rather than uint32_t
for the number of tag items.
</content>
</entry>
<entry>
<title>mp4: Remove -&gt;len member of struct mp4_tag.</title>
<updated>2022-06-27T14:45:56Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2021-08-28T13:18:41Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=a6e19bbc0c886cf310316b304e927a230236ac39'/>
<id>urn:sha1:a6e19bbc0c886cf310316b304e927a230236ac39</id>
<content type='text'>
It is set but never read.
</content>
</entry>
<entry>
<title>mp4: Return proper types for sample rate and count.</title>
<updated>2022-06-27T14:45:56Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2021-08-27T17:10:51Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=c2e987abfcf711c85e00fc11b9ef00d38ad89f3a'/>
<id>urn:sha1:c2e987abfcf711c85e00fc11b9ef00d38ad89f3a</id>
<content type='text'>
The sample rate and the number of samples are stored as 16-bit/32-bit
unsigned integers in the mp4 file, so let mp4_get_sample_rate()
and mp4_num_samples() return these types.
</content>
</entry>
<entry>
<title>mp4: Remove E_MP4_BAD_CHANNEL_COUNT.</title>
<updated>2022-06-06T18:46:37Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2021-08-27T14:07:24Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=84c7e6c683280d39a41155cc402f0ff2eafc7a0a'/>
<id>urn:sha1:84c7e6c683280d39a41155cc402f0ff2eafc7a0a</id>
<content type='text'>
If the mp4 file does not contain an m4a atom, the channel
count stays at zero and open_file() returns -E_MP4_TRACK in this
case. So the check in aac_afh.c for a non-positive return value from
mp4_get_channel_count() can never trigger. Replace the check by an
assertion and remove the error code.

Also, let mp4_get_channel_count() return uint16_t as the number of
channels is stored as an unsigned 16 bit number in the mp4 file.
</content>
</entry>
<entry>
<title>mp4: Improve mp4_get_sample_size().</title>
<updated>2022-06-06T18:46:37Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2021-08-27T13:38:25Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=5ed19fbaa7145db070142c288ec5eb184d36dbc5'/>
<id>urn:sha1:5ed19fbaa7145db070142c288ec5eb184d36dbc5</id>
<content type='text'>
Use an unsigned type for the sample number and check that the passed
number is within range. Since the function can fail now, let it return
int and return the sample size via an additional pointer argument.
</content>
</entry>
<entry>
<title>mp4: Make sample number be an unsigned parameter.</title>
<updated>2022-06-06T18:46:37Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@tuebingen.mpg.de</email>
</author>
<published>2021-08-27T13:23:24Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=83607bd0556f3c7aa5880567e3d089e76c0d9746'/>
<id>urn:sha1:83607bd0556f3c7aa5880567e3d089e76c0d9746</id>
<content type='text'>
There is no reason to convert the 32-bit unsigned paraslash chunk
number into a signed quantity here, as sample numbers are also stored
as 32 bit unsigned in the mp4 file.
</content>
</entry>
</feed>
