gst_nokia_speech/gstaacenc.h
author hgs
Wed, 24 Mar 2010 18:04:17 -0500
changeset 16 8e837d1bf446
permissions -rw-r--r--
201009
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
16
hgs
parents:
diff changeset
     1
/* GStreamer AAC encoder
hgs
parents:
diff changeset
     2
 * Copyright 2009 Collabora Multimedia,
hgs
parents:
diff changeset
     3
 * Copyright 2009 Nokia Corporation
hgs
parents:
diff changeset
     4
 *  @author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>.
hgs
parents:
diff changeset
     5
 *
hgs
parents:
diff changeset
     6
 * This library is free software; you can redistribute it and/or
hgs
parents:
diff changeset
     7
 * modify it under the terms of the GNU Library General Public
hgs
parents:
diff changeset
     8
 * License as published by the Free Software Foundation; either
hgs
parents:
diff changeset
     9
 * version 2 of the License, or (at your option) any later version.
hgs
parents:
diff changeset
    10
 *
hgs
parents:
diff changeset
    11
 * This library is distributed in the hope that it will be useful,
hgs
parents:
diff changeset
    12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
hgs
parents:
diff changeset
    13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
hgs
parents:
diff changeset
    14
 * Library General Public License for more details.
hgs
parents:
diff changeset
    15
 *
hgs
parents:
diff changeset
    16
 * You should have received a copy of the GNU Library General Public
hgs
parents:
diff changeset
    17
 * License along with this library; if not, write to the
hgs
parents:
diff changeset
    18
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
hgs
parents:
diff changeset
    19
 * Boston, MA 02111-1307, USA.
hgs
parents:
diff changeset
    20
 */
hgs
parents:
diff changeset
    21
hgs
parents:
diff changeset
    22
/* TODO non-GPL license */
hgs
parents:
diff changeset
    23
hgs
parents:
diff changeset
    24
#ifndef __GST_AAC_ENC_H__
hgs
parents:
diff changeset
    25
#define __GST_AAC_ENC_H__
hgs
parents:
diff changeset
    26
hgs
parents:
diff changeset
    27
#include <gst/gst.h>
hgs
parents:
diff changeset
    28
hgs
parents:
diff changeset
    29
#include <eaacplus_api.h>
hgs
parents:
diff changeset
    30
hgs
parents:
diff changeset
    31
#include "gstframedaudioenc.h"
hgs
parents:
diff changeset
    32
hgs
parents:
diff changeset
    33
G_BEGIN_DECLS
hgs
parents:
diff changeset
    34
hgs
parents:
diff changeset
    35
/* #define's don't like whitespacey bits */
hgs
parents:
diff changeset
    36
#define GST_TYPE_AAC_ENC			\
hgs
parents:
diff changeset
    37
  (gst_aac_enc_get_type())
hgs
parents:
diff changeset
    38
#define GST_AAC_ENC(obj)						\
hgs
parents:
diff changeset
    39
  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AAC_ENC,GstAACEnc))
hgs
parents:
diff changeset
    40
#define GST_AAC_ENC_CLASS(klass)					\
hgs
parents:
diff changeset
    41
  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AAC_ENC,GstAACEncClass))
hgs
parents:
diff changeset
    42
#define GST_IS_AAC_ENC(obj)					\
hgs
parents:
diff changeset
    43
  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AAC_ENC))
hgs
parents:
diff changeset
    44
#define GST_IS_AAC_ENC_CLASS(klass)				\
hgs
parents:
diff changeset
    45
  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AAC_ENC))
hgs
parents:
diff changeset
    46
#define GST_AAC_ENC_CAST(obj)          ((GstAACEnc*)(obj))
hgs
parents:
diff changeset
    47
hgs
parents:
diff changeset
    48
hgs
parents:
diff changeset
    49
typedef struct _GstNokiaAACEnc      GstNokiaAACEnc;
hgs
parents:
diff changeset
    50
typedef struct _GstNokiaAACEncClass GstNokiaAACEncClass;
hgs
parents:
diff changeset
    51
hgs
parents:
diff changeset
    52
typedef GstNokiaAACEnc      GstAACEnc;
hgs
parents:
diff changeset
    53
typedef GstNokiaAACEncClass GstAACEncClass;
hgs
parents:
diff changeset
    54
hgs
parents:
diff changeset
    55
struct _GstNokiaAACEnc
hgs
parents:
diff changeset
    56
{
hgs
parents:
diff changeset
    57
  GstElement element;
hgs
parents:
diff changeset
    58
hgs
parents:
diff changeset
    59
  GstPad *sinkpad, *srcpad, *cnpad;
hgs
parents:
diff changeset
    60
hgs
parents:
diff changeset
    61
  GstFramedAudioEnc enc;
hgs
parents:
diff changeset
    62
  HANDLE_AACPLUS_ENC encoder;
hgs
parents:
diff changeset
    63
  AACPLUS_ENC_INFO info;
hgs
parents:
diff changeset
    64
hgs
parents:
diff changeset
    65
  /* mode selection */
hgs
parents:
diff changeset
    66
  GstClockTime frame_duration;
hgs
parents:
diff changeset
    67
  gint raw_frame_size;
hgs
parents:
diff changeset
    68
  gint codec_frame_size;
hgs
parents:
diff changeset
    69
hgs
parents:
diff changeset
    70
  /* optional helper (history) buffer */
hgs
parents:
diff changeset
    71
  guint8 *buffer;
hgs
parents:
diff changeset
    72
hgs
parents:
diff changeset
    73
  /* stream description */
hgs
parents:
diff changeset
    74
  gint rate;
hgs
parents:
diff changeset
    75
  gint channels;
hgs
parents:
diff changeset
    76
hgs
parents:
diff changeset
    77
  /* properties */
hgs
parents:
diff changeset
    78
  gint bitrate;
hgs
parents:
diff changeset
    79
  guint profile;
hgs
parents:
diff changeset
    80
  guint format;
hgs
parents:
diff changeset
    81
};
hgs
parents:
diff changeset
    82
hgs
parents:
diff changeset
    83
struct _GstNokiaAACEncClass
hgs
parents:
diff changeset
    84
{
hgs
parents:
diff changeset
    85
  GstElementClass parent_class;
hgs
parents:
diff changeset
    86
};
hgs
parents:
diff changeset
    87
hgs
parents:
diff changeset
    88
GType gst_aac_enc_get_type (void);
hgs
parents:
diff changeset
    89
hgs
parents:
diff changeset
    90
G_END_DECLS
hgs
parents:
diff changeset
    91
hgs
parents:
diff changeset
    92
#endif /* __GST_AAC_ENC_H__ */