[sip-comm-dev] [Patch] Issue 750 : Missing local video on video calls


#1

Hi all,

Here is a patch to bring back again the local video display on video calls.

Here a summary of file changes:

- src/net/java/sip/communicator/impl/protocol/sip/CallPeerMediaHandler.java
  =>Fire OperationSetVideoTelephony.LOCAL_VIDEO_STREAMING when setLocalVideoTransmissionEnabled() is called

- src/net/java/sip/communicator/impl/protocol/sip/CallPeerSipImpl.java
  => Properly add the propertyChangedListener

- src/net/java/sip/communicator/service/neomedia/VideoMediaStream.java
  => Add two new methods to create and dispose local video component

sc-local-video.diff (12.7 KB)

···

- src/net/java/sip/communicator/impl/protocol/sip/OperationSetVideoTelephonySipImpl.java
  => implement create and disposeLocalVisualComponent (forward to VideoMediaStream::create/disposeLocalVisualComponent)

- src/net/java/sip/communicator/impl/neomedia/VideoMediaStreamImpl.java
   => implement create and disposeLocalVisualComponent (forward to VideoMediaDeviceSession::create/disposeLocalVisualComponent)

- src/net/java/sip/communicator/impl/neomedia/device/VideoMediaDeviceSession.java
  => Override MediaDeviceSession's getCaptureDevice() and provide SourceCloneable DataSource in order to use this DataSource for streaming and displaying local video.
  => Create player for local video display
  => Dispose player for local video display

Feedback is welcome.

Regards,
--
Sebastien


#2

Seb,

We already talked about these over the phone and I'm just writing here
for the sake of completeness of this thread:

- I think when a cloneable DataSource creates clones, the means of
control is only the mater i.e. when the master gets disconnected, so
do the clones. That's why I think we should fire the VIDEO_REMOVED
event for the local visual component when it gets disposed by means
other than an explicit call to disposeLocalVisualComponent. I believe
the media bundle used to take care of it.

- I'm not entirely sure why your patch fires VIDEO_ADDED to the
listeners other than the one specified in the
createLocalVisualComponent call. The thing is that a given visual
component cannot be added to more than one container i.e. if there are
multiple containers willing to display local video, each of them has
to request a separate visual component through
createLocalVisualComponent and if the events are fired to everyone,
how will they now which one was meant for them?

- The media bundle used to take into consideration the fact that if a
local visual component is requested by a listener and it does not get
displayed by that listener after the visual component is ready and the
respective event is fired, then it doesn't make sense for that visual
component to exist anymore. This tracking of the use was accomplished
through the consumed property of the event. I can see its use case in
the following scenario: the user clicks a button to request the
display of local video and since it takes time to prepare the visual
component, the user clicks the button again and states that she
doesn't want the display of the local video. If the local video
preparation completes after the user has changed her mind, the local
video will still be delivered but it will not be consumed by the UI in
which case it will be left unnecessary.

Regards,
Lubo

···

On Thu, Jan 14, 2010 at 2:46 PM, Sebastien Vincent <seb@sip-communicator.org> wrote:

Hi all,

Here is a patch to bring back again the local video display on video calls.

Here a summary of file changes:

- src/net/java/sip/communicator/impl/protocol/sip/CallPeerMediaHandler.java
=>Fire OperationSetVideoTelephony.LOCAL_VIDEO_STREAMING when
setLocalVideoTransmissionEnabled() is called

- src/net/java/sip/communicator/impl/protocol/sip/CallPeerSipImpl.java
=> Properly add the propertyChangedListener

- src/net/java/sip/communicator/service/neomedia/VideoMediaStream.java
=> Add two new methods to create and dispose local video component

-
src/net/java/sip/communicator/impl/protocol/sip/OperationSetVideoTelephonySipImpl.java
=> implement create and disposeLocalVisualComponent (forward to
VideoMediaStream::create/disposeLocalVisualComponent)

- src/net/java/sip/communicator/impl/neomedia/VideoMediaStreamImpl.java
=> implement create and disposeLocalVisualComponent (forward to
VideoMediaDeviceSession::create/disposeLocalVisualComponent)

-
src/net/java/sip/communicator/impl/neomedia/device/VideoMediaDeviceSession.java
=> Override MediaDeviceSession's getCaptureDevice() and provide
SourceCloneable DataSource in order to use this DataSource for streaming and
displaying local video.
=> Create player for local video display
=> Dispose player for local video display

Feedback is welcome.

Regards,
--
Sebastien

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


#3

Hi,

I have commited the patch, the third issue is also fixed.

I will try to address the two ones later.

Regards,

···

--
Seb

Lubomir Marinov a �crit :

Seb,

We already talked about these over the phone and I'm just writing here
for the sake of completeness of this thread:

- I think when a cloneable DataSource creates clones, the means of
control is only the mater i.e. when the master gets disconnected, so
do the clones. That's why I think we should fire the VIDEO_REMOVED
event for the local visual component when it gets disposed by means
other than an explicit call to disposeLocalVisualComponent. I believe
the media bundle used to take care of it.

