2009-04-23 4 views
1

나는 Red5에서 thelaDemo를 검사하고있었습니다. 나는 모든 가입자에게 특정 FLV 파일을 스트리밍 할 수 있도록 내가 oflaDemo을 변경할 수 있는지 궁금 ...Red5 stream flv 파일

/** {@inheritDoc} */ 
    @Override 
    public boolean appConnect(IConnection conn, Object[] params) { 
     // Trigger calling of "onBWDone", required for some FLV players 
     measureBandwidth(conn); 
     if (conn instanceof IStreamCapableConnection) { 
      IStreamCapableConnection streamConn = (IStreamCapableConnection) conn; 
      SimpleConnectionBWConfig bwConfig = new SimpleConnectionBWConfig(); 
      bwConfig.getChannelBandwidth()[IBandwidthConfigure.OVERALL_CHANNEL] = 
       1024 * 1024; 
      bwConfig.getChannelInitialBurst()[IBandwidthConfigure.OVERALL_CHANNEL] = 
       128 * 1024; 
      streamConn.setBandwidthConfigure(bwConfig); 
     } 

      serverStream = StreamUtils.createServerStream(appScope, "live0"); 
      SimplePlayItem item = new SimplePlayItem(); 
      item.setStart(0); 
      item.setLength(10000); 
      item.setName("IronMan"); 
      serverStream.addItem(item); 
      item = new SimplePlayItem(); 
      item.setStart(20000); 
      item.setLength(10000); 
      item.setName("DarkKnight"); 
      serverStream.addItem(item); 
      serverStream.start(); 
      serverStream.setRepeat(true); 

     return super.appConnect(conn, params); 
    } 

위 코드의 결과는 모든 가입자 단지 빈 화면입니다 ...

혹시 궁금한 점이 있으십니까?

미리 감사드립니다.

답변

0

이렇게하면 클라이언트 측에서 쉽게 수행 할 수 있으며 스트림 이름을 하드 코딩하지 않으려면 이름을 플래시 var로 전달할 수 있습니다.

0

같은 문제가 있습니다. 나는 빈 화면이 때문에 false로 반복 설정하면

serverStream.setRepeat(true); 

모두가 잘

UPD를 작동하는 무슨 라인의 것을 발견 : 나는이 RED5 버그라고 생각합니다. 나는 하나의 flv를 지속적으로 반복하기 위해 해킹을했다. 사용자 지정 재생 목록 컨트롤러를 추가했습니다.