/** * 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(); }
/** * 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(); }
return formatIsSupported ? formatControl.getFormat() : null;
Format format = formatControl.getFormat();
= (VideoFormat) formatControl.getFormat(); Dimension currentSize = null; int width = preferredWidth;
/** * 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();
Format inFormat = formatControl.getFormat();
Format format = formatControl.getFormat();