test_class.file: domain/src/test/java/org/m4m/domain/VideoEncoderTest.java
test_class.identifier: VideoEncoderTest
test_class.superclass: extends TestBase
test_case.body: @Test
      public void canConfigure() {
          IMediaCodec mediaCodec = create.mediaCodec().construct();
  
          VideoFormat videoFormat = create.videoFormat()
                  .withFrameSize(1024, 768)
                  .withBitRate(100)
                  .withFrameRate(10)
                  .withIFrameInterval(1)
                  .construct();
          MediaCodecInfo.CodecCapabilities codecCapabilities = new MediaCodecInfo.CodecCapabilities();
          videoFormat.setColorFormat(codecCapabilities.COLOR_FormatSurface);
  
          VideoEncoder encoder = new VideoEncoder(mediaCodec);
          encoder.setMediaFormat(videoFormat);
          encoder.configure();
  
          ArgumentCaptor<VideoFormat> actualVideoFormat = ArgumentCaptor.forClass(VideoFormat.class);
          verify(mediaCodec).configure(actualVideoFormat.capture(), any(ISurfaceWrapper.class), anyInt());
          assertEquals(100, actualVideoFormat.getValue().getVideoBitRateInKBytes());
          assertEquals(10, actualVideoFormat.getValue().getVideoFrameRate());
          assertEquals(1, actualVideoFormat.getValue().getVideoIFrameInterval());
          assertEquals(2130708361, actualVideoFormat.getValue().getInteger("color-format"));
      }
