Add frame-rate requirement to MediaFormat used to find matched encoder

Root Cause:
The MediaFormat used to find matched test encoder and to create the test
encoder are different, which leads to the Google h.264 encoder selected
in isConcurrentEncodingDecodingSupported(), but fail to be created in
doEncoding() function due to being unable to meet the required frame
rate. If unable to find an encoder to create, the doEncoding() will
throw exception.

Solution:
Add the frame rate condition to the
isConcurrentEncodingDecodingSupported() function to screen out the
unqualified encoder at first place.

Change-Id: I2f64f744534238637af071922129c0f5684f3bd9
Signed-off-by: Xinghua Yang <xinghua.yang@mediatek.com>
diff --git a/tests/tests/media/src/android/media/cts/EncodeVirtualDisplayWithCompositionTest.java b/tests/tests/media/src/android/media/cts/EncodeVirtualDisplayWithCompositionTest.java
index 6a556e3..7df0c31 100644
--- a/tests/tests/media/src/android/media/cts/EncodeVirtualDisplayWithCompositionTest.java
+++ b/tests/tests/media/src/android/media/cts/EncodeVirtualDisplayWithCompositionTest.java
@@ -1372,6 +1372,7 @@
         MediaCodecList mcl = new MediaCodecList(MediaCodecList.REGULAR_CODECS);
         MediaFormat testFormat = MediaFormat.createVideoFormat(MIME_TYPE, w, h);
         testFormat.setInteger(MediaFormat.KEY_BIT_RATE, bitRate);
+        testFormat.setInteger(MediaFormat.KEY_FRAME_RATE, 30);
         if (mcl.findDecoderForFormat(testFormat) == null
                 || mcl.findEncoderForFormat(testFormat) == null) {
             return false;