]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - afh.h
build: Rename all_objs -> dep_objs.
[paraslash.git] / afh.h
diff --git a/afh.h b/afh.h
index 6dc5a3fc663659b67f658c9ef9b58883adde6266..ba72d80e5917b103e879ce221526d1a1a5e3fccc 100644 (file)
--- a/afh.h
+++ b/afh.h
@@ -1,8 +1,4 @@
-/*
- * Copyright (C) 2005 Andre Noll <maan@tuebingen.mpg.de>
- *
- * Licensed under the GPL v2. For licencing details see COPYING.
- */
+/* Copyright (C) 2005 Andre Noll <maan@tuebingen.mpg.de>, see file COPYING. */
 
 /** \file afh.h Structures for audio format handling (para_server). */
 
@@ -62,8 +58,6 @@ struct afh_info {
 
 /** Data about the current audio file, passed from afs to server. */
 struct audio_file_data {
-       /** The open file descriptor to the current audio file. */
-       int fd;
        /** Vss needs this for streaming. */
        struct afh_info afhi;
        /**
@@ -84,14 +78,6 @@ struct audio_file_data {
  * in the other part of this struct.
  */
 struct audio_format_handler {
-       /** Name of the audio format. */
-       const char *name;
-       /**
-        * Pointer to the audio format handler's init function.
-        *
-        * Must initialize all function pointers and is assumed to succeed.
-        */
-       void (*init)(struct audio_format_handler*);
        /** Typical file endings for files that can be handled by this afh. */
        const char * const *suffixes;
        /**
@@ -103,7 +89,7 @@ struct audio_format_handler {
         * success, the function must return a positive value and fill in the
         * given struct afh_info.
         *
-        * \sa struct afh_info
+        * \sa struct \ref afh_info.
         */
        int (*get_file_info)(char *map, size_t numbytes, int fd,
                struct afh_info *afhi);
@@ -125,8 +111,8 @@ struct audio_format_handler {
         * portion of the memory mapped audio file. The caller must not call
         * free() on it.
         */
-       int (*get_chunk)(long unsigned chunk_num, void *afh_context,
-               const char **buf, size_t *len);
+       int (*get_chunk)(uint32_t chunk_num, void *afh_context,
+               const char **buf, uint32_t *len);
        /** Deallocate the resources occupied by ->open(). */
        void (*close)(void *afh_context);
        /**
@@ -139,14 +125,13 @@ struct audio_format_handler {
                int output_fd, const char *filename);
 };
 
-void afh_init(void);
 int guess_audio_format(const char *name);
 int compute_afhi(const char *path, char *data, size_t size,
        int fd, struct afh_info *afhi);
 const char *audio_format_name(int);
 __must_check int afh_get_chunk(long unsigned chunk_num, struct afh_info *afhi,
                uint8_t audio_format_id, const void *map, size_t mapsize,
-               const char **buf, size_t *len, void **afh_context);
+               const char **buf, uint32_t *len, void **afh_context);
 void afh_close(void *afh_context, uint8_t audio_format_id);
 int32_t afh_get_start_chunk(int32_t approx_chunk_num,
                const struct afh_info *afhi, uint8_t audio_format_id);