Mercurial > pidgin
changeset 24948:78c3e991782a
Use a key file for Farsight 2 codec configuration.
author | Mike Ruprecht <maiku@soc.pidgin.im> |
---|---|
date | Sun, 02 Nov 2008 21:00:46 +0000 |
parents | 7252e3d0c627 |
children | 1a2d446cb8a0 |
files | libpurple/media.c |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/media.c Mon Oct 20 00:11:33 2008 +0000 +++ b/libpurple/media.c Sun Nov 02 21:00:46 2008 +0000 @@ -1075,6 +1075,7 @@ if (!session) { GError *err = NULL; GList *codec_conf = NULL; + gchar *filename = NULL; session = g_new0(PurpleMediaSession, 1); @@ -1094,8 +1095,10 @@ * The MPV codec didn't work for me. * MPV may not work yet as of Farsight2 0.0.3 */ +#if 0 codec_conf = g_list_prepend(codec_conf, fs_codec_new(FS_CODEC_ID_DISABLE, "MPV", FS_MEDIA_TYPE_VIDEO, 90000)); +#endif /* XXX: SPEEX has a latency of 5 or 6 seconds for me */ #if 0 @@ -1106,6 +1109,15 @@ "SPEEX", FS_MEDIA_TYPE_AUDIO, 16000)); #endif + filename = g_build_filename(purple_user_dir(), "fs-codec.conf", NULL); + codec_conf = fs_codec_list_from_keyfile(filename, &err); + g_free(filename); + + if (err != NULL) { + purple_debug_error("media", "Error reading codec configuration file: %s\n", err->message); + g_error_free(err); + } + fs_session_set_codec_preferences(session->session, codec_conf, NULL); /*