[sip-comm-dev] Re: svn commit: r6869 - trunk/src/net/java/sip/communicator/impl: gui/main/call gui/main/menus neomedia neomedia/codec/video


#1

Hi Lubomir,

It works perfectly now. Thank you!

Regards,

···

--
Seb

lubomir_m@dev.java.net a écrit :

Author: lubomir_m
Date: 2010-03-11 00:59:02+0000
New Revision: 6869

Modified:
   trunk/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPeerPanel.java
   trunk/src/net/java/sip/communicator/impl/gui/main/menus/MainMenu.java
   trunk/src/net/java/sip/communicator/impl/neomedia/MediaStreamImpl.java
   trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/FFMPEG.java
   trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/SwScaler.java

Log:
Attempts to fix the problem with r6860 reported by Sebastien Vincent as "I have half of the display that is black and the other is not "clean" at all" in the dev mailing list thread "[sip-comm-dev] [Fwd: Re: svn commit: r6859 - trunk/src/net/java/sip/communicator/impl/neomedia: codec/video device]."

Modified: trunk/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPeerPanel.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPeerPanel.java?view=diff&rev=6869&p1=trunk/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPeerPanel.java&p2=trunk/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPeerPanel.java&r1=6868&r2=6869

--- trunk/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPeerPanel.java (original)
+++ trunk/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPeerPanel.java 2010-03-11 00:59:02+0000
@@ -625,7 +625,17 @@
                 if (visualComponent.getParent() == null)
                     visualComponent.setPreferredSize(new Dimension(width, height));
                 else if (isAncestor(videoContainer, visualComponent))
+ {
                     ensureSize(visualComponent, width, height);
+
+ /*
+ * Even if ensureSize hasn't changed the Frame size,
+ * videoContainer may still need to lay out visualComponent
+ * again because the size-related properties of the latter
+ * have likely changed.
+ */
+ videoContainer.doLayout();
+ }
                 return;
             }

Modified: trunk/src/net/java/sip/communicator/impl/gui/main/menus/MainMenu.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/gui/main/menus/MainMenu.java?view=diff&rev=6869&p1=trunk/src/net/java/sip/communicator/impl/gui/main/menus/MainMenu.java&p2=trunk/src/net/java/sip/communicator/impl/gui/main/menus/MainMenu.java&r1=6868&r2=6869

--- trunk/src/net/java/sip/communicator/impl/gui/main/menus/MainMenu.java (original)
+++ trunk/src/net/java/sip/communicator/impl/gui/main/menus/MainMenu.java 2010-03-11 00:59:02+0000
@@ -76,8 +76,9 @@
     /**
      * Paints the MENU_BACKGROUND image on the background of this container.
      * - * @param g the Graphics object that does the painting
+ * @param g the <tt>Graphics</tt> object that does the painting
      */
+ @Override
     public void paintComponent(Graphics g)
     {
         super.paintComponent(g);
@@ -85,6 +86,6 @@
         Image backgroundImage
             = ImageLoader.getImage(ImageLoader.MENU_BACKGROUND);
- g.drawImage(backgroundImage, 0, 0, getWidth(), getHeight(), null);
+ g.drawImage(backgroundImage, 0, 0, getWidth(), getHeight(), this);
     }
}

Modified: trunk/src/net/java/sip/communicator/impl/neomedia/MediaStreamImpl.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/neomedia/MediaStreamImpl.java?view=diff&rev=6869&p1=trunk/src/net/java/sip/communicator/impl/neomedia/MediaStreamImpl.java&p2=trunk/src/net/java/sip/communicator/impl/neomedia/MediaStreamImpl.java&r1=6868&r2=6869

--- trunk/src/net/java/sip/communicator/impl/neomedia/MediaStreamImpl.java (original)
+++ trunk/src/net/java/sip/communicator/impl/neomedia/MediaStreamImpl.java 2010-03-11 00:59:02+0000
@@ -495,9 +495,7 @@
                 ZRTPTransformEngine engine = zrtpControl.getZrtpEngine();
                  if (engine != null)
- {
                     engine.setOwnSSRC(sendStream.getSSRC());
- }
             }
             catch (IOException ioe)
             {

Modified: trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/FFMPEG.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/FFMPEG.java?view=diff&rev=6869&p1=trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/FFMPEG.java&p2=trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/FFMPEG.java&r1=6868&r2=6869

--- trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/FFMPEG.java (original)
+++ trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/FFMPEG.java 2010-03-11 00:59:02+0000
@@ -216,6 +216,7 @@
      * or short[])
      * @param dst_pix_fmt destination format
      * @param src source image. Its type must be an array (int[], byte[] or short[])
