@Test public void getMediaFormatType_Audio() { AudioFormat audioFormat = create.audioFormat().construct(); AudioEncoder audioEncoder = create.audioEncoder().construct(); AndroidMediaObjectFactoryFake factory = new AndroidMediaObjectFactoryFake(create); factory.withAudioEncoder(audioEncoder); new CameraCapture(factory, progressListener).setTargetAudioFormat(audioFormat); assertEquals(MediaFormatType.AUDIO, audioEncoder.getMediaFormatType()); }
@Override public MediaFormatType getMediaFormatType() { if (mediaFormat.getMimeType().startsWith("audio")) { return MediaFormatType.AUDIO; } return MediaFormatType.VIDEO; }
Plugin extends Input implements ITransform, IPluginOutput { @Override public MediaFormatType getMediaFormatType() { if (mediaFormat.getMimeType().startsWith("audio")) { return MediaFormatType.AUDIO; } return MediaFormatType.VIDEO; } }
Plugin extends Input implements ITransform, IPluginOutput { @Override public MediaFormatType getMediaFormatType() { if (mediaFormat.getMimeType().startsWith("audio")) { return MediaFormatType.AUDIO; } return MediaFormatType.VIDEO; } protected  Plugin(); }
Plugin extends Input implements ITransform, IPluginOutput { @Override public MediaFormatType getMediaFormatType() { if (mediaFormat.getMimeType().startsWith("audio")) { return MediaFormatType.AUDIO; } return MediaFormatType.VIDEO; } protected  Plugin(); void checkIfOutputQueueHasData(); void notifySurfaceReady(ISurface surface); @Override CommandQueue getOutputCommandQueue(); abstract void start(); abstract void stop(); @Override void push(Frame frame); @Override MediaFormatType getMediaFormatType(); @Override MediaFormat getMediaFormatByType(MediaFormatType mediaFormatType); @Override MediaFormat getOutputMediaFormat(); @Override void incrementConnectedPluginsCount(); @Override boolean canConnectFirst(IInputRaw connector); boolean canConnectFirst(IOutputRaw connector); @Override void recreate(); void setInputResolution(Resolution resolution); }
Plugin extends Input implements ITransform, IPluginOutput { @Override public MediaFormatType getMediaFormatType() { if (mediaFormat.getMimeType().startsWith("audio")) { return MediaFormatType.AUDIO; } return MediaFormatType.VIDEO; } protected  Plugin(); void checkIfOutputQueueHasData(); void notifySurfaceReady(ISurface surface); @Override CommandQueue getOutputCommandQueue(); abstract void start(); abstract void stop(); @Override void push(Frame frame); @Override MediaFormatType getMediaFormatType(); @Override MediaFormat getMediaFormatByType(MediaFormatType mediaFormatType); @Override MediaFormat getOutputMediaFormat(); @Override void incrementConnectedPluginsCount(); @Override boolean canConnectFirst(IInputRaw connector); boolean canConnectFirst(IOutputRaw connector); @Override void recreate(); void setInputResolution(Resolution resolution);  }