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 * @file pvmf_ffparsernode_extension.h 20 * @brief Extension interface for PVMF FF parser nodes 21 */ 22 23 #ifndef PVMF_FFPARSERNODE_EXTENSION_H_INCLUDED 24 #define PVMF_FFPARSERNODE_EXTENSION_H_INCLUDED 25 26 #ifndef OSCL_BASE_H_INCLUDED 27 #include "oscl_base.h" 28 #endif 29 #ifndef OSCL_FILE_IO_H_INCLUDED 30 #include "oscl_file_io.h" 31 #endif 32 33 34 #ifndef PV_INTERFACE_H 35 #include "pv_interface.h" 36 #endif 37 #ifndef PV_UUID_H_INCLUDED 38 #include "pv_uuid.h" 39 #endif 40 #ifndef PVMF_FORMAT_TYPE_H_INCLUDED 41 #include "pvmf_format_type.h" 42 #endif 43 #ifndef PVMF_RETURN_CODES_H_INCLUDED 44 #include "pvmf_return_codes.h" 45 #endif 46 47 // UUID for the extension interface 48 // The below commented out line won't build on ARM5 - have to replace w/ #define. Global data not allowed on ARM5. 49 //const PVUuid KPVMFFFParserNodeExtensionUuid = PVUuid(0x72B76D8C,0xB4CC,0x4887,0xB1,0x0B,0x7E,0xE6,0x48,0x47,0xB2,0x05); 50 #define KPVMFFFParserNodeExtensionUuid PVUuid(0x72B76D8C,0xB4CC,0x4887,0xB1,0x0B,0x7E,0xE6,0x48,0x47,0xB2,0x05) 51 52 // Defines 53 #define PVMFFFPARSERNODE_MAX_NUM_TRACKS 6 54 55 // Structs 56 struct PVMFFFParserNodeTrackInfo 57 { 58 int32 iNumTracks; 59 uint32 iTrackId[PVMFFFPARSERNODE_MAX_NUM_TRACKS]; 60 PVMFFormatType iFormatType[PVMFFFPARSERNODE_MAX_NUM_TRACKS]; 61 uint32 iBitrate[PVMFFFPARSERNODE_MAX_NUM_TRACKS]; 62 uint32 iTimescale[PVMFFFPARSERNODE_MAX_NUM_TRACKS]; 63 }; 64 65 /** 66 * PVMFFFParserNodeExtensionInterface specifies extended interfaces for file format parser nodes 67 */ 68 class PVMFFFParserNodeExtensionInterface : public PVInterface 69 { 70 public: 71 virtual void addRef() = 0; 72 virtual void removeRef() = 0; 73 virtual bool queryInterface(const PVUuid& uuid, PVInterface*& iface) = 0; 74 75 /** 76 * Sets the path and filename for the input file to be used for the data source 77 * 78 * @param aFilename Wide character OSCL_String.reference to the input filename 79 * @return PVMFSuccess if successful. PVMFFailure if not 80 */ 81 virtual PVMFStatus SetSourceFilename(OSCL_wString& aFilename) = 0; 82 83 /** 84 * Retrieves the track information for the currently set and initialized file 85 * 86 * @param aTrackInfo Reference to a PVMFFFParserNodeTrackInfo struct that will be filled with track info 87 * @return PVMFSuccess if successful. PVMFFailure if not 88 */ 89 virtual PVMFStatus GetTrackInfo(PVMFFFParserNodeTrackInfo& aTrackInfo) = 0; 90 }; 91 92 #endif // PVMF_FFPARSERNODE_EXTENSION_H_INCLUDED 93