How does CTS work? Where can I get the test streams?

by Chenny » Tue, 17 Nov 2009 10:58:08 GMT


Sponsored Links
 Hi Friends,
I am working on the CTS (Compatibility Test Suite), but I am a newer.

-- testPlayAudio fail junit.framework.AssertionFailedError:
expected:<4231.0> but was:<4119.0> at
android.media.cts.MediaPlayerTest.testPlayAudio(MediaPlayerTest.java:
216)

I have checked the CTS source code. And find the the following source
code:

public void testPlayAudio() throws Exception {
        final int mp3Duration = 4231;
        final int tolerance = 50;
        final int seekDuration = 100;
        final int resid = R.raw.testmp3;

        MediaPlayer mp = MediaPlayer.create(mContext, resid);
        mp.setAudioStreamType(AudioManager.STREAM_MUSIC);
        mp.setWakeMode(mContext, PowerManager.PARTIAL_WAKE_LOCK);

        assertFalse(mp.isPlaying());
        mp.start();
        assertTrue(mp.isPlaying());

        assertFalse(mp.isLooping());
        mp.setLooping(true);
        assertTrue(mp.isLooping());

        assertEquals(mp3Duration, mp.getDuration(), tolerance);    //
Error from here.
...............
}

duration from getDuration() is different from the expected (4231.
Should be 4181 to 4281). But my questions are:
1. Where is the tested mp3? I cannot find it any where.
2. Why do we set the duration for the tested mp3 to 4231 (final int
mp3Duration = 4231;)? Could we set it to other number?

Thanks very much!

--



How does CTS work? Where can I get the test streams?

by Chenny » Tue, 17 Nov 2009 11:37:24 GMT


 I checked the source code. And noticed the location of testmp3.mp3.

But from some tool, the original duration is 3860 ms.

The expected duration is 4231. Which tool can check the real duration
of the clip?




--


Sponsored Links


How does CTS work? Where can I get the test streams?

by Chenny » Fri, 20 Nov 2009 15:14:52 GMT


 Dear friends,

I tried to test video by modify the CTS source code. But failed when
build:

cts/tests/tests/media/src/android/media/cts/MediaPlayerTest.java:486:
cannot find symbol
symbol  : variable testvideompeg4
location: class com.android.cts.stub.R.raw
                final int resid = R.raw.testvideompeg4;

I only change the tested stream (testvideo) to my own stream
(testvideompeg4). Code:
//final int resid = R.raw.testvideo;
final int resid = R.raw.testvideompeg4;

testvideompeg4 has been put into the folder: *\cts\tests\res\raw

Anybody meet the similar issue?






--



Other Threads

1. streaming issue with mediaplayer on android 2.0

I've tried that too. No one has any clue as why this might happen?






-- 

2. Two selectable items in each list Item in listView.

The way i want it is, per row there will be a text and is followed by a
right arrow button, so that the user can click on that button to edit the
content of that row. If the user is using the keypad, by using the left and
right buttons on the keypad , he should be able to select the textview or
the Button in that particular row. I have seen this in a couple of apps. The
way i see that working on those apps appear as if they are maintaining two
lists in parallel.  The reason i felt it this way is, if i am on row 1 of
the list, and if i press the right key on the phone keypad, then the right
arrow button will get highlighted and now if i use the down key or if i keep
pressing the down key, then the focus will scroll through that arrow button
only as if that is an another parallel list contructed. I dont know if that
is a good way to do it. Can any one help me in this.

I tried many for getting this to work, but couldn't succeed.

-- 

3. Android kernel 2.6.32 for review

4. After Activity closed, restart of APP??

5. Rotate animation applied to full window -- view crops width? How to fix?

6. Android Eclair porting on Beagleboard Omap3530 Init problem when booting

7. Only onCreate and no onRestart after startActivity ! Please Help