maiku.vv: 12f3ee32: Use a key file for Farsight 2 codec conf...
maiku at soc.pidgin.im
maiku at soc.pidgin.im
Sun Nov 2 16:25:22 EST 2008
-----------------------------------------------------------------
Revision: 12f3ee326edcf1cb6ebbe2e5a79987d5c5fe50f3
Ancestor: 7f57db04ace05cfd30a498993a91ac7af67a8ed8
Author: maiku at soc.pidgin.im
Date: 2008-11-02T21:00:46
Branch: im.pidgin.maiku.vv
URL: http://d.pidgin.im/viewmtn/revision/info/12f3ee326edcf1cb6ebbe2e5a79987d5c5fe50f3
Modified files:
libpurple/media.c
ChangeLog:
Use a key file for Farsight 2 codec configuration.
-------------- next part --------------
============================================================
--- libpurple/media.c a85c4b6c35e3a05cd350956d763628ac0371b5ec
+++ libpurple/media.c 3a0bccc0b0c3eb5115d865ee4564d5784810dfd8
@@ -1075,6 +1075,7 @@ purple_media_add_stream_internal(PurpleM
if (!session) {
GError *err = NULL;
GList *codec_conf = NULL;
+ gchar *filename = NULL;
session = g_new0(PurpleMediaSession, 1);
@@ -1094,8 +1095,10 @@ purple_media_add_stream_internal(PurpleM
* 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 @@ purple_media_add_stream_internal(PurpleM
"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);
/*
More information about the Commits
mailing list