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 PVMP4FFCN_FACTORY_H_INCLUDED 19 #define PVMP4FFCN_FACTORY_H_INCLUDED 20 21 #ifndef OSCL_BASE_H_INCLUDED 22 #include "oscl_base.h" 23 #endif 24 #ifndef OSCL_SCHEDULER_AO_H_INCLUDED 25 #include "oscl_scheduler_ao.h" 26 #endif 27 #ifndef PVMP4FFCN_TYPES_H_INCLUDED 28 #include "pvmp4ffcn_types.h" 29 #endif 30 31 // Forward declaration 32 class PVMFNodeInterface; 33 34 #define KPVMp4FFComposerNodeUuid PVUuid(0x0d270304,0x2c46,0x4fe7,0x92,0xa1,0xa7,0xaa,0x1f,0x95,0xa0,0x7a) 35 36 /** 37 * PVMp4FFComposerNodeFactory Class 38 * 39 * PVMp4FFComposerNodeFactory class is a singleton class which instantiates and provides 40 * access to PV MPEG4 file format composer. It returns a PVMFNodeInterface 41 * reference, the interface class of the PVMp4FFComposerNode. 42 * 43 * The client is expected to contain and maintain a pointer to the instance created 44 * while the node is active. 45 */ 46 class PVMp4FFComposerNodeFactory 47 { 48 public: 49 /** 50 * Creates an instance of a PV MPEG4 file format composer. If the creation fails, this function will leave. 51 * 52 * @param aPriority Priority of the active object of this node 53 * @returns A pointer to an author or leaves if instantiation fails 54 **/ 55 OSCL_IMPORT_REF static PVMFNodeInterface* CreateMp4FFComposer(int32 aPriority = OsclActiveObject::EPriorityNominal); 56 57 /** 58 * This function allows the application to delete an instance of a PVMp4FFComposerNode 59 * and reclaim all allocated resources. An instance can be deleted only in 60 * the idle state. An attempt to delete in any other state will fail and return false. 61 * 62 * @param aComposer The file format composer to be deleted. 63 * @returns A status code indicating success or failure. 64 **/ 65 OSCL_IMPORT_REF static bool DeleteMp4FFComposer(PVMFNodeInterface* aComposer); 66 }; 67 68 #endif // PVMP4FFCN_FACTORY_H_INCLUDED 69