gst_plugins_base/gst/audioresample/buffer.h
changeset 0 0e761a78d257
equal deleted inserted replaced
-1:000000000000 0:0e761a78d257
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __AUDIORESAMPLE_BUFFER_H__
       
    20 #define __AUDIORESAMPLE_BUFFER_H__
       
    21 
       
    22 #include <glib.h>
       
    23 
       
    24 typedef struct _AudioresampleBuffer AudioresampleBuffer;
       
    25 typedef struct _AudioresampleBufferQueue AudioresampleBufferQueue;
       
    26 
       
    27 struct _AudioresampleBuffer
       
    28 {
       
    29   unsigned char *data;
       
    30   int length;
       
    31 
       
    32   int ref_count;
       
    33 
       
    34   AudioresampleBuffer *parent;
       
    35 
       
    36   void (*free) (AudioresampleBuffer *, void *);
       
    37   void *priv;
       
    38   void *priv2;
       
    39 };
       
    40 
       
    41 struct _AudioresampleBufferQueue
       
    42 {
       
    43   GList *buffers;
       
    44   int depth;
       
    45   int offset;
       
    46 };
       
    47 #ifdef __SYMBIAN32__
       
    48 IMPORT_C
       
    49 #endif
       
    50 
       
    51 
       
    52 AudioresampleBuffer *   audioresample_buffer_new                (void);
       
    53 #ifdef __SYMBIAN32__
       
    54 IMPORT_C
       
    55 #endif
       
    56 
       
    57 AudioresampleBuffer *   audioresample_buffer_new_and_alloc      (int size);
       
    58 #ifdef __SYMBIAN32__
       
    59 IMPORT_C
       
    60 #endif
       
    61 
       
    62 AudioresampleBuffer *   audioresample_buffer_new_with_data      (void *data, int size);
       
    63 #ifdef __SYMBIAN32__
       
    64 IMPORT_C
       
    65 #endif
       
    66 
       
    67 AudioresampleBuffer *   audioresample_buffer_new_subbuffer      (AudioresampleBuffer * buffer, 
       
    68                                                                  int offset,
       
    69                                                                  int length);
       
    70 #ifdef __SYMBIAN32__
       
    71 IMPORT_C
       
    72 #endif
       
    73 
       
    74 void                    audioresample_buffer_ref                (AudioresampleBuffer * buffer);
       
    75 #ifdef __SYMBIAN32__
       
    76 IMPORT_C
       
    77 #endif
       
    78 
       
    79 void                    audioresample_buffer_unref              (AudioresampleBuffer * buffer);
       
    80 #ifdef __SYMBIAN32__
       
    81 IMPORT_C
       
    82 #endif
       
    83 
       
    84 
       
    85 AudioresampleBufferQueue *      
       
    86                         audioresample_buffer_queue_new          (void);
       
    87 #ifdef __SYMBIAN32__
       
    88 IMPORT_C
       
    89 #endif
       
    90 
       
    91 void                    audioresample_buffer_queue_free         (AudioresampleBufferQueue * queue);
       
    92 #ifdef __SYMBIAN32__
       
    93 IMPORT_C
       
    94 #endif
       
    95 
       
    96 int                     audioresample_buffer_queue_get_depth    (AudioresampleBufferQueue * queue);
       
    97 #ifdef __SYMBIAN32__
       
    98 IMPORT_C
       
    99 #endif
       
   100 
       
   101 int                     audioresample_buffer_queue_get_offset   (AudioresampleBufferQueue * queue);
       
   102 #ifdef __SYMBIAN32__
       
   103 IMPORT_C
       
   104 #endif
       
   105 
       
   106 void                    audioresample_buffer_queue_push         (AudioresampleBufferQueue * queue,
       
   107                                                                  AudioresampleBuffer * buffer);
       
   108 #ifdef __SYMBIAN32__
       
   109 IMPORT_C
       
   110 #endif
       
   111 
       
   112 AudioresampleBuffer *   audioresample_buffer_queue_pull         (AudioresampleBufferQueue * queue, int len);
       
   113 #ifdef __SYMBIAN32__
       
   114 IMPORT_C
       
   115 #endif
       
   116 
       
   117 AudioresampleBuffer *   audioresample_buffer_queue_peek         (AudioresampleBufferQueue * queue, int len);
       
   118 #ifdef __SYMBIAN32__
       
   119 IMPORT_C
       
   120 #endif
       
   121 
       
   122 void                    audioresample_buffer_queue_flush        (AudioresampleBufferQueue * queue);
       
   123 
       
   124 #endif