+ * @param pix_fmt the format of <tt>src</tt>
      * @param width original width
      * @param height original height
      * @param newWidth new width

Modified: trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/SwScaler.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/SwScaler.java?view=diff&rev=6869&p1=trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/SwScaler.java&p2=trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/SwScaler.java&r1=6868&r2=6869

--- trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/SwScaler.java (original)
+++ trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/SwScaler.java 2010-03-11 00:59:02+0000
@@ -78,9 +78,7 @@
         Format outputFormat = super.setOutputFormat(format);
          if (logger.isDebugEnabled() && (outputFormat != null))
- logger.debug(
- "SwScaler set to output with size "
- + ((VideoFormat) outputFormat).getSize());
+ logger.debug("SwScaler set to output in " + outputFormat);
         return outputFormat;
     }
@@ -114,17 +112,55 @@
                 -1.0f, 24, -1, -1, -1);
          // Set the size to the outputFormat as well.
- VideoFormat outputFormat = (VideoFormat) this.outputFormat;
+ VideoFormat outputFormat = (VideoFormat) getOutputFormat();
+
+ /*
+ * Since the size of the Format has changed, its size-related properties
+ * should change as well. Format#intersects doesn't seem to be cool
+ * because it preserves them and thus the resulting Format is
+ * inconsistent.
+ */
+ if (outputFormat instanceof RGBFormat)
+ {
+ RGBFormat rgbOutputFormat = (RGBFormat) outputFormat;
- if (outputFormat != null)
             setOutputFormat(
- new VideoFormat(
- outputFormat.getEncoding(),
+ new RGBFormat(
                         size,
- outputFormat.getMaxDataLength(),
+ Format.NOT_SPECIFIED,
                         outputFormat.getDataType(),
- outputFormat.getFrameRate())
- .intersects(outputFormat));
+ outputFormat.getFrameRate(),
+ rgbOutputFormat.getBitsPerPixel(),
+ rgbOutputFormat.getRedMask(),
+ rgbOutputFormat.getGreenMask(),
+ rgbOutputFormat.getBlueMask(),
+ rgbOutputFormat.getPixelStride(),
+ size.width, // lineStride
+ rgbOutputFormat.getFlipped(),
+ rgbOutputFormat.getEndian()));
+ }
+ else if (outputFormat instanceof YUVFormat)
+ {
+ YUVFormat yuvOutputFormat = (YUVFormat) outputFormat;
+
+ setOutputFormat(
+ new YUVFormat(
+ size,
+ Format.NOT_SPECIFIED,
+ outputFormat.getDataType(),
+ outputFormat.getFrameRate(),
+ yuvOutputFormat.getYuvType(),
+ Format.NOT_SPECIFIED,
+ 0,
+ Format.NOT_SPECIFIED,
+ Format.NOT_SPECIFIED));
+ }
+ else if (outputFormat != null)
+ logger.warn(
+ "SwScaler outputFormat of type "
+ + outputFormat.getClass().getSimpleName()
+ + " is not supported for optimized scaling.");
     }
      /**
@@ -223,12 +259,15 @@
     @Override
     public Format setInputFormat(Format format)
     {
- VideoFormat videoFormat = (VideoFormat) format;
-
- if (videoFormat.getSize() == null)
- return null; // must set a size.
-
- return super.setInputFormat(format);
+ Format inputFormat
+ = ((format instanceof VideoFormat)
+ && (((VideoFormat) format).getSize() == null))
+ ? null // size is required
+ : super.setInputFormat(format);
+
+ if (logger.isDebugEnabled() && (inputFormat != null))
+ logger.debug("SwScaler set to input in " + inputFormat);
+ return inputFormat;
     }
      /**
@@ -287,7 +326,7 @@
          if (isEOM(input))
         {
- propagateEOM(output); // TODO: what about data? can there be any?
+ propagateEOM(output); // TODO Can there be any data?
             return BUFFER_PROCESSED_OK;
         }

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: commits-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#2

Sebastien Vincent a écrit :

Hi Lubomir,

It works perfectly now. Thank you!

Ah I speak too quickly. On Windows I have 3/4 of the display screen black :frowning: and the last quarter looks bad (like my previous image I sent yesterday). Both SC are revision 6870.

I will test on Mac OS X if it has the same behavior.

···

--
Seb

Regards,
--
Seb

lubomir_m@dev.java.net a écrit :

Author: lubomir_m
Date: 2010-03-11 00:59:02+0000
New Revision: 6869

Modified:
   trunk/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPeerPanel.java

   trunk/src/net/java/sip/communicator/impl/gui/main/menus/MainMenu.java
   trunk/src/net/java/sip/communicator/impl/neomedia/MediaStreamImpl.java
   trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/FFMPEG.java

   trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/SwScaler.java

Log:
Attempts to fix the problem with r6860 reported by Sebastien Vincent as "I have half of the display that is black and the other is not "clean" at all" in the dev mailing list thread "[sip-comm-dev] [Fwd: Re: svn commit: r6859 - trunk/src/net/java/sip/communicator/impl/neomedia: codec/video device]."

Modified: trunk/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPeerPanel.java

Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPeerPanel.java?view=diff&rev=6869&p1=trunk/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPeerPanel.java&p2=trunk/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPeerPanel.java&r1=6868&r2=6869

==============================================================================

--- trunk/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPeerPanel.java (original)
+++ trunk/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPeerPanel.java 2010-03-11 00:59:02+0000
@@ -625,7 +625,17 @@
                 if (visualComponent.getParent() == null)
                     visualComponent.setPreferredSize(new Dimension(width, height));
                 else if (isAncestor(videoContainer, visualComponent))
+ {
                     ensureSize(visualComponent, width, height);
+
+ /*
+ * Even if ensureSize hasn't changed the Frame size,
+ * videoContainer may still need to lay out visualComponent
+ * again because the size-related properties of the latter
+ * have likely changed.
+ */
+ videoContainer.doLayout();
+ }
                 return;
             }