- I'm not entirely sure why your patch fires VIDEO_ADDED to the
listeners other than the one specified in the
createLocalVisualComponent call. The thing is that a given visual
component cannot be added to more than one container i.e. if there are
multiple containers willing to display local video, each of them has
to request a separate visual component through
createLocalVisualComponent and if the events are fired to everyone,
how will they now which one was meant for them?.
  - The media bundle used to take into consideration the fact that if a
local visual component is requested by a listener and it does not get
displayed by that listener after the visual component is ready and the
respective event is fired, then it doesn't make sense for that visual
component to exist anymore. This tracking of the use was accomplished
through the consumed property of the event. I can see its use case in
the following scenario: the user clicks a button to request the
display of local video and since it takes time to prepare the visual
component, the user clicks the button again and states that she
doesn't want the display of the local video. If the local video
preparation completes after the user has changed her mind, the local
video will still be delivered but it will not be consumed by the UI in
which case it will be left unnecessary.

  Regards,
Lubo

On Thu, Jan 14, 2010 at 2:46 PM, Sebastien Vincent > <seb@sip-communicator.org> wrote:
  

Hi all,

Here is a patch to bring back again the local video display on video calls.

Here a summary of file changes:

- src/net/java/sip/communicator/impl/protocol/sip/CallPeerMediaHandler.java
=>Fire OperationSetVideoTelephony.LOCAL_VIDEO_STREAMING when
setLocalVideoTransmissionEnabled() is called

- src/net/java/sip/communicator/impl/protocol/sip/CallPeerSipImpl.java
=> Properly add the propertyChangedListener

- src/net/java/sip/communicator/service/neomedia/VideoMediaStream.java
=> Add two new methods to create and dispose local video component

-
src/net/java/sip/communicator/impl/protocol/sip/OperationSetVideoTelephonySipImpl.java
=> implement create and disposeLocalVisualComponent (forward to
VideoMediaStream::create/disposeLocalVisualComponent)

- src/net/java/sip/communicator/impl/neomedia/VideoMediaStreamImpl.java
=> implement create and disposeLocalVisualComponent (forward to
VideoMediaDeviceSession::create/disposeLocalVisualComponent)

-
src/net/java/sip/communicator/impl/neomedia/device/VideoMediaDeviceSession.java
=> Override MediaDeviceSession's getCaptureDevice() and provide
SourceCloneable DataSource in order to use this DataSource for streaming and
displaying local video.
=> Create player for local video display
=> Dispose player for local video display

Feedback is welcome.

Regards,
--
Sebastien
    
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-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

Hi Seb,

I think that apart from making the video in a call to not be available
when using the QTKit CaptureDevice on Mac OS X (which I suppose is the
fault of the CaptureDevice), the patch has also breaken video muting
(which was introduced in neomedia and attempts to make the video
output only a single-color rectangle much like audio muting outputs
silence).

Regards,
Lubo

···

On Thu, Jan 14, 2010 at 6:31 PM, Sebastien Vincent <seb@sip-communicator.org> wrote:

Hi,

I have commited the patch, the third issue is also fixed.

I will try to address the two ones later.

Regards,
--
Seb

Lubomir Marinov a écrit :

Seb,

We already talked about these over the phone and I'm just writing here
for the sake of completeness of this thread:

- I think when a cloneable DataSource creates clones, the means of
control is only the mater i.e. when the master gets disconnected, so
do the clones. That's why I think we should fire the VIDEO_REMOVED
event for the local visual component when it gets disposed by means
other than an explicit call to disposeLocalVisualComponent. I believe
the media bundle used to take care of it.

- I'm not entirely sure why your patch fires VIDEO_ADDED to the
listeners other than the one specified in the
createLocalVisualComponent call. The thing is that a given visual
component cannot be added to more than one container i.e. if there are
multiple containers willing to display local video, each of them has
to request a separate visual component through
createLocalVisualComponent and if the events are fired to everyone,
how will they now which one was meant for them?.
- The media bundle used to take into consideration the fact that if a
local visual component is requested by a listener and it does not get
displayed by that listener after the visual component is ready and the
respective event is fired, then it doesn't make sense for that visual
component to exist anymore. This tracking of the use was accomplished
through the consumed property of the event. I can see its use case in
the following scenario: the user clicks a button to request the
display of local video and since it takes time to prepare the visual
component, the user clicks the button again and states that she
doesn't want the display of the local video. If the local video
preparation completes after the user has changed her mind, the local
video will still be delivered but it will not be consumed by the UI in
which case it will be left unnecessary.

Regards,
Lubo

On Thu, Jan 14, 2010 at 2:46 PM, Sebastien Vincent >> <seb@sip-communicator.org> wrote:

Hi all,

Here is a patch to bring back again the local video display on video
calls.

Here a summary of file changes:

-
src/net/java/sip/communicator/impl/protocol/sip/CallPeerMediaHandler.java
=>Fire OperationSetVideoTelephony.LOCAL_VIDEO_STREAMING when
setLocalVideoTransmissionEnabled() is called

