Package org.red5.server.service

Examples of org.red5.server.service.Call


          }
          String scopeName = "hibernate";
          if (rcl.getRoom_id() != null) {
            scopeName = rcl.getRoom_id().toString();
          }
          IScope currentScope = this.scopeApplicationAdapter.getRoomScope(scopeName);
         
          HashMap<Integer,String> messageObj = new HashMap<Integer,String>();
          messageObj.put(0, "kick");
         
          this.scopeApplicationAdapter.sendMessageById(messageObj, rcl.getStreamid(), currentScope);
View Full Code Here


    // ------------------------------------------------------------------------

    private void createPlayStream( IPendingServiceCallback callback ) {

        logger.debug( "create play stream" );
        IPendingServiceCallback wrapper = new CreatePlayStreamCallBack( callback );
        invoke( "createStream", null, wrapper );
    }
View Full Code Here

      if (stream.getStreamListeners() != null) {
       
        for (Iterator<IStreamListener> iter = stream.getStreamListeners().iterator();iter.hasNext();) {
         
          IStreamListener iStreamListener = iter.next();
         
          ListenerAdapter listenerAdapter = (ListenerAdapter) iStreamListener;
         
          log.debug("Stream Closing ?? "+listenerAdapter.getFlvRecordingMetaDataId()+ " " +flvRecordingMetaDataId);
         
View Full Code Here

            if ( !( event instanceof IRTMPEvent ) ) {
                logger.debug( "skipping non rtmp event: " + event );
                return;
            }

            IRTMPEvent rtmpEvent = (IRTMPEvent) event;

            if ( logger.isDebugEnabled() ) {
                // logger.debug("rtmp event: " + rtmpEvent.getHeader() + ", " +
                // rtmpEvent.getClass().getSimpleName());
            }

            if ( !( rtmpEvent instanceof IStreamData ) ) {
                logger.debug( "skipping non stream data" );
                return;
            }

            if ( rtmpEvent.getHeader().getSize() == 0 ) {
                logger.debug( "skipping event where size == 0" );
                return;
            }

            if ( rtmpEvent instanceof VideoData ) {
View Full Code Here

        buffer.clear();
        buffer.put( video );
        buffer.flip();

        VideoData videoData = new VideoData( buffer );
        videoData.setTimestamp( (int) ts );

        kt++;

//        if ( kt < 10 ) {
//            logger.debug( "+++ " + videoData );
View Full Code Here

        buffer.clear();
        buffer.put( video );
        buffer.flip();

        VideoData videoData = new VideoData( buffer );
        videoData.setTimestamp( (int) ts );

        kt++;

//        if ( kt < 10 ) {
//            logger.debug( "+++ " + videoData );
View Full Code Here

          if (scope.getContext().getApplicationContext().containsBean(IRtmpSampleAccess.BEAN_NAME)) {
            IRtmpSampleAccess sampleAccess = (IRtmpSampleAccess) scope.getContext().getApplicationContext().getBean(IRtmpSampleAccess.BEAN_NAME);
            boolean videoAccess = sampleAccess.isVideoAllowed(scope);
            boolean audioAccess = sampleAccess.isAudioAllowed(scope);
            if (videoAccess || audioAccess) {
              final Call call2 = new Call(null, "|RtmpSampleAccess", null);
              Notify notify = new Notify();
              notify.setCall(call2);
              notify.setData(IoBuffer.wrap(new byte[] { 0x01, (byte) (audioAccess ? 0x01 : 0x00), 0x01, (byte) (videoAccess ? 0x01 : 0x00) }));
              write(notify, connection.getStreamIdForChannel(id));
            }
          }
        }
        event.setCall(call);
      } else {
        final Call call = new Call(null, CALL_ON_STATUS, new Object[] { status });
        event.setCall(call);
      }
      // send directly to the corresponding stream as for some status codes, no stream has been created  and thus "getStreamByChannelId" will fail
      write(event, connection.getStreamIdForChannel(id));
    }
View Full Code Here

    notify(method, null);
  }

  /** {@inheritDoc} */
  public void notify(String method, Object[] params) {
    IServiceCall call = new Call(method, params);
    notify(call);
  }
View Full Code Here

      String serviceMethod = (dotIndex == -1) ? action : action.substring(dotIndex + 1, action.length());
      // pull off the prefixes since java doesnt allow this on a method name
      if (serviceMethod.startsWith("@") || serviceMethod.startsWith("|")) {
        serviceMethod = serviceMethod.substring(1);
      }
      Call call = new Call(serviceName, serviceMethod, params);
      notify.setCall(call);
      return notify;
    } else {
      //TODO replace this with something better as time permits
      throw new RuntimeException("Action was null");
View Full Code Here

    notify(method, null);
  }

  /** {@inheritDoc} */
  public void notify(String method, Object[] params) {
    IServiceCall call = new Call(method, params);
    notify(call);
  }
View Full Code Here

TOP

Related Classes of org.red5.server.service.Call

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.