~ubuntu-branches/ubuntu/quantal/linphone/quantal

« back to all changes in this revision

Viewing changes to mediastreamer/mscodec.h

  • Committer: Bazaar Package Importer
  • Author(s): Samuel Mimram
  • Date: 2006-11-15 10:34:50 UTC
  • mfrom: (1.2.1 upstream) (2.1.8 feisty)
  • Revision ID: james.westby@ubuntu.com-20061115103450-qgafwcks2lkhctlj
* New upstream release.
* Enable video support.
* Fix mismatched #endif in mscommon.h, closes: #398307.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
  The mediastreamer library aims at providing modular media processing and I/O
3
 
        for linphone, but also for any telephony application.
4
 
  Copyright (C) 2001  Simon MORLAT simon.morlat@linphone.org
5
 
 
6
 
  This library is free software; you can redistribute it and/or
7
 
  modify it under the terms of the GNU Lesser General Public
8
 
  License as published by the Free Software Foundation; either
9
 
  version 2.1 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
 
  Lesser General Public License for more details.
15
 
 
16
 
  You should have received a copy of the GNU Lesser General Public
17
 
  License along with this library; if not, write to the Free Software
18
 
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19
 
*/
20
 
 
21
 
#ifndef MSCODEC_H
22
 
#define MSCODEC_H
23
 
 
24
 
#include "msfilter.h"
25
 
 
26
 
struct _MSCodecInfo
27
 
{
28
 
        MSFilterInfo info;
29
 
        MSFilterNewFunc encoder;
30
 
        MSFilterNewFunc decoder;
31
 
        gint fr_size; /* size in char of the uncompressed frame */
32
 
        gint dt_size;   /* size in char of the compressed frame */
33
 
        gint bitrate;  /* the minimum bit rate in bits/second */
34
 
        gint rate;              /*frequency */
35
 
        gint pt;                        /* the payload type number associated with this codec*/
36
 
        gchar *description;             /* a rtpmap field to describe the codec */
37
 
        guint is_usable:1; /* linphone set this flag to remember if it can use this codec considering the total bandwidth*/
38
 
        guint is_selected:1; /* linphone (user) set this flag if he allows this codec to be used*/
39
 
};
40
 
 
41
 
typedef struct _MSCodecInfo MSCodecInfo;
42
 
 
43
 
MSFilter * ms_encoder_new(gchar *name);
44
 
MSFilter * ms_decoder_new(gchar *name);
45
 
 
46
 
MSFilter * ms_encoder_new_with_pt(gint pt);
47
 
MSFilter * ms_decoder_new_with_pt(gint pt);
48
 
 
49
 
MSFilter * ms_encoder_new_with_string_id(gchar *id);
50
 
MSFilter * ms_decoder_new_with_string_id(gchar *id);
51
 
 
52
 
/* return 0 if codec can be used with bandwidth, -1 else*/
53
 
int ms_codec_is_usable(MSCodecInfo *codec,double bandwidth);
54
 
 
55
 
GList * ms_codec_get_all_audio();
56
 
 
57
 
GList * ms_codec_get_all_video();
58
 
 
59
 
MSCodecInfo * ms_audio_codec_info_get(gchar *name);
60
 
MSCodecInfo * ms_video_codec_info_get(gchar *name);
61
 
 
62
 
/* register all statically linked codecs */
63
 
void ms_codec_register_all();
64
 
 
65
 
#define MS_CODEC_INFO(codinfo)  ((MSCodecInfo*)codinfo)
66
 
 
67
 
#endif