rygel r697 - trunk/src/rygel
- From: zeeshanak svn gnome org
- To: svn-commits-list gnome org
- Subject: rygel r697 - trunk/src/rygel
- Date: Sat, 21 Mar 2009 13:55:01 +0000 (UTC)
Author: zeeshanak
Date: Sat Mar 21 13:55:01 2009
New Revision: 697
URL: http://svn.gnome.org/viewvc/rygel?rev=697&view=rev
Log:
Use an mp3 parser.
Modified:
trunk/src/rygel/rygel-mp2-transcoder.vala
Modified: trunk/src/rygel/rygel-mp2-transcoder.vala
==============================================================================
--- trunk/src/rygel/rygel-mp2-transcoder.vala (original)
+++ trunk/src/rygel/rygel-mp2-transcoder.vala Sat Mar 21 13:55:01 2009
@@ -27,6 +27,7 @@
private const string DECODEBIN = "decodebin2";
private const string AUDIO_CONVERT = "audioconvert";
private const string AUDIO_ENCODER = "twolame";
+ private const string AUDIO_PARSER = "mp3parse";
private const string AUDIO_SRC_PAD = "audio-src-pad";
@@ -84,17 +85,26 @@
AUDIO_ENCODER);
}
+ Element parser = ElementFactory.make (AUDIO_PARSER,
+ AUDIO_PARSER);
+ if (parser == null) {
+ throw new LiveResponseError.MISSING_PLUGIN (
+ "Required element '%s' missing",
+ AUDIO_PARSER);
+ }
+
var bin = new Bin ("audio-encoder-bin");
- bin.add_many (convert, encoder);
+ bin.add_many (convert, encoder, parser);
var filter = Caps.from_string ("audio/x-raw-int");
convert.link_filtered (encoder, filter);
+ encoder.link (parser);
var pad = convert.get_static_pad ("sink");
var ghost = new GhostPad (null, pad);
bin.add_pad (ghost);
- pad = encoder.get_static_pad ("src");
+ pad = parser.get_static_pad ("src");
ghost = new GhostPad (AUDIO_SRC_PAD, pad);
bin.add_pad (ghost);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]