It seems android guys are doing some refactoring:)And you can find in latest
master branch, they even changed AndroidSurfaceOutput from constructor
injection to setter injection. But it seems AndroidSurfaceOutput isn't an
interface? I am really curious what below code is prepared for :)
@@
-582,8<http://android.git.kernel.org/?p=platform/external/opencore.git;a=blob;f=android/playerdriver.cpp;h=72320ef33a43b5ff0b53db35265a99ed09625569#l582>
+595,32<http://android.git.kernel.org/?p=platform/external/opencore.git;a=blob;f=android/playerdriver.cpp;h=31f1a1e84a78e8fc15fb81ec8f0a7ed3b76dd463;hb=71652749e2899efc5c108511a1e74399d72fd6e4#l595>@@
void PlayerDriver::handleInit(PlayerInit* ec)
void PlayerDriver::handleSetVideoSurface(PlayerSetVideoSurface* ec)
{
int error = 0;
+ AndroidSurfaceOutput* mio = NULL;
+
+ // attempt to load device-specific video MIO
+ if (mLibHandle != NULL) {
+ VideoMioFactory f = (VideoMioFactory) ::dlsym(mLibHandle,
VIDEO_MIO_FACTORY_NAME);
+ if (f != NULL) {
+ mio = f();
+ }
+ }
+
+ // if no device-specific MIO was created, use the generic one
+ if (mio == NULL) {
+ LOGW("Using generic video MIO");
+ mio = new AndroidSurfaceOutput();
+ }
+
+ // initialize the MIO parameters
+ status_t ret = mio->set(mPvPlayer, ec->surface());
+ if (ret != NO_ERROR) {
+ LOGE("Video MIO set failed");
+ commandFailed(ec);
+ delete mio;
+ return;
+ }
+ mVideoOutputMIO = mio;
- mVideoOutputMIO = new AndroidSurfaceOutput(mPvPlayer, ec->surface());
mVideoNode =
PVMediaOutputNodeFactory::CreateMediaOutputNode(mVideoOutputMIO);
mVideoSink = new PVPlayerDataSinkPVMFNode;
2009/1/20 hanchao3c <[email protected]>
>
>
> I only can think it as the :
> The set display size and the true display size may be not same . (For
> some pixel format it need use 4 bytes or 2 bytes)
> So the Output need notify the PVPlayer .
>
> Does it only for it? or has other meaning ?
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"android-framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-framework?hl=en
-~----------~----~----~----~------~----~------~--~---