rygel r779 - trunk/src/rygel
- From: zeeshanak svn gnome org
- To: svn-commits-list gnome org
- Subject: rygel r779 - trunk/src/rygel
- Date: Wed, 1 Apr 2009 21:56:13 +0000 (UTC)
Author: zeeshanak
Date: Wed Apr 1 21:56:13 2009
New Revision: 779
URL: http://svn.gnome.org/viewvc/rygel?rev=779&view=rev
Log:
The aspect-ratio needs to be 1:1 once video has been scaled.
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 Wed Apr 1 21:56:13 2009
@@ -38,8 +38,6 @@
private const int[] WIDTH = {640, 1920};
private const int[] HEIGHT = {480, 1080};
private const string[] PROFILES = {"MPEG_TS_SD_US", "MPEG_TS_HD_US"};
- private const int[] ASPECT = { 2, // 4:3
- 3 }; // 16:9
private const string VIDEO_ENCODER = "ffenc_mpeg2video";
private const string COLORSPACE_CONVERT = "ffmpegcolorspace";
@@ -76,10 +74,7 @@
var videoscale = GstUtils.create_element (VIDEO_SCALE, VIDEO_SCALE);
var convert = GstUtils.create_element (COLORSPACE_CONVERT,
COLORSPACE_CONVERT);
- dynamic Element encoder = GstUtils.create_element (VIDEO_ENCODER,
- VIDEO_ENCODER);
-
- encoder.aspect = ASPECT[this.profile];
+ var encoder = GstUtils.create_element (VIDEO_ENCODER, VIDEO_ENCODER);
var bin = new Bin ("video-encoder-bin");
bin.add_many (videorate, videoscale, convert, encoder);
@@ -90,7 +85,8 @@
convert.link (videoscale);
caps = new Caps.simple ("video/x-raw-yuv",
"width", typeof (int), WIDTH[this.profile],
- "height", typeof (int), HEIGHT[this.profile]);
+ "height", typeof (int), HEIGHT[this.profile],
+ "pixel-aspect-ratio", typeof (Fraction), 1, 1);
videoscale.link_filtered (encoder, caps);
var pad = videorate.get_static_pad ("sink");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]