New test player stub to load mock native players.
Added a new class TestPlayerStub that takes a magic url in the setDataSource call.
Based on the value of the url, the stub is going to load a DL and create the concrete
player used during the test.
After these initialization steps TestPlayerStub is just a wrapper.
Added a new functional test MediaPlayerInvokeTest to demonstrate how a new
mock player to test the invoke method can be loaded.
Added a new mock player for the invoke test: invoke_mock_media_player.cpp.
diff --git a/include/media/MediaPlayerInterface.h b/include/media/MediaPlayerInterface.h
index d1933f6..9102b40 100644
--- a/include/media/MediaPlayerInterface.h
+++ b/include/media/MediaPlayerInterface.h
@@ -19,8 +19,10 @@
#ifdef __cplusplus
+#include <sys/types.h>
#include <ui/ISurface.h>
#include <utils/RefBase.h>
+#include <utils/Errors.h>
#include <media/mediaplayer.h>
#include <media/AudioSystem.h>
@@ -33,7 +35,11 @@
PV_PLAYER = 1,
SONIVOX_PLAYER = 2,
VORBIS_PLAYER = 3,
- STAGEFRIGHT_PLAYER = 4
+ STAGEFRIGHT_PLAYER = 4,
+ // Test players are available only in the 'test' and 'eng' builds.
+ // The shared library with the test player is passed passed as an
+ // argument to the 'test:' url in the setDataSource call.
+ TEST_PLAYER = 5,
};