rygel r773 - trunk/src/rygel
- From: zeeshanak svn gnome org
- To: svn-commits-list gnome org
- Subject: rygel r773 - trunk/src/rygel
- Date: Sat, 28 Mar 2009 00:46:41 +0000 (UTC)
Author: zeeshanak
Date: Sat Mar 28 00:46:40 2009
New Revision: 773
URL: http://svn.gnome.org/viewvc/rygel?rev=773&view=rev
Log:
MP3Trancoder specifies the bitrate in Resource.
Modified:
trunk/src/rygel/rygel-mp3-transcoder.vala
Modified: trunk/src/rygel/rygel-mp3-transcoder.vala
==============================================================================
--- trunk/src/rygel/rygel-mp3-transcoder.vala (original)
+++ trunk/src/rygel/rygel-mp3-transcoder.vala Sat Mar 28 00:46:40 2009
@@ -22,8 +22,11 @@
*/
using Rygel;
using Gst;
+using GUPnP;
internal class Rygel.MP3Transcoder : Rygel.Transcoder {
+ private const int BITRATE = 256;
+
private const string[] AUDIO_ENCODER = {null, "twolame", "lame"};
private const string AUDIO_PARSER = "mp3parse";
@@ -41,6 +44,16 @@
return new MP3TranscoderBin (src, this);
}
+ public override DIDLLiteResource create_resource (MediaItem item,
+ TranscodeManager manager)
+ throws Error {
+ var res = base.create_resource (item, manager);
+
+ res.bitrate = BITRATE;
+
+ return res;
+ }
+
public Element create_encoder (string? src_pad_name,
string? sink_pad_name)
throws Error {
@@ -59,7 +72,7 @@
encoder.quality = 0;
}
- encoder.bitrate = 256;
+ encoder.bitrate = BITRATE;
var bin = new Bin ("mp3-encoder-bin");
bin.add_many (convert, encoder, parser);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]