Home | History | Annotate | Download | only in mediaframeworktest
      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_HIGHRES_H263 = "/sdcard/media_api/video/H263_500_AMRNB_12.3gp";
     64     public static final String VIDEO_HIGHRES_MP4 = "/sdcard/media_api/video/H264_500_AAC_128.3gp";
     65     public static final String VIDEO_WEBM = "/sdcard/media_api/video/big-buck-bunny_trailer.webm";
     66 
     67     // Media Recorder
     68     public static final String RECORDER_OUTPUT = "/sdcard/media_api/recorderOutput.amr";
     69 
     70     // video thumbnail
     71     public static final String THUMBNAIL_OUTPUT = "/sdcard/media_api/videoThumbnail.png";
     72     public static final String GOLDEN_THUMBNAIL_OUTPUT = "/sdcard/media_api/goldenThumbnail.png";
     73 
     74     /*
     75      * Metadata Utility Test media files which contain meta data.
     76      */
     77     public static final String[] THUMBNAIL_METADATA_TEST_FILES = {
     78         "/sdcard/media_api/video/H263_500_AMRNB_12.3gp",
     79         "/sdcard/media_api/video/H263_56_AAC_24.3gp",
     80         "/sdcard/media_api/video/H263_56_AMRNB_6.3gp",
     81         "/sdcard/media_api/video/H264_320_AAC_64.3gp",
     82         "/sdcard/media_api/video/H264_320_AMRNB_6.3gp",
     83         "/sdcard/media_api/video/H264_500_AAC_128.3gp",
     84         "/sdcard/media_api/video/H264_HVGA_500_NO_AUDIO.3gp",
     85         "/sdcard/media_api/video/H264_QVGA_500_NO_AUDIO.3gp",
     86         "/sdcard/media_api/video/MPEG4_320_AAC_64.mp4",
     87         "/sdcard/media_api/video/border_large.3gp",
     88         "/sdcard/media_api/videoeditor/H264_BP_800x480_15fps_512kbps_AACLC_24KHz_38Kbps_s_1_17.mp4",
     89         "/sdcard/media_api/videoeditor/H264_MP_960x720_25fps_800kbps_AACLC_48Khz_192Kbps_s_1_17.mp4",
     90         "/sdcard/media_api/videoeditor/MPEG4_SP_640x480_15fps_512kbps_AACLC_48khz_132kbps_s_0_26.mp4",
     91         "/sdcard/media_api/videoeditor/MPEG4_SP_176x144_12fps_92kbps_AMRNB_8KHz_12.2kbps_m_0_27.3gp",
     92         "/sdcard/media_api/videoeditor/MPEG4_SP_720x480_30fps_280kbps_AACLC_48kHz_161kbps_s_0_26.mp4"
     93     };
     94 
     95     public static final String[] ALBUMART_TEST_FILES = {
     96         "/sdcard/media_api/music/MP3_48KHz_128kbps_s_1_17_ID3V1_ID3V2.mp3",
     97         "/sdcard/media_api/music/MP3_48KHz_128kbps_s_1_17_ID3V2.mp3",
     98         "/sdcard/media_api/music/MP3_48KHz_128kbps_s_1_17_ID3V1.mp3",
     99     };
    100 
    101     // TEST_PATH_1: is a video and contains metadata for key "num-tracks"
    102     // TEST_PATH_2: any valid media file.
    103     // TEST_PATH_3: invalid media file
    104     public static final String TEST_PATH_1 = "/sdcard/media_api/video/MPEG4_320_AAC_64.mp4";
    105     public static final String TEST_PATH_3 = "/sdcard/media_api/data.txt";
    106     public static final String TEST_PATH_4 = "somenonexistingpathname";
    107     public static final String TEST_PATH_5 = "mem://012345";
    108 
    109     // Meta data expected result
    110     // The expected tag result in the following order
    111     // cd_track_number, album, artist, author, composer, date, genre
    112     // title, years, duration
    113     public static final String META_DATA_MP3[][] = {
    114         {"/sdcard/media_api/music/MP3_48KHz_128kbps_s_1_17_ID3V1_ID3V2.mp3", "2/34",
    115          "Test ID3V2 Album", "Test ID3V2 Artist", null, "Test ID3V2 Composer",
    116          null, "(1)Classic Rock", "Test ID3V2 Title ", null, "77640", "1", null},
    117         {"/sdcard/media_api/music/MP3_48KHz_128kbps_s_1_17_ID3V2.mp3", "1/10",
    118          "Test ID3V2 Album", "Test ID3V2 Artist", null, "Test ID3V2 Composer",
    119          null, "(74)Acid Jazz", "Test ID3V2 Tag", null, "77640", "1", null},
    120         {"/sdcard/media_api/music/MP3_48KHz_128kbps_s_1_17_ID3V1.mp3", "2",
    121          "Test ID3V1 Album", "Test ID3V1 Artist", null, null, null, "(15)",
    122          "Test ID3V1 Title", "2011", "77640", "1", null}
    123     };
    124 
    125     // output recorded video
    126     public static final String RECORDED_HVGA_H263 = "/sdcard/HVGA_H263.3gp";
    127     public static final String RECORDED_QVGA_H263 = "/sdcard/QVGA_H263.3gp";
    128     public static final String RECORDED_SQVGA_H263 = "/sdcard/SQVGA_H263.3gp";
    129     public static final String RECORDED_CIF_H263 = "/sdcard/CIF_H263.3gp";
    130     public static final String RECORDED_QCIF_H263 = "/sdcard/QCIF_H263.3gp";
    131     public static final String RECORDED_PORTRAIT_H263 = "/sdcard/QCIF_mp4.3gp";
    132 
    133     public static final String RECORDED_HVGA_MP4 = "/sdcard/HVGA_mp4.mp4";
    134     public static final String RECORDED_QVGA_MP4 = "/sdcard/QVGA_mp4.mp4";
    135     public static final String RECORDED_SQVGA_MP4 = "/sdcard/SQVGA_mp4.mp4";
    136     public static final String RECORDED_CIF_MP4 = "/sdcard/CIF_mp4.mp4";
    137     public static final String RECORDED_QCIF_MP4 = "/sdcard/QCIF_mp4.mp4";
    138 
    139     public static final String RECORDED_VIDEO_3GP = "/sdcard/temp.3gp";
    140 
    141     public static final String INVALD_VIDEO_PATH =
    142             "/sdcard/media_api/filepathdoesnotexist" + "/filepathdoesnotexist/temp.3gp";
    143 
    144     public static final String RECORDED_SURFACE_3GP = "/sdcard/surface.3gp";
    145 
    146     public static final long RECORDED_TIME = 5000;
    147     public static final long VALID_VIDEO_DURATION = 2000;
    148 
    149     // Streaming test files
    150     public static final byte[] STREAM_SERVER =
    151             new byte[] {(byte) 75, (byte) 17, (byte) 48, (byte) 204};
    152     public static final String STREAM_H264_480_360_1411k =
    153             "http://75.17.48.204:10088/yslau/stress_media/h264_regular.mp4";
    154     public static final String STREAM_WMV = "http://75.17.48.204:10088/yslau/stress_media/bugs.wmv";
    155     public static final String STREAM_H263_176x144_325k =
    156             "http://75.17.48.204:10088/yslau/stress_media/h263_regular.3gp";
    157     public static final String STREAM_H264_352x288_1536k =
    158             "http://75.17.48.204:10088/yslau/stress_media/h264_highBitRate.mp4";
    159     public static final String STREAM_MP3 =
    160             "http://75.17.48.204:10088/yslau/stress_media/mp3_regular.mp3";
    161     public static final String STREAM_MPEG4_QVGA_128k =
    162             "http://75.17.48.204:10088/yslau/stress_media/mpeg4_qvga_24fps.3gp";
    163     public static final int STREAM_H264_480_360_1411k_DURATION = 46000;
    164     public static final int VIDEO_H263_AAC_DURATION = 501000;
    165     public static final int VIDEO_H263_AMR_DURATION = 502000;
    166 
    167     // Video files for WiFi IOT video streaming test.
    168     public static final String[] NETWORK_VIDEO_FILES = {
    169             "H264_BP_720x480_25fps_256kbps_AMRNB_8khz_12.2kbps_m_0_26.mp4",
    170             "MPEG4_SP_720x480_30fps_280kbps_AACLC_48kHz_161kbps_s_0_26.mp4",
    171             "MPEG4_SP_720x480_30fps_280kbps_AACLC_48kHz_96kbps_s_0_21.mp4"
    172     };
    173 }
    174