]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Prefix public functions of ogg_afh_common.c with "oac".
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 17 Jul 2017 21:39:14 +0000 (23:39 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sat, 22 Jul 2017 14:33:22 +0000 (16:33 +0200)
This way it is clear that these are not functions provided by libogg.
Pure rename. no real changes.

ogg_afh.c
ogg_afh_common.c
ogg_afh_common.h
opus_afh.c
spx_afh.c

index cb0611e01440a2a1e23e4c586a602c16cb7bbc16..8a64fcc53b8635d6d14d472da4bb836f4401ab3b 100644 (file)
--- 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;
 {
        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);
                .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;
        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};
 {
        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,
        };
 
                .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;
        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 = 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;
                packet.bytes);
        free(packet.packet);
        return ret;
index 734fd58680b1f944f6adf51c76aebb19d1b5b5c7..fd0c86ccd37925f6d09942bd82a0c7c0d7ebeeed 100644 (file)
@@ -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,
 /* 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;
 {
        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,
 }
 
 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;
 {
        ogg_packet packet;
        ogg_stream_state stream;
@@ -122,8 +122,8 @@ static void set_chunk_tv(int frames_per_chunk, int frequency,
  *
  * \return Standard.
  */
  *
  * \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;
 {
        ogg_sync_state oss;
        ogg_page op;
@@ -216,7 +216,7 @@ static int write_ogg_page(int fd, const ogg_page *op)
  *
  * \return Standard.
  */
  *
  * \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;
                char *meta_packet, size_t meta_sz)
 {
        ogg_sync_state oss_in, oss_out;
index 7b9d1313af4816b79d1177c7898b94a70ee24775..0a18b5cc6c2a9586b5f2365c5d00057b2e12541a 100644 (file)
@@ -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.
  */
  * 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
        /**
         * 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;
 };
 
        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);
                char *meta_packet, size_t meta_sz);
index 64eeb03c1a4bd89bb64488495ed5d76c3ca322e9..bdc4a96dce306638d64ce6838dc4e5139ac89934 100644 (file)
@@ -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};
 
        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,
        };
                .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 */
        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);
        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;
 }
        free(meta_packet);
        return ret;
 }
index 4e318af19af8940570887ac3ebf8edb7a4c25b85..cd65ac519c0673c0b9df997f7608e2c86b5920dd 100644 (file)
--- 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 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));
                .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)
 }
 
 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);
        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;
 }
        free(meta_packet);
        return ret;
 }