]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
ogg: Abstract out custom header code.
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 17 Jul 2017 23:02:50 +0000 (01:02 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sat, 22 Jul 2017 14:34:10 +0000 (16:34 +0200)
The ogg/vorbis audio format handler employs the callback mechanism of
oac_get_file_info() to replace the metadata packet of an ogg/vorbis
stream by a fixed sized dummy packet. The same approach should also be
used for the ogg/opus audio format handler because ogg/opus metadata
can be arbitrary large too.

As a preparation for modifying the ogg/opus audio format
handler to skip the metadata header in this way, this commit
makes the infrastructure available to all audio format handlers
which employ the ogg container format by providing a public
interface in ogg_afh_common.c. The central data structure is struct
oac_custom_header, which replaces the former vorbis_get_header_data
structure. The layout of the new structure is only known to
ogg_afh_common.c. Users of this API need to call the accessor functions
declared in ogg_afh_common.h.

Only the ogg/vorbis audio format handler is converted to the new API.
A subsequent patch will make the ogg/opus audio format handler the
second user.


No differences found