1 /*
2  * Copyright (C) 2008 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5  * use this file except in compliance with the License. You may obtain a copy of
6  * 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, WITHOUT
12  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13  * License for the specific language governing permissions and limitations under
14  * the License.
15  */
16 
17 package com.android.mediaframeworktest;
18 
19 /**
20  *
21  * This class has the names of the all the activity name and variables in the
22  * instrumentation test.
23  *
24  */
25 public class MediaNames {
26     // A directory to hold all kinds of media files
27     public static final String MEDIA_SAMPLE_POOL = "/sdcard/media_api/samples/";
28     // A file to hold all streaming URLs
29     public static final String MEDIA_STREAMING_SRC = "/sdcard/media_api/streaming.txt";
30 
31     // Audio files
32     public static final String MP3CBR = "/sdcard/media_api/music/MP3_48KHz_128kbps_s_1_17_CBR.mp3";
33     public static final String MP3VBR = "/sdcard/media_api/music/MP3_48KHz_128kbps_s_1_17_VBR.mp3";
34     public static final String MP3ABR = "/sdcard/media_api/music/MP3_48KHz_128kbps_s_1_17_ABR.mp3";
35     public static final String SHORTMP3 = "/sdcard/media_api/music/SHORTMP3.mp3";
36     public static final String MIDI = "/sdcard/media_api/music/ants.mid";
37     public static final String WAV = "/sdcard/media_api/music/rings_2ch.wav";
38     public static final String AMR = "/sdcard/media_api/music/test_amr_ietf.amr";
39     public static final String SINE_200_1000 = "/sdcard/media_api/music/sine_200+1000Hz_44K_mo.wav";
40     // public static final String OGG =
41     // "/sdcard/media_api/music/Revelation.ogg";
42 
43     public static final int MP3CBR_LENGTH = 71000;
44     public static final int MP3VBR_LENGTH = 71000;
45     public static final int SHORTMP3_LENGTH = 286;
46     public static final int MIDI_LENGTH = 17000;
47     public static final int AMR_LENGTH = 37000;
48     public static final int SEEK_TIME = 10000;
49 
50     public static final long PAUSE_WAIT_TIME = 3000;
51     public static final long WAIT_TIME = 2000;
52     public static final long WAIT_SNAPSHOT_TIME = 5000;
53 
54     // local video
55     public static final String VIDEO_MP4 = "/sdcard/media_api/video/MPEG4_320_AAC_64.mp4";
56     public static final String VIDEO_SHORT_3GP = "/sdcard/media_api/video/short.3gp";
57     public static final String VIDEO_LARGE_SIZE_3GP = "/sdcard/media_api/video/border_large.3gp";
58     public static final String VIDEO_H263_AAC = "/sdcard/media_api/video/H263_56_AAC_24.3gp";
59     public static final String VIDEO_H263_AMR = "/sdcard/media_api/video/H263_56_AMRNB_6.3gp";
60     public static final String VIDEO_H264_AAC = "/sdcard/media_api/video/H264_320_AAC_64.3gp";
61     public static final String VIDEO_H264_AMR = "/sdcard/media_api/video/H264_320_AMRNB_6.3gp";
62     public static final String VIDEO_HEVC_AAC = "/sdcard/media_api/video/HEVC_320_AAC_128.mp4";
63     public static final String VIDEO_MPEG2_AAC = "/sdcard/media_api/video/MPEG2_1500_AAC_128.mp4";
64     public static final String VIDEO_HIGHRES_H263 = "/sdcard/media_api/video/H263_500_AMRNB_12.3gp";
65     public static final String VIDEO_HIGHRES_MP4 = "/sdcard/media_api/video/H264_500_AAC_128.3gp";
66     public static final String VIDEO_WEBM = "/sdcard/media_api/video/big-buck-bunny_trailer.webm";
67 
68     // Media Recorder
69     public static final String RECORDER_OUTPUT = "/sdcard/media_api/recorderOutput.amr";
70 
71     // video thumbnail
72     public static final String THUMBNAIL_OUTPUT = "/sdcard/media_api/videoThumbnail.png";
73     public static final String GOLDEN_THUMBNAIL_OUTPUT = "/sdcard/media_api/goldenThumbnail.png";
74 
75     /*
76      * Metadata Utility Test media files which contain meta data.
77      */
78     public static final String[] THUMBNAIL_METADATA_TEST_FILES = {
79         "/sdcard/media_api/video/H263_500_AMRNB_12.3gp",
80         "/sdcard/media_api/video/H263_56_AAC_24.3gp",
81         "/sdcard/media_api/video/H263_56_AMRNB_6.3gp",
82         "/sdcard/media_api/video/H264_320_AAC_64.3gp",
83         "/sdcard/media_api/video/H264_320_AMRNB_6.3gp",
84         "/sdcard/media_api/video/H264_500_AAC_128.3gp",
85         "/sdcard/media_api/video/H264_HVGA_500_NO_AUDIO.3gp",
86         "/sdcard/media_api/video/H264_QVGA_500_NO_AUDIO.3gp",
87         "/sdcard/media_api/video/MPEG4_320_AAC_64.mp4",
88         "/sdcard/media_api/video/border_large.3gp",
89         "/sdcard/media_api/videoeditor/H264_BP_800x480_15fps_512kbps_AACLC_24KHz_38Kbps_s_1_17.mp4",
90         "/sdcard/media_api/videoeditor/H264_MP_960x720_25fps_800kbps_AACLC_48Khz_192Kbps_s_1_17.mp4",
91         "/sdcard/media_api/videoeditor/MPEG4_SP_640x480_15fps_512kbps_AACLC_48khz_132kbps_s_0_26.mp4",
92         "/sdcard/media_api/videoeditor/MPEG4_SP_176x144_12fps_92kbps_AMRNB_8KHz_12.2kbps_m_0_27.3gp",
93         "/sdcard/media_api/videoeditor/MPEG4_SP_720x480_30fps_280kbps_AACLC_48kHz_161kbps_s_0_26.mp4"
94     };
95 
96     public static final String[] ALBUMART_TEST_FILES = {
97         "/sdcard/media_api/music/MP3_48KHz_128kbps_s_1_17_ID3V1_ID3V2.mp3",
98         "/sdcard/media_api/music/MP3_48KHz_128kbps_s_1_17_ID3V2.mp3",
99         "/sdcard/media_api/music/MP3_48KHz_128kbps_s_1_17_ID3V1.mp3",
100     };
101 
102     // TEST_PATH_1: is a video and contains metadata for key "num-tracks"
103     // TEST_PATH_2: any valid media file.
104     // TEST_PATH_3: invalid media file
105     public static final String TEST_PATH_1 = "/sdcard/media_api/video/MPEG4_320_AAC_64.mp4";
106     public static final String TEST_PATH_3 = "/sdcard/media_api/data.txt";
107     public static final String TEST_PATH_4 = "somenonexistingpathname";
108     public static final String TEST_PATH_5 = "mem://012345";
109 
110     // Meta data expected result
111     // The expected tag result in the following order
112     // cd_track_number, album, artist, author, composer, date, genre
113     // title, years, duration
114     public static final String META_DATA_MP3[][] = {
115         {"/sdcard/media_api/music/MP3_48KHz_128kbps_s_1_17_ID3V1_ID3V2.mp3", "2/34",
116          "Test ID3V2 Album", "Test ID3V2 Artist", null, "Test ID3V2 Composer",
117          null, "(1)Classic Rock", "Test ID3V2 Title ", null, "77640", "1", null},
118         {"/sdcard/media_api/music/MP3_48KHz_128kbps_s_1_17_ID3V2.mp3", "1/10",
119          "Test ID3V2 Album", "Test ID3V2 Artist", null, "Test ID3V2 Composer",
120          null, "(74)Acid Jazz", "Test ID3V2 Tag", null, "77640", "1", null},
121         {"/sdcard/media_api/music/MP3_48KHz_128kbps_s_1_17_ID3V1.mp3", "2",
122          "Test ID3V1 Album", "Test ID3V1 Artist", null, null, null, "(15)",
123          "Test ID3V1 Title", "2011", "77640", "1", null}
124     };
125 
126     // output recorded video
127     public static final String RECORDED_HVGA_H263 = "/sdcard/HVGA_H263.3gp";
128     public static final String RECORDED_QVGA_H263 = "/sdcard/QVGA_H263.3gp";
129     public static final String RECORDED_SQVGA_H263 = "/sdcard/SQVGA_H263.3gp";
130     public static final String RECORDED_CIF_H263 = "/sdcard/CIF_H263.3gp";
131     public static final String RECORDED_QCIF_H263 = "/sdcard/QCIF_H263.3gp";
132     public static final String RECORDED_PORTRAIT_H263 = "/sdcard/QCIF_mp4.3gp";
133 
134     public static final String RECORDED_HVGA_MP4 = "/sdcard/HVGA_mp4.mp4";
135     public static final String RECORDED_QVGA_MP4 = "/sdcard/QVGA_mp4.mp4";
136     public static final String RECORDED_SQVGA_MP4 = "/sdcard/SQVGA_mp4.mp4";
137     public static final String RECORDED_CIF_MP4 = "/sdcard/CIF_mp4.mp4";
138     public static final String RECORDED_QCIF_MP4 = "/sdcard/QCIF_mp4.mp4";
139 
140     public static final String RECORDED_VIDEO_3GP = "/sdcard/temp.3gp";
141 
142     public static final String INVALD_VIDEO_PATH =
143             "/sdcard/media_api/filepathdoesnotexist" + "/filepathdoesnotexist/temp.3gp";
144 
145     public static final String RECORDED_SURFACE_3GP = "/sdcard/surface.3gp";
146 
147     public static final long RECORDED_TIME = 5000;
148     public static final long VALID_VIDEO_DURATION = 2000;
149 
150     // Streaming test files
151     public static final byte[] STREAM_SERVER =
152             new byte[] {(byte) 75, (byte) 17, (byte) 48, (byte) 204};
153     public static final String STREAM_H264_480_360_1411k =
154             "http://75.17.48.204:10088/yslau/stress_media/h264_regular.mp4";
155     public static final String STREAM_WMV = "http://75.17.48.204:10088/yslau/stress_media/bugs.wmv";
156     public static final String STREAM_H263_176x144_325k =
157             "http://75.17.48.204:10088/yslau/stress_media/h263_regular.3gp";
158     public static final String STREAM_H264_352x288_1536k =
159             "http://75.17.48.204:10088/yslau/stress_media/h264_highBitRate.mp4";
160     public static final String STREAM_MP3 =
161             "http://75.17.48.204:10088/yslau/stress_media/mp3_regular.mp3";
162     public static final String STREAM_MPEG4_QVGA_128k =
163             "http://75.17.48.204:10088/yslau/stress_media/mpeg4_qvga_24fps.3gp";
164     public static final int STREAM_H264_480_360_1411k_DURATION = 46000;
165     public static final int VIDEO_H263_AAC_DURATION = 501000;
166     public static final int VIDEO_H263_AMR_DURATION = 502000;
167 
168     // Video files for WiFi IOT video streaming test.
169     public static final String[] NETWORK_VIDEO_FILES = {
170             "H264_BP_720x480_25fps_256kbps_AMRNB_8khz_12.2kbps_m_0_26.mp4",
171             "MPEG4_SP_720x480_30fps_280kbps_AACLC_48kHz_161kbps_s_0_26.mp4",
172             "MPEG4_SP_720x480_30fps_280kbps_AACLC_48kHz_96kbps_s_0_21.mp4"
173     };
174 }
175