gst_nokia_speech/gstframedaudioenc.h
changeset 16 8e837d1bf446
equal deleted inserted replaced
15:4b0c6ed43234 16:8e837d1bf446
       
     1 /* GStreamer Framed Audio Encoder
       
     2  * Copyright 2009 Collabora Ltd,
       
     3  * Copyright 2009 Nokia Corporation
       
     4  *  @author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>.
       
     5  *
       
     6  * This library is free software; you can redistribute it and/or
       
     7  * modify it under the terms of the GNU Library General Public
       
     8  * License as published by the Free Software Foundation; either
       
     9  * version 2 of the License, or (at your option) any later version.
       
    10  *
       
    11  * This library is distributed in the hope that it will be useful,
       
    12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
       
    14  * Library General Public License for more details.
       
    15  *
       
    16  * You should have received a copy of the GNU Library General Public
       
    17  * License along with this library; if not, write to the
       
    18  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
       
    19  * Boston, MA 02111-1307, USA.
       
    20  */
       
    21 
       
    22 #ifndef __GST_FRAMED_AUDIO_ENC_H__
       
    23 #define __GST_FRAMED_AUDIO_ENC_H__
       
    24 
       
    25 #include <gst/gst.h>
       
    26 #include <gst/base/gstadapter.h>
       
    27 
       
    28 G_BEGIN_DECLS
       
    29 
       
    30 typedef struct _GstNokiaFramedAudioEnc      GstNokiaFramedAudioEnc;
       
    31 typedef struct _GstNokiaFramedAudioEncClass GstNokiaFramedAudioEncClass;
       
    32 
       
    33 typedef GstNokiaFramedAudioEnc      GstFramedAudioEnc;
       
    34 typedef GstNokiaFramedAudioEncClass GstFramedAudioEncClass;
       
    35 
       
    36 struct _GstNokiaFramedAudioEnc
       
    37 {
       
    38   /* helper for this element */
       
    39   GstElement *element;
       
    40 
       
    41   /* private stuff */
       
    42 
       
    43   /* pad with incoming data */
       
    44   GstPad *sinkpad;
       
    45 
       
    46   GstAdapter *adapter;
       
    47   GstClockTime next_ts;
       
    48 };
       
    49 
       
    50 typedef enum _GstDtxDecision {
       
    51   GST_DTX_DECISION_VOICE,
       
    52   GST_DTX_DECISION_SID_UPDATE,
       
    53   GST_DTX_DECISION_SID_NONE
       
    54 } GstDtxDecision;
       
    55 
       
    56 void      gst_framed_audio_enc_init (GstFramedAudioEnc * enc, GstElement * element,
       
    57           GstDebugCategory * cat);
       
    58 void      gst_framed_audio_enc_reset (GstFramedAudioEnc * enc);
       
    59 void      gst_framed_audio_enc_finalize (GstFramedAudioEnc * enc);
       
    60 GstPad *  gst_framed_audio_enc_request_new_pad (GstFramedAudioEnc * enc,
       
    61           GstPadTemplate * templ, const gchar * req_name, GstPad ** pad_p);
       
    62 void      gst_framed_audio_enc_release_pad (GstFramedAudioEnc * enc, GstPad * pad,
       
    63           GstPad ** pad_p, void (disable_cn) (GstElement *));
       
    64 gboolean  gst_framed_audio_enc_sink_event (GstPad * pad, GstEvent * event);
       
    65 
       
    66 G_END_DECLS
       
    67 
       
    68 #endif /* __GST_FRAMED_AUDIO_ENC_H__ */