wms-mediareader-flv

16:54:10.059 INFO  jd.cli.Main - Decompiling wms-mediareader-flv.jar
package com.wowza.wms.mediareader.flv;

import com.wowza.wms.stream.IMediaReaderStreamPosition;

public class FLVStreamPosition
  implements IMediaReaderStreamPosition
{
  long a = -1L;
  
  public FLVStreamPosition(long paramLong)
  {
    a = paramLong;
  }
  
  public FLVStreamPosition()
  {
    a = a;
  }
  
  /* Error */
  public boolean isValid()
  {
    // Byte code:
    //   0: aload_0
    //   1: getfield 18	com/wowza/wms/mediareader/flv/FLVStreamPosition:a	J
    //   4: lconst_0
    //   5: lcmp
    //   6: iflt +7 -> 13
    //   9: goto +8 -> 17
    //   12: ireturn
    //   13: iconst_0
    //   14: goto -2 -> 12
    //   17: iconst_1
    //   18: goto -6 -> 12
    // Line number table:
    //   Java source line #21	-> byte code offset #0
  }
  
  public long getFilePos()
  {
    return a;
  }
  
  public void setFilePos(long paramLong)
  {
    a = paramLong;
  }
}

/* Location:
 * Qualified Name:     com.wowza.wms.mediareader.flv.FLVStreamPosition
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package com.wowza.wms.mediareader.flv;

import com.wowza.io.IRandomAccessReader;
import com.wowza.io.IRandomAccessWriter;
import com.wowza.io.ScheduledRandomAccessReaderWrapper;
import com.wowza.util.Base64;
import com.wowza.util.JSON;
import com.wowza.wms.amf.AMFObj;
import com.wowza.wms.application.IApplicationInstance;
import com.wowza.wms.application.WMSProperties;
import com.wowza.wms.logging.WMSLogger;
import com.wowza.wms.logging.WMSLoggerFactory;
import com.wowza.wms.stream.FastPlaySettings;
import com.wowza.wms.stream.IMediaReader;
import com.wowza.wms.stream.IMediaReaderStreamPosition;
import com.wowza.wms.stream.IMediaStream;
import com.wowza.wms.stream.MediaReaderItem;
import com.wowza.wms.stream.PlaylistSeekResult;
import com.wowza.wms.stream.file.MediaStreamIndex;
import com.wowza.wms.stream.file.PlaylistCursor;
import com.wowza.wms.stream.file.PlaylistReaderWriteResults;
import com.wowza.wms.stream.file.PlaylistWriteControl;
import java.io.OutputStream;
import java.util.List;
import java.util.SortedMap;
import java.util.TreeMap;

public class MediaReaderFLV
  implements IMediaReader
{
  protected static final int HEADER_TYPE = 0;
  protected static final int HEADER_SIZE = 1;
  protected static final int HEADER_TC = 2;
  protected static final int SEEK_KEYFRAMEMAX = 10000;
  protected IRandomAccessReader fileStream = null;
  protected ScheduledRandomAccessReaderWrapper fileReader = null;
  protected List metaData = null;
  protected int metaDataSize = 0;
  protected MediaReaderFLVNodeData nodeData = null;
  protected byte[] chunkHeaderBuffer = null;
  protected byte[] chunkWorkBuffer = null;
  protected int[] chunkHeaderValues = null;
  protected boolean errorReported = false;
  protected IMediaStream stream = null;
  protected Object lock = new Object();
  protected String mediaReaderType = Base64.endsWith('?' / 65, "cjq");
  protected String mediaReaderExt = JSON.copyValueOf("bip", 114 + 18);
  protected MediaReaderItem mediaReaderItem = null;
  protected long saveLastVideoPos = 0L;
  protected long saveLastAudioPos = 0L;
  protected long saveLastBroadcastPos = 0L;
  protected int saveLastVideoSize = 0;
  protected int saveLastAudioSize = 0;
  protected int saveLastBroadcastSize = 0;
  protected String basePath = "";
  protected String mediaName = "";
  protected String mediaExtension = "";
  protected long duration = -1L;
  protected SortedMap<Long, Long> seekMap = new TreeMap();
  protected SortedMap<Long, Long> keyframeMap = new TreeMap();
  protected int seekBufferSize = 24576;
  protected long seekLargestFrame = 512000L;
  protected IRandomAccessWriter directWriter = null;
  protected long firstPacketLoc = 13L;
  protected byte firstPacketType = 8;
  protected int readAheadSize = 65536;
  protected int readAheadTrigger = readAheadSize / 2;
  protected String randomAccessReaderClass = Base64.endsWith(25 * 59, " +(h0'>0*b$!a\0248 67!\00466=56\035>=:32\020&%!#5");
  protected IApplicationInstance appInstance = null;
  protected boolean bufferSeekIO = false;
  protected byte[] videoCodecConfig = null;
  protected byte[] audioCodecConfig = null;
  protected int seekKeyFrameSearchWindow = 10000;
  
  public MediaReaderFLV()
  {
    chunkHeaderBuffer = new byte[13];
    
    chunkHeaderValues = new int[5];
  }
  
  protected MediaReaderFLVNodeData getNodeData()
  {
    if (nodeData != null) {}
    for (;; nodeData = new MediaReaderFLVNodeData()) {
      return nodeData;
    }
  }
  
  /* Error */
  public void init(IApplicationInstance arg1, IMediaStream arg2, String arg3, String arg4, String arg5)
  {
    // Byte code:
    //   0: aload_0
    //   1: aload_1
    //   2: putfield 176	com/wowza/wms/mediareader/flv/MediaReaderFLV:appInstance	Lcom/wowza/wms/application/IApplicationInstance;
    //   5: aload_0
    //   6: aload_2
    //   7: putfield 96	com/wowza/wms/mediareader/flv/MediaReaderFLV:stream	Lcom/wowza/wms/stream/IMediaStream;
    //   10: aload_0
    //   11: aload_2
    //   12: ifnonnull +120 -> 132
    //   15: goto +121 -> 136
    //   18: putfield 98	com/wowza/wms/mediareader/flv/MediaReaderFLV:lock	Ljava/lang/Object;
    //   21: aload_0
    //   22: aload_3
    //   23: invokevirtual 197	java/lang/String:toLowerCase	()Ljava/lang/String;
    //   26: putfield 108	com/wowza/wms/mediareader/flv/MediaReaderFLV:mediaReaderType	Ljava/lang/String;
    //   29: aload_0
    //   30: aload_3
    //   31: putfield 118	com/wowza/wms/mediareader/flv/MediaReaderFLV:mediaReaderExt	Ljava/lang/String;
    //   34: aload_0
    //   35: aload 4
    //   37: putfield 136	com/wowza/wms/mediareader/flv/MediaReaderFLV:basePath	Ljava/lang/String;
    //   40: aload_0
    //   41: aload 5
    //   43: putfield 138	com/wowza/wms/mediareader/flv/MediaReaderFLV:mediaName	Ljava/lang/String;
    //   46: aload_0
    //   47: dup
    //   48: getfield 120	com/wowza/wms/mediareader/flv/MediaReaderFLV:mediaReaderItem	Lcom/wowza/wms/stream/MediaReaderItem;
    //   51: invokevirtual 202	com/wowza/wms/stream/MediaReaderItem:getFileExtension	()Ljava/lang/String;
    //   54: putfield 140	com/wowza/wms/mediareader/flv/MediaReaderFLV:mediaExtension	Ljava/lang/String;
    //   57: aload_0
    //   58: dup
    //   59: getfield 176	com/wowza/wms/mediareader/flv/MediaReaderFLV:appInstance	Lcom/wowza/wms/application/IApplicationInstance;
    //   62: aload_0
    //   63: getfield 174	com/wowza/wms/mediareader/flv/MediaReaderFLV:randomAccessReaderClass	Ljava/lang/String;
    //   66: aload_0
    //   67: getfield 136	com/wowza/wms/mediareader/flv/MediaReaderFLV:basePath	Ljava/lang/String;
    //   70: aload_0
    //   71: getfield 138	com/wowza/wms/mediareader/flv/MediaReaderFLV:mediaName	Ljava/lang/String;
    //   74: aload_0
    //   75: getfield 140	com/wowza/wms/mediareader/flv/MediaReaderFLV:mediaExtension	Ljava/lang/String;
    //   78: aload_0
    //   79: getfield 96	com/wowza/wms/mediareader/flv/MediaReaderFLV:stream	Lcom/wowza/wms/stream/IMediaStream;
    //   82: invokestatic 208	com/wowza/io/RandomAccessReaderFactory:createInstance	(Lcom/wowza/wms/application/IApplicationInstance;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/wowza/wms/stream/IMediaStream;)Lcom/wowza/io/IRandomAccessReader;
    //   85: putfield 78	com/wowza/wms/mediareader/flv/MediaReaderFLV:fileStream	Lcom/wowza/io/IRandomAccessReader;
    //   88: aload_0
    //   89: new 210	com/wowza/io/ScheduledRandomAccessReaderWrapper
    //   92: dup
    //   93: aload_0
    //   94: getfield 96	com/wowza/wms/mediareader/flv/MediaReaderFLV:stream	Lcom/wowza/wms/stream/IMediaStream;
    //   97: aload_0
    //   98: getfield 78	com/wowza/wms/mediareader/flv/MediaReaderFLV:fileStream	Lcom/wowza/io/IRandomAccessReader;
    //   101: aload_0
    //   102: getfield 168	com/wowza/wms/mediareader/flv/MediaReaderFLV:readAheadSize	I
    //   105: aload_0
    //   106: getfield 170	com/wowza/wms/mediareader/flv/MediaReaderFLV:readAheadTrigger	I
    //   109: invokespecial 213	com/wowza/io/ScheduledRandomAccessReaderWrapper:<init>	(Lcom/wowza/wms/stream/IMediaStream;Lcom/wowza/io/IRandomAccessReader;II)V
    //   112: putfield 80	com/wowza/wms/mediareader/flv/MediaReaderFLV:fileReader	Lcom/wowza/io/ScheduledRandomAccessReaderWrapper;
    //   115: aload_0
    //   116: dup
    //   117: getfield 80	com/wowza/wms/mediareader/flv/MediaReaderFLV:fileReader	Lcom/wowza/io/ScheduledRandomAccessReaderWrapper;
    //   120: putfield 159	com/wowza/wms/mediareader/flv/MediaReaderFLV:directWriter	Lcom/wowza/io/IRandomAccessWriter;
    //   123: aload_1
    //   124: aload_0
    //   125: aload_2
    //   126: invokeinterface 219 3 0
    //   131: return
    //   132: aload_2
    //   133: goto -115 -> 18
    //   136: aload_0
    //   137: getfield 98	com/wowza/wms/mediareader/flv/MediaReaderFLV:lock	Ljava/lang/Object;
    //   140: goto -122 -> 18
    // Line number table:
    //   Java source line #151	-> byte code offset #0
    //   Java source line #152	-> byte code offset #5
    //   Java source line #153	-> byte code offset #10
    //   Java source line #154	-> byte code offset #21
    //   Java source line #155	-> byte code offset #29
    //   Java source line #156	-> byte code offset #34
    //   Java source line #157	-> byte code offset #40
    //   Java source line #158	-> byte code offset #46
    //   Java source line #160	-> byte code offset #57
    //   Java source line #161	-> byte code offset #88
    //   Java source line #162	-> byte code offset #115
    //   Java source line #164	-> byte code offset #123
    //   Java source line #165	-> byte code offset #131
    //   Java source line #153	-> byte code offset #132
  }
  
  /* Error */
  public void open(String arg1, String arg2)
  {
    // Byte code:
    //   0: aload_0
    //   1: getfield 98	com/wowza/wms/mediareader/flv/MediaReaderFLV:lock	Ljava/lang/Object;
    //   4: dup
    //   5: astore_3
    //   6: goto +348 -> 354
    //   9: aload 6
    //   11: athrow
    //   12: astore 6
    //   14: aload_3
    //   15: monitorexit
    //   16: goto -7 -> 9
    //   19: aload_0
    //   20: getfield 78	com/wowza/wms/mediareader/flv/MediaReaderFLV:fileStream	Lcom/wowza/io/IRandomAccessReader;
    //   23: invokeinterface 231 1 0
    //   28: ifeq +206 -> 234
    //   31: goto +93 -> 124
    //   34: ldc 2
    //   36: invokestatic 237	com/wowza/wms/logging/WMSLoggerFactory:getLogger	(Ljava/lang/Class;)Lcom/wowza/wms/logging/WMSLogger;
    //   39: getstatic 243	org/apache/log4j/Level:WARN	Lorg/apache/log4j/Level;
    //   42: new 245	java/lang/StringBuilder
    //   45: dup
    //   46: invokespecial 246	java/lang/StringBuilder:<init>	()V
    //   49: bipush 45
    //   51: bipush 51
    //   53: swap
    //   54: imul
    //   55: ldc -8
    //   57: invokestatic 106	com/wowza/util/Base64:endsWith	(ILjava/lang/String;)Ljava/lang/String;
    //   60: invokevirtual 252	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   63: aload 5
    //   65: invokevirtual 255	java/lang/Exception:toString	()Ljava/lang/String;
    //   68: invokevirtual 252	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   71: invokevirtual 256	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   74: aconst_null
    //   75: bipush 11
    //   77: bipush 25
    //   79: imul
    //   80: ldc_w 258
    //   83: invokestatic 106	com/wowza/util/Base64:endsWith	(ILjava/lang/String;)Ljava/lang/String;
    //   86: ldc_w 260
    //   89: sipush 404
    //   92: aload_2
    //   93: invokevirtual 266	com/wowza/wms/logging/WMSLogger:log	(Lorg/apache/log4j/Level;Ljava/lang/String;Lcom/wowza/wms/stream/IMediaStream;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;)V
    //   96: goto +20 -> 116
    //   99: aload_3
    //   100: monitorexit
    //   101: goto +250 -> 351
    //   104: invokevirtual 252	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   107: invokevirtual 256	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   110: invokevirtual 270	com/wowza/wms/logging/WMSLogger:warn	(Ljava/lang/String;)V
    //   113: goto -14 -> 99
    //   116: aload_0
    //   117: iconst_1
    //   118: putfield 94	com/wowza/wms/mediareader/flv/MediaReaderFLV:errorReported	Z
    //   121: goto +119 -> 240
    //   124: aload_0
    //   125: invokevirtual 273	com/wowza/wms/mediareader/flv/MediaReaderFLV:close	()V
    //   128: goto +106 -> 234
    //   131: iload 5
    //   133: ifne -34 -> 99
    //   136: goto +176 -> 312
    //   139: astore 5
    //   141: aload_0
    //   142: getfield 94	com/wowza/wms/mediareader/flv/MediaReaderFLV:errorReported	Z
    //   145: ifne -29 -> 116
    //   148: goto -114 -> 34
    //   151: aload_0
    //   152: getfield 96	com/wowza/wms/mediareader/flv/MediaReaderFLV:stream	Lcom/wowza/wms/stream/IMediaStream;
    //   155: invokeinterface 276 1 0
    //   160: goto -56 -> 104
    //   163: ldc_w 278
    //   166: bipush 25
    //   168: bipush 13
    //   170: imul
    //   171: invokestatic 116	com/wowza/util/JSON:copyValueOf	(Ljava/lang/String;I)Ljava/lang/String;
    //   174: goto -70 -> 104
    //   177: aload_0
    //   178: getfield 176	com/wowza/wms/mediareader/flv/MediaReaderFLV:appInstance	Lcom/wowza/wms/application/IApplicationInstance;
    //   181: aload_0
    //   182: dup
    //   183: getfield 96	com/wowza/wms/mediareader/flv/MediaReaderFLV:stream	Lcom/wowza/wms/stream/IMediaStream;
    //   186: invokeinterface 281 3 0
    //   191: aload_0
    //   192: dup
    //   193: getfield 80	com/wowza/wms/mediareader/flv/MediaReaderFLV:fileReader	Lcom/wowza/io/ScheduledRandomAccessReaderWrapper;
    //   196: invokevirtual 285	com/wowza/wms/mediareader/flv/MediaReaderFLV:readMetadata	(Lcom/wowza/io/IRandomAccessReader;)Z
    //   199: istore 5
    //   201: aload_0
    //   202: dup
    //   203: getfield 80	com/wowza/wms/mediareader/flv/MediaReaderFLV:fileReader	Lcom/wowza/io/ScheduledRandomAccessReaderWrapper;
    //   206: invokevirtual 289	com/wowza/wms/mediareader/flv/MediaReaderFLV:readCodecConfig	(Lcom/wowza/io/IRandomAccessReader;)V
    //   209: aload_0
    //   210: getfield 176	com/wowza/wms/mediareader/flv/MediaReaderFLV:appInstance	Lcom/wowza/wms/application/IApplicationInstance;
    //   213: aload_0
    //   214: dup
    //   215: getfield 96	com/wowza/wms/mediareader/flv/MediaReaderFLV:stream	Lcom/wowza/wms/stream/IMediaStream;
    //   218: invokeinterface 292 3 0
    //   223: iload 4
    //   225: ifeq -126 -> 99
    //   228: goto -97 -> 131
    //   231: goto +9 -> 240
    //   234: iconst_0
    //   235: istore 4
    //   237: goto +13 -> 250
    //   240: aload_0
    //   241: getfield 80	com/wowza/wms/mediareader/flv/MediaReaderFLV:fileReader	Lcom/wowza/io/ScheduledRandomAccessReaderWrapper;
    //   244: ifnull -145 -> 99
    //   247: goto -70 -> 177
    //   250: aload_0
    //   251: getfield 78	com/wowza/wms/mediareader/flv/MediaReaderFLV:fileStream	Lcom/wowza/io/IRandomAccessReader;
    //   254: invokeinterface 294 1 0
    //   259: aload_0
    //   260: getfield 80	com/wowza/wms/mediareader/flv/MediaReaderFLV:fileReader	Lcom/wowza/io/ScheduledRandomAccessReaderWrapper;
    //   263: invokevirtual 295	com/wowza/io/ScheduledRandomAccessReaderWrapper:open	()V
    //   266: aload_0
    //   267: iconst_0
    //   268: putfield 94	com/wowza/wms/mediareader/flv/MediaReaderFLV:errorReported	Z
    //   271: aload_0
    //   272: lconst_0
    //   273: putfield 122	com/wowza/wms/mediareader/flv/MediaReaderFLV:saveLastVideoPos	J
    //   276: aload_0
    //   277: lconst_0
    //   278: putfield 124	com/wowza/wms/mediareader/flv/MediaReaderFLV:saveLastAudioPos	J
    //   281: aload_0
    //   282: lconst_0
    //   283: putfield 126	com/wowza/wms/mediareader/flv/MediaReaderFLV:saveLastBroadcastPos	J
    //   286: aload_0
    //   287: ldc2_w 141
    //   290: putfield 144	com/wowza/wms/mediareader/flv/MediaReaderFLV:duration	J
    //   293: aload_0
    //   294: ldc2_w 160
    //   297: putfield 163	com/wowza/wms/mediareader/flv/MediaReaderFLV:firstPacketLoc	J
    //   300: aload_0
    //   301: bipush 8
    //   303: putfield 165	com/wowza/wms/mediareader/flv/MediaReaderFLV:firstPacketType	B
    //   306: iconst_1
    //   307: istore 4
    //   309: goto -78 -> 231
    //   312: ldc 2
    //   314: invokestatic 237	com/wowza/wms/logging/WMSLoggerFactory:getLogger	(Ljava/lang/Class;)Lcom/wowza/wms/logging/WMSLogger;
    //   317: new 245	java/lang/StringBuilder
    //   320: dup
    //   321: invokespecial 246	java/lang/StringBuilder:<init>	()V
    //   324: sipush 946
    //   327: sipush 205
    //   330: idiv
    //   331: ldc_w 297
    //   334: invokestatic 106	com/wowza/util/Base64:endsWith	(ILjava/lang/String;)Ljava/lang/String;
    //   337: invokevirtual 252	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   340: aload_0
    //   341: getfield 96	com/wowza/wms/mediareader/flv/MediaReaderFLV:stream	Lcom/wowza/wms/stream/IMediaStream;
    //   344: ifnonnull -193 -> 151
    //   347: goto -184 -> 163
    //   350: return
    //   351: goto -1 -> 350
    //   354: monitorenter
    //   355: goto -336 -> 19
    // Line number table:
    //   Java source line #169	-> byte code offset #0
    //   Java source line #213	-> byte code offset #9
    //   Java source line #171	-> byte code offset #19
    //   Java source line #195	-> byte code offset #34
    //   Java source line #213	-> byte code offset #99
    //   Java source line #209	-> byte code offset #104
    //   Java source line #198	-> byte code offset #116
    //   Java source line #172	-> byte code offset #124
    //   Java source line #208	-> byte code offset #131
    //   Java source line #191	-> byte code offset #139
    //   Java source line #193	-> byte code offset #141
    //   Java source line #209	-> byte code offset #151
    //   Java source line #203	-> byte code offset #177
    //   Java source line #204	-> byte code offset #191
    //   Java source line #205	-> byte code offset #201
    //   Java source line #206	-> byte code offset #209
    //   Java source line #208	-> byte code offset #223
    //   Java source line #199	-> byte code offset #231
    //   Java source line #174	-> byte code offset #234
    //   Java source line #201	-> byte code offset #240
    //   Java source line #177	-> byte code offset #250
    //   Java source line #178	-> byte code offset #259
    //   Java source line #179	-> byte code offset #266
    //   Java source line #181	-> byte code offset #271
    //   Java source line #182	-> byte code offset #276
    //   Java source line #183	-> byte code offset #281
    //   Java source line #184	-> byte code offset #286
    //   Java source line #185	-> byte code offset #293
    //   Java source line #186	-> byte code offset #300
    //   Java source line #188	-> byte code offset #306
    //   Java source line #209	-> byte code offset #312
    //   Java source line #214	-> byte code offset #350
    //   Java source line #213	-> byte code offset #351
    //   Java source line #169	-> byte code offset #354
    // Exception table:
    //   from	to	target	type
    //   12	19	12	finally
    //   19	350	12	finally
    //   250	312	139	java/lang/Exception
  }
  
  /* Error */
  public void close()
  {
    // Byte code:
    //   0: aload_0
    //   1: getfield 98	com/wowza/wms/mediareader/flv/MediaReaderFLV:lock	Ljava/lang/Object;
    //   4: dup
    //   5: astore_1
    //   6: goto +178 -> 184
    //   9: aload_0
    //   10: getfield 80	com/wowza/wms/mediareader/flv/MediaReaderFLV:fileReader	Lcom/wowza/io/ScheduledRandomAccessReaderWrapper;
    //   13: ifnull +129 -> 142
    //   16: aload_0
    //   17: getfield 80	com/wowza/wms/mediareader/flv/MediaReaderFLV:fileReader	Lcom/wowza/io/ScheduledRandomAccessReaderWrapper;
    //   20: invokevirtual 300	com/wowza/io/ScheduledRandomAccessReaderWrapper:close	()V
    //   23: goto +119 -> 142
    //   26: astore_2
    //   27: ldc 2
    //   29: invokestatic 237	com/wowza/wms/logging/WMSLoggerFactory:getLogger	(Ljava/lang/Class;)Lcom/wowza/wms/logging/WMSLogger;
    //   32: bipush 123
    //   34: bipush 73
    //   36: iadd
    //   37: ldc_w 302
    //   40: invokestatic 106	com/wowza/util/Base64:endsWith	(ILjava/lang/String;)Ljava/lang/String;
    //   43: aload_2
    //   44: invokevirtual 306	com/wowza/wms/logging/WMSLogger:error	(Ljava/lang/String;Ljava/lang/Throwable;)V
    //   47: goto +101 -> 148
    //   50: aload_0
    //   51: getfield 149	com/wowza/wms/mediareader/flv/MediaReaderFLV:seekMap	Ljava/util/SortedMap;
    //   54: invokeinterface 311 1 0
    //   59: aload_0
    //   60: getfield 151	com/wowza/wms/mediareader/flv/MediaReaderFLV:keyframeMap	Ljava/util/SortedMap;
    //   63: invokeinterface 311 1 0
    //   68: aload_0
    //   69: aconst_null
    //   70: putfield 82	com/wowza/wms/mediareader/flv/MediaReaderFLV:metaData	Ljava/util/List;
    //   73: aload_0
    //   74: iconst_0
    //   75: putfield 84	com/wowza/wms/mediareader/flv/MediaReaderFLV:metaDataSize	I
    //   78: aload_0
    //   79: lconst_0
    //   80: putfield 122	com/wowza/wms/mediareader/flv/MediaReaderFLV:saveLastVideoPos	J
    //   83: aload_0
    //   84: lconst_0
    //   85: putfield 124	com/wowza/wms/mediareader/flv/MediaReaderFLV:saveLastAudioPos	J
    //   88: aload_0
    //   89: lconst_0
    //   90: putfield 126	com/wowza/wms/mediareader/flv/MediaReaderFLV:saveLastBroadcastPos	J
    //   93: aload_0
    //   94: ldc2_w 141
    //   97: putfield 144	com/wowza/wms/mediareader/flv/MediaReaderFLV:duration	J
    //   100: aload_0
    //   101: ldc2_w 160
    //   104: putfield 163	com/wowza/wms/mediareader/flv/MediaReaderFLV:firstPacketLoc	J
    //   107: aload_0
    //   108: bipush 8
    //   110: putfield 165	com/wowza/wms/mediareader/flv/MediaReaderFLV:firstPacketType	B
    //   113: aload_1
    //   114: monitorexit
    //   115: goto +79 -> 194
    //   118: astore_2
    //   119: ldc 2
    //   121: invokestatic 237	com/wowza/wms/logging/WMSLoggerFactory:getLogger	(Ljava/lang/Class;)Lcom/wowza/wms/logging/WMSLogger;
    //   124: bipush 48
    //   126: bipush 43
    //   128: isub
    //   129: ldc_w 313
    //   132: invokestatic 106	com/wowza/util/Base64:endsWith	(ILjava/lang/String;)Ljava/lang/String;
    //   135: aload_2
    //   136: invokevirtual 306	com/wowza/wms/logging/WMSLogger:error	(Ljava/lang/String;Ljava/lang/Throwable;)V
    //   139: goto -89 -> 50
    //   142: goto +6 -> 148
    //   145: goto -95 -> 50
    //   148: aload_0
    //   149: getfield 78	com/wowza/wms/mediareader/flv/MediaReaderFLV:fileStream	Lcom/wowza/io/IRandomAccessReader;
    //   152: ifnull -7 -> 145
    //   155: aload_0
    //   156: getfield 78	com/wowza/wms/mediareader/flv/MediaReaderFLV:fileStream	Lcom/wowza/io/IRandomAccessReader;
    //   159: invokeinterface 314 1 0
    //   164: goto -19 -> 145
    //   167: aload_0
    //   168: getfield 176	com/wowza/wms/mediareader/flv/MediaReaderFLV:appInstance	Lcom/wowza/wms/application/IApplicationInstance;
    //   171: aload_0
    //   172: dup
    //   173: getfield 96	com/wowza/wms/mediareader/flv/MediaReaderFLV:stream	Lcom/wowza/wms/stream/IMediaStream;
    //   176: invokeinterface 317 3 0
    //   181: return
    //   182: aload_3
    //   183: athrow
    //   184: monitorenter
    //   185: goto -176 -> 9
    //   188: astore_3
    //   189: aload_1
    //   190: monitorexit
    //   191: goto -9 -> 182
    //   194: goto -27 -> 167
    // Line number table:
    //   Java source line #218	-> byte code offset #0
    //   Java source line #222	-> byte code offset #9
    //   Java source line #223	-> byte code offset #16
    //   Java source line #225	-> byte code offset #26
    //   Java source line #227	-> byte code offset #27
    //   Java source line #239	-> byte code offset #50
    //   Java source line #240	-> byte code offset #59
    //   Java source line #241	-> byte code offset #68
    //   Java source line #242	-> byte code offset #73
    //   Java source line #243	-> byte code offset #78
    //   Java source line #244	-> byte code offset #83
    //   Java source line #245	-> byte code offset #88
    //   Java source line #246	-> byte code offset #93
    //   Java source line #247	-> byte code offset #100
    //   Java source line #248	-> byte code offset #107
    //   Java source line #249	-> byte code offset #113
    //   Java source line #234	-> byte code offset #118
    //   Java source line #236	-> byte code offset #119
    //   Java source line #228	-> byte code offset #142
    //   Java source line #237	-> byte code offset #145
    //   Java source line #231	-> byte code offset #148
    //   Java source line #232	-> byte code offset #155
    //   Java source line #251	-> byte code offset #167
    //   Java source line #252	-> byte code offset #181
    //   Java source line #249	-> byte code offset #182
    //   Java source line #218	-> byte code offset #184
    //   Java source line #249	-> byte code offset #188
    // Exception table:
    //   from	to	target	type
    //   9	26	26	java/lang/Exception
    //   148	167	118	java/lang/Exception
    //   9	167	188	finally
    //   188	194	188	finally
  }
  
  public void setProperties(WMSProperties paramWMSProperties)
  {
    seekBufferSize = paramWMSProperties.getPropertyInt(Base64.endsWith('?' / '�', "bipTmlaIykhjbB{iq"), seekBufferSize);
    readAheadSize = paramWMSProperties.getPropertyInt(Base64.endsWith(57 * 41, "gnuV`gcIaojh^guu"), readAheadSize);
    readAheadTrigger = (readAheadSize / 2);
    readAheadTrigger = paramWMSProperties.getPropertyInt(Base64.endsWith(23 * 9, ")<'\000651\027?=8>\017.498%3"), readAheadTrigger);
    randomAccessReaderClass = paramWMSProperties.getPropertyStr(JSON.copyValueOf("vdhcgdKhoh}|BtswqgU{yji", '?' / 68), randomAccessReaderClass);
    bufferSeekIO = paramWMSProperties.getPropertyBoolean(Base64.endsWith(17 * 9, "{o}zxlLediJK"), bufferSeekIO);
    bufferSeekIO = paramWMSProperties.getPropertyBoolean(JSON.copyValueOf("bipE}oln~^kj{X]", -59 - 33), bufferSeekIO);
    seekKeyFrameSearchWindow = paramWMSProperties.getPropertyInt(JSON.copyValueOf("xiheDuhTauxsD}xhxtJwq$.5", 19 * 9), seekKeyFrameSearchWindow);
    if (!WMSLoggerFactory.getLogger(MediaReaderFLV.class).isDebugEnabled()) {}
    for (;;)
    {
      return;WMSLoggerFactory.getLogger(MediaReaderFLV.class).debug(Base64.endsWith(43 * 31, "XssqxH~}y{m\006\r\024m\")0\025-(.\n$(/+\0038(6nu") + readAheadSize);WMSLoggerFactory.getLogger(MediaReaderFLV.class).debug(Base64.endsWith(-41 - -32, "\032==3:\0168?;esDOR+`k~[ojhLfjquFa}rqrj#:") + readAheadTrigger);WMSLoggerFactory.getLogger(MediaReaderFLV.class).debug(JSON.copyValueOf("I`bni[ojhh|I\\G<uxcEr}rXnz{{mShxf>%", '?' / '�') + seekBufferSize);WMSLoggerFactory.getLogger(MediaReaderFLV.class).debug(Base64.endsWith('?' / '?', "NaaofZlkoiHCF?`rzqyzYzy~onLzaegqGigt{3*") + randomAccessReaderClass);WMSLoggerFactory.getLogger(MediaReaderFLV.class).debug(JSON.copyValueOf("\\ww}tDry}iZQH1btdeawUbmbCD6-", 41 * 41) + bufferSeekIO);
    }
  }
  
  public void setMediaReaderItem(MediaReaderItem paramMediaReaderItem)
  {
    mediaReaderItem = paramMediaReaderItem;
  }
  
  public boolean isOpen()
  {
    if (fileStream == null) {
      return false;
    }
    return fileStream.isOpen();
  }
  
  protected void indexFileExpand(MediaReaderFLVNodeData paramMediaReaderFLVNodeData, IRandomAccessReader paramIRandomAccessReader, long paramLong)
  {
    indexFile(paramMediaReaderFLVNodeData, paramIRandomAccessReader, (int)(paramLong / 1000L));
  }
  
  protected void indexFile(MediaReaderFLVNodeData paramMediaReaderFLVNodeData, IRandomAccessReader paramIRandomAccessReader, int paramInt)
  {
    MediaStreamIndex localMediaStreamIndex = paramMediaReaderFLVNodeData.getMediaStreamIndex();
    if (!localMediaStreamIndex.isHitEnd())
    {
      if (paramInt == -1) {
        break label27;
      }
      break label477;
    }
    for (;;)
    {
      return;return;
      try
      {
        label27:
        label54:
        label185:
        label239:
        label291:
        label301:
        label316:
        label327:
        label351:
        label361:
        label370:
        label380:
        label432:
        label460:
        label462:
        label477:
        do
        {
          if (paramInt != -1) {
            break label301;
          }
          int m;
          byte[] arrayOfByte;
          int i1;
          int i2;
          long l3;
          long l4;
          int j;
          long l2;
          for (;;)
          {
            int n;
            if (k != 0)
            {
              break label291;
              Object localObject1;
              paramIRandomAccessReader.seek(localObject1);
              break;
              Object localObject2;
              long l6 = localObject2;
              long l1;
              localObject1 += m;
              
              n = arrayOfByte[0] & 0xFF;
              i1 = arrayOfByte[1] & 0xFF;
              i1 <<= 8;
              i1 |= arrayOfByte[2] & 0xFF;
              i1 <<= 8;
              i1 |= arrayOfByte[3] & 0xFF;
              i2 = arrayOfByte[4] & 0xFF;
              i2 <<= 8;
              i2 |= arrayOfByte[5] & 0xFF;
              i2 <<= 8;
              i2 |= arrayOfByte[6] & 0xFF;
              if (i1 <= 0) {
                break label432;
              }
              break label351;
              paramIRandomAccessReader.seek(l1);
              l3 = paramIRandomAccessReader.length();
              
              arrayOfByte = new byte[8];
              k = 0;
              
              l4 = l1;
              
              l6 = 0L; break;
              for (;;)
              {
                l1 = 13L;
                j = 0;
                if (localMediaStreamIndex.getLength() <= 0) {
                  break label185;
                }
                break label327;
                if (j <= paramInt) {
                  break label460;
                }
                break label316;
                int i = localMediaStreamIndex.getLength();
                i += 500;
                localMediaStreamIndex.indexFileIncSize(i); continue;
                for (;;)
                {
                  tmp273_271 = localMediaStreamIndex;tmp273_271.indexFileSet(tmp273_271.getLength(), l6);
                  break label361;
                  k = 1;
                  break;
                  if (l6 <= 0L) {
                    break label361;
                  }
                }
                i = paramInt + 1;
                localMediaStreamIndex.indexFileIncSize(i);
              }
            }
            for (;;)
            {
              localMediaStreamIndex.indexFileShrink();
              break label499;
              j = localMediaStreamIndex.getLength() - 1;
              l2 = localMediaStreamIndex.get(j);
              j++; break;
              if (n == 8) {
                break label462;
              }
              break label370;
              localMediaStreamIndex.setHitEnd(true);
            }
            if (n != 9) {
              break label432;
            }
            break label462;
            int k = 1;
          }
          for (;;)
          {
            Object localObject3;
            localMediaStreamIndex.indexFileSet(j, localObject3);
            j++;
            break label462;
            l5 = l4;
            l4 = l2;
            m = paramIRandomAccessReader.read(arrayOfByte, 0, 7);
            if (m == 7) {
              break label54;
            }
            for (; i2 <= j * 1000; goto 43)
            {
              long l5;
              l2 += i1 + 8;
              if (l2 >= l3) {
                break label380;
              }
              if (paramInt == -1) {
                break;
              }
              break label239;
            }
          }
          return;
        } while (localMediaStreamIndex.getLength() <= paramInt);
      }
      catch (Exception localException)
      {
        label499:
        for (;;)
        {
          localException.printStackTrace();
        }
      }
    }
  }
  
  public int sendVideoTrakData(int paramInt, boolean paramBoolean1, IMediaStream paramIMediaStream, OutputStream paramOutputStream, AMFObj paramAMFObj, PlaylistCursor paramPlaylistCursor, PlaylistWriteControl paramPlaylistWriteControl, PlaylistReaderWriteResults paramPlaylistReaderWriteResults, long[] paramArrayOfLong, boolean paramBoolean2, long paramLong)
  {
    int i = 0;
    if (videoCodecConfig == null) {}
    for (;;)
    {
      return i;int j = paramPlaylistCursor.getWriteControl().getChunkSize();checkWorkBuffer(j);int[] arrayOfInt = new int[5];arrayOfInt[1] = videoCodecConfig.length;arrayOfInt[2] = paramInt;arrayOfInt[0] = 9;int k = directOutputBuf(arrayOfInt, paramBoolean1, paramIMediaStream.getSrc(), paramOutputStream, paramAMFObj, chunkWorkBuffer, j, videoCodecConfig);i += k;paramArrayOfLong[2] += k;paramArrayOfLong[3] += 1L;
    }
  }
  
  public int sendAudioTrakData(int paramInt, boolean paramBoolean1, IMediaStream paramIMediaStream, OutputStream paramOutputStream, AMFObj paramAMFObj, PlaylistCursor paramPlaylistCursor, PlaylistWriteControl paramPlaylistWriteControl, PlaylistReaderWriteResults paramPlaylistReaderWriteResults, long[] paramArrayOfLong, boolean paramBoolean2, long paramLong)
  {
    int i = 0;
    if (audioCodecConfig == null) {}
    for (;;)
    {
      return i;int j = paramPlaylistCursor.getWriteControl().getChunkSize();checkWorkBuffer(j);int[] arrayOfInt = new int[5];arrayOfInt[1] = audioCodecConfig.length;arrayOfInt[2] = paramInt;arrayOfInt[0] = 8;int k = directOutputBuf(arrayOfInt, paramBoolean1, paramIMediaStream.getSrc(), paramOutputStream, paramAMFObj, chunkWorkBuffer, j, audioCodecConfig);i += k;paramArrayOfLong[0] += k;paramArrayOfLong[1] += 1L;
    }
  }
  
  /* Error */
  protected void readCodecConfig(IRandomAccessReader arg1)
  {
    // Byte code:
    //   0: aload_1
    //   1: invokeinterface 454 1 0
    //   6: lstore_2
    //   7: goto +23 -> 30
    //   10: aload_1
    //   11: lload_2
    //   12: invokeinterface 392 3 0
    //   17: aload 11
    //   19: athrow
    //   20: aload_1
    //   21: lload_2
    //   22: invokeinterface 392 3 0
    //   27: goto +402 -> 429
    //   30: iconst_0
    //   31: istore 4
    //   33: iconst_0
    //   34: istore 5
    //   36: iconst_0
    //   37: istore 6
    //   39: bipush 13
    //   41: newarray <illegal type>
    //   43: astore 7
    //   45: iconst_5
    //   46: newarray <illegal type>
    //   48: astore 8
    //   50: aload_0
    //   51: aconst_null
    //   52: putfield 180	com/wowza/wms/mediareader/flv/MediaReaderFLV:videoCodecConfig	[B
    //   55: aload_0
    //   56: aconst_null
    //   57: putfield 182	com/wowza/wms/mediareader/flv/MediaReaderFLV:audioCodecConfig	[B
    //   60: goto +55 -> 115
    //   63: iinc 5 1
    //   66: goto +271 -> 337
    //   69: aload 8
    //   71: iconst_4
    //   72: iaload
    //   73: ifne +215 -> 288
    //   76: goto +6 -> 82
    //   79: goto -59 -> 20
    //   82: aload_0
    //   83: aload 8
    //   85: iconst_1
    //   86: iaload
    //   87: newarray <illegal type>
    //   89: putfield 182	com/wowza/wms/mediareader/flv/MediaReaderFLV:audioCodecConfig	[B
    //   92: aload_1
    //   93: aload_0
    //   94: getfield 182	com/wowza/wms/mediareader/flv/MediaReaderFLV:audioCodecConfig	[B
    //   97: iconst_0
    //   98: aload_0
    //   99: getfield 182	com/wowza/wms/mediareader/flv/MediaReaderFLV:audioCodecConfig	[B
    //   102: arraylength
    //   103: invokeinterface 423 4 0
    //   108: pop
    //   109: iconst_1
    //   110: istore 9
    //   112: goto +176 -> 288
    //   115: iconst_0
    //   116: istore 9
    //   118: aload_0
    //   119: aload_1
    //   120: aload 7
    //   122: aload 8
    //   124: invokevirtual 458	com/wowza/wms/mediareader/flv/MediaReaderFLV:readChunkHeader	(Lcom/wowza/io/IRandomAccessReader;[B[I)V
    //   127: aload 8
    //   129: iconst_0
    //   130: iaload
    //   131: bipush 127
    //   133: if_icmpne +6 -> 139
    //   136: goto -57 -> 79
    //   139: aload 8
    //   141: iconst_1
    //   142: iaload
    //   143: iconst_2
    //   144: if_icmplt +97 -> 241
    //   147: goto +144 -> 291
    //   150: aload 8
    //   152: iconst_3
    //   153: iaload
    //   154: invokestatic 464	com/wowza/util/FLVUtils:getAudioCodec	(I)I
    //   157: istore 10
    //   159: iload 10
    //   161: bipush 10
    //   163: if_icmpne +125 -> 288
    //   166: goto +108 -> 274
    //   169: iinc 6 1
    //   172: goto +165 -> 337
    //   175: aload 8
    //   177: iconst_3
    //   178: iaload
    //   179: invokestatic 467	com/wowza/util/FLVUtils:getVideoCodec	(I)I
    //   182: istore 10
    //   184: iload 10
    //   186: bipush 7
    //   188: if_icmpne +53 -> 241
    //   191: goto +168 -> 359
    //   194: aload_0
    //   195: aload 8
    //   197: iconst_1
    //   198: iaload
    //   199: newarray <illegal type>
    //   201: putfield 180	com/wowza/wms/mediareader/flv/MediaReaderFLV:videoCodecConfig	[B
    //   204: aload_1
    //   205: aload_0
    //   206: getfield 180	com/wowza/wms/mediareader/flv/MediaReaderFLV:videoCodecConfig	[B
    //   209: iconst_0
    //   210: aload_0
    //   211: getfield 180	com/wowza/wms/mediareader/flv/MediaReaderFLV:videoCodecConfig	[B
    //   214: arraylength
    //   215: invokeinterface 423 4 0
    //   220: pop
    //   221: iconst_1
    //   222: istore 9
    //   224: goto +17 -> 241
    //   227: iload 6
    //   229: ifgt -209 -> 20
    //   232: goto +149 -> 381
    //   235: iinc 5 -1
    //   238: goto +111 -> 349
    //   241: aload_0
    //   242: aload 8
    //   244: iload 9
    //   246: iconst_1
    //   247: iconst_1
    //   248: invokevirtual 471	com/wowza/wms/mediareader/flv/MediaReaderFLV:skipPacket	([IZZI)Z
    //   251: pop
    //   252: iload 4
    //   254: bipush 10
    //   256: if_icmpge -236 -> 20
    //   259: goto +114 -> 373
    //   262: aload 8
    //   264: iconst_0
    //   265: iaload
    //   266: bipush 9
    //   268: if_icmpne -27 -> 241
    //   271: goto -96 -> 175
    //   274: aload 8
    //   276: iconst_1
    //   277: iaload
    //   278: iconst_2
    //   279: if_icmplt +9 -> 288
    //   282: goto -213 -> 69
    //   285: goto -170 -> 115
    //   288: goto -47 -> 241
    //   291: iinc 4 1
    //   294: aload 8
    //   296: iconst_0
    //   297: iaload
    //   298: lookupswitch	default:+39->337, 8:+-129->169, 9:+-235->63
    //   324: nop
    //   325: nop
    //   326: athrow
    //   327: aload_0
    //   328: getfield 180	com/wowza/wms/mediareader/flv/MediaReaderFLV:videoCodecConfig	[B
    //   331: ifnull -46 -> 285
    //   334: goto -107 -> 227
    //   337: aload 8
    //   339: iconst_0
    //   340: iaload
    //   341: bipush 8
    //   343: if_icmpne -81 -> 262
    //   346: goto -196 -> 150
    //   349: aload 8
    //   351: iconst_4
    //   352: iaload
    //   353: ifne -112 -> 241
    //   356: goto -162 -> 194
    //   359: aload 8
    //   361: iconst_4
    //   362: iaload
    //   363: iconst_1
    //   364: if_icmpeq -15 -> 349
    //   367: goto -132 -> 235
    //   370: goto -350 -> 20
    //   373: iload 5
    //   375: ifgt -148 -> 227
    //   378: goto -51 -> 327
    //   381: aload_0
    //   382: getfield 182	com/wowza/wms/mediareader/flv/MediaReaderFLV:audioCodecConfig	[B
    //   385: ifnull -100 -> 285
    //   388: goto -18 -> 370
    //   391: aload_1
    //   392: lload_2
    //   393: invokeinterface 392 3 0
    //   398: goto +31 -> 429
    //   401: astore 4
    //   403: ldc 2
    //   405: invokestatic 237	com/wowza/wms/logging/WMSLoggerFactory:getLogger	(Ljava/lang/Class;)Lcom/wowza/wms/logging/WMSLogger;
   
1 2 3 4 5 6 7 8 9 10 11

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2019. Infinite Loop Ltd