After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 588252 - Set the codecs preferences/properties from a config file
Set the codecs preferences/properties from a config file
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: VoIP
unspecified
Other All
: Normal normal
: ---
Assigned To: empathy-maint
Depends on:
Blocks:
 
 
Reported: 2009-07-10 14:52 UTC by Olivier Crête
Modified: 2009-08-07 11:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Put codec preferences in a configuration file (2.77 KB, patch)
2009-07-10 14:52 UTC, Olivier Crête
none Details | Review
Make it possible to set element properties from a config file (3.20 KB, patch)
2009-07-10 14:52 UTC, Olivier Crête
none Details | Review
Put codec preferences in a configuration file (3.50 KB, patch)
2009-07-10 21:08 UTC, Olivier Crête
none Details | Review
Make it possible to set element properties from a config file (3.28 KB, patch)
2009-07-10 21:08 UTC, Olivier Crête
none Details | Review
Added element properties to ensure h263 packets are small enough (MSN) (686 bytes, patch)
2009-07-13 16:55 UTC, Louis-Francis Ratté-Boulianne
none Details | Review
Put codec preferences in a configuration file (3.51 KB, patch)
2009-07-14 19:46 UTC, Olivier Crête
none Details | Review
Make it possible to set element properties from a config file (3.31 KB, patch)
2009-07-14 19:46 UTC, Olivier Crête
needs-work Details | Review
Put codec preferences in a configuration file (3.68 KB, patch)
2009-07-17 21:41 UTC, Olivier Crête
committed Details | Review
Make it possible to set element properties from a config file (3.48 KB, patch)
2009-07-17 21:41 UTC, Olivier Crête
committed Details | Review
Correctly register the src/sink elements (1.75 KB, patch)
2009-08-01 00:19 UTC, Olivier Crête
none Details | Review
Move the FsElementElementAddedNotifier over the main pipeline (5.26 KB, patch)
2009-08-01 00:20 UTC, Olivier Crête
committed Details | Review
Force skew method of clock slaving for alsa/osssrc (783 bytes, patch)
2009-08-04 19:48 UTC, Olivier Crête
committed Details | Review
Correctly register the src/sink elements (1.81 KB, patch)
2009-08-05 23:43 UTC, Olivier Crête
committed Details | Review

Description Olivier Crête 2009-07-10 14:52:27 UTC
Added two patches to set the codec preferences/properties from a config file
I'm putting in /usr/share/empathy (not /etc) because its more a developer feature than a sysadmin feature).
Comment 1 Olivier Crête 2009-07-10 14:52:32 UTC
Created attachment 138196 [details] [review]
Put codec preferences in a configuration file
Comment 2 Olivier Crête 2009-07-10 14:52:34 UTC
Created attachment 138197 [details] [review]
Make it possible to set element properties from a config file
Comment 3 Frederic Peters 2009-07-10 14:56:25 UTC
Wouldn't it be better to have this in gconf? This would for example give lockdown for free.
Comment 4 Olivier Crête 2009-07-10 16:01:21 UTC
Having a GKeyFile in GConf ?

Also, Vuntz loves you
Comment 5 Xavier Claessens 2009-07-10 16:15:43 UTC
Do we really want to let the user define its own file for that? I think out of the 6billion people on earth, only Olivier knows what it is about... Can't we just ship the file in /usr/share/empathy and that's it?
Comment 6 Olivier Crête 2009-07-10 21:08:42 UTC
Created attachment 138218 [details] [review]
Put codec preferences in a configuration file

