鈼廇bout AndroidSurfaceOutput use PVPlayer as parameter in cupcake

by hanchao3c » Tue, 20 Jan 2009 06:54:52 GMT


Sponsored Links
 In Cupcake branch:

The constructor of AndroidSurfaceOutput add a paramether PVPlayer. It
mean AndroidSurfaceOutput need know who is using this output.

path : external/opencore/android/android_surface_output.cpp
in about 1041
===============================================
    // update app
    mPvPlayer->sendEvent(MEDIA_SET_VIDEO_SIZE, displayWidth,
displayHeight);
===============================================

The displayWidth and displayHeight is the display size  set by
AndroidSurfaceOutput::setParametersSync.

It mean when the displaysize is  set , The AndroidSurfaceOutput need
notify the PVPlayer.
I have 3 question about it :
1.  AndroidSurfaceOutput is designed a passive output , so it looks
strange .

2.  In original design PVPlay will decode using the video size ,
AndroidSurfaceOutput work as output device , it may resize it to
display size.
So when PVPlay need know the display size ?
Do it only used by mediaplayer App ?

3. If the Surface is using hardware overlay , Does it has something
different for it ?






--~--~---------~--~----~------------~-------~--~----~



鈼廇bout AndroidSurfaceOutput use PVPlayer as parameter in cupcake

by hanchao3c » Tue, 20 Jan 2009 07:04:07 GMT


 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 ?

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


鈼廇bout AndroidSurfaceOutput use PVPlayer as parameter in cupcake

by Freepine » Tue, 20 Jan 2009 07:46:39 GMT


 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 <hancha...@gmail.com>


--~--~---------~--~----~------------~-------~--~----~



鈼廇bout AndroidSurfaceOutput use PVPlayer as parameter in cupcake

by Freepine » Tue, 20 Jan 2009 07:50:08 GMT


 oh, maybe below line should be changed to PvmiMIOControl*? maybe I missed
something...
+    AndroidSurfaceOutput* mio = NULL;
+

2009/1/20 Freepine <freep...@gmail.com>


--~--~---------~--~----~------------~-------~--~----~



鈼廇bout AndroidSurfaceOutput use PVPlayer as parameter in cupcake

by hanchao3c » Tue, 20 Jan 2009 07:55:20 GMT


 It seem video MIO has add a new impl too

I think Spark should know it .


--~--~---------~--~----~------------~-------~--~----~



鈼廇bout AndroidSurfaceOutput use PVPlayer as parameter in cupcake

by Freepine » Tue, 20 Jan 2009 11:53:20 GMT


 oh? for hardware overlay?

2009/1/20 hanchao3c <hancha...@gmail.com>


--~--~---------~--~----~------------~-------~--~----~



鈼廇bout AndroidSurfaceOutput use PVPlayer as parameter in cupcake

by Dave Sparks » Tue, 20 Jan 2009 16:24:19 GMT


 Yes, we are providing hardware abstraction for video sink and adding
support for video overlays.



--~--~---------~--~----~------------~-------~--~----~



鈼廇bout AndroidSurfaceOutput use PVPlayer as parameter in cupcake

by Archer » Mon, 26 Jan 2009 19:43:03 GMT


 Hi Dave,

Is there any new update about this hardware abstraction? Is it
available soon?

So right now, by default the generic MIO is being used. then is
hardware accelerated rendering (and color conversion) still enabled
with generic MIO? Or it is completely independent?

Thanks,
Archer




--~--~---------~--~----~------------~-------~--~----~



鈼廇bout AndroidSurfaceOutput use PVPlayer as parameter in cupcake

by Dave Sparks » Mon, 26 Jan 2009 20:14:03 GMT


 I just checked in a change into our internal tree this morning that
moves just a few functions that are specific to the pmem
implementation into a separate subclass. This change should be go out
in the next batch migration within 2-3 days.

With this change, the generic MIO will use the OpenCore codecs, color
convert to RGB565 and push the buffers to SurfaceFlinger. It also
falls back to this behavior if you are running device specific code in
the emulator.

If you want a hardware specific module, you create a subclass of
AndroidSurfaceOutput and a factory function to create it and include
it in a new library called "libopencorehw.so". When PlayerDriver
constructs the video MIO, it dlopen's the hardware library and calls
the factory function to create the MIO. If any of those steps fails,
it falls back to the generic MIO.





--~--~---------~--~----~------------~-------~--~----~



鈼廇bout AndroidSurfaceOutput use PVPlayer as parameter in cupcake

by Archer » Mon, 26 Jan 2009 23:10:30 GMT


 Thank you for the response, Dave.

If I compile the cupcake for G-1, how do I turn on the hardware
accelerated open GL? It seems that the file libhgl.so has to be copied
from an existing phone and added to the compiled image. Are there
anything else need to be done?

Thanks,
Archer






--~--~---------~--~----~------------~-------~--~----~



鈼廇bout AndroidSurfaceOutput use PVPlayer as parameter in cupcake

by Dave Sparks » Tue, 27 Jan 2009 03:50:49 GMT


 I'm not familiar with the process - our internal development is
different, so it hasn't been something I've had to worry about.

Maybe someone else can help?







--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Snapdragon vs. OMAP vs. Hummingbird (Video)

mayan juga buat referensi, ternyata Hummingbird's samsung yg paling cepet

http://pocketnow.com/software-1/snapdragon-vs-omap-vs-hummingbird-video

---
This message was sent by eko.m...@gmail.com via http://addthis.com.  Please 
note that AddThis does not verify email addresses.

Make sharing easier with the AddThis Toolbar:  
http://www.addthis.com/go/toolbar-em

-- 
"Indonesian Android Community [id-android]" 

2. Cannot play MPEG4 video stream on Android SDK 1.6

Anybody any ideas or questions/suggestions?

Regards,
Yadnesh




-- 

3. How to access and edit call phone voice stream

4. vertical Scrollbar in linearlayout not working

5. Any Archos5 owners able to help debug a problem?

6. dissmis a Progressdialog after recieving a message broadcast

7. Quick test with log from a Samsung Moment user please?