src/net/java/sip/communicator/impl/protocol/sip/OperationSetDesktopStreamingSipImpl.java
/**
     * Create a new video call and invite the specified CallPeer to it.
     *
     * @param toAddress the address of the callee that we should invite to a new
     * call.
     * @param mediaDevice the media device to use for the desktop streaming
     * @return CallPeer the CallPeer that will represented by the
     * specified uri. All following state change events will be delivered
     * through that call peer. The Call that this peer is a member
     * of could be retrieved from the CallParticipant instance with the use
     * of the corresponding method.
     * @throws OperationFailedException with the corresponding code if we fail
     * to create the video call.
     */
Create a new video call and invite the specified CallPeer to it.
@param toAddress the address of the callee that we should invite to a new
call.
@param mediaDevice the media device to use for the desktop streaming
@return CallPeer the CallPeer that will represented by the
specified uri. All following state change events will be delivered
through that call peer. The Call that this peer is a member
of could be retrieved from the CallParticipant instance with the use
of the corresponding method.
@throws OperationFailedException with the corresponding code if we fail
to create the video call.
Create a new video call and invite the specified CallPeer to it . @param toAddress the address of the callee that we should invite to a new call . @param mediaDevice the media device to use for the desktop streaming @return CallPeer the CallPeer that will represented by the specified uri . All following state change events will be delivered through that call peer . The Call that this peer is a member of could be retrieved from the CallParticipant instance with the use of the corresponding method . @throws OperationFailedException with the corresponding code if we fail to create the video call .
private Call createVideoCall(Address toAddress, MediaDevice mediaDevice)
        throws OperationFailedException
    {
        basicTelephony.assertRegistered();
        CallSipImpl call;
        if(desktopControlOutOfDialogEnabled)
        {
            call = new DesktopSharingCallSipImpl(basicTelephony)
            {
                @Override
                protected void processExtraHeaders(
                      javax.sip.message.Message message)
                    throws ParseException
                {
                    addDesktopShareHeader(message);
                }
            };
        }
        else
        {
            call = new CallSipImpl(basicTelephony)
            {
                @Override
                protected void processExtraHeaders(
                    javax.sip.message.Message message)
                    throws
                    ParseException
                {
                    addDesktopShareHeader(message);
                }
            };
        }
        MediaUseCase useCase = getMediaUseCase();
        call.setVideoDevice(mediaDevice, useCase);
        call.setLocalVideoAllowed(true, useCase);
        call.invite(toAddress, null);
        origin = getOriginForMediaDevice(mediaDevice);
        return call;
    }
private Call createVideoCall ( Address toAddress , MediaDevice mediaDevice ) throws OperationFailedException { basicTelephony . assertRegistered ( ) ; CallSipImpl call ; if ( desktopControlOutOfDialogEnabled ) { call = new DesktopSharingCallSipImpl ( basicTelephony ) { @ Override protected void processExtraHeaders ( javax . sip . message . Message message ) throws ParseException { addDesktopShareHeader ( message ) ; } } ; } else { call = new CallSipImpl ( basicTelephony ) { @ Override protected void processExtraHeaders ( javax . sip . message . Message message ) throws ParseException { addDesktopShareHeader ( message ) ; } } ; } MediaUseCase useCase = getMediaUseCase ( ) ; call . setVideoDevice ( mediaDevice , useCase ) ; call . setLocalVideoAllowed ( true , useCase ) ; call . invite ( toAddress , null ) ; origin = getOriginForMediaDevice ( mediaDevice ) ; return call ; }
Create a new video call and invite the specified CallPeer to it.
Create a new video call and invite the specified CallPeer to it .