[rygel] core: Dump encodebin profile in transcoder
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] core: Dump encodebin profile in transcoder
- Date: Sun, 4 Dec 2011 11:04:24 +0000 (UTC)
commit fb28cf1739f37f3a1f4931260d623234e97326bc
Author: Jens Georg <mail jensge org>
Date: Sun Dec 4 12:01:31 2011 +0100
core: Dump encodebin profile in transcoder
src/rygel/rygel-audio-transcoder.vala | 1 +
src/rygel/rygel-gst-utils.vala | 17 +++++++++++++++++
src/rygel/rygel-transcoder.vala | 1 +
src/rygel/rygel-video-transcoder.vala | 1 +
4 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/src/rygel/rygel-audio-transcoder.vala b/src/rygel/rygel-audio-transcoder.vala
index 6a299b2..0b45be5 100644
--- a/src/rygel/rygel-audio-transcoder.vala
+++ b/src/rygel/rygel-audio-transcoder.vala
@@ -98,6 +98,7 @@ internal class Rygel.AudioTranscoder : Rygel.Transcoder {
null,
null,
1);
+ enc_audio_profile.set_name ("audio");
if (this.container_format != null) {
var enc_container_profile = new EncodingContainerProfile ("container",
diff --git a/src/rygel/rygel-gst-utils.vala b/src/rygel/rygel-gst-utils.vala
index 2585eb2..47b36f1 100644
--- a/src/rygel/rygel-gst-utils.vala
+++ b/src/rygel/rygel-gst-utils.vala
@@ -92,6 +92,23 @@ internal abstract class Rygel.GstUtils {
return get_best_depay (features, caps);
}
+ public static void dump_encoding_profile (EncodingProfile profile,
+ int indent = 0) {
+ var indent_s = string.nfill (indent, ' ');
+ debug (indent_s + "Dumping %s", profile.get_name ());
+ debug (indent_s + " Format: %s", profile.get_format ().to_string ());
+ if (profile.get_restriction () != null) {
+ debug (indent_s + " Restriction: %s",
+ profile.get_restriction ().to_string ());
+ }
+
+ if (profile is EncodingContainerProfile) {
+ foreach (var subprofile in (profile as EncodingContainerProfile).get_profiles ()) {
+ dump_encoding_profile (subprofile, indent + 4);
+ }
+ }
+ }
+
private static bool need_rtp_depayloader (Caps caps) {
var structure = caps.get_structure (0);
return structure.get_name () == "application/x-rtp";
diff --git a/src/rygel/rygel-transcoder.vala b/src/rygel/rygel-transcoder.vala
index 9620ae2..92e0f5a 100644
--- a/src/rygel/rygel-transcoder.vala
+++ b/src/rygel/rygel-transcoder.vala
@@ -69,6 +69,7 @@ internal abstract class Rygel.Transcoder : GLib.Object {
ENCODE_BIN);
encoder.profile = this.get_encoding_profile ();
+ GstUtils.dump_encoding_profile (encoder.profile);
var bin = new Bin ("transcoder-source");
bin.add_many (src, decoder, encoder);
diff --git a/src/rygel/rygel-video-transcoder.vala b/src/rygel/rygel-video-transcoder.vala
index 0b33bab..0639cab 100644
--- a/src/rygel/rygel-video-transcoder.vala
+++ b/src/rygel/rygel-video-transcoder.vala
@@ -96,6 +96,7 @@ internal class Rygel.VideoTranscoder : Rygel.AudioTranscoder {
null,
this.video_restrictions,
1);
+ enc_video_profile.set_name ("video");
enc_container_profile.add_profile (enc_video_profile);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]