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 PV_MEDIA_OUTPUT_NODE_FACTORY_H_INCLUDED 19 #define PV_MEDIA_OUTPUT_NODE_FACTORY_H_INCLUDED 20 21 // Forward declaration 22 class PVMFNodeInterface; 23 class PvmiMIOControl; 24 class PVMFNodeCmdStatusObserver; 25 class PVMFNodeInfoEventObserver; 26 class PVMFNodeErrorEventObserver; 27 28 //6418b1e0-f020-11d9-8cd6-0800200c9a66 29 #define PVMFMediaOutputNodeUUID PVUuid(0x6418b1e0,0xf020,0x11d9,0x8c,0xd6,0x08,0x00,0x20,0x0c,0x9a,0x66) 30 31 32 /** 33 * PVMediaOutputNodeFactory Class 34 * 35 * PVMediaOutputNodeFactory class is a singleton class which instantiates and provides 36 * access to PVMediaOutputNode node. It returns a PVMFNodeInterface reference, the 37 * interface class of the PVMediaOutputNode. 38 * 39 * The client is expected to contain and maintain a pointer to the instance created 40 * while the node is active. 41 */ 42 class PVMediaOutputNodeFactory 43 { 44 public: 45 /** 46 * Creates an instance of a PVMediaOutputNode. If the creation fails, this function will leave. 47 * 48 * @param aMIOControl Media IO object to be controlled by this node 49 * @returns A pointer to an author or leaves if instantiation fails 50 */ 51 OSCL_IMPORT_REF static PVMFNodeInterface* CreateMediaOutputNode( 52 PvmiMIOControl* aMIOControl); 53 54 /** 55 * This function allows the application to delete an instance of a PVMediaOutputNode 56 * and reclaim all allocated resources. An instance can be deleted only in 57 * the idle state. An attempt to delete in any other state will fail and return false. 58 * 59 * @param aNode The PVMediaOutputNode to be deleted. 60 */ 61 OSCL_IMPORT_REF static void DeleteMediaOutputNode(PVMFNodeInterface* aNode); 62 63 /** 64 * This function allows the application to retrieve the 65 * media I/O control instance contained within the node. 66 * 67 * @param aNode The PVMediaOutputNode 68 * @returns Pointer to the media I/O component. 69 */ 70 OSCL_IMPORT_REF static PvmiMIOControl* GetMediaIOControl(PVMFNodeInterface* aNode); 71 }; 72 73 74 75 #endif // PV_MEDIA_OUTPUT_NODE_FACTORY_H_INCLUDED 76