648540858
2022-07-19 28b5cc39d0a2d9939f70b4c980a31d9b27fc1e4c
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java
@@ -1830,7 +1830,7 @@
   }
   
   @Override
   public void playbackControlCmd(Device device, StreamInfo streamInfo, String content) {
   public void playbackControlCmd(Device device, StreamInfo streamInfo, String content,SipSubscribe.Event errorEvent, SipSubscribe.Event okEvent) {
      try {
         Request request = headerProvider.createInfoRequest(device, streamInfo, content);
         if (request == null) {
@@ -1843,7 +1843,22 @@
         } else if ("UDP".equals(device.getTransport())) {
            clientTransaction = udpSipProvider.getNewClientTransaction(request);
         }
         CallIdHeader callIdHeader = (CallIdHeader)request.getHeader(CallIdHeader.NAME);
         if(errorEvent != null) {
            sipSubscribe.addErrorSubscribe(callIdHeader.getCallId(), (eventResult -> {
               errorEvent.response(eventResult);
               sipSubscribe.removeErrorSubscribe(eventResult.callId);
               sipSubscribe.removeOkSubscribe(eventResult.callId);
            }));
         }
         
         if(okEvent != null) {
            sipSubscribe.addOkSubscribe(callIdHeader.getCallId(), eventResult -> {
               okEvent.response(eventResult);
               sipSubscribe.removeOkSubscribe(eventResult.callId);
               sipSubscribe.removeErrorSubscribe(eventResult.callId);
            });
         }
         clientTransaction.sendRequest();
         
      } catch (SipException | ParseException | InvalidArgumentException e) {