/** * Finds the attributes shared by two matching <tt>Format</tt>s. If the * specified <tt>Format</tt> does not match this one, the result is * undefined. * * @param format the matching <tt>Format</tt> to intersect with this one * @return a <tt>Format</tt> with its attributes set to the attributes * common to this instance and the specified <tt>format</tt> */ @Override public Format intersects(Format format) { Format intersection = super.intersects(format); if (intersection != null) { AVFrameFormat avFrameFormatIntersection = (AVFrameFormat) intersection; avFrameFormatIntersection.pixFmt = ((pixFmt == NOT_SPECIFIED) && (format instanceof AVFrameFormat)) ? ((AVFrameFormat) format).pixFmt : pixFmt; } return intersection; }
/** * Finds the attributes shared by two matching <tt>Format</tt>s. If the * specified <tt>Format</tt> does not match this one, the result is * undefined. * * @param format the matching <tt>Format</tt> to intersect with this one * @return a <tt>Format</tt> with its attributes set to the attributes * common to this instance and the specified <tt>format</tt> */ @Override public Format intersects(Format format) { Format intersection = super.intersects(format); if (intersection == null) return null; ((ParameterizedVideoFormat) intersection).fmtps = fmtps.isEmpty() ? MediaFormatImpl.EMPTY_FORMAT_PARAMETERS : getFormatParameters(); return intersection; }
null, Format.NOT_SPECIFIED); return (VideoFormat) result.intersects(sourceFormat);
null, Format.NOT_SPECIFIED) .intersects(selectedFormat);
= videoFormat.intersects( new VideoFormat(