rygel r751 - trunk/src/rygel
- From: zeeshanak svn gnome org
- To: svn-commits-list gnome org
- Subject: rygel r751 - trunk/src/rygel
- Date: Sat, 28 Mar 2009 00:44:56 +0000 (UTC)
Author: zeeshanak
Date: Sat Mar 28 00:44:56 2009
New Revision: 751
URL: http://svn.gnome.org/viewvc/rygel?rev=751&view=rev
Log:
Move create_resource() from TranscodeManager to Transcoder.
Modified:
trunk/src/rygel/rygel-l16-transcoder.vala
trunk/src/rygel/rygel-mp2ts-transcoder.vala
trunk/src/rygel/rygel-mp3-transcoder.vala
trunk/src/rygel/rygel-transcode-manager.vala
trunk/src/rygel/rygel-transcoder.vala
Modified: trunk/src/rygel/rygel-l16-transcoder.vala
==============================================================================
--- trunk/src/rygel/rygel-l16-transcoder.vala (original)
+++ trunk/src/rygel/rygel-l16-transcoder.vala Sat Mar 28 00:44:56 2009
@@ -55,10 +55,10 @@
return;
}
- var res = manager.create_resource (item,
- this.mime_type,
- this.dlna_profile);
-
+ var res = this.create_resource (item,
+ this.mime_type,
+ this.dlna_profile,
+ manager);
res.sample_freq = L16Transcoder.FREQUENCY;
res.n_audio_channels = L16Transcoder.CHANNELS;
res.bits_per_sample = L16Transcoder.WIDTH;
Modified: trunk/src/rygel/rygel-mp2ts-transcoder.vala
==============================================================================
--- trunk/src/rygel/rygel-mp2ts-transcoder.vala (original)
+++ trunk/src/rygel/rygel-mp2ts-transcoder.vala Sat Mar 28 00:44:56 2009
@@ -58,9 +58,10 @@
return;
}
- var res = manager.create_resource (item,
- this.mime_type,
- PROFILES[this.profile]);
+ var res = this.create_resource (item,
+ this.mime_type,
+ PROFILES[this.profile],
+ manager);
res.width = WIDTH[profile];
res.height = HEIGHT[profile];
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:44:56 2009
@@ -59,9 +59,10 @@
return;
}
- resources.add (manager.create_resource (item,
- this.mime_type,
- this.dlna_profile));
+ resources.add (this.create_resource (item,
+ this.mime_type,
+ this.dlna_profile,
+ manager));
}
}
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 28 00:44:56 2009
@@ -73,23 +73,5 @@
target);
}
}
-
- public DIDLLiteResource create_resource (MediaItem item,
- string mime_type,
- string dlna_profile)
- throws Error {
- string protocol;
- var uri = this.create_uri_for_item (item, dlna_profile, out protocol);
- DIDLLiteResource res = item.create_res (uri);
- res.mime_type = mime_type;
- res.protocol = protocol;
- res.dlna_profile = dlna_profile;
- res.dlna_conversion = DLNAConversion.TRANSCODED;
- res.dlna_flags = DLNAFlags.STREAMING_TRANSFER_MODE;
- res.dlna_operation = DLNAOperation.NONE;
- res.size = -1;
-
- return res;
- }
}
Modified: trunk/src/rygel/rygel-transcoder.vala
==============================================================================
--- trunk/src/rygel/rygel-transcoder.vala (original)
+++ trunk/src/rygel/rygel-transcoder.vala Sat Mar 28 00:44:56 2009
@@ -41,6 +41,28 @@
TranscodeManager manager)
throws Error;
+
+ public DIDLLiteResource create_resource (MediaItem item,
+ string mime_type,
+ string dlna_profile,
+ TranscodeManager manager)
+ throws Error {
+ string protocol;
+ var uri = manager.create_uri_for_item (item,
+ dlna_profile,
+ out protocol);
+ DIDLLiteResource res = item.create_res (uri);
+ res.mime_type = mime_type;
+ res.protocol = protocol;
+ res.dlna_profile = dlna_profile;
+ res.dlna_conversion = DLNAConversion.TRANSCODED;
+ res.dlna_flags = DLNAFlags.STREAMING_TRANSFER_MODE;
+ res.dlna_operation = DLNAOperation.NONE;
+ res.size = -1;
+
+ return res;
+ }
+
public bool can_handle (string target) {
return target == this.dlna_profile;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]