Home | History | Annotate | Download | only in src
      1 /* ------------------------------------------------------------------
      2  * Copyright (C) 1998-2009 PacketVideo
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
     13  * express or implied.
     14  * See the License for the specific language governing permissions
     15  * and limitations under the License.
     16  * -------------------------------------------------------------------
     17  */
     18 #ifndef OSCL_BASE_H_INCLUDED
     19 #include "oscl_base.h"
     20 #endif
     21 
     22 #ifndef PV_PLAYER_INTERFACE_H_INCLUDED
     23 #include "pv_player_interface.h"
     24 #endif
     25 
     26 #ifndef PV_ENGINE_OBSERVER_H_INCLUDED
     27 #include "pv_engine_observer.h"
     28 #endif
     29 
     30 #ifndef PV_PLAYER_ENGINE_H_INCLUDED
     31 #include "pv_player_engine.h"
     32 #endif
     33 
     34 #ifndef PV_PLAYER_FACTORY_H_INCLUDED
     35 #include "pv_player_factory.h"
     36 #endif
     37 
     38 #ifndef OSCL_DLL_H_INCLUDED
     39 #include "oscl_dll.h"
     40 #endif
     41 
     42 // Define entry point for this DLL
     43 OSCL_DLL_ENTRY_POINT_DEFAULT()
     44 
     45 OSCL_EXPORT_REF PVPlayerInterface *PVPlayerFactory::CreatePlayer(PVCommandStatusObserver* aCmdStatusObserver,
     46         PVErrorEventObserver *aErrorEventObserver,
     47         PVInformationalEventObserver *aInfoEventObserver,
     48         bool aHwAccelerated)
     49 {
     50     return PVPlayerEngine::New(aCmdStatusObserver, aErrorEventObserver, aInfoEventObserver, aHwAccelerated);
     51 }
     52 
     53 OSCL_EXPORT_REF bool PVPlayerFactory::DeletePlayer(PVPlayerInterface* aPlayer)
     54 {
     55     PVPlayerEngine* engptr = (PVPlayerEngine*)aPlayer;
     56     OSCL_DELETE(engptr);
     57 
     58     return true;
     59 }
     60 
     61 
     62