From: Zeeshan Ali (Khattak) Date: Thu, 28 May 2009 13:39:03 +0000 (+0300) Subject: Take user transcoding configuration into account X-Git-Tag: RYGEL_0_3~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=747db1c781af3368f1536d088fb9028c89e7f6ab;p=profile%2Fivi%2Frygel.git Take user transcoding configuration into account --- diff --git a/src/rygel/rygel-transcode-manager.vala b/src/rygel/rygel-transcode-manager.vala index a4a982c..b53d7d6 100644 --- a/src/rygel/rygel-transcode-manager.vala +++ b/src/rygel/rygel-transcode-manager.vala @@ -37,10 +37,20 @@ internal abstract class Rygel.TranscodeManager : GLib.Object { public TranscodeManager () { transcoders = new ArrayList (); - transcoders.add (new L16Transcoder (Endianness.BIG)); - transcoders.add (new MP3Transcoder (MP3Layer.THREE)); - transcoders.add (new MP2TSTranscoder(MP2TSProfile.SD)); - transcoders.add (new MP2TSTranscoder(MP2TSProfile.HD)); + var config = Configuration.get_default (); + + if (config.transcoding) { + if (config.lpcm_transcoder) { + transcoders.add (new L16Transcoder (Endianness.BIG)); + } + if (config.mp3_transcoder) { + transcoders.add (new MP3Transcoder (MP3Layer.THREE)); + } + if (config.mp2ts_transcoder) { + transcoders.add (new MP2TSTranscoder(MP2TSProfile.SD)); + transcoders.add (new MP2TSTranscoder(MP2TSProfile.HD)); + } + } } public abstract string create_uri_for_item (MediaItem item,