Modified: trunk/src/net/java/sip/communicator/impl/gui/main/menus/MainMenu.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/gui/main/menus/MainMenu.java?view=diff&rev=6869&p1=trunk/src/net/java/sip/communicator/impl/gui/main/menus/MainMenu.java&p2=trunk/src/net/java/sip/communicator/impl/gui/main/menus/MainMenu.java&r1=6868&r2=6869

==============================================================================

--- trunk/src/net/java/sip/communicator/impl/gui/main/menus/MainMenu.java (original)
+++ trunk/src/net/java/sip/communicator/impl/gui/main/menus/MainMenu.java 2010-03-11 00:59:02+0000
@@ -76,8 +76,9 @@
     /**
      * Paints the MENU_BACKGROUND image on the background of this container.
      * - * @param g the Graphics object that does the painting
+ * @param g the <tt>Graphics</tt> object that does the painting
      */
+ @Override
     public void paintComponent(Graphics g)
     {
         super.paintComponent(g);
@@ -85,6 +86,6 @@
         Image backgroundImage
             = ImageLoader.getImage(ImageLoader.MENU_BACKGROUND);
- g.drawImage(backgroundImage, 0, 0, getWidth(), getHeight(), null);
+ g.drawImage(backgroundImage, 0, 0, getWidth(), getHeight(), this);
     }
}

Modified: trunk/src/net/java/sip/communicator/impl/neomedia/MediaStreamImpl.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/neomedia/MediaStreamImpl.java?view=diff&rev=6869&p1=trunk/src/net/java/sip/communicator/impl/neomedia/MediaStreamImpl.java&p2=trunk/src/net/java/sip/communicator/impl/neomedia/MediaStreamImpl.java&r1=6868&r2=6869

==============================================================================

--- trunk/src/net/java/sip/communicator/impl/neomedia/MediaStreamImpl.java (original)
+++ trunk/src/net/java/sip/communicator/impl/neomedia/MediaStreamImpl.java 2010-03-11 00:59:02+0000
@@ -495,9 +495,7 @@
                 ZRTPTransformEngine engine = zrtpControl.getZrtpEngine();
                  if (engine != null)
- {
                     engine.setOwnSSRC(sendStream.getSSRC());
- }
             }
             catch (IOException ioe)
             {

Modified: trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/FFMPEG.java

Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/FFMPEG.java?view=diff&rev=6869&p1=trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/FFMPEG.java&p2=trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/FFMPEG.java&r1=6868&r2=6869

==============================================================================

--- trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/FFMPEG.java (original)
+++ trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/FFMPEG.java 2010-03-11 00:59:02+0000
@@ -216,6 +216,7 @@
      * or short[])
      * @param dst_pix_fmt destination format
      * @param src source image. Its type must be an array (int[], byte[] or short[])
