grabber = (FrameGrabbingControl) getControl(GRABBING_CTRL); if (control.setFormat(format) == null) { throw new RuntimeException("Cannot change video format");
return null; Format[] formats = formatControl.getSupportedFormats(); final int count = formats.length; = (VideoFormat) formatControl.getFormat(); Dimension currentSize = null; int width = preferredWidth; Format setFormat = formatControl.setFormat(selectedFormat);
= formatControl.getSupportedFormats(); formatControl.setFormat(supportedAudioFormat);
/** * Gets the <tt>Format</tt> of the media data made available by this * <tt>AbstractBufferStream</tt>. * * @return the <tt>Format</tt> of the media data made available by this * <tt>AbstractBufferStream</tt> */ public Format getFormat() { return (formatControl == null) ? null : formatControl.getFormat(); }
for (Format supportedFormat : formatControl.getSupportedFormats()) if (supportedFormat.matches(format)) return formatIsSupported ? formatControl.getFormat() : null;
/** * Implements {@link Control#getControlComponent()}. * * @return a <tt>Component</tt> which represents UI associated with this * instance if any; otherwise, <tt>null</tt> */ public Component getControlComponent() { return formatControl.getControlComponent(); }
/** * Gets the <tt>Format</tt>s supported by the owner of this * <tt>FormatControl</tt>. Delegates to the wrapped <tt>FormatControl</tt>. * * @return an array of <tt>Format</tt>s supported by the owner of this * <tt>FormatControl</tt> */ public Format[] getSupportedFormats() { return formatControl.getSupportedFormats(); }
/** * Implements {@link FormatControl#isEnabled()}. * * @return <tt>true</tt> if this track is enabled; otherwise, <tt>false</tt> */ public boolean isEnabled() { return formatControl.isEnabled(); }
Format format = formatControl.getFormat(); = formatControl.getSupportedFormats(); AudioFormat supportedFormatToSet = null; formatControl.setFormat( supportedFormatToSet.intersects( formatToSet));
/** * Gets the <tt>Format</tt> of the owner of this <tt>FormatControl</tt>. * Delegates to the wrapped <tt>FormatControl</tt>. * * @return the <tt>Format</tt> of the owner of this <tt>FormatControl</tt> */ public Format getFormat() { return formatControl.getFormat(); }
/** * Gets the <tt>Format</tt> in which a specific <tt>DataSource</tt> * provides stream data. * * @param dataSource the <tt>DataSource</tt> for which the <tt>Format</tt> * in which it provides stream data is to be determined * @return the <tt>Format</tt> in which the specified <tt>dataSource</tt> * provides stream data if it was determined; otherwise, <tt>null</tt> */ private static Format getFormat(DataSource dataSource) { FormatControl formatControl = (FormatControl) dataSource.getControl(FormatControl.class.getName()); return (formatControl == null) ? null : formatControl.getFormat(); }
Format format = formatControl.getFormat();
/** * Gets the <tt>MediaFormat</tt> in which this <tt>MediaDevice</tt> captures * media. * * @return the <tt>MediaFormat</tt> in which this <tt>MediaDevice</tt> * captures media * @see MediaDevice#getFormat() */ public MediaFormat getFormat() { CaptureDevice captureDevice = createCaptureDevice(); if (captureDevice != null) { MediaType mediaType = getMediaType(); for (FormatControl formatControl : captureDevice.getFormatControls()) { MediaFormat format = MediaFormatImpl.createInstance(formatControl.getFormat()); if ((format != null) && format.getMediaType().equals(mediaType)) return format; } } return null; }
Format format = formatControl.getFormat();
= (AudioFormat) formatControl.getFormat();