OSDN Git Service

merge from eclair
authorJean-Baptiste Queru <jbq@google.com>
Sun, 15 Nov 2009 20:06:01 +0000 (12:06 -0800)
committerJean-Baptiste Queru <jbq@google.com>
Sun, 15 Nov 2009 20:06:01 +0000 (12:06 -0800)
18 files changed:
1  2 
android/PVPlayerExtHandler.h
android/android_surface_output.h
android/author/authordriver.h
android/dispatch.h
android/extension_registry_populator_interface.h
android/mediascanner.cpp
build_config/opencore_dynamic/Android_opencore_author.mk
build_config/opencore_dynamic/Android_opencore_player.mk
codecs_v2/omx/omx_common/include/pv_omxcore.h
codecs_v2/omx/omx_proxy/src/omx_proxy_interface.h
codecs_v2/omx/omx_proxy/src/pv_omx_proxied_interface.h
oscl/oscl/osclbase/src/oscl_opaque_type.h
oscl/oscl/osclio/src/oscl_file_io.h
oscl/oscl/oscllib/src/oscl_shared_lib_interface.h
oscl/oscl/osclproc/src/oscl_scheduler_readyq.h
pvmi/pvmf/include/pvmf_node_interface.h
pvmi/pvmf/include/pvmi_data_stream_interface.h
tools_v2/build/make/android_segments.mk

index b9715c1,0000000..316a981
mode 100644,000000..100644
--- /dev/null
@@@ -1,63 -1,0 +1,63 @@@
- #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>
  
@@@ -114,6 -117,6 +121,8 @@@ public
      {
          delete((DestructClass*)ptr);
      }
++
++    virtual ~LogAppenderDestructDealloc(){}
  };
  
  // Commands that MediaAuthor sends to the AuthorDriver.
index ae4ac03,0000000..52b8641
mode 100755,000000..100755
--- /dev/null
@@@ -1,52 -1,0 +1,52 @@@
- #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
index 488bd71,0000000..f452985
mode 100644,000000..100644
--- /dev/null
@@@ -1,83 -1,0 +1,87 @@@
 +#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
 +
 +
Simple merge
@@@ -11,7 -10,7 +11,7 @@@ LOCAL_WHOLE_STATIC_LIBRARIES +=  liband
  
  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
  
@@@ -27,7 -26,7 +27,7 @@@ LOCAL_WHOLE_STATIC_LIBRARIES +=  liband
  
  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
  
@@@ -137,6 -180,7 +137,8 @@@ class OmxSharedLibraryInterfac
  {
      public:
          virtual OsclAny *QueryOmxComponentInterface(const OsclUuid& aOmxTypeId, const OsclUuid& aInterfaceId) = 0;
 -        virtual ~OmxSharedLibraryInterface() {}
++
++        virtual ~OmxSharedLibraryInterface(){}
  };
  #endif // USE_DYNAMIC_LOAD_OMX_COMPONENTS
  
@@@ -560,6 -560,6 +560,8 @@@ class BasicDestructDealloc : public Osc
          {
              delete(PVLoggerAppender*)ptr;
          }
++
++        virtual ~BasicDestructDealloc(){}
  };
  
  
@@@ -201,6 -202,6 +201,8 @@@ class PVMainProxy_OM
          **   notifications still remaining on the queue.
          */
          virtual void DeliverNotifications(int32 aMaxCount, int32& aPendingCount) = 0;
++
++        virtual ~PVMainProxy_OMX(){}
  };
  
  /**
@@@ -243,6 -245,6 +245,8 @@@ class PVProxiedEngine_OM
          **   to the main proxy.
          */
          virtual void PVThreadLogoff(PVMainProxy_OMX &proxy) = 0;
++
++        virtual ~PVProxiedEngine_OMX(){}
  };
  
  /**
@@@ -298,6 -302,6 +302,8 @@@ class PVProxiedInterfaceServer_OM
          ** @param aMsg: the notification data.
          */
          virtual void CleanupNotification(TPVProxyMsgId aId, OsclAny* aMsg) = 0;
++
++        virtual ~PVProxiedInterfaceServer_OMX(){}
  };
  
  /**
@@@ -325,6 -331,6 +331,8 @@@ class PVProxiedInterfaceClient_OM
          ** @param aMsg: the command data.
          */
          virtual void CleanupCommand(TPVProxyMsgId aId, OsclAny* aMsg) = 0;
++
++        virtual ~PVProxiedInterfaceClient_OMX(){}
  };
  
  /**
@@@ -67,6 -69,6 +67,8 @@@ class Oscl_Opaque_Type_Allo
           * Deallocate memory previously allocated with "allocate"
           */
          virtual void deallocate(OsclAny* p) = 0;
++
++        virtual ~Oscl_Opaque_Type_Alloc(){}
  };
  
  /**
@@@ -91,6 -95,6 +93,7 @@@ class Oscl_Opaque_Type_Compar
           */
          virtual int compare_EQ(const OsclAny* a, const OsclAny* b) const = 0;
  
++        virtual ~Oscl_Opaque_Type_Compare(){}
  };
  
  /**
@@@ -140,6 -146,6 +143,8 @@@ class Oscl_Opaque_Type_Alloc_L
           * Compare data.
           */
          virtual bool compare_data(const OsclAny*elem, const OsclAny*data_val)const = 0;
++
++        virtual ~Oscl_Opaque_Type_Alloc_LL() {}
  };
  
  /*! @} */
@@@ -163,64 -158,6 +163,66 @@@ class Oscl_File : public HeapBas
          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.
           *
@@@ -26,6 -26,7 +26,8 @@@ class OsclSharedLibraryInterfac
  {
      public:
          virtual OsclAny* SharedLibraryLookup(const OsclUuid& aInterfaceId) = 0;
 -        virtual ~OsclSharedLibraryInterface() {}
++
++        virtual ~OsclSharedLibraryInterface(){}
  };
  #endif // OSCL_SHARED_LIB_INTERFACE_H_INCLUDED
  
@@@ -65,6 -65,6 +65,7 @@@ class OsclReadyAlloc: public Oscl_DefAl
          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;
  };
@@@ -225,10 -227,11 +225,12 @@@ class PVMFPortActivity
  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:
  
@@@ -115,6 -114,8 +115,8 @@@ class PVMFDataStreamReadCapacityObserve
  {
      public:
          virtual PvmiDataStreamStatus GetStreamReadCapacity(uint32& aCapacity) = 0;
 -        virtual ~PVMFDataStreamReadCapacityObserver() {}
++        virtual ~PVMFDataStreamReadCapacityObserver(){}
  };
  
  
@@@ -1,7 -1,6 +1,7 @@@
  
  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