rygel r700 - trunk/src/rygel
- From: zeeshanak svn gnome org
- To: svn-commits-list gnome org
- Subject: rygel r700 - trunk/src/rygel
- Date: Sat, 21 Mar 2009 13:55:15 +0000 (UTC)
Author: zeeshanak
Date: Sat Mar 21 13:55:14 2009
New Revision: 700
URL: http://svn.gnome.org/viewvc/rygel?rev=700&view=rev
Log:
Use enum to identify mpeg audio layers, rather than integer.
Modified:
trunk/src/rygel/rygel-mp3-transcoder.vala
trunk/src/rygel/rygel-transcode-manager.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 21 13:55:14 2009
@@ -23,6 +23,11 @@
using Rygel;
using Gst;
+internal enum Rygel.MP3Profile {
+ LAYER2 = 1,
+ LAYER3 = 2
+}
+
internal class Rygel.MP3Transcoder : Gst.Bin {
private const string DECODEBIN = "decodebin2";
private const string AUDIO_CONVERT = "audioconvert";
@@ -32,9 +37,9 @@
private const string AUDIO_SRC_PAD = "audio-src-pad";
private dynamic Element audio_enc;
- private uint layer;
+ private MP3Profile layer;
- public MP3Transcoder (Element src, uint layer) throws Error {
+ public MP3Transcoder (Element src, MP3Profile layer) throws Error {
this.layer = layer;
Element decodebin = ElementFactory.make (DECODEBIN, DECODEBIN);
@@ -98,7 +103,7 @@
AUDIO_PARSER);
}
- if (this.layer == 3) {
+ if (this.layer == MP3Profile.LAYER3) {
// Best quality
encoder.quality = 0;
}
Modified: trunk/src/rygel/rygel-transcode-manager.vala
==============================================================================
--- trunk/src/rygel/rygel-transcode-manager.vala (original)
+++ trunk/src/rygel/rygel-transcode-manager.vala Sat Mar 21 13:55:14 2009
@@ -67,7 +67,7 @@
string target)
throws Error {
if (target == "audio/mpeg") {
- return new MP3Transcoder (src, 3);
+ return new MP3Transcoder (src, MP3Profile.LAYER3);
} else if (target == "video/mpeg") {
return new MP2TSTranscoder (src);
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]