[rygel] core,data: Fix AVC transcoder
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] core,data: Fix AVC transcoder
- Date: Fri, 31 Aug 2012 21:05:09 +0000 (UTC)
commit 06315d13332c878871f95c6b469e1f9b04090dad
Author: Jens Georg <mail jensge org>
Date: Fri Aug 31 22:56:28 2012 +0200
core,data: Fix AVC transcoder
Add a slight hack to enable a streamable position of moov atoms.
Drop the passthrough in the transcoder. This doesn*t make sense
currently and it needs to be more sophisticated; it doesn't
properly work if we change the resolution and/or framerate.
data/presets/GstX264Enc.prs | 2 +-
data/presets/ffenc_aac.prs | 3 +++
data/rygel.conf | 2 +-
src/librygel-server/rygel-http-response.vala | 24 +++++++++++++++++-------
src/librygel-server/rygel-transcoder.vala | 14 --------------
5 files changed, 22 insertions(+), 23 deletions(-)
---
diff --git a/data/presets/GstX264Enc.prs b/data/presets/GstX264Enc.prs
index 5b2383c..b126d36 100644
--- a/data/presets/GstX264Enc.prs
+++ b/data/presets/GstX264Enc.prs
@@ -2,6 +2,6 @@
version=0.10
element-name=GstX264Enc
-[Rygel AVC_MP4_BL_CIF15_AAC_520]
+[Rygel AVC_MP4_BL_CIF15_AAC_520 preset]
preset=1
bitrate=1200
diff --git a/data/presets/ffenc_aac.prs b/data/presets/ffenc_aac.prs
index 5963f2f..cd3838e 100644
--- a/data/presets/ffenc_aac.prs
+++ b/data/presets/ffenc_aac.prs
@@ -7,3 +7,6 @@ bitrate=64000
[Rygel AAC_ADTS_320 preset]
bitrate=256000
+
+[Rygel AVC_MP4_BL_CIF15_AAC_520 preset]
+bitrate=256000
diff --git a/data/rygel.conf b/data/rygel.conf
index 01dfe1d..4f3ad22 100644
--- a/data/rygel.conf
+++ b/data/rygel.conf
@@ -30,7 +30,7 @@ enable-wmv-transcoder=true
enable-aac-transcoder=true
# Set it to 'false' if you want to disable AVC_MP4 transcoding support.
-enable-avc-transcoder=false
+enable-avc-transcoder=true
# Where video files should be saved if allow-upload is true.
# Defaults to @VIDEOS@, the standard videos folder (typically ${HOME}/Videos).
diff --git a/src/librygel-server/rygel-http-response.vala b/src/librygel-server/rygel-http-response.vala
index bbcf655..8485b25 100644
--- a/src/librygel-server/rygel-http-response.vala
+++ b/src/librygel-server/rygel-http-response.vala
@@ -211,15 +211,25 @@ internal class Rygel.HTTPResponse : GLib.Object, Rygel.StateMachine {
if (message.src != this.pipeline) {
return true;
}
+ State old_state;
+ State new_state;
+
+ message.parse_state_changed (out old_state,
+ out new_state,
+ null);
+ if (old_state == State.NULL && new_state == State.READY) {
+ dynamic Element element = this.pipeline.get_by_name ("muxer");
+ if (element != null) {
+ var name = element.get_factory ().get_name ();
+ // Awesome gross hack, really.
+ if (name == "mp4mux") {
+ element.streamable = true;
+ element.fragment_duration = 1000;
+ }
+ }
+ }
if (this.seek != null && this.seek.start > 0) {
- State old_state;
- State new_state;
-
- message.parse_state_changed (out old_state,
- out new_state,
- null);
-
if (old_state == State.READY && new_state == State.PAUSED) {
if (this.perform_seek ()) {
this.pipeline.set_state (State.PLAYING);
diff --git a/src/librygel-server/rygel-transcoder.vala b/src/librygel-server/rygel-transcoder.vala
index 2071bfb..05b3a23 100644
--- a/src/librygel-server/rygel-transcoder.vala
+++ b/src/librygel-server/rygel-transcoder.vala
@@ -86,7 +86,6 @@ internal abstract class Rygel.Transcoder : GLib.Object {
src.link (decoder);
decoder.pad_added.connect (this.on_decoder_pad_added);
- decoder.autoplug_continue.connect (this.on_autoplug_continue);
decoder.no_more_pads.connect (this.on_no_more_pads);
var pad = encoder.get_static_pad ("src");
@@ -160,19 +159,6 @@ internal abstract class Rygel.Transcoder : GLib.Object {
return ContentType.is_a (content_type1, content_type2);
}
- private bool on_autoplug_continue (Element decodebin,
- Pad new_pad,
- Caps caps) {
- Gst.Pad sinkpad = null;
-
- Signal.emit_by_name (this.encoder, "request-pad", caps, out sinkpad);
- if (sinkpad == null) {
- return true;
- }
-
- return false;
- }
-
private void on_decoder_pad_added (Element decodebin, Pad new_pad) {
Gst.Pad sinkpad;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]