+ * @param pix_fmt the format of <tt>src</tt>
      * @param width original width
      * @param height original height
      * @param newWidth new width

Modified: trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/SwScaler.java

Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/SwScaler.java?view=diff&rev=6869&p1=trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/SwScaler.java&p2=trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/SwScaler.java&r1=6868&r2=6869

==============================================================================

--- trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/SwScaler.java (original)
+++ trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/SwScaler.java 2010-03-11 00:59:02+0000
@@ -78,9 +78,7 @@
         Format outputFormat = super.setOutputFormat(format);
          if (logger.isDebugEnabled() && (outputFormat != null))
- logger.debug(
- "SwScaler set to output with size "
- + ((VideoFormat) outputFormat).getSize());
+ logger.debug("SwScaler set to output in " + outputFormat);
         return outputFormat;
     }
@@ -114,17 +112,55 @@
                 -1.0f, 24, -1, -1, -1);
          // Set the size to the outputFormat as well.
- VideoFormat outputFormat = (VideoFormat) this.outputFormat;
+ VideoFormat outputFormat = (VideoFormat) getOutputFormat();
+
+ /*
+ * Since the size of the Format has changed, its size-related properties
+ * should change as well. Format#intersects doesn't seem to be cool
+ * because it preserves them and thus the resulting Format is
+ * inconsistent.
+ */
+ if (outputFormat instanceof RGBFormat)
+ {
+ RGBFormat rgbOutputFormat = (RGBFormat) outputFormat;
- if (outputFormat != null)
             setOutputFormat(
- new VideoFormat(
- outputFormat.getEncoding(),
+ new RGBFormat(
                         size,
- outputFormat.getMaxDataLength(),
+ Format.NOT_SPECIFIED,
                         outputFormat.getDataType(),
- outputFormat.getFrameRate())
- .intersects(outputFormat));
+ outputFormat.getFrameRate(),
+ rgbOutputFormat.getBitsPerPixel(),
+ rgbOutputFormat.getRedMask(),
+ rgbOutputFormat.getGreenMask(),
+ rgbOutputFormat.getBlueMask(),
+ rgbOutputFormat.getPixelStride(),
+ size.width, // lineStride
+ rgbOutputFormat.getFlipped(),
+ rgbOutputFormat.getEndian()));
+ }
+ else if (outputFormat instanceof YUVFormat)
+ {
+ YUVFormat yuvOutputFormat = (YUVFormat) outputFormat;
+
+ setOutputFormat(
+ new YUVFormat(
+ size,
+ Format.NOT_SPECIFIED,
+ outputFormat.getDataType(),
+ outputFormat.getFrameRate(),
+ yuvOutputFormat.getYuvType(),
+ Format.NOT_SPECIFIED,
+ 0,
+ Format.NOT_SPECIFIED,
+ Format.NOT_SPECIFIED));
+ }
+ else if (outputFormat != null)
+ logger.warn(
+ "SwScaler outputFormat of type "
+ + outputFormat.getClass().getSimpleName()
+ + " is not supported for optimized scaling.");
     }
      /**
@@ -223,12 +259,15 @@
     @Override
     public Format setInputFormat(Format format)
     {
- VideoFormat videoFormat = (VideoFormat) format;
-
- if (videoFormat.getSize() == null)
- return null; // must set a size.
-
- return super.setInputFormat(format);
+ Format inputFormat
+ = ((format instanceof VideoFormat)
+ && (((VideoFormat) format).getSize() == null))
+ ? null // size is required
+ : super.setInputFormat(format);
+
+ if (logger.isDebugEnabled() && (inputFormat != null))
+ logger.debug("SwScaler set to input in " + inputFormat);
+ return inputFormat;
     }
      /**
@@ -287,7 +326,7 @@
          if (isEOM(input))
         {
- propagateEOM(output); // TODO: what about data? can there be any?
+ propagateEOM(output); // TODO Can there be any data?
             return BUFFER_PROCESSED_OK;
         }

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: commits-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#3

Sebastien Vincent a écrit :

Sebastien Vincent a écrit :

Hi Lubomir,

It works perfectly now. Thank you!

Ah I speak too quickly. On Windows I have 3/4 of the display screen black :frowning: and the last quarter looks bad (like my previous image I sent yesterday). Both SC are revision 6870.

I will test on Mac OS X if it has the same behavior.

On a Mac OS X receiver it works well. It seems to be only related to Windows on receiver side.

···

--
Seb

--
Seb

Regards,
--
Seb

lubomir_m@dev.java.net a écrit :

Author: lubomir_m
Date: 2010-03-11 00:59:02+0000
New Revision: 6869

Modified:
   trunk/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPeerPanel.java

   trunk/src/net/java/sip/communicator/impl/gui/main/menus/MainMenu.java
   trunk/src/net/java/sip/communicator/impl/neomedia/MediaStreamImpl.java
   trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/FFMPEG.java

   trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/SwScaler.java

Log:
Attempts to fix the problem with r6860 reported by Sebastien Vincent as "I have half of the display that is black and the other is not "clean" at all" in the dev mailing list thread "[sip-comm-dev] [Fwd: Re: svn commit: r6859 - trunk/src/net/java/sip/communicator/impl/neomedia: codec/video device]."

Modified: trunk/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPeerPanel.java

Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPeerPanel.java?view=diff&rev=6869&p1=trunk/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPeerPanel.java&p2=trunk/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPeerPanel.java&r1=6868&r2=6869

==============================================================================

--- trunk/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPeerPanel.java (original)
+++ trunk/src/net/java/sip/communicator/impl/gui/main/call/OneToOneCallPeerPanel.java 2010-03-11 00:59:02+0000
@@ -625,7 +625,17 @@
                 if (visualComponent.getParent() == null)
                     visualComponent.setPreferredSize(new Dimension(width, height));
                 else if (isAncestor(videoContainer, visualComponent))
+ {
                     ensureSize(visualComponent, width, height);
+
+ /*
+ * Even if ensureSize hasn't changed the Frame size,
+ * videoContainer may still need to lay out visualComponent
+ * again because the size-related properties of the latter
+ * have likely changed.
+ */
+ videoContainer.doLayout();
+ }
                 return;
             }

