From 34d4086123256e31003aaddd76a0cb27fa7d0306 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Mon, 17 Jul 2017 23:39:14 +0200 Subject: [PATCH] Prefix public functions of ogg_afh_common.c with "oac". This way it is clear that these are not functions provided by libogg. Pure rename. no real changes. --- ogg_afh.c | 10 +++++----- ogg_afh_common.c | 10 +++++----- ogg_afh_common.h | 8 ++++---- opus_afh.c | 6 +++--- spx_afh.c | 6 +++--- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/ogg_afh.c b/ogg_afh.c index cb0611e0..8a64fcc5 100644 --- a/ogg_afh.c +++ b/ogg_afh.c @@ -66,14 +66,14 @@ static int ogg_vorbis_get_file_info(char *map, size_t numbytes, __a_unused int f { 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; @@ -155,12 +155,12 @@ static void vorbis_get_header(void *map, size_t mapsize, char **buf, { 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; @@ -199,7 +199,7 @@ static int vorbis_rewrite_tags(const char *map, size_t mapsize, 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; diff --git a/ogg_afh_common.c b/ogg_afh_common.c index 734fd586..fd0c86cc 100644 --- a/ogg_afh_common.c +++ b/ogg_afh_common.c @@ -19,7 +19,7 @@ /* 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; @@ -60,7 +60,7 @@ static int process_packets_2_and_3(ogg_sync_state *oss, } 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; @@ -122,8 +122,8 @@ static void set_chunk_tv(int frames_per_chunk, int frequency, * * \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; @@ -216,7 +216,7 @@ static int write_ogg_page(int fd, const 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; diff --git a/ogg_afh_common.h b/ogg_afh_common.h index 7b9d1313..0a18b5cc 100644 --- a/ogg_afh_common.h +++ b/ogg_afh_common.h @@ -16,7 +16,7 @@ * 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 @@ -33,7 +33,7 @@ struct ogg_afh_callback_info { 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); diff --git a/opus_afh.c b/opus_afh.c index 64eeb03c..bdc4a96d 100644 --- a/opus_afh.c +++ b/opus_afh.c @@ -123,11 +123,11 @@ static int opus_get_file_info(char *map, size_t numbytes, __a_unused int fd, 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 */ @@ -222,7 +222,7 @@ static int opus_rewrite_tags(const char *map, size_t mapsize, 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; } diff --git a/spx_afh.c b/spx_afh.c index 4e318af1..cd65ac51 100644 --- a/spx_afh.c +++ b/spx_afh.c @@ -152,13 +152,13 @@ static int spx_get_file_info(char *map, size_t numbytes, __a_unused int fd, 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) @@ -244,7 +244,7 @@ static int spx_rewrite_tags(const char *map, size_t mapsize, 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; } -- 2.39.5