Thank you for pointing me in the right direction, Freepine. I
especially appreciate the note about
PVMFDataSourceInitializationExtensionInterface::SetSourceInitializationData
(). I was following the CPM Developer's Guide, and although it
mentions SetSourceInitializationData(), I thought it referred to
PVMFCPMPluginInterface::SetSourceInitializationData(), because that is
used in the reference implementation in \pvmi\content_policy_manager
\plugins\oma1\passthru.
I guess I am confused why the reference implementation does not use
PVMFDataSourceInitializationExtensionInterface. Is there a better or
newer reference for dynamically loaded CPM plugins?
That also leads me to wonder if the docs in external\opencore\doc are
still relevant? For example, the PVPlayer SDK Developer's Guide
mentions that "CPM plug-ins are registered with a factory function and
a MIME string, using the PVMFCPMPluginFactoryRegistryClient class"...
Maybe the docs are for OpenCORE 1.x?
Again, thanks. I was able to get a basic CPM plug-in to be loaded in
LoadLibrary(). Now I just need to get it to Init() and actually do
something ;)
~Andrew
On Jul 23, 6:12 am, Freepine <
freep...@gmail.com> wrote:
> CPM plugins are loaded when PVPlayerEngine invokes
> SetSourceInitializationData on the source node via
> PVMFDataSourceInitializationExtensionInterface interface. However, you need
> add an entry in pvplayer.cfg file with
> PVMF_CPM_PLUGIN_REGISTRY_POPULATOR_UUID and your .so name, then it can be
> added into CPMPluginRegistry as a dynamic module at runtime.
> You can have a look at external/opencore/
> modules/cpm_oma1_passthru/build/make/pvdrm_oma1passthru.cfg as an example:
http://android.git.kernel.org/?p=platform/external/opencore.git;a=blo...
>
> On Wed, Jul 22, 2009 at 12:20 AM, Andrew <
awoo...@gmail.com> wrote:
>
> > Hello,
>
> > I am trying to understand how and when a CPM plugin gets loaded. I
> > have created an image with PVLOGGING=1, wrote a simple app to create a
> > MediaPlayer instance on the emulator, and am viewing logs through
> > LogCat on Eclipse. LogCat shows that pvplayer.cfg is parsed and
> > several shared object files are loaded, but there are no entries for
> > any CPM plugins. From the code samples it seems that
> > PvmfOma1PassthruPluginPopulator should create
> > PVMFOma1PassthruPluginFactory.
>
> > Could somebody please explain how a CPM plugin is loaded? Is it after
> > a splitter node recognizes that a file is DRM-protected, or when the
> > media player starts up, or at some other time?
>
> > Thanks,
> > ~Andrew
>
> > P.S. I had just posted this question on android-framework, but as
> > that group is being shut down and messages will not be moved over, I
> > have added it here. I apologize for any confusion.
>
> Thank you for pointing me in the right direction, Freepine. I especially appreciate the note about PVMFDataSourceInitializationExtensionInterface::SetSourceInitializationData(). I was following the CPM Developer's Guide, and although it mentions SetSourceInitializationData(), I thought it referred to PVMFCPMPluginInterface::SetSourceInitializationData(), which is used in the reference implementation in \pvmi\content_policy_manager\plugins\oma1\passthru.
I guess I am confused why the reference implementation does not use
PVMFDataSourceInitializationExtensionInterface. Is there a better or
newer reference for dynamically loaded CPM plugins?
That also leads me to wonder if the docs in external\opencore\doc are
still relevant? For example, the PVPlayer SDK Developer's Guide
mentions that "CPM plug-ins are registered with a factory function and
a MIME string, using the PVMFCPMPluginFactoryRegistryClient class"...
~Andrew