rygel r711 - trunk/src/rygel
- From: zeeshanak svn gnome org
- To: svn-commits-list gnome org
- Subject: rygel r711 - trunk/src/rygel
- Date: Sat, 21 Mar 2009 13:56:09 +0000 (UTC)
Author: zeeshanak
Date: Sat Mar 21 13:56:09 2009
New Revision: 711
URL: http://svn.gnome.org/viewvc/rygel?rev=711&view=rev
Log:
Prepend a videorate to the video encoder bin.
Modified:
trunk/src/rygel/rygel-mp2ts-transcoder.vala
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 21 13:56:09 2009
@@ -27,6 +27,7 @@
private const string DECODEBIN = "decodebin2";
private const string VIDEO_ENCODER = "mpeg2enc";
private const string COLORSPACE_CONVERT = "ffmpegcolorspace";
+ private const string VIDEO_RATE = "videorate";
private const string VIDEO_PARSER = "mpegvideoparse";
private const string MUXER = "mpegtsmux";
@@ -106,6 +107,13 @@
internal static Element create_encoder (string? src_pad_name,
string? sink_pad_name)
throws Error {
+ var videorate = ElementFactory.make (VIDEO_RATE, VIDEO_RATE);
+ if (videorate == null) {
+ throw new LiveResponseError.MISSING_PLUGIN (
+ "Required element '%s' missing",
+ VIDEO_RATE);
+ }
+
var convert = ElementFactory.make (COLORSPACE_CONVERT,
COLORSPACE_CONVERT);
if (convert == null) {
@@ -129,11 +137,11 @@
}
var bin = new Bin ("video-encoder-bin");
- bin.add_many (convert, encoder, parser);
+ bin.add_many (videorate, convert, encoder, parser);
- convert.link_many (encoder, parser);
+ videorate.link_many (convert, encoder, parser);
- var pad = convert.get_static_pad ("sink");
+ var pad = videorate.get_static_pad ("sink");
var ghost = new GhostPad (sink_pad_name, pad);
bin.add_pad (ghost);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]