Modified: trunk/src/net/java/sip/communicator/impl/gui/main/menus/MainMenu.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/gui/main/menus/MainMenu.java?view=diff&rev=6869&p1=trunk/src/net/java/sip/communicator/impl/gui/main/menus/MainMenu.java&p2=trunk/src/net/java/sip/communicator/impl/gui/main/menus/MainMenu.java&r1=6868&r2=6869

==============================================================================

--- trunk/src/net/java/sip/communicator/impl/gui/main/menus/MainMenu.java (original)
+++ trunk/src/net/java/sip/communicator/impl/gui/main/menus/MainMenu.java 2010-03-11 00:59:02+0000
@@ -76,8 +76,9 @@
     /**
      * Paints the MENU_BACKGROUND image on the background of this container.
      * - * @param g the Graphics object that does the painting
+ * @param g the <tt>Graphics</tt> object that does the painting
      */
+ @Override
     public void paintComponent(Graphics g)
     {
         super.paintComponent(g);
@@ -85,6 +86,6 @@
         Image backgroundImage
             = ImageLoader.getImage(ImageLoader.MENU_BACKGROUND);
- g.drawImage(backgroundImage, 0, 0, getWidth(), getHeight(), null);
+ g.drawImage(backgroundImage, 0, 0, getWidth(), getHeight(), this);
     }
}

Modified: trunk/src/net/java/sip/communicator/impl/neomedia/MediaStreamImpl.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/neomedia/MediaStreamImpl.java?view=diff&rev=6869&p1=trunk/src/net/java/sip/communicator/impl/neomedia/MediaStreamImpl.java&p2=trunk/src/net/java/sip/communicator/impl/neomedia/MediaStreamImpl.java&r1=6868&r2=6869

==============================================================================

--- trunk/src/net/java/sip/communicator/impl/neomedia/MediaStreamImpl.java (original)
+++ trunk/src/net/java/sip/communicator/impl/neomedia/MediaStreamImpl.java 2010-03-11 00:59:02+0000
@@ -495,9 +495,7 @@
                 ZRTPTransformEngine engine = zrtpControl.getZrtpEngine();
                  if (engine != null)
- {
                     engine.setOwnSSRC(sendStream.getSSRC());
- }
             }
             catch (IOException ioe)
             {

Modified: trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/FFMPEG.java

Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/FFMPEG.java?view=diff&rev=6869&p1=trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/FFMPEG.java&p2=trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/FFMPEG.java&r1=6868&r2=6869

==============================================================================

--- trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/FFMPEG.java (original)
+++ trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/FFMPEG.java 2010-03-11 00:59:02+0000
@@ -216,6 +216,7 @@
      * or short[])
      * @param dst_pix_fmt destination format
      * @param src source image. Its type must be an array (int[], byte[] or short[])