- src/net/java/sip/communicator/impl/protocol/sip/CallPeerSipImpl.java
=> Properly add the propertyChangedListener

- src/net/java/sip/communicator/service/neomedia/VideoMediaStream.java
=> Add two new methods to create and dispose local video component

-

src/net/java/sip/communicator/impl/protocol/sip/OperationSetVideoTelephonySipImpl.java
=> implement create and disposeLocalVisualComponent (forward to
VideoMediaStream::create/disposeLocalVisualComponent)

- src/net/java/sip/communicator/impl/neomedia/VideoMediaStreamImpl.java
=> implement create and disposeLocalVisualComponent (forward to
VideoMediaDeviceSession::create/disposeLocalVisualComponent)

-

src/net/java/sip/communicator/impl/neomedia/device/VideoMediaDeviceSession.java
=> Override MediaDeviceSession's getCaptureDevice() and provide
SourceCloneable DataSource in order to use this DataSource for streaming
and
displaying local video.
=> Create player for local video display
=> Dispose player for local video display

Feedback is welcome.

Regards,
--
Sebastien

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-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

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


#5

Hi Lubomir,

Yes, it also breaks desktop streaming :(. I think the desktop streaming/QTKit DataSource do not like to be Cloneable (Manager.createSourceCloneable()).

For the video muting, I will try to fix it today.

···

--
Seb

Lubomir Marinov a �crit :

Hi Seb,

I think that apart from making the video in a call to not be available
when using the QTKit CaptureDevice on Mac OS X (which I suppose is the
fault of the CaptureDevice), the patch has also breaken video muting
(which was introduced in neomedia and attempts to make the video
output only a single-color rectangle much like audio muting outputs
silence).

Regards,
Lubo

On Thu, Jan 14, 2010 at 6:31 PM, Sebastien Vincent > <seb@sip-communicator.org> wrote:
  

Hi,

I have commited the patch, the third issue is also fixed.

I will try to address the two ones later.

Regards,
--
Seb

Lubomir Marinov a �crit :
    

Seb,

We already talked about these over the phone and I'm just writing here
for the sake of completeness of this thread:

- I think when a cloneable DataSource creates clones, the means of
control is only the mater i.e. when the master gets disconnected, so
do the clones. That's why I think we should fire the VIDEO_REMOVED
event for the local visual component when it gets disposed by means
other than an explicit call to disposeLocalVisualComponent. I believe
the media bundle used to take care of it.

- I'm not entirely sure why your patch fires VIDEO_ADDED to the
listeners other than the one specified in the
createLocalVisualComponent call. The thing is that a given visual
component cannot be added to more than one container i.e. if there are
multiple containers willing to display local video, each of them has
to request a separate visual component through
createLocalVisualComponent and if the events are fired to everyone,
how will they now which one was meant for them?.
- The media bundle used to take into consideration the fact that if a
local visual component is requested by a listener and it does not get
displayed by that listener after the visual component is ready and the
respective event is fired, then it doesn't make sense for that visual
component to exist anymore. This tracking of the use was accomplished
through the consumed property of the event. I can see its use case in
the following scenario: the user clicks a button to request the
display of local video and since it takes time to prepare the visual
component, the user clicks the button again and states that she
doesn't want the display of the local video. If the local video
preparation completes after the user has changed her mind, the local
video will still be delivered but it will not be consumed by the UI in
which case it will be left unnecessary.

Regards,
Lubo

On Thu, Jan 14, 2010 at 2:46 PM, Sebastien Vincent >>> <seb@sip-communicator.org> wrote:

Hi all,

Here is a patch to bring back again the local video display on video
calls.

Here a summary of file changes:

-
src/net/java/sip/communicator/impl/protocol/sip/CallPeerMediaHandler.java
=>Fire OperationSetVideoTelephony.LOCAL_VIDEO_STREAMING when
setLocalVideoTransmissionEnabled() is called

- src/net/java/sip/communicator/impl/protocol/sip/CallPeerSipImpl.java
=> Properly add the propertyChangedListener

- src/net/java/sip/communicator/service/neomedia/VideoMediaStream.java
=> Add two new methods to create and dispose local video component

-

src/net/java/sip/communicator/impl/protocol/sip/OperationSetVideoTelephonySipImpl.java
=> implement create and disposeLocalVisualComponent (forward to
VideoMediaStream::create/disposeLocalVisualComponent)

- src/net/java/sip/communicator/impl/neomedia/VideoMediaStreamImpl.java
=> implement create and disposeLocalVisualComponent (forward to
VideoMediaDeviceSession::create/disposeLocalVisualComponent)

-

src/net/java/sip/communicator/impl/neomedia/device/VideoMediaDeviceSession.java
=> Override MediaDeviceSession's getCaptureDevice() and provide
SourceCloneable DataSource in order to use this DataSource for streaming
and
displaying local video.
=> Create player for local video display
=> Dispose player for local video display

Feedback is welcome.

Regards,
--
Sebastien

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-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