codeclist.h 1.97 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
 *  Copyright (C) 2007 Savoir-Faire Linux inc.
 *  Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.net>
 *                                                                              
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 3 of the License, or
 *  (at your option) any later version.
 *                                                                                
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *                                                                              
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#ifndef __CODECLIST_H__
#define __CODECLIST_H__

#include <gtk/gtk.h>
/** @file codeclist.h
  * @brief A list to hold codecs.
  */

typedef struct {
29
  int _payload;
30
  gboolean is_active;
31
32
33
34
  gchar * name;
  int sample_rate;
  gdouble _bitrate;
  gdouble _bandwidth;
35
36
37
}codec_t;

void codec_list_init();
38
void codec_list_clear();
39
void codec_list_add(codec_t * c);
40
41
void codec_set_active(gchar* name);
void codec_set_inactive(gchar* name);
42
guint codec_list_get_size();
Emmanuel Milou's avatar
Emmanuel Milou committed
43
44
codec_t * codec_list_get(const gchar * name);
//codec_t * codec_list_get(const int payload);
45
46
47
48
49
50
51
52
53
54
codec_t* codec_list_get_nth(guint index);

/**
 * Set the prefered codec first in the codec list
 * @param index The position in the list of the prefered codec
 */ 
void codec_set_prefered_order(guint index);
//gchar * codec_get_name(codec_t * c);
//guint codec_get_rate(gchar * codec_name);

55
56
57
void codec_list_move_codec_up(guint index);
void codec_list_move_codec_down(guint index);

58
#endif