--- /dev/null
- #include "utils/Parcel.h"
+#ifndef PVPLAYER_EXT_HANDLER_H_INCLUDED
+#define PVPLAYER_EXT_HANDLER_H_INCLUDED
+
+#include "playerdriver.h"
+
++#include "binder/Parcel.h"
+#include "extension_handler_registry.h"
+using namespace android;
+
+
+class PVPlayerExtensionHandler
+{
+public:
+ PVPlayerExtensionHandler(const PlayerDriver& pd);
+ virtual ~PVPlayerExtensionHandler();
+
+ /**
+ * Extension UUID String is fetched from the data parcel. If the requested Extension is found in the registry,
+ * then its instance is created and handle is returned in the reply parcel.
+ *
+ * @param data
+ * It is a parcel which contains the String UUID of the requested Extension
+ * @param reply
+ * It is a parcel which contains the handle to requested Extension
+ * @return
+ * Completion status
+ */
+ virtual status_t queryExtnIface(const Parcel& data, Parcel& reply);
+ /**
+ * The extension commands are invoked through this function
+ *
+ * @param cmd
+ * The extension command meant to be executed
+ * @param data
+ * It is a parcel which contains Extension handle and data related to Extension Command
+ * @param reply
+ * It is a parcel which contains data returned by the Extension API
+ * @return
+ * Completion status
+ */
+ virtual status_t callPlayerExtension(PlayerExtensionCommand* cmd, const Parcel& data, Parcel& reply);
+
+ // access to playerdriver and its fields
+ PlayerDriver& getPlayerDriver() { return const_cast<PlayerDriver &>(mPlayerDriver); }
+ PVPlayerInterface* getPlayer() { return mPlayerDriver.mPlayer; }
+ void FinishSyncCommand(PlayerCommand* cmd){(const_cast<PlayerDriver &> (mPlayerDriver)).FinishSyncCommand(cmd);}
+ // returns true if aCmd was handled by an extension or false to request default completion
+ virtual bool commandCompleted( PlayerExtensionCommand* cmd, const PVCmdResponse &resp );
+protected:
+ const PlayerDriver& mPlayerDriver;
+ PVPlayerExtensionRegistry mPVPlayerExtnIfaceRegistry;
+private:
+ enum{
+ EXTN_HANDLER_CMD_FIRST = 0,
+ EXTN_HANDLER_CMD_QUERY_EXTN_IFACE = EXTN_HANDLER_CMD_FIRST,
+ EXTN_HANDLER_CMD_EXTN_API_CALL = 1,
+ EXTN_HANDLER_CMD_RELEASE_EXTN_IFACE = 2,
+ EXTN_HANDLER_CMD_LAST
+ };
+};
+
+
+#endif//PVPLAYER_EXT_HANDLER_H_INCLUDED
#ifndef _AUTHORDRIVER_PRIV_H
#define _AUTHORDRIVER_PRIV_H
- #include <utils.h>
++//#include <utils/ported.h>
+ #include <utils/Log.h>
+ #include <utils/threads.h>
++#include <utils/Timers.h>
+ #include <utils/List.h>
++#include <utils/StringArray.h>
++#include <utils/misc.h>
+ #include <utils/Errors.h>
#include <ui/ICamera.h>
{
delete((DestructClass*)ptr);
}
++
++ virtual ~LogAppenderDestructDealloc(){}
};
// Commands that MediaAuthor sends to the AuthorDriver.
--- /dev/null
- #include "utils/Parcel.h"
+#ifndef DISPATCH_H_INCLUDED
+#define DISPATCH_H_INCLUDED
+
++#include "binder/Parcel.h"
+using namespace android;
+
+class PlayerExtensionCommand;
+class PVCmdResponse;
+/**
+ * IDispatch Class
+ */
+class IDispatch {
+public:
+/**
+ * Every Extension needs to implement this interface. This function is used
+ * to execute different commands based on the function index.
+ *
+ * @param data
+ * It is a parcel which contains the information like index
+ * of the function to be executed along with its arguments
+ * @param reply
+ * It is a parcel which contains the information which needs to be
+ * returned to the Application
+ * @param cmd
+ * The extension command meant to be executed
+ * @return
+ * Completion status
+ */
+ virtual status_t invoke(const Parcel& data, Parcel& reply, PlayerExtensionCommand* cmd)=0;
+/**
+ * If any engine commands were scheduled by this extension, this function will be
+ * called upon completion.
+ *
+ * @param cmd
+ * It is the command which has completed
+ * @param resp
+ * It is the respose to the completed command.
+ * @return
+ * false= let playerdriver handle standard command completion
+ * true = command was handled (e.g. FinishSyncCommand, commandFailed) and aCmd deleted
+*/
+ virtual bool commandCompleted(PlayerExtensionCommand* cmd, const PVCmdResponse &resp) {
+ return false;
+ }
+/**
+ * Destructor
+*/
+ virtual ~IDispatch() {}
+};
+
+
+#endif//DISPATCH_H_INCLUDED
--- /dev/null
+#ifndef EXTENSION_REGISTRY_POPULATOR_INTERFACE_H_INCLUDED
+#define EXTENSION_REGISTRY_POPULATOR_INTERFACE_H_INCLUDED
+
+#include "dispatch.h"
+//UUid for the Registry populator Interface which Extension handler looks for in the configuration files while loading the extensions
+#define PV_EXTN_REGISTRY_POPULATOR_INTERFACE OsclUuid(0xf5a4c808,0x963b,0x48db,0xbd,0x13,0x2f,0x7a,0x1f,0x2b,0x41,0x2f)
+
+
+
+class PVPlayerExtensionHandler;
+class ExtensionRegistryInterface;
+
+/**
+ * ExtnRegPopulatorInterface
+ * Extension handler looks for Libraries supporting ExtnRegPopulatorInterface as mentioned in the configuration files
+ */
+class ExtnRegPopulatorInterface
+{
+public:
+ virtual void registerExtensions(ExtensionRegistryInterface* aRegistry) = 0;
++
++ virtual ~ExtnRegPopulatorInterface(){}
+};
+
+/**
+ * PVPlayerExtnInfo
+ * It has the information regarding the creation and deletion of extensions along with its UUID.
+ */
+class PVPlayerExtnInfo
+{
+public:
+ PVPlayerExtnInfo()
+ {
+ mExtnCreateFunc = NULL;
+ mExtnReleaseFunc = NULL;
+ mExtnUID = NULL;
+ }
+
+ PVPlayerExtnInfo(const PVPlayerExtnInfo& info)
+ {
+ mExtnUID = info.mExtnUID;
+ mExtnCreateFunc = info.mExtnCreateFunc;
+ mExtnReleaseFunc = info.mExtnReleaseFunc;
+ }
+
+ ~PVPlayerExtnInfo()
+ {
+ }
+
+ IDispatch*(*mExtnCreateFunc)(PVPlayerExtensionHandler&);
+ bool (*mExtnReleaseFunc)(IDispatch *);
+ const char* mExtnUID;
+};
+
+/**
+ * ExtensionRegistryInterface
+ * This is the interface for Extension registry.
+ */
+class ExtensionRegistryInterface
+{
+public:
+/**
+ * This function creates the requested Extension, if the specified String UUID is present in the registry
+ *
+ * @param ifaceName
+ * String UUID of the Extension which needs to be created
+ * @param extnHandler
+ * Extension handler reference
+ * @return
+ * Handle to the instance of the extension
+ */
+ virtual IDispatch* createExtension(const String16& ifaceName,PVPlayerExtensionHandler& extnHandler ) = 0;
+
+/**
+ * This function is used for registering new extension.
+ *
+ * @param extnInfo
+ * Infornmation required for creation and deletion of extension
+ */
+ virtual void registerExtension(const PVPlayerExtnInfo& extnInfo) = 0;
++
++ virtual ~ExtensionRegistryInterface(){}
+};
+
+#endif // EXTENSION_REGISTRY_POPULATOR_INTERFACE_H_INCLUDED
+
+
LOCAL_MODULE := libopencore_author
- LOCAL_SHARED_LIBRARIES := libutils libcutils libui libandroid_runtime libmedia liblog libicuuc
--include $(PV_TOP)/Android_platform_extras.mk
++LOCAL_SHARED_LIBRARIES := libutils libcutils libui libandroid_runtime libmedia liblog libicuuc libbinder
-include $(PV_TOP)/Android_system_extras.mk
LOCAL_MODULE := libopencore_player
- LOCAL_SHARED_LIBRARIES := libutils libcutils libui libhardware libandroid_runtime libdrm1 libmedia libsgl libvorbisidec libsonivox liblog libicuuc
--include $(PV_TOP)/Android_platform_extras.mk
++LOCAL_SHARED_LIBRARIES := libutils libcutils libui libhardware libandroid_runtime libdrm1 libmedia libskia libvorbisidec libsonivox liblog libicuuc libbinder
-include $(PV_TOP)/Android_system_extras.mk
{
public:
virtual OsclAny *QueryOmxComponentInterface(const OsclUuid& aOmxTypeId, const OsclUuid& aInterfaceId) = 0;
- virtual ~OmxSharedLibraryInterface() {}
++
++ virtual ~OmxSharedLibraryInterface(){}
};
#endif // USE_DYNAMIC_LOAD_OMX_COMPONENTS
{
delete(PVLoggerAppender*)ptr;
}
++
++ virtual ~BasicDestructDealloc(){}
};
** notifications still remaining on the queue.
*/
virtual void DeliverNotifications(int32 aMaxCount, int32& aPendingCount) = 0;
++
++ virtual ~PVMainProxy_OMX(){}
};
/**
** to the main proxy.
*/
virtual void PVThreadLogoff(PVMainProxy_OMX &proxy) = 0;
++
++ virtual ~PVProxiedEngine_OMX(){}
};
/**
** @param aMsg: the notification data.
*/
virtual void CleanupNotification(TPVProxyMsgId aId, OsclAny* aMsg) = 0;
++
++ virtual ~PVProxiedInterfaceServer_OMX(){}
};
/**
** @param aMsg: the command data.
*/
virtual void CleanupCommand(TPVProxyMsgId aId, OsclAny* aMsg) = 0;
++
++ virtual ~PVProxiedInterfaceClient_OMX(){}
};
/**
* Deallocate memory previously allocated with "allocate"
*/
virtual void deallocate(OsclAny* p) = 0;
++
++ virtual ~Oscl_Opaque_Type_Alloc(){}
};
/**
*/
virtual int compare_EQ(const OsclAny* a, const OsclAny* b) const = 0;
++ virtual ~Oscl_Opaque_Type_Compare(){}
};
/**
* Compare data.
*/
virtual bool compare_data(const OsclAny*elem, const OsclAny*data_val)const = 0;
++
++ virtual ~Oscl_Opaque_Type_Alloc_LL() {}
};
/*! @} */
OSCL_IMPORT_REF void SetPVCacheSize(uint32 aSize);
/**
+ * Parameters for defining a fixed cache
+ */
+ class OsclFixedCacheParam
+ {
+ public:
+ /*
+ ** File position where the fixed cache is located.
+ */
+ TOsclFileOffset iFilePosition;
+ /*
+ ** Fixed cache size in bytes.
+ */
+ uint32 iSize;
+
+ bool Contains(TOsclFileOffset pos) const
+ {
+ return (iFilePosition <= pos && pos < iFilePosition + (TOsclFileOffset)iSize);
+ }
+ };
+
+ /**
+ * AddFixedCache adds a fixed cache. The fixed cache will
+ * be used on the next opportunity.
+ * The fixed cache must not overlap with any other fixed cache.
+ *
+ * @param aParam: Cache location and size.
+ */
+ void AddFixedCache(const OsclFixedCacheParam& aParam)
+ {
+ iAddFixedCache.push_back(aParam);
+ }
+
+ /**
+ * RemoveFixedCache removes a fixed cache.
+ *
+ * @param aPos: Cache location and size.
+ */
+ void RemoveFixedCache(const TOsclFileOffset &aPos)
+ {
+ iRemoveFixedCache.push_back(aPos);
+ }
+
+ /**
+ * For defining a cache observer. Cache observer
+ * can implement customized cache schemes by replacing the
+ * SetCachePosition routine.
+ */
+ class OsclCacheObserver
+ {
+ public:
+ virtual OsclFileCacheBuffer* ChooseCurCache(OsclFileCache& aContext, TOsclFileOffset aPos) = 0;
++
++ virtual ~OsclCacheObserver(){}
+ };
+ void SetCacheObserver(OsclCacheObserver* aObs)
+ {
+ iCacheObserver = aObs;
+ }
+
+ /**
* SetNativeAccessMode allows switching between different native file access
* modes, when available.
*
{
public:
virtual OsclAny* SharedLibraryLookup(const OsclUuid& aInterfaceId) = 0;
- virtual ~OsclSharedLibraryInterface() {}
++
++ virtual ~OsclSharedLibraryInterface(){}
};
#endif // OSCL_SHARED_LIB_INTERFACE_H_INCLUDED
OsclAny* allocate(const uint32 size) ;
OsclAny* allocate_fl(const uint32 size, const char * file_name, const int line_num);
void deallocate(OsclAny* p) ;
++ virtual ~OsclReadyAlloc(){}
private:
OsclMemAllocator iBasicAlloc;
};
class PVMFPortActivityHandler
{
public:
- virtual ~PVMFPortActivityHandler() {}
virtual void HandlePortActivity(const PVMFPortActivity &) = 0;
++
++ virtual ~PVMFPortActivityHandler(){}
};
-class OSCL_IMPORT_REF PVMFNodeInterface: public PVMFPortActivityHandler
+class PVMFNodeInterface: public PVMFPortActivityHandler
{
public:
{
public:
virtual PvmiDataStreamStatus GetStreamReadCapacity(uint32& aCapacity) = 0;
- virtual ~PVMFDataStreamReadCapacityObserver() {}
+
++ virtual ~PVMFDataStreamReadCapacityObserver(){}
};
EXTRA_LIBS_opencore_player := libandroidpv
EXTRA_MAKEFILES_PATHS_opencore_player := /android
- EXTRA_SHARED_LIBRARIES_opencore_player := libutils libcutils libui libhardware libandroid_runtime libdrm1 libmedia libsgl libvorbisidec libsonivox liblog libicuuc
++EXTRA_SHARED_LIBRARIES_opencore_player := libutils libcutils libui libhardware libandroid_runtime libdrm1 libmedia libskia libvorbisidec libsonivox liblog libicuuc
EXTRA_LIBS_opencore_author := libandroidpvauthor
EXTRA_MAKEFILES_PATHS_opencore_author := /android/author