test_case.class_method_signature: VideoEncoderTest.canConfigure()
test_case.full_signature: @Test public void canConfigure()
test_case.identifier: canConfigure
test_case.invocations: construct mediaCodec construct withIFrameInterval withFrameRate withBitRate withFrameSize videoFormat setColorFormat setMediaFormat configure forClass configure verify capture any anyInt assertEquals getVideoBitRateInKBytes getValue assertEquals getVideoFrameRate getValue assertEquals getVideoIFrameInterval getValue assertEquals getInteger getValue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void canConfigure()
focal_class.file: domain/src/main/java/org/m4m/domain/VideoEncoder.java
focal_class.identifier: VideoEncoder
focal_class.interfaces: implements ITransform
focal_class.class_method_signature: VideoEncoder.VideoEncoder(IMediaCodec mediaCodec)
focal_class.full_signature: public  VideoEncoder(IMediaCodec mediaCodec)
focal_class.identifier: VideoEncoder
focal_class.modifiers: public
focal_class.parameters: (IMediaCodec mediaCodec)
focal_class.signature:  VideoEncoder(IMediaCodec mediaCodec)
focal_class.class_method_signature: VideoEncoder.setMediaFormat(MediaFormat inputMediaFormat)
focal_class.full_signature: @Override public void setMediaFormat(MediaFormat inputMediaFormat)
focal_class.identifier: setMediaFormat
focal_class.modifiers: @Override public
focal_class.parameters: (MediaFormat inputMediaFormat)
focal_class.return: void
focal_class.signature: void setMediaFormat(MediaFormat inputMediaFormat)
focal_class.class_method_signature: VideoEncoder.setBitRateInKBytes(int bitRate)
focal_class.full_signature: public void setBitRateInKBytes(int bitRate)
focal_class.identifier: setBitRateInKBytes
focal_class.modifiers: public
focal_class.parameters: (int bitRate)
focal_class.return: void
focal_class.signature: void setBitRateInKBytes(int bitRate)
focal_class.class_method_signature: VideoEncoder.getBitRateInKBytes()
focal_class.full_signature: public int getBitRateInKBytes()
focal_class.identifier: getBitRateInKBytes
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getBitRateInKBytes()
focal_class.class_method_signature: VideoEncoder.setFrameRate(int frameRate)
focal_class.full_signature: public void setFrameRate(int frameRate)
focal_class.identifier: setFrameRate
focal_class.modifiers: public
focal_class.parameters: (int frameRate)
focal_class.return: void
focal_class.signature: void setFrameRate(int frameRate)
focal_class.class_method_signature: VideoEncoder.getFrameRate()
focal_class.full_signature: public int getFrameRate()
focal_class.identifier: getFrameRate
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getFrameRate()
focal_class.class_method_signature: VideoEncoder.setIFrameInterval(int iFrameInterval)
focal_class.full_signature: public void setIFrameInterval(int iFrameInterval)
focal_class.identifier: setIFrameInterval
focal_class.modifiers: public
focal_class.parameters: (int iFrameInterval)
focal_class.return: void
focal_class.signature: void setIFrameInterval(int iFrameInterval)
focal_class.class_method_signature: VideoEncoder.getIFrameInterval()
focal_class.full_signature: public int getIFrameInterval()
focal_class.identifier: getIFrameInterval
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getIFrameInterval()
focal_class.class_method_signature: VideoEncoder.getVideoFormat()
focal_class.full_signature: private VideoFormat getVideoFormat()
focal_class.identifier: getVideoFormat
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: VideoFormat
focal_class.signature: VideoFormat getVideoFormat()
focal_class.class_method_signature: VideoEncoder.isLastFile()
focal_class.full_signature: @Override public boolean isLastFile()
focal_class.identifier: isLastFile
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isLastFile()
focal_class.class_method_signature: VideoEncoder.setOutputSurface(ISurface surface)
focal_class.full_signature: @Override public void setOutputSurface(ISurface surface)
focal_class.identifier: setOutputSurface
focal_class.modifiers: @Override public
focal_class.parameters: (ISurface surface)
focal_class.return: void
focal_class.signature: void setOutputSurface(ISurface surface)
focal_class.class_method_signature: VideoEncoder.waitForSurface(long pts)
focal_class.full_signature: @Override public void waitForSurface(long pts)
focal_class.identifier: waitForSurface
focal_class.modifiers: @Override public
focal_class.parameters: (long pts)
focal_class.return: void
focal_class.signature: void waitForSurface(long pts)
focal_class.class_method_signature: VideoEncoder.drain(int bufferIndex)
focal_class.full_signature: @Override public void drain(int bufferIndex)
focal_class.identifier: drain
focal_class.modifiers: @Override public
focal_class.parameters: (int bufferIndex)
focal_class.return: void
focal_class.signature: void drain(int bufferIndex)
focal_class.class_method_signature: VideoEncoder.feedMeIfNotDraining()
focal_class.full_signature: @Override protected void feedMeIfNotDraining()
focal_class.identifier: feedMeIfNotDraining
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void feedMeIfNotDraining()
focal_class.class_method_signature: VideoEncoder.push(Frame frame)
focal_class.full_signature: @Override public void push(Frame frame)
focal_class.identifier: push
focal_class.modifiers: @Override public
focal_class.parameters: (Frame frame)
focal_class.return: void
focal_class.signature: void push(Frame frame)
focal_class.class_method_signature: VideoEncoder.notifySurfaceReady(ISurface surface)
focal_class.full_signature: @Override public void notifySurfaceReady(ISurface surface)
focal_class.identifier: notifySurfaceReady
focal_class.modifiers: @Override public
focal_class.parameters: (ISurface surface)
focal_class.return: void
focal_class.signature: void notifySurfaceReady(ISurface surface)
focal_class.class_method_signature: VideoEncoder.releaseOutputBuffer(int outputBufferIndex)
focal_class.full_signature: @Override public void releaseOutputBuffer(int outputBufferIndex)
focal_class.identifier: releaseOutputBuffer
focal_class.modifiers: @Override public
focal_class.parameters: (int outputBufferIndex)
focal_class.return: void
focal_class.signature: void releaseOutputBuffer(int outputBufferIndex)
focal_class.superclass: extends Encoder
focal_method.body: @Override
      public void setMediaFormat(MediaFormat inputMediaFormat) {
          this.mediaFormat = inputMediaFormat;
          getVideoFormat().setColorFormat(MediaCodecInfo.CodecCapabilities.COLOR_FormatSurface);
      }
focal_method.class_method_signature: VideoEncoder.setMediaFormat(MediaFormat inputMediaFormat)
focal_method.full_signature: @Override public void setMediaFormat(MediaFormat inputMediaFormat)
focal_method.identifier: setMediaFormat
focal_method.invocations: setColorFormat getVideoFormat
focal_method.modifiers: @Override public
focal_method.parameters: (MediaFormat inputMediaFormat)
focal_method.return: void
focal_method.signature: void setMediaFormat(MediaFormat inputMediaFormat)