+ * @param pix_fmt the format of <tt>src</tt>
      * @param width original width
      * @param height original height
      * @param newWidth new width

Modified: trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/SwScaler.java

Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/SwScaler.java?view=diff&rev=6869&p1=trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/SwScaler.java&p2=trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/SwScaler.java&r1=6868&r2=6869

==============================================================================

--- trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/SwScaler.java (original)
+++ trunk/src/net/java/sip/communicator/impl/neomedia/codec/video/SwScaler.java 2010-03-11 00:59:02+0000
@@ -78,9 +78,7 @@
         Format outputFormat = super.setOutputFormat(format);
          if (logger.isDebugEnabled() && (outputFormat != null))
- logger.debug(
- "SwScaler set to output with size "
- + ((VideoFormat) outputFormat).getSize());
+ logger.debug("SwScaler set to output in " + outputFormat);
         return outputFormat;
     }
@@ -114,17 +112,55 @@
                 -1.0f, 24, -1, -1, -1);
          // Set the size to the outputFormat as well.
- VideoFormat outputFormat = (VideoFormat) this.outputFormat;
+ VideoFormat outputFormat = (VideoFormat) getOutputFormat();
+
+ /*
+ * Since the size of the Format has changed, its size-related properties
+ * should change as well. Format#intersects doesn't seem to be cool
+ * because it preserves them and thus the resulting Format is
+ * inconsistent.
+ */
+ if (outputFormat instanceof RGBFormat)
+ {
+ RGBFormat rgbOutputFormat = (RGBFormat) outputFormat;
- if (outputFormat != null)
             setOutputFormat(
- new VideoFormat(
- outputFormat.getEncoding(),
+ new RGBFormat(
                         size,
- outputFormat.getMaxDataLength(),
+ Format.NOT_SPECIFIED,
                         outputFormat.getDataType(),
- outputFormat.getFrameRate())
- .intersects(outputFormat));
+ outputFormat.getFrameRate(),
+ rgbOutputFormat.getBitsPerPixel(),
+ rgbOutputFormat.getRedMask(),
+ rgbOutputFormat.getGreenMask(),
+ rgbOutputFormat.getBlueMask(),
+ rgbOutputFormat.getPixelStride(),
+ size.width, // lineStride
+ rgbOutputFormat.getFlipped(),
+ rgbOutputFormat.getEndian()));
+ }
+ else if (outputFormat instanceof YUVFormat)
+ {
+ YUVFormat yuvOutputFormat = (YUVFormat) outputFormat;
+
+ setOutputFormat(
+ new YUVFormat(
+ size,
+ Format.NOT_SPECIFIED,
+ outputFormat.getDataType(),
+ outputFormat.getFrameRate(),
+ yuvOutputFormat.getYuvType(),
+ Format.NOT_SPECIFIED,
+ 0,
+ Format.NOT_SPECIFIED,
+ Format.NOT_SPECIFIED));
+ }
+ else if (outputFormat != null)
+ logger.warn(
+ "SwScaler outputFormat of type "
+ + outputFormat.getClass().getSimpleName()
+ + " is not supported for optimized scaling.");
     }
      /**
@@ -223,12 +259,15 @@
     @Override
     public Format setInputFormat(Format format)
     {
- VideoFormat videoFormat = (VideoFormat) format;
-
- if (videoFormat.getSize() == null)
- return null; // must set a size.
-
- return super.setInputFormat(format);
+ Format inputFormat
+ = ((format instanceof VideoFormat)
+ && (((VideoFormat) format).getSize() == null))
+ ? null // size is required
+ : super.setInputFormat(format);
+
+ if (logger.isDebugEnabled() && (inputFormat != null))
+ logger.debug("SwScaler set to input in " + inputFormat);
+ return inputFormat;
     }
      /**
@@ -287,7 +326,7 @@
          if (isEOM(input))
         {
- propagateEOM(output); // TODO: what about data? can there be any?
+ propagateEOM(output); // TODO Can there be any data?
             return BUFFER_PROCESSED_OK;
         }

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: commits-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#4

Hello Seb,

Thank you very much! It sounds like the blasted lineStride again :frowning:
I'll be looking at it now.

Best regards,
Lubomir

···

On Thu, Mar 11, 2010 at 12:31 PM, Sebastien Vincent <seb@sip-communicator.org> wrote:

Ah I speak too quickly. On Windows I have 3/4 of the display screen black :frowning:
and the last quarter looks bad (like my previous image I sent yesterday).
Both SC are revision 6870.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net