Used empathy_file_lookup() to find the file, and I removed the lookup from the user dir, I was mostly convinced by Xavier's argument that only experts know which codecs should be preferred (and distros can use it to disable broken codecs)
Comment 7 Olivier Crête 2009-07-10 21:08:53 UTC
Created attachment 138219 [details] [review]
Make it possible to set element properties from a config file
Comment 8 Frederic Peters 2009-07-12 12:45:44 UTC
Okay, so it's not about configuration or preferences, just a data file used by Empathy; fine.
Comment 9 Louis-Francis Ratté-Boulianne 2009-07-13 16:55:57 UTC
Created attachment 138344 [details] [review]
Added element properties to ensure h263 packets are small enough (MSN)
Comment 10 Olivier Crête 2009-07-13 17:08:13 UTC
I'm not a big fan of forcing a-mode on everyone.. but I'm not sure what the best way to have per-protocol properties is... Well, ideally it would be in the SDP, but its not there :-(
Comment 11 Guillaume Desmottes 2009-07-14 10:11:18 UTC
(In reply to comment #10)
> I'm not a big fan of forcing a-mode on everyone.. but I'm not sure what the
> best way to have per-protocol properties is... Well, ideally it would be in the
> SDP, but its not there :-(

Is that different from other codec options? Will that cause troubles with other protocols?

Comment 12 Olivier Crête 2009-07-14 13:17:06 UTC
Mode A only fragments at GOB boundaries, so it may not be able to fragment large images enough forcing the fragmentation to be done at the IP level (for ipv4) or completely preventing it from working (if using ipv6)...
Comment 13 Louis-Francis Ratté-Boulianne 2009-07-14 14:55:41 UTC
Should we add a way to specify element properties in tp-spec ? Or pass that information along the codecs (SetRemoteCodecs) in the parameters ?
Comment 14 Olivier Crête 2009-07-14 19:46:39 UTC
Created attachment 138409 [details] [review]
Put codec preferences in a configuration file
Comment 15 Olivier Crête 2009-07-14 19:46:41 UTC
Created attachment 138410 [details] [review]
Make it possible to set element properties from a config file
Comment 16 Olivier Crête 2009-07-14 19:48:08 UTC
1. Update the codec prefs to use "clock-rate" instead of "rate" .. oops
2. Updated the element properties patch to set the ffenc_h263 rtp-payload-size prop.
3. The mode-a-only will go into the SDP caps
Comment 17 Danielle Madeley 2009-07-17 14:57:47 UTC
Comment on attachment 138410 [details] [review]
Make it possible to set element properties from a config file


>-  g_signal_connect (priv->fsnotifier, "element-added",
>-    G_CALLBACK (conference_element_added), NULL);
>+  keyfile = g_key_file_new ();
>+  filename = empathy_file_lookup ("element-properties", "data");
>+  if (g_key_file_load_from_file (keyfile, filename, G_KEY_FILE_NONE, NULL))
>+    fs_element_added_notifier_set_properties_from_keyfile (priv->fsnotifier,
>+        keyfile);
>+  else
>+    g_key_file_free (keyfile);
>+  g_free (filename);

Doesn't the coding style mandate braces?

Also, g_key_file_load_from_file should have its error handled.

Also, what is freeing the keyfile when g_key_file_load_from_file returns TRUE?
Comment 18 Olivier Crête 2009-07-17 15:03:24 UTC
(In reply to comment #17)
> Doesn't the coding style mandate braces?

Which coding style is it even supposed to be?
 
> Also, g_key_file_load_from_file should have its error handled.

Yes, it should print a g_warning() I guess

> Also, what is freeing the keyfile when g_key_file_load_from_file returns TRUE?

FsElementAddedNotifier takes ownership of it.
Comment 19 Olivier Crête 2009-07-17 21:41:39 UTC
Created attachment 138641 [details] [review]
Put codec preferences in a configuration file

Now prints a g_warning if the config file can't be found
Comment 20 Olivier Crête 2009-07-17 21:41:54 UTC
Created attachment 138642 [details] [review]
Make it possible to set element properties from a config file

Also prints a g_warning if the properties file can't be found
Comment 21 Olivier Crête 2009-08-01 00:19:36 UTC
Created attachment 139659 [details] [review]
Correctly register the src/sink elements

This allows the next patch to work
Comment 22 Olivier Crête 2009-08-01 00:20:08 UTC
Created attachment 139660 [details] [review]
Move the FsElementElementAddedNotifier over the main pipeline

With this patch, we can use the element-properties to set properties on alsasrc and the like to control the latency and stuff
Comment 23 Olivier Crête 2009-08-04 19:48:26 UTC
Created attachment 139895 [details] [review]
Force skew method of clock slaving for alsa/osssrc

Without this patch, the timestamps will be wrong and the audio will be mangled at
the receiving side
Comment 24 Olivier Crête 2009-08-05 23:43:06 UTC
Created attachment 139986 [details] [review]
Correctly register the src/sink elements

Updated to do the "do once" thing correctly... 

Available as a branch at:
http://git.collabora.co.uk/?p=user/tester/empathy.git;a=shortlog;h=refs/heads/calling-fixes
Comment 25 Xavier Claessens 2009-08-06 09:13:03 UTC
Ok, please merge :)