rygel r743 - trunk/src/rygel
- From: zeeshanak svn gnome org
- To: svn-commits-list gnome org
- Subject: rygel r743 - trunk/src/rygel
- Date: Sat, 28 Mar 2009 00:44:13 +0000 (UTC)
Author: zeeshanak
Date: Sat Mar 28 00:44:13 2009
New Revision: 743
URL: http://svn.gnome.org/viewvc/rygel?rev=743&view=rev
Log:
TranscodeManager provides Transcoder rather than transcoding source.
Modified:
trunk/src/rygel/rygel-http-request.vala
trunk/src/rygel/rygel-transcode-manager.vala
Modified: trunk/src/rygel/rygel-http-request.vala
==============================================================================
--- trunk/src/rygel/rygel-http-request.vala (original)
+++ trunk/src/rygel/rygel-http-request.vala Sat Mar 28 00:44:13 2009
@@ -47,7 +47,7 @@
private HTTPResponse response;
private string item_id;
- private string transcode_target;
+ private Transcoder transcoder;
private MediaItem item;
private Seek seek;
@@ -78,7 +78,11 @@
if (this.query != null) {
this.item_id = this.query.lookup ("itemid");
- this.transcode_target = this.query.lookup ("transcode");
+ var transcode_target = this.query.lookup ("transcode");
+ if (transcode_target != null) {
+ this.transcoder = this.http_server.get_transcoder (
+ transcode_target);
+ }
}
if (this.item_id == null) {
@@ -142,7 +146,7 @@
uri = this.item.uris.get (0);
}
- if (this.item.size > 0 && this.transcode_target == null) {
+ if (this.item.size > 0 && this.transcoder == null) {
this.handle_interactive_item (uri);
} else {
this.handle_streaming_item (uri);
@@ -150,9 +154,9 @@
}
private void add_item_headers () {
- if (this.transcode_target != null) {
+ if (this.transcoder != null) {
this.msg.response_headers.append ("Content-Type",
- this.transcode_target);
+ this.transcoder.mime_type);
return;
}
@@ -208,10 +212,8 @@
src.tcp_timeout = (int64) 60000000;
try {
- if (this.transcode_target != null) {
- src = this.http_server.get_transcoding_src (
- src,
- this.transcode_target);
+ if (this.transcoder != null) {
+ src = this.transcoder.create_source (src);
}
// Then start the gst stream
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:13 2009
@@ -56,15 +56,13 @@
}
}
- internal Element get_transcoding_src (Element src,
- string target)
- throws Error {
+ internal Transcoder get_transcoder (string target) throws Error {
if (this.mp3_transcoder.can_handle (target)) {
- return this.mp3_transcoder.create_source (src);
+ return this.mp3_transcoder;
} else if (this.l16_transcoder.can_handle (target)) {
- return this.l16_transcoder.create_source (src);
+ return this.l16_transcoder;
} else if (this.mp2ts_transcoder.can_handle (target)) {
- return this.mp2ts_transcoder.create_source (src);
+ return this.mp2ts_transcoder;
} else {
throw new HTTPRequestError.NOT_FOUND (
"No transcoder available for target format '%s'",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]