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 19 #ifndef PVMF_FILEINPUT_NODE_INTERNAL_H_INCLUDED 20 #define PVMF_FILEINPUT_NODE_INTERNAL_H_INCLUDED 21 22 #ifndef OSCL_MEM_MEMPOOL_H_INCLUDED 23 #include "oscl_mem_mempool.h" 24 #endif 25 #ifndef PVMF_MEDIA_DATA_H_INCLUDED 26 #include "pvmf_media_data.h" 27 #endif 28 #ifndef PVMF_SIMPLE_MEDIA_BUFFER_H_INCLUDED 29 #include "pvmf_simple_media_buffer.h" 30 #endif 31 32 33 //memory allocator type for this node. 34 typedef OsclMemAllocator PVMFFileInputNodeAllocator; 35 36 37 /////////////////////////////////////////////////////// 38 // For Command implementation 39 /////////////////////////////////////////////////////// 40 41 //Default vector reserve size 42 #define PVMF_FILEINPUT_NODE_COMMAND_VECTOR_RESERVE 10 43 44 //Starting value for command IDs 45 #define PVMF_FILEINPUT_NODE_COMMAND_ID_START 6000 46 47 //Mimetypes for the custom interface 48 #define PVMF_FILEINPUT_NODE_EXTENSION_INTERFACE_MIMETYPE "pvxxx/FileInputNode/ExtensionInterface" 49 #define PVMF_FILEINPUT_NODE_MIMETYPE "pvxxx/FileInputNode" 50 #define PVMF_BASEMIMETYPE "pvxxx" 51 52 //Node command type. 53 //typedef PVMFGenericNodeCommand<PVMFFileInputNodeAllocator> PVMFFileInputNodeCommandBase; 54 #define PVMFFileInputNodeCommandBase PVMFGenericNodeCommand<PVMFFileInputNodeAllocator> // to remove typedef warning on symbian 55 class PVMFFileInputNodeCommand: public PVMFFileInputNodeCommandBase 56 { 57 public: 58 //constructor for Custom2 command Construct(PVMFSessionId s,int32 cmd,int32 arg1,int32 arg2,int32 & arg3,const OsclAny * aContext)59 void Construct(PVMFSessionId s, int32 cmd, int32 arg1, int32 arg2, int32& arg3, const OsclAny*aContext) 60 { 61 PVMFFileInputNodeCommandBase::Construct(s, cmd, aContext); 62 iParam1 = (OsclAny*)arg1; 63 iParam2 = (OsclAny*)arg2; 64 iParam3 = (OsclAny*) & arg3; 65 } Parse(int32 & arg1,int32 & arg2,int32 * & arg3)66 void Parse(int32&arg1, int32&arg2, int32*&arg3) 67 { 68 arg1 = (int32)iParam1; 69 arg2 = (int32)iParam2; 70 arg3 = (int32*)iParam3; 71 } 72 }; 73 74 75 //Command queue type 76 typedef PVMFNodeCommandQueue<PVMFFileInputNodeCommand, PVMFFileInputNodeAllocator> PVMFFileInputNodeCmdQ; 77 78 #endif // PVMF_FILEINPUT_NODE_INTERNAL_H_INCLUDED 79 80 81