The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2008 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package com.android.mediaframeworktest.unit; |
| 18 | |
| 19 | import android.util.Log; |
| 20 | import android.media.MediaMetadataRetriever; |
| 21 | import android.graphics.Bitmap; |
| 22 | import java.io.FileOutputStream; |
| 23 | import android.test.AndroidTestCase; |
| 24 | import com.android.mediaframeworktest.MediaNames; |
James Dong | 38b03a7 | 2009-11-02 12:11:57 -0800 | [diff] [blame] | 25 | import com.android.mediaframeworktest.MediaProfileReader; |
Yu Shan Emily Lau | 3e7b3c0 | 2009-03-24 22:20:13 -0700 | [diff] [blame] | 26 | import android.test.suitebuilder.annotation.*; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 27 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 28 | public class MediaMetadataRetrieverTest extends AndroidTestCase { |
| 29 | |
| 30 | private static final String TAG = "MediaMetadataRetrieverTest"; |
| 31 | |
| 32 | // Test album art extraction. |
Yu Shan Emily Lau | 3e7b3c0 | 2009-03-24 22:20:13 -0700 | [diff] [blame] | 33 | @MediumTest |
James Dong | df9b349 | 2011-01-04 15:03:48 -0800 | [diff] [blame] | 34 | public static void testGetEmbeddedPicture() throws Exception { |
| 35 | Log.v(TAG, "testGetEmbeddedPicture starts."); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 36 | MediaMetadataRetriever retriever = new MediaMetadataRetriever(); |
James Dong | 1b7babd | 2010-02-16 14:38:23 -0800 | [diff] [blame] | 37 | boolean supportWMA = MediaProfileReader.getWMAEnable(); |
James Dong | 454f69c | 2010-03-17 15:09:24 -0700 | [diff] [blame] | 38 | boolean hasFailed = false; |
James Dong | 1b7babd | 2010-02-16 14:38:23 -0800 | [diff] [blame] | 39 | boolean supportWMV = MediaProfileReader.getWMVEnable(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 40 | for (int i = 0, n = MediaNames.ALBUMART_TEST_FILES.length; i < n; ++i) { |
| 41 | try { |
| 42 | Log.v(TAG, "File " + i + ": " + MediaNames.ALBUMART_TEST_FILES[i]); |
James Dong | 38b03a7 | 2009-11-02 12:11:57 -0800 | [diff] [blame] | 43 | if ((MediaNames.ALBUMART_TEST_FILES[i].endsWith(".wma") && !supportWMA) || |
| 44 | (MediaNames.ALBUMART_TEST_FILES[i].endsWith(".wmv") && !supportWMV) |
| 45 | ) { |
| 46 | Log.v(TAG, "windows media is not supported and thus we will skip the test for this file"); |
| 47 | continue; |
| 48 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 49 | retriever.setDataSource(MediaNames.ALBUMART_TEST_FILES[i]); |
James Dong | df9b349 | 2011-01-04 15:03:48 -0800 | [diff] [blame] | 50 | byte[] albumArt = retriever.getEmbeddedPicture(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 51 | |
| 52 | // TODO: |
| 53 | // A better test would be to compare the retrieved album art with the |
| 54 | // known result. |
| 55 | if (albumArt == null) { // Do we have expect in JUnit? |
James Dong | df9b349 | 2011-01-04 15:03:48 -0800 | [diff] [blame] | 56 | Log.e(TAG, "Fails to get embedded picture for " + MediaNames.ALBUMART_TEST_FILES[i]); |
James Dong | 454f69c | 2010-03-17 15:09:24 -0700 | [diff] [blame] | 57 | hasFailed = true; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 58 | } |
| 59 | } catch(Exception e) { |
James Dong | 454f69c | 2010-03-17 15:09:24 -0700 | [diff] [blame] | 60 | Log.e(TAG, "Fails to setDataSource for " + MediaNames.ALBUMART_TEST_FILES[i]); |
| 61 | hasFailed = true; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 62 | } |
| 63 | Thread.yield(); // Don't be evil |
| 64 | } |
| 65 | retriever.release(); |
James Dong | df9b349 | 2011-01-04 15:03:48 -0800 | [diff] [blame] | 66 | Log.v(TAG, "testGetEmbeddedPicture completes."); |
James Dong | 454f69c | 2010-03-17 15:09:24 -0700 | [diff] [blame] | 67 | assertTrue(!hasFailed); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 68 | } |
| 69 | |
| 70 | // Test frame capture |
James Dong | 525ad18 | 2009-09-28 10:57:17 -0700 | [diff] [blame] | 71 | @LargeTest |
| 72 | public static void testThumbnailCapture() throws Exception { |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 73 | MediaMetadataRetriever retriever = new MediaMetadataRetriever(); |
James Dong | 1b7babd | 2010-02-16 14:38:23 -0800 | [diff] [blame] | 74 | boolean supportWMA = MediaProfileReader.getWMAEnable(); |
| 75 | boolean supportWMV = MediaProfileReader.getWMVEnable(); |
James Dong | 454f69c | 2010-03-17 15:09:24 -0700 | [diff] [blame] | 76 | boolean hasFailed = false; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 77 | Log.v(TAG, "Thumbnail processing starts"); |
| 78 | long startedAt = System.currentTimeMillis(); |
Yu Shan Emily Lau | c4fe54a | 2011-06-13 19:26:50 -0700 | [diff] [blame] | 79 | for(int i = 0, n = MediaNames.THUMBNAIL_METADATA_TEST_FILES.length; i < n; ++i) { |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 80 | try { |
Yu Shan Emily Lau | c4fe54a | 2011-06-13 19:26:50 -0700 | [diff] [blame] | 81 | Log.v(TAG, "File " + i + ": " + MediaNames.THUMBNAIL_METADATA_TEST_FILES[i]); |
| 82 | if ((MediaNames.THUMBNAIL_METADATA_TEST_FILES[i].endsWith(".wma") && !supportWMA) || |
| 83 | (MediaNames.THUMBNAIL_METADATA_TEST_FILES[i].endsWith(".wmv") && !supportWMV) |
James Dong | 38b03a7 | 2009-11-02 12:11:57 -0800 | [diff] [blame] | 84 | ) { |
| 85 | Log.v(TAG, "windows media is not supported and thus we will skip the test for this file"); |
| 86 | continue; |
| 87 | } |
Yu Shan Emily Lau | c4fe54a | 2011-06-13 19:26:50 -0700 | [diff] [blame] | 88 | retriever.setDataSource(MediaNames.THUMBNAIL_METADATA_TEST_FILES[i]); |
James Dong | f6bd1ea | 2010-12-03 17:00:48 -0800 | [diff] [blame] | 89 | Bitmap bitmap = retriever.getFrameAtTime(-1); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 90 | assertTrue(bitmap != null); |
| 91 | try { |
Yu Shan Emily Lau | c4fe54a | 2011-06-13 19:26:50 -0700 | [diff] [blame] | 92 | java.io.OutputStream stream = new FileOutputStream(MediaNames.THUMBNAIL_METADATA_TEST_FILES[i] + ".jpg"); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 93 | bitmap.compress(Bitmap.CompressFormat.JPEG, 75, stream); |
| 94 | stream.close(); |
| 95 | } catch (Exception e) { |
Yu Shan Emily Lau | c4fe54a | 2011-06-13 19:26:50 -0700 | [diff] [blame] | 96 | Log.e(TAG, "Fails to convert the bitmap to a JPEG file for " + MediaNames.THUMBNAIL_METADATA_TEST_FILES[i]); |
James Dong | 454f69c | 2010-03-17 15:09:24 -0700 | [diff] [blame] | 97 | hasFailed = true; |
James Dong | 7411c1b | 2010-11-29 11:57:27 -0800 | [diff] [blame] | 98 | Log.e(TAG, e.toString()); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 99 | } |
| 100 | } catch(Exception e) { |
Yu Shan Emily Lau | c4fe54a | 2011-06-13 19:26:50 -0700 | [diff] [blame] | 101 | Log.e(TAG, "Fails to setDataSource for file " + MediaNames.THUMBNAIL_METADATA_TEST_FILES[i]); |
James Dong | 454f69c | 2010-03-17 15:09:24 -0700 | [diff] [blame] | 102 | hasFailed = true; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 103 | } |
| 104 | Thread.yield(); // Don't be evil |
| 105 | } |
| 106 | long endedAt = System.currentTimeMillis(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 107 | retriever.release(); |
James Dong | 454f69c | 2010-03-17 15:09:24 -0700 | [diff] [blame] | 108 | assertTrue(!hasFailed); |
Yu Shan Emily Lau | c4fe54a | 2011-06-13 19:26:50 -0700 | [diff] [blame] | 109 | Log.v(TAG, "Average processing time per thumbnail: " + (endedAt - startedAt)/MediaNames.THUMBNAIL_METADATA_TEST_FILES.length + " ms"); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 110 | } |
| 111 | |
| 112 | @LargeTest |
| 113 | public static void testMetadataRetrieval() throws Exception { |
James Dong | 1b7babd | 2010-02-16 14:38:23 -0800 | [diff] [blame] | 114 | boolean supportWMA = MediaProfileReader.getWMAEnable(); |
| 115 | boolean supportWMV = MediaProfileReader.getWMVEnable(); |
James Dong | 454f69c | 2010-03-17 15:09:24 -0700 | [diff] [blame] | 116 | boolean hasFailed = false; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 117 | MediaMetadataRetriever retriever = new MediaMetadataRetriever(); |
Yu Shan Emily Lau | c4fe54a | 2011-06-13 19:26:50 -0700 | [diff] [blame] | 118 | for(int i = 0, n = MediaNames.THUMBNAIL_METADATA_TEST_FILES.length; i < n; ++i) { |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 119 | try { |
Yu Shan Emily Lau | c4fe54a | 2011-06-13 19:26:50 -0700 | [diff] [blame] | 120 | Log.v(TAG, "File " + i + ": " + MediaNames.THUMBNAIL_METADATA_TEST_FILES[i]); |
| 121 | if ((MediaNames.THUMBNAIL_METADATA_TEST_FILES[i].endsWith(".wma") && !supportWMA) || |
| 122 | (MediaNames.THUMBNAIL_METADATA_TEST_FILES[i].endsWith(".wmv") && !supportWMV) |
James Dong | 38b03a7 | 2009-11-02 12:11:57 -0800 | [diff] [blame] | 123 | ) { |
| 124 | Log.v(TAG, "windows media is not supported and thus we will skip the test for this file"); |
| 125 | continue; |
| 126 | } |
Yu Shan Emily Lau | c4fe54a | 2011-06-13 19:26:50 -0700 | [diff] [blame] | 127 | retriever.setDataSource(MediaNames.THUMBNAIL_METADATA_TEST_FILES[i]); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 128 | extractAllSupportedMetadataValues(retriever); |
| 129 | } catch(Exception e) { |
Yu Shan Emily Lau | c4fe54a | 2011-06-13 19:26:50 -0700 | [diff] [blame] | 130 | Log.e(TAG, "Fails to setDataSource for file " + MediaNames.THUMBNAIL_METADATA_TEST_FILES[i]); |
James Dong | 454f69c | 2010-03-17 15:09:24 -0700 | [diff] [blame] | 131 | hasFailed = true; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 132 | } |
| 133 | Thread.yield(); // Don't be evil |
| 134 | } |
| 135 | retriever.release(); |
James Dong | 454f69c | 2010-03-17 15:09:24 -0700 | [diff] [blame] | 136 | assertTrue(!hasFailed); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 137 | } |
| 138 | |
| 139 | // If the specified call order and valid media file is used, no exception |
| 140 | // should be thrown. |
Yu Shan Emily Lau | 3e7b3c0 | 2009-03-24 22:20:13 -0700 | [diff] [blame] | 141 | @MediumTest |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 142 | public static void testBasicNormalMethodCallSequence() throws Exception { |
James Dong | 454f69c | 2010-03-17 15:09:24 -0700 | [diff] [blame] | 143 | boolean hasFailed = false; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 144 | MediaMetadataRetriever retriever = new MediaMetadataRetriever(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 145 | try { |
| 146 | retriever.setDataSource(MediaNames.TEST_PATH_1); |
James Dong | f6bd1ea | 2010-12-03 17:00:48 -0800 | [diff] [blame] | 147 | Bitmap bitmap = retriever.getFrameAtTime(-1); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 148 | assertTrue(bitmap != null); |
| 149 | try { |
| 150 | java.io.OutputStream stream = new FileOutputStream("/sdcard/thumbnailout.jpg"); |
| 151 | bitmap.compress(Bitmap.CompressFormat.JPEG, 75, stream); |
| 152 | stream.close(); |
| 153 | } catch (Exception e) { |
| 154 | throw new Exception("Fails to convert the bitmap to a JPEG file for " + MediaNames.TEST_PATH_1, e); |
| 155 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 156 | extractAllSupportedMetadataValues(retriever); |
| 157 | } catch(Exception e) { |
James Dong | 454f69c | 2010-03-17 15:09:24 -0700 | [diff] [blame] | 158 | Log.e(TAG, "Fails to setDataSource for " + MediaNames.TEST_PATH_1, e); |
| 159 | hasFailed = true; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 160 | } |
| 161 | retriever.release(); |
James Dong | 454f69c | 2010-03-17 15:09:24 -0700 | [diff] [blame] | 162 | assertTrue(!hasFailed); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 163 | } |
| 164 | |
James Dong | f6bd1ea | 2010-12-03 17:00:48 -0800 | [diff] [blame] | 165 | // If setDataSource() has not been called, both getFrameAtTime() and extractMetadata() must |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 166 | // return null. |
Yu Shan Emily Lau | 3e7b3c0 | 2009-03-24 22:20:13 -0700 | [diff] [blame] | 167 | @MediumTest |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 168 | public static void testBasicAbnormalMethodCallSequence() { |
James Dong | 454f69c | 2010-03-17 15:09:24 -0700 | [diff] [blame] | 169 | boolean hasFailed = false; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 170 | MediaMetadataRetriever retriever = new MediaMetadataRetriever(); |
James Dong | 454f69c | 2010-03-17 15:09:24 -0700 | [diff] [blame] | 171 | if (retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_ALBUM) != null) { |
| 172 | Log.e(TAG, "No album metadata expected, but is available"); |
| 173 | hasFailed = true; |
| 174 | } |
James Dong | f6bd1ea | 2010-12-03 17:00:48 -0800 | [diff] [blame] | 175 | if (retriever.getFrameAtTime(-1) != null) { |
James Dong | 454f69c | 2010-03-17 15:09:24 -0700 | [diff] [blame] | 176 | Log.e(TAG, "No frame expected, but is available"); |
| 177 | hasFailed = true; |
| 178 | } |
| 179 | assertTrue(!hasFailed); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 180 | } |
| 181 | |
| 182 | // Test setDataSource() |
Yu Shan Emily Lau | 3e7b3c0 | 2009-03-24 22:20:13 -0700 | [diff] [blame] | 183 | @MediumTest |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 184 | public static void testSetDataSource() { |
| 185 | MediaMetadataRetriever retriever = new MediaMetadataRetriever(); |
James Dong | 454f69c | 2010-03-17 15:09:24 -0700 | [diff] [blame] | 186 | boolean hasFailed = false; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 187 | |
| 188 | // Null pointer argument |
| 189 | try { |
| 190 | String path = null; |
| 191 | retriever.setDataSource(path); |
James Dong | 454f69c | 2010-03-17 15:09:24 -0700 | [diff] [blame] | 192 | Log.e(TAG, "IllegalArgumentException failed to be thrown."); |
| 193 | hasFailed = true; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 194 | } catch(Exception e) { |
James Dong | 454f69c | 2010-03-17 15:09:24 -0700 | [diff] [blame] | 195 | if (!(e instanceof IllegalArgumentException)) { |
| 196 | Log.e(TAG, "Expected a IllegalArgumentException, but got a different exception"); |
| 197 | hasFailed = true; |
| 198 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 199 | } |
| 200 | |
| 201 | // Use mem:// path |
| 202 | try { |
| 203 | retriever.setDataSource(MediaNames.TEST_PATH_5); |
James Dong | 454f69c | 2010-03-17 15:09:24 -0700 | [diff] [blame] | 204 | Log.e(TAG, "IllegalArgumentException failed to be thrown."); |
| 205 | hasFailed = true; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 206 | } catch(Exception e) { |
James Dong | 454f69c | 2010-03-17 15:09:24 -0700 | [diff] [blame] | 207 | if (!(e instanceof IllegalArgumentException)) { |
| 208 | Log.e(TAG, "Expected a IllegalArgumentException, but got a different exception"); |
| 209 | hasFailed = true; |
| 210 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 211 | } |
| 212 | |
| 213 | // The pathname does not correspond to any existing file |
| 214 | try { |
| 215 | retriever.setDataSource(MediaNames.TEST_PATH_4); |
James Dong | 454f69c | 2010-03-17 15:09:24 -0700 | [diff] [blame] | 216 | Log.e(TAG, "RuntimeException failed to be thrown."); |
| 217 | hasFailed = true; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 218 | } catch(Exception e) { |
James Dong | 454f69c | 2010-03-17 15:09:24 -0700 | [diff] [blame] | 219 | if (!(e instanceof RuntimeException)) { |
| 220 | Log.e(TAG, "Expected a RuntimeException, but got a different exception"); |
| 221 | hasFailed = true; |
| 222 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 223 | } |
| 224 | |
| 225 | // The pathname does correspond to a file, but this file |
| 226 | // is not a valid media file |
| 227 | try { |
| 228 | retriever.setDataSource(MediaNames.TEST_PATH_3); |
James Dong | 454f69c | 2010-03-17 15:09:24 -0700 | [diff] [blame] | 229 | Log.e(TAG, "RuntimeException failed to be thrown."); |
| 230 | hasFailed = true; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 231 | } catch(Exception e) { |
James Dong | 454f69c | 2010-03-17 15:09:24 -0700 | [diff] [blame] | 232 | if (!(e instanceof RuntimeException)) { |
| 233 | Log.e(TAG, "Expected a RuntimeException, but got a different exception"); |
| 234 | hasFailed = true; |
| 235 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 236 | } |
| 237 | |
| 238 | retriever.release(); |
James Dong | 454f69c | 2010-03-17 15:09:24 -0700 | [diff] [blame] | 239 | assertTrue(!hasFailed); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 240 | } |
| 241 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 242 | // TODO: |
| 243 | // Encode and test for the correct mix of metadata elements on a per-file basis? |
| 244 | // We should be able to compare the actual returned metadata with the expected metadata |
| 245 | // with each given sample test file. |
| 246 | private static void extractAllSupportedMetadataValues(MediaMetadataRetriever retriever) { |
| 247 | String value = null; |
| 248 | Log.v(TAG, (value = retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_CD_TRACK_NUMBER)) == null? "not found": value); |
| 249 | Log.v(TAG, (value = retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_DURATION)) == null? "not found": value); |
| 250 | Log.v(TAG, (value = retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_NUM_TRACKS)) == null? "not found": value); |
| 251 | Log.v(TAG, (value = retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_ALBUM)) == null? "not found": value); |
| 252 | Log.v(TAG, (value = retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_ARTIST)) == null? "not found": value); |
| 253 | Log.v(TAG, (value = retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_AUTHOR)) == null? "not found": value); |
| 254 | Log.v(TAG, (value = retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_COMPOSER)) == null? "not found": value); |
| 255 | Log.v(TAG, (value = retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_DATE)) == null? "not found": value); |
| 256 | Log.v(TAG, (value = retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_GENRE)) == null? "not found": value); |
| 257 | Log.v(TAG, (value = retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_TITLE)) == null? "not found": value); |
| 258 | Log.v(TAG, (value = retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_YEAR)) == null? "not found": value); |
| 259 | } |
| 260 | } |