Home | History | Annotate | Download | only in android
      1 /* ------------------------------------------------------------------
      2  * Copyright (C) 1998-2009 PacketVideo
      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
     13  * express or implied.
     14  * See the License for the specific language governing permissions
     15  * and limitations under the License.
     16  * -------------------------------------------------------------------
     17  */
     18 #ifndef TEST_PV_PLAYER_ENGINE_CONFIG_H_INCLUDED
     19 #define TEST_PV_PLAYER_ENGINE_CONFIG_H_INCLUDED
     20 
     21 #ifndef PVMF_FORMAT_TYPE_H_INCLUDED
     22 #include "pvmf_format_type.h"
     23 #endif
     24 #define AUDIOSINK_FORMAT_TYPE PVMF_MIME_PCM16
     25 
     26 // The default test file to use
     27 #define DEFAULTSOURCEFILENAME "test.mp4"
     28 #define DEFAULTSOURCEFORMATTYPE PVMF_MIME_MPEG4FF
     29 
     30 // Set to 1 to enable MP4 file test cases, 0 to disable
     31 #define RUN_MP4FILE_TESTCASES 1
     32 // MP4 files to test. Needs to be defined if RUN_MP4FILE_TESTCASES is set to 1
     33 #define LOCAL_TEST_FILE_MP4_FORMAT_TYPE PVMF_MIME_MPEG4FF
     34 #define LOCAL_TEST_FILE_MP4_M4V_AMR "test_m4v_amr.mp4"
     35 #define LOCAL_TEST_FILE_MP4_H263_AMR "test_h263_amr.mp4"
     36 #define LOCAL_TEST_FILE_MP4_AVC_AMR "test_avc_amr.mp4"
     37 #define LOCAL_TEST_FILE_MP4_AMR "test_amr.mp4"
     38 #define LOCAL_TEST_FILE_MP4_AAC "test_aac.mp4"
     39 #define LOCAL_TEST_FILE_MP4_M4V_AMR_TEXT "test_m4v_amr_text.mp4"
     40 
     41 // Set to 1 to enable AMR file test cases, 0 to disable
     42 #define RUN_AMRFILE_TESTCASES 1
     43 // AMR files to test. Needs to be defined if RUN_AMRFILE_TESTCASES is set to 1
     44 #define LOCAL_TEST_FILE_AMR_FORMAT_TYPE PVMF_MIME_AMRFF
     45 #define LOCAL_TEST_FILE_AMR_IETF "test_amr_ietf.amr"
     46 #define LOCAL_TEST_FILE_AMR_IF2 "test_amr_if2.cod"
     47 
     48 // Set to 1 to enable AAC file test cases, 0 to disable
     49 #define RUN_AACFILE_TESTCASES 1
     50 // AAC files to test. Needs to be defined if RUN_AACFILE_TESTCASES is set to 1
     51 #define LOCAL_TEST_FILE_AAC_FORMAT_TYPE PVMF_MIME_AACFF
     52 #define LOCAL_TEST_FILE_AAC_ADTS "test_adts.aac"
     53 #define LOCAL_TEST_FILE_AAC_ADIF "test_adif.aac"
     54 #define LOCAL_TEST_FILE_AAC_RAW "test_raw.aac"
     55 
     56 // Set to 1 to enable MP3 file test cases, 0 to disable
     57 #define RUN_MP3FILE_TESTCASES 1
     58 // MP3 files to test. Needs to be defined if RUN_MP3FILE_TESTCASES is set to 1
     59 #define LOCAL_TEST_FILE_MP3_FORMAT_TYPE PVMF_MIME_MP3FF
     60 #define LOCAL_TEST_FILE_MP3_CBR "test_cbr.mp3"
     61 #define LOCAL_TEST_FILE_MP3_VBR "test_vbr.mp3"
     62 
     63 // Set to 1 to enable 3GP file test cases, 0 to disable
     64 #define RUN_3GPFILE_TESTCASES 1
     65 // 3GP files to test. Needs to be defined if RUN_3GPFILE_TESTCASES is set to 1
     66 #define LOCAL_TEST_FILE_3GP_FORMAT_TYPE PVMF_MIME_MPEG4FF
     67 #define LOCAL_TEST_FILE_3GP "test.3gp"
     68 
     69 // Set to 1 to enable WMA file test cases, 0 to disable
     70 #define RUN_WMAFILE_TESTCASES 1
     71 // WMA files to test. Needs to be defined if RUN_WMAFILE_TESTCASES is set to 1
     72 #define LOCAL_TEST_FILE_WMA_FORMAT_TYPE PVMF_MIME_ASFFF
     73 #define LOCAL_TEST_FILE_WMA "00000035.wma"
     74 
     75 // Set to 1 to enable WMV file test cases, 0 to disable
     76 #define RUN_WMVFILE_TESTCASES 1
     77 // WMV files to test. Needs to be defined if RUN_WMVFILE_TESTCASES is set to 1
     78 #define LOCAL_TEST_FILE_WMV_FORMAT_TYPE PVMF_MIME_ASFFF
     79 #define LOCAL_TEST_FILE_WMV "bad_video_config.wmv"
     80 
     81 // Set to 1 to enable WAV file test cases, 0 to disable
     82 #define RUN_WAVFILE_TESTCASES 1
     83 // WAV files to test. Needs to be defined if RUN_WAVFILE_TESTCASES is set to 1
     84 #define LOCAL_TEST_FILE_WAV_FORMAT_TYPE PVMF_MIME_WAVFF
     85 #define LOCAL_TEST_FILE_WAV "test.wav"
     86 
     87 // Set to 1 to enable ASF file test cases, 0 to disable
     88 #define RUN_ASFFILE_TESTCASES 0
     89 // ASF files to test. Needs to be defined if RUN_ASFFILE_TESTCASES is set to 1
     90 #define LOCAL_TEST_FILE_ASF_FORMAT_TYPE PVMF_MIME_ASFFF
     91 #define LOCAL_TEST_FILE_ASF "test.asf"
     92 
     93 // Set to 1 to enable rtsp cloaking test cases, 0 to disable
     94 #define RUN_RTSP_CLOAKING_TESTCASES 0
     95 
     96 // Set to 1 to enable Real audio file test cases, 0 to disable
     97 #define RUN_REALAUDIO_FILE_TESTCASES 0
     98 
     99 // Real audio files to test. Needs to be defined if RUN_REALAUDIO_FILE_TESTCASES is set to 1
    100 #define LOCAL_TEST_FILE_REALAUDIO_FORMAT_TYPE PVMF_MIME_RMFF
    101 #define LOCAL_TEST_FILE_REALAUDIO "22sec_cook10_stereo.rm"
    102 
    103 // Set to 1 to enable FastTrack download test cases, 0 to disable
    104 #define RUN_FASTTRACK_TESTCASES 0
    105 
    106 // Set to 1 to enable HTTP download test cases, 0 to disable
    107 #define RUN_HTTPDOWNLOAD_TESTCASES 1
    108 
    109 // Set to 1 to enable streaming test cases, 0 to disable
    110 #define RUN_STREAMING_TESTCASES 1
    111 
    112 // Set to 1 to enable streaming test cases, 0 to disable
    113 #define RUN_MS_HTTP_STREAMING_TESTCASES 0
    114 
    115 // Define to enable only 3GPP streaming formats
    116 // Used with #ifdef
    117 #define ONLY_3GPP_STREAMING_FORMAT
    118 
    119 #ifndef RUN_CPMJANUS_TESTCASES
    120 // Set to 1 to enable Janus CPM test cases, 0 to disable
    121 #define RUN_CPMJANUS_TESTCASES 0
    122 #endif
    123 
    124 // Set to 1 to enable OMA1 DLA Passthru CPM test cases, 0 to disable
    125 #define RUN_CPMOMA1_DLAPASSTHRU_TESTCASES 1
    126 
    127 // Set to 1 to enable app involved track selection test cases, 0 to disable
    128 #define RUN_APP_TRACK_SELECTION_TESTCASES 0
    129 
    130 // Set to 1 to use the scheduler native to the system instead of PV scheduler
    131 #define USE_NATIVE_SCHEDULER 0
    132 
    133 // The string to prepend to source filenames
    134 #define SOURCENAME_PREPEND_STRING ""
    135 #define SOURCENAME_PREPEND_WSTRING _STRLIT_WCHAR("")
    136 
    137 // The string to prepend to output filenames
    138 #ifdef ANDROID
    139 #define OUTPUTNAME_PREPEND_STRING "/sdcard/"
    140 #define OUTPUTNAME_PREPEND_WSTRING _STRLIT_WCHAR("/sdcard/")
    141 #else
    142 #define OUTPUTNAME_PREPEND_STRING ""
    143 #define OUTPUTNAME_PREPEND_WSTRING _STRLIT_WCHAR("")
    144 #endif
    145 
    146 //Local playback range
    147 #define FIRST_LOCAL_PLAYBACK 0
    148 #define LAST_LOCAL_PLAYBACK 80
    149 
    150 
    151 /*Number of Invalid test cases  */
    152 
    153 #define NO_OF_AAC_INVALID_TESTCASES 29
    154 const int AAC_INVALID_TEST_ARRAY[NO_OF_AAC_INVALID_TESTCASES] = { 15, 18, 20, 50, 51, 52, 53, 54, 55, 56,
    155         57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
    156         73, 74, 75, 76, 77, 78, 79, 80, 81
    157                                                                 };
    158 
    159 
    160 #define NO_OF_AMR_INVALID_TESTCASES 28
    161 const int AMR_INVALID_TEST_ARRAY[NO_OF_AMR_INVALID_TESTCASES] = { 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
    162         60, 61, 62, 67, 68, 69, 70, 71, 72, 73,
    163         74, 75, 76, 77, 78, 79, 80, 81
    164                                                                 };
    165 
    166 
    167 #define NO_OF_3GP_OR_MP4_INVALID_TESTCASES 20
    168 const int FILE_3GP_OR_MP4_INVALID_TEST_ARRAY[NO_OF_3GP_OR_MP4_INVALID_TESTCASES] = { 50, 63, 64, 65, 66, 67, 68, 69, 70, 71,
    169         72, 73, 74, 75, 76, 77, 78, 79, 80, 81
    170                                                                                    };
    171 
    172 
    173 #define NO_OF_MP3_INVALID_TESTCASES 31
    174 const int MP3_INVALID_TEST_ARRAY[NO_OF_MP3_INVALID_TESTCASES] = { 15, 18, 20, 50, 51, 52, 53, 54, 55, 56,
    175         57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
    176         67, 68, 69, 70, 71, 72, 77, 78, 79, 80, 81
    177                                                                 };
    178 
    179 
    180 
    181 #define NO_OF_WAV_INVALID_TESTCASES 33
    182 const int WAV_INVALID_TEST_ARRAY[NO_OF_WAV_INVALID_TESTCASES] = { 15, 18, 20, 50, 51, 52, 53, 54, 55, 56,
    183         57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
    184         67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 79, 80, 81
    185                                                                 };
    186 
    187 
    188 #define NO_OF_ASF_INVALID_TESTCASES 29
    189 const int ASF_INVALID_TEST_ARRAY[NO_OF_ASF_INVALID_TESTCASES] = { 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
    190         61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
    191         71, 72, 73, 74, 75, 76, 77, 78, 81
    192                                                                 };
    193 
    194 
    195 #define NO_OF_REAL_INVALID_TESTCASES 31
    196 const int REAL_INVALID_TEST_ARRAY[NO_OF_REAL_INVALID_TESTCASES] = {50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
    197         60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
    198         70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
    199         80
    200                                                                   };
    201 
    202 
    203 #define NO_OF_WMV_INVALID_TESTCASES 29
    204 const int WMV_INVALID_TEST_ARRAY[NO_OF_WMV_INVALID_TESTCASES] = { 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
    205         61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
    206         71, 72, 73, 74, 75, 76, 77, 78, 81
    207                                                                 };
    208 
    209 
    210 #define NO_OF_WMA_INVALID_TESTCASES 29
    211 const int WMA_INVALID_TEST_ARRAY[NO_OF_WMA_INVALID_TESTCASES] = { 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
    212         61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
    213         71, 72, 73, 74, 75, 76, 77, 78, 81
    214                                                                 };
    215 
    216 
    217 typedef enum Flag_Tag
    218 {
    219     AAC_ENABLED = 0,
    220     AMR_ENABLED,
    221     MP4_ENABLED,
    222     MP3_ENABLED,
    223     WAV_ENABLED,
    224     ASF_ENABLED,
    225     RM_ENABLED,
    226     WMV_ENABLED,
    227     WMA_ENABLED,
    228     THREE_GP_ENABLED,
    229     LAST_FORMAT_ENABLED // Place holder
    230 } Flag;
    231 
    232 #endif
    233 
    234