This way it is clear that these are not functions provided by libogg.
Pure rename. no real changes.
{
int ret;
struct private_vorbis_data pvd;
- struct ogg_afh_callback_info vorbis_callback_info = {
+ struct oac_callback_info vorbis_callback_info = {
.packet_callback = vorbis_packet_callback,
.private_data = &pvd,
};
vorbis_info_init(&pvd.vi);
vorbis_comment_init(&pvd.vc);
- ret = ogg_get_file_info(map, numbytes, afhi, &vorbis_callback_info);
+ ret = oac_get_file_info(map, numbytes, afhi, &vorbis_callback_info);
vorbis_info_clear(&pvd.vi);
vorbis_comment_clear(&pvd.vc);
return ret;
{
int ret;
struct vorbis_get_header_data vghd = {.len = 0};
- struct ogg_afh_callback_info cb = {
+ struct oac_callback_info cb = {
.packet_callback = vorbis_get_header_callback,
.private_data = &vghd,
};
- ret = ogg_get_file_info(map, mapsize, NULL, &cb);
+ ret = oac_get_file_info(map, mapsize, NULL, &cb);
if (ret < 0)
goto fail;
*buf = vghd.buf;
ret = vorbis_make_meta_packet(tags, &packet);
if (ret < 0)
return ret;
- ret = ogg_rewrite_tags(map, mapsize, output_fd, (char *)packet.packet,
+ ret = oac_rewrite_tags(map, mapsize, output_fd, (char *)packet.packet,
packet.bytes);
free(packet.packet);
return ret;
/* Taken from decoder_example.c of libvorbis-1.2.3. */
static int process_packets_2_and_3(ogg_sync_state *oss,
ogg_stream_state *stream, struct afh_info *afhi,
- struct ogg_afh_callback_info *ci)
+ struct oac_callback_info *ci)
{
ogg_page page;
ogg_packet packet;
}
static int process_ogg_packets(ogg_sync_state *oss, struct afh_info *afhi,
- struct ogg_afh_callback_info *ci)
+ struct oac_callback_info *ci)
{
ogg_packet packet;
ogg_stream_state stream;
*
* \return Standard.
*/
-int ogg_get_file_info(char *map, size_t numbytes, struct afh_info *afhi,
- struct ogg_afh_callback_info *ci)
+int oac_get_file_info(char *map, size_t numbytes, struct afh_info *afhi,
+ struct oac_callback_info *ci)
{
ogg_sync_state oss;
ogg_page op;
*
* \return Standard.
*/
-int ogg_rewrite_tags(const char *map, size_t map_sz, int fd,
+int oac_rewrite_tags(const char *map, size_t map_sz, int fd,
char *meta_packet, size_t meta_sz)
{
ogg_sync_state oss_in, oss_out;
* function whose purpose is to extract the meta information about the audio
* file from the first few ogg packets of the bitstream.
*/
-struct ogg_afh_callback_info {
+struct oac_callback_info {
/**
* ogg_get_file_info() calls this function for the first three ogg
* packets, or until the callback returns a non-positive value. If it
void *private_data;
};
-int ogg_get_file_info(char *map, size_t numbytes, struct afh_info *afhi,
- struct ogg_afh_callback_info *ci);
-int ogg_rewrite_tags(const char *map, size_t mapsize, int fd,
+int oac_get_file_info(char *map, size_t numbytes, struct afh_info *afhi,
+ struct oac_callback_info *ci);
+int oac_rewrite_tags(const char *map, size_t mapsize, int fd,
char *meta_packet, size_t meta_sz);
int ret, ms;
struct opus_header oh = {.version = 0};
- struct ogg_afh_callback_info opus_callback_info = {
+ struct oac_callback_info opus_callback_info = {
.packet_callback = opus_packet_callback,
.private_data = &oh,
};
- ret = ogg_get_file_info(map, numbytes, afhi, &opus_callback_info);
+ ret = oac_get_file_info(map, numbytes, afhi, &opus_callback_info);
if (ret < 0)
return ret;
ret = (afhi->chunk_table[afhi->chunks_total] - afhi->chunk_table[0]) * 8; /* bits */
int ret;
meta_sz = opus_make_meta_packet(tags, &meta_packet);
- ret = ogg_rewrite_tags(map, mapsize, output_fd, meta_packet, meta_sz);
+ ret = oac_rewrite_tags(map, mapsize, output_fd, meta_packet, meta_sz);
free(meta_packet);
return ret;
}
struct afh_info *afhi)
{
struct private_spx_data psd;
- struct ogg_afh_callback_info spx_callback_info = {
+ struct oac_callback_info spx_callback_info = {
.packet_callback = spx_packet_callback,
.private_data = &psd,
};
memset(&psd, 0, sizeof(psd));
- return ogg_get_file_info(map, numbytes, afhi, &spx_callback_info);
+ return oac_get_file_info(map, numbytes, afhi, &spx_callback_info);
}
static size_t spx_make_meta_packet(struct taginfo *tags, char **result)
int ret;
meta_sz = spx_make_meta_packet(tags, &meta_packet);
- ret = ogg_rewrite_tags(map, mapsize, output_fd, meta_packet, meta_sz);
+ ret = oac_rewrite_tags(map, mapsize, output_fd, meta_packet, meta_sz);
free(meta_packet);
return ret;
}