[PATCH] Fix keepAspect property in Cortado

"[email protected]" <[email protected]>
Newsgroups gmane.comp.multimedia.ogg.theora.devel
Message-ID <[email protected]>
Hi,

this is in response to s.monzio's post on '[email protected]',
which I received despite never having heard of this list, so I suspect
it redirects to one of the lists at lists.xiph.org, so I'll assume
you've seen it. If not, I can forward it.

It's pretty simple, and I'm waiting to hear from the original poster
to confirm it fixes the problem. If so, and no objections from this
list, I'll push soon.

Cheers

_______________________________________________
theora-dev mailing list
[email protected]
http://lists.xiph.org/mailman/listinfo/theora-dev
0001-fix-keepAspect-being-ignored.patch (application/octet-stream, 2.2 KB)
From 3e219d62021e5ff9c47917b8989f81f3c73814c3 Mon Sep 17 00:00:00 2001
From: ogg.k.ogg.k <[email protected]>
Date: Sat, 30 Jan 2010 20:32:03 +0000
Subject: [PATCH] fix keepAspect being ignored

---
 src/com/fluendo/player/Cortado.java         |    1 +
 src/com/fluendo/player/CortadoPipeline.java |    5 +++++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/com/fluendo/player/Cortado.java b/src/com/fluendo/player/Cortado.java
index 3bf22bf..8b6a9f9 100644
--- a/src/com/fluendo/player/Cortado.java
+++ b/src/com/fluendo/player/Cortado.java
@@ -270,6 +270,7 @@ public class Cortado extends Applet implements Runnable, MouseMotionListener,
         pipeline.setPassword(password);
         pipeline.enableAudio(audio);
         pipeline.enableVideo(video);
+        pipeline.setKeepAspect(keepAspect);
         pipeline.setIgnoreAspect(ignoreAspect);
         pipeline.enableKateStream(kateIndex, kateLanguage, kateCategory);
         pipeline.setBufferSize(bufferSize);
diff --git a/src/com/fluendo/player/CortadoPipeline.java b/src/com/fluendo/player/CortadoPipeline.java
index 725dd72..0219145 100644
--- a/src/com/fluendo/player/CortadoPipeline.java
+++ b/src/com/fluendo/player/CortadoPipeline.java
@@ -32,6 +32,7 @@ public class CortadoPipeline extends Pipeline implements PadListener, CapsListen
   private String password;
   private boolean enableAudio;
   private boolean enableVideo;
+  private boolean keepAspect;
   private boolean ignoreAspect;
   private int enableKate;
   private Component component;
@@ -351,6 +352,9 @@ public class CortadoPipeline extends Pipeline implements PadListener, CapsListen
   public void setUserId(String aUserId) {
     userId = aUserId;
   }
+  public void setKeepAspect(boolean keep) {
+    keepAspect = keep;
+  }
   public void setIgnoreAspect(boolean ignore) {
     ignoreAspect = ignore;
   }
@@ -612,6 +616,7 @@ public class CortadoPipeline extends Pipeline implements PadListener, CapsListen
         return false;
       }
 
+      videosink.setProperty("keep-aspect", keepAspect ? "true" : "false");
       videosink.setProperty("ignore-aspect", ignoreAspect ? "true" : "false");
 
       videosink.setProperty ("component", component);
-- 
1.6.4.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.