rygel r724 - trunk/src/rygel
- From: zeeshanak svn gnome org
- To: svn-commits-list gnome org
- Subject: rygel r724 - trunk/src/rygel
- Date: Sat, 21 Mar 2009 13:57:16 +0000 (UTC)
Author: zeeshanak
Date: Sat Mar 21 13:57:15 2009
New Revision: 724
URL: http://svn.gnome.org/viewvc/rygel?rev=724&view=rev
Log:
Refactor TranscodeManager.add_resources a bit more.
Modified:
trunk/src/rygel/rygel-transcode-manager.vala
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:57:15 2009
@@ -39,19 +39,10 @@
// No transcoding for images yet :(
return;
} else if (item.upnp_class.has_prefix (MediaItem.MUSIC_CLASS)) {
- this.add_resource (resources,
- item,
- MP3Transcoder.mime_type,
- MP3Transcoder.dlna_profile);
- this.add_resource (resources,
- item,
- L16Transcoder.mime_type,
- L16Transcoder.dlna_profile);
+ add_mp3_resource (resources, item);
+ add_l16_resource (resources, item);
} else {
- this.add_resource (resources,
- item,
- MP2TSTranscoder.mime_type,
- MP2TSTranscoder.dlna_profile);
+ add_mp2ts_resource (resources, item);
}
}
@@ -71,6 +62,33 @@
}
}
+ private void add_mp3_resource (ArrayList<DIDLLiteResource?> resources,
+ MediaItem item)
+ throws Error {
+ this.add_resource (resources,
+ item,
+ MP3Transcoder.mime_type,
+ MP3Transcoder.dlna_profile);
+ }
+
+ private void add_l16_resource (ArrayList<DIDLLiteResource?> resources,
+ MediaItem item)
+ throws Error {
+ this.add_resource (resources,
+ item,
+ L16Transcoder.mime_type,
+ L16Transcoder.dlna_profile);
+ }
+
+ private void add_mp2ts_resource (ArrayList<DIDLLiteResource?> resources,
+ MediaItem item)
+ throws Error {
+ this.add_resource (resources,
+ item,
+ MP2TSTranscoder.mime_type,
+ MP2TSTranscoder.dlna_profile);
+ }
+
private void add_resource (ArrayList<DIDLLiteResource?> resources,
MediaItem item,
string mime_type,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]