test_class.file: domain/src/test/java/org/m4m/domain/MultipleMediaSourceTest.java
test_class.identifier: MultipleMediaSourceTest
test_class.superclass: extends TestBase
test_case.body: @Test
      public void getSegmentsDurationForTwoFiles() throws RuntimeException {
          MediaSource trackWithAudioDuration100 = create.mediaSource().with(
                  create.audioFormat().withDuration(100).construct())
              .construct();
          MediaSource trackWithAudioDuration200 = create.mediaSource().with(
              create.audioFormat().withDuration(200).construct())
              .construct();
  
          MultipleMediaSource multipleMediaSource=create.multipleMediaSource()
              .with(trackWithAudioDuration100)
              .with(trackWithAudioDuration200)
              .construct();
  
          assertEquals(300, multipleMediaSource.getSegmentsDurationInMicroSec());
      }
test_case.class_method_signature: MultipleMediaSourceTest.getSegmentsDurationForTwoFiles()
test_case.full_signature: @Test public void getSegmentsDurationForTwoFiles()
test_case.identifier: getSegmentsDurationForTwoFiles
test_case.invocations: construct with mediaSource construct withDuration audioFormat construct with mediaSource construct withDuration audioFormat construct with with multipleMediaSource assertEquals getSegmentsDurationInMicroSec
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void getSegmentsDurationForTwoFiles()
focal_class.declarator: mediaFiles = new LinkedList<MediaFile>()
focal_class.modifier: private
focal_class.original_string: private LinkedList<MediaFile> mediaFiles = new LinkedList<MediaFile>();
focal_class.type: LinkedList<MediaFile>
focal_class.var_name: mediaFiles
focal_class.declarator: mediaFileIterator = null
focal_class.modifier: private
focal_class.original_string: private Iterator<MediaFile> mediaFileIterator = null;
focal_class.type: Iterator<MediaFile>
focal_class.var_name: mediaFileIterator
focal_class.declarator: currentMediaFile = null
focal_class.modifier: private
focal_class.original_string: private MediaFile currentMediaFile = null;
focal_class.type: MediaFile
focal_class.var_name: currentMediaFile
focal_class.declarator: sampleTimeOffsets = new Hashtable<Integer, Long>()
focal_class.modifier: private
focal_class.original_string: private Hashtable<Integer, Long> sampleTimeOffsets = new Hashtable<Integer, Long>();
focal_class.type: Hashtable<Integer, Long>
focal_class.var_name: sampleTimeOffsets
focal_class.declarator: currentSampleTimes = new Hashtable<Integer, Long>()
focal_class.modifier: private
focal_class.original_string: private Hashtable<Integer, Long> currentSampleTimes = new Hashtable<Integer, Long>();
focal_class.type: Hashtable<Integer, Long>
focal_class.var_name: currentSampleTimes
focal_class.declarator: commandQueue = new CommandQueue()
focal_class.modifier: private
focal_class.original_string: private CommandQueue commandQueue = new CommandQueue();
focal_class.type: CommandQueue
focal_class.var_name: commandQueue
focal_class.declarator: isLastFile = true
focal_class.modifier: private
focal_class.original_string: private boolean isLastFile = true;
focal_class.type: boolean
focal_class.var_name: isLastFile
focal_class.declarator: connectedPluginsCount = 0
focal_class.modifier: private
focal_class.original_string: private int connectedPluginsCount = 0;
focal_class.type: int
focal_class.var_name: connectedPluginsCount
focal_class.declarator: nextFileRequest = 0
focal_class.modifier: private
focal_class.original_string: private int nextFileRequest = 0;
focal_class.type: int
focal_class.var_name: nextFileRequest
focal_class.declarator: trackIdMap = new Hashtable<Integer, Integer>()
focal_class.modifier: private
focal_class.original_string: private Dictionary<Integer, Integer> trackIdMap = new Hashtable<Integer, Integer>();
focal_class.type: Dictionary<Integer, Integer>
focal_class.var_name: trackIdMap
focal_class.file: domain/src/main/java/org/m4m/domain/MultipleMediaSource.java
focal_class.identifier: MultipleMediaSource
focal_class.interfaces: implements IMediaSource
focal_class.class_method_signature: MultipleMediaSource.getOutputCommandQueue()
focal_class.full_signature: @Override public CommandQueue getOutputCommandQueue()
focal_class.identifier: getOutputCommandQueue
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: CommandQueue
focal_class.signature: CommandQueue getOutputCommandQueue()
focal_class.class_method_signature: MultipleMediaSource.fillCommandQueues()
focal_class.full_signature: @Override public void fillCommandQueues()
focal_class.identifier: fillCommandQueues
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void fillCommandQueues()
focal_class.class_method_signature: MultipleMediaSource.close()
focal_class.full_signature: @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.class_method_signature: MultipleMediaSource.pull(Frame frame)
focal_class.full_signature: @Override public void pull(Frame frame)
focal_class.identifier: pull
focal_class.modifiers: @Override public
focal_class.parameters: (Frame frame)
focal_class.return: void
focal_class.signature: void pull(Frame frame)
focal_class.class_method_signature: MultipleMediaSource.nextFile()
focal_class.full_signature: public void nextFile()
focal_class.identifier: nextFile
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void nextFile()
focal_class.class_method_signature: MultipleMediaSource.getMediaFormatByType(MediaFormatType mediaFormatType)
focal_class.full_signature: @Override public MediaFormat getMediaFormatByType(MediaFormatType mediaFormatType)
focal_class.identifier: getMediaFormatByType
focal_class.modifiers: @Override public
focal_class.parameters: (MediaFormatType mediaFormatType)
focal_class.return: MediaFormat
focal_class.signature: MediaFormat getMediaFormatByType(MediaFormatType mediaFormatType)
focal_class.class_method_signature: MultipleMediaSource.pullFrameFromMediaSource(Frame frame)
focal_class.full_signature: private void pullFrameFromMediaSource(Frame frame)
focal_class.identifier: pullFrameFromMediaSource
focal_class.modifiers: private
focal_class.parameters: (Frame frame)
focal_class.return: void
focal_class.signature: void pullFrameFromMediaSource(Frame frame)
focal_class.class_method_signature: MultipleMediaSource.mapTrackId(int sourceTrackId)
focal_class.full_signature: private int mapTrackId(int sourceTrackId)
focal_class.identifier: mapTrackId
focal_class.modifiers: private
focal_class.parameters: (int sourceTrackId)
focal_class.return: int
focal_class.signature: int mapTrackId(int sourceTrackId)
focal_class.class_method_signature: MultipleMediaSource.safeGet(Long value)
focal_class.full_signature: private long safeGet(Long value)
focal_class.identifier: safeGet
focal_class.modifiers: private
focal_class.parameters: (Long value)
focal_class.return: long
focal_class.signature: long safeGet(Long value)
focal_class.class_method_signature: MultipleMediaSource.switchToNextFile()
focal_class.full_signature: private void switchToNextFile()
focal_class.identifier: switchToNextFile
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void switchToNextFile()
focal_class.class_method_signature: MultipleMediaSource.isLastFrame()
focal_class.full_signature: private boolean isLastFrame()
focal_class.identifier: isLastFrame
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isLastFrame()
focal_class.class_method_signature: MultipleMediaSource.isLastFile()
focal_class.full_signature: public boolean isLastFile()
focal_class.identifier: isLastFile
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isLastFile()
focal_class.class_method_signature: MultipleMediaSource.incrementConnectedPluginsCount()
focal_class.full_signature: @Override public void incrementConnectedPluginsCount()
focal_class.identifier: incrementConnectedPluginsCount
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void incrementConnectedPluginsCount()
focal_class.class_method_signature: MultipleMediaSource.start()
focal_class.full_signature: @Override public void start()
focal_class.identifier: start
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void start()
focal_class.class_method_signature: MultipleMediaSource.files()
focal_class.full_signature: public List<MediaFile> files()
focal_class.identifier: files
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<MediaFile>
focal_class.signature: List<MediaFile> files()
focal_class.class_method_signature: MultipleMediaSource.add(MediaFile mediaFile)
focal_class.full_signature: public void add(MediaFile mediaFile)
focal_class.identifier: add
focal_class.modifiers: public
focal_class.parameters: (MediaFile mediaFile)
focal_class.return: void
focal_class.signature: void add(MediaFile mediaFile)
focal_class.class_method_signature: MultipleMediaSource.validate(MediaFile mediaFile)
focal_class.full_signature: private void validate(MediaFile mediaFile)
focal_class.identifier: validate
focal_class.modifiers: private
focal_class.parameters: (MediaFile mediaFile)
focal_class.return: void
focal_class.signature: void validate(MediaFile mediaFile)
focal_class.class_method_signature: MultipleMediaSource.getMaxCurrentTimeOffset()
focal_class.full_signature: public long getMaxCurrentTimeOffset()
focal_class.identifier: getMaxCurrentTimeOffset
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long getMaxCurrentTimeOffset()
focal_class.class_method_signature: MultipleMediaSource.hasData()
focal_class.full_signature: private void hasData()
focal_class.identifier: hasData
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void hasData()
focal_class.class_method_signature: MultipleMediaSource.queueCommand(Command command)
focal_class.full_signature: private void queueCommand(Command command)
focal_class.identifier: queueCommand
focal_class.modifiers: private
focal_class.parameters: (Command command)
focal_class.return: void
focal_class.signature: void queueCommand(Command command)
focal_class.class_method_signature: MultipleMediaSource.getTrackIdByMediaType(MediaFormatType mediaFormatType)
focal_class.full_signature: @Override public int getTrackIdByMediaType(MediaFormatType mediaFormatType)
focal_class.identifier: getTrackIdByMediaType
focal_class.modifiers: @Override public
focal_class.parameters: (MediaFormatType mediaFormatType)
focal_class.return: int
focal_class.signature: int getTrackIdByMediaType(MediaFormatType mediaFormatType)
focal_class.class_method_signature: MultipleMediaSource.selectTrack(int trackId)
focal_class.full_signature: @Override public void selectTrack(int trackId)
focal_class.identifier: selectTrack
focal_class.modifiers: @Override public
focal_class.parameters: (int trackId)
focal_class.return: void
focal_class.signature: void selectTrack(int trackId)
focal_class.class_method_signature: MultipleMediaSource.setTrackMap(int source, int target)
focal_class.full_signature: public void setTrackMap(int source, int target)
focal_class.identifier: setTrackMap
focal_class.modifiers: public
focal_class.parameters: (int source, int target)
focal_class.return: void
focal_class.signature: void setTrackMap(int source, int target)
focal_class.class_method_signature: MultipleMediaSource.stop()
focal_class.full_signature: @Override public void stop()
focal_class.identifier: stop
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void stop()
focal_class.class_method_signature: MultipleMediaSource.canConnectFirst(IInputRaw connector)
focal_class.full_signature: @Override public boolean canConnectFirst(IInputRaw connector)
focal_class.identifier: canConnectFirst
focal_class.modifiers: @Override public
focal_class.parameters: (IInputRaw connector)
focal_class.return: boolean
focal_class.signature: boolean canConnectFirst(IInputRaw connector)
focal_class.class_method_signature: MultipleMediaSource.getSegmentsDurationInMicroSec()
focal_class.full_signature: public long getSegmentsDurationInMicroSec()
focal_class.identifier: getSegmentsDurationInMicroSec
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long getSegmentsDurationInMicroSec()
focal_class.class_method_signature: MultipleMediaSource.remove(MediaFile mediaFile)
focal_class.full_signature: public void remove(MediaFile mediaFile)
focal_class.identifier: remove
focal_class.modifiers: public
focal_class.parameters: (MediaFile mediaFile)
focal_class.return: void
focal_class.signature: void remove(MediaFile mediaFile)
focal_class.class_method_signature: MultipleMediaSource.insertAt(int index, MediaFile mediaFile)
focal_class.full_signature: public void insertAt(int index, MediaFile mediaFile)
focal_class.identifier: insertAt
focal_class.modifiers: public
focal_class.parameters: (int index, MediaFile mediaFile)
focal_class.return: void
focal_class.signature: void insertAt(int index, MediaFile mediaFile)
focal_class.class_method_signature: MultipleMediaSource.getOutputResolution()
focal_class.full_signature: @Override public Resolution getOutputResolution()
focal_class.identifier: getOutputResolution
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Resolution
focal_class.signature: Resolution getOutputResolution()
focal_class.class_method_signature: MultipleMediaSource.hasTrack(MediaFormatType mediaFormatType)
focal_class.full_signature: public boolean hasTrack(MediaFormatType mediaFormatType)
focal_class.identifier: hasTrack
focal_class.modifiers: public
focal_class.parameters: (MediaFormatType mediaFormatType)
focal_class.return: boolean
focal_class.signature: boolean hasTrack(MediaFormatType mediaFormatType)
focal_class.class_method_signature: MultipleMediaSource.verify()
focal_class.full_signature: public void verify()
focal_class.identifier: verify
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void verify()
focal_method.body: public long getSegmentsDurationInMicroSec() {
          long totalDuration = 0;
          for (MediaFile mediaFile : mediaFiles) {
              totalDuration += mediaFile.getSegmentsDurationInMicroSec();
          }
          return totalDuration;
      }
focal_method.class_method_signature: MultipleMediaSource.getSegmentsDurationInMicroSec()
focal_method.full_signature: public long getSegmentsDurationInMicroSec()
focal_method.identifier: getSegmentsDurationInMicroSec
focal_method.invocations: getSegmentsDurationInMicroSec
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: long
focal_method.signature: long getSegmentsDurationInMicroSec()