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 PVMF_DATA_SOURCE_INIT_EXTENSION_H_INCLUDED 19 #define PVMF_DATA_SOURCE_INIT_EXTENSION_H_INCLUDED 20 21 #ifndef OSCL_BASE_H_INCLUDED 22 #include "oscl_base.h" 23 #endif 24 #ifndef OSCL_TYPES_H_INCLUDED 25 #include "oscl_types.h" 26 #endif 27 #ifndef OSCL_STRING_H_INCLUDED 28 #include "oscl_string.h" 29 #endif 30 #ifndef PVMF_MEDIA_CLOCK_H_INCLUDED 31 #include "pvmf_media_clock.h" 32 #endif 33 #ifndef PV_UUID_H_INCLUDED 34 #include "pv_uuid.h" 35 #endif 36 #ifndef PV_INTERFACE_H 37 #include "pv_interface.h" 38 #endif 39 #ifndef PVMF_FORMAT_TYPE_H_INCLUDED 40 #include "pvmf_format_type.h" 41 #endif 42 #ifndef PVMF_RETURN_CODES_H_INCLUDED 43 #include "pvmf_return_codes.h" 44 #endif 45 46 #define PVMF_DATA_SOURCE_INIT_INTERFACE_MIMETYPE "pvxxx/pvmf/pvmfdatasourceinitalizationinterface" 47 #define PVMF_DATA_SOURCE_INIT_INTERFACE_UUID PVUuid(0x161ef65f,0x8cd1,0x424d,0x9f,0x7f,0xe3,0xf6,0x35,0x2a,0x6c,0x1e) 48 49 class PVMFDataSourceInitializationExtensionInterface : public PVInterface 50 { 51 public: 52 virtual void addRef() = 0; 53 virtual void removeRef() = 0; 54 virtual bool queryInterface(const PVUuid& uuid, PVInterface*& iface) = 0; 55 56 /** 57 * Sets the data necessary to initialize the data source 58 * 59 * @param aSourceURL Wide character string reference to the URL of the source (e.g. path/filename, HTTP URL, RTSP URL) 60 * @param aSourceFormat Reference to a format type describing aSourceURL 61 * @param aSourceData Pointer to opaque data which the receiving component would understand (e.g. authentication information) 62 * @return PVMFSuccess if successfully set. PVMFErrNoMemory if no memory is available to copy the data. PVMFFailure for all other errors. 63 */ 64 virtual PVMFStatus SetSourceInitializationData(OSCL_wString& aSourceURL, 65 PVMFFormatType& aSourceFormat, 66 OsclAny* aSourceData) = 0; 67 /** 68 * Sets the client playback clock for the use of the data source. 69 * 70 * @param aClientClock Pointer to PVMFMediaClock 71 * @return PVMFSuccess if successfully set. PVMFFailure for all other errors. 72 */ 73 virtual PVMFStatus SetClientPlayBackClock(PVMFMediaClock* aClientClock) = 0; 74 75 /** 76 * Sets the estimated server clock for the use of the data source. 77 * 78 * @param aClientClock Pointer to PVMFMediaClock 79 * @return PVMFSuccess if successfully set. PVMFFailure for all other errors. 80 */ 81 virtual PVMFStatus SetEstimatedServerClock(PVMFMediaClock* aClientClock) = 0; 82 83 }; 84 85 86 #define PVMF_DATA_SOURCE_NODE_REGISRTY_INIT_INTERFACE_MIMETYPE "pvxxx/pvmf/pvmfdatasourcenoderegistryinitinterface" 87 #define PVMF_DATA_SOURCE_NODE_REGISRTY_INIT_INTERFACE_UUID PVUuid(0x4f2d9799,0x7621,0x4712,0x85,0x07,0x61,0xd0,0xae,0xa0,0xcf,0x47) 88 89 class PVPlayerNodeRegistryInterface; 90 91 class PVMFDataSourceNodeRegistryInitInterface : public PVInterface 92 { 93 public: 94 /** 95 * Sets the node registry for the use of the data source 96 * 97 * @param aRegistry Pointer to PVPlayerNodeRegistryInterface 98 * @return PVMFSuccess if successfully set. 99 * PVMFFailure for all other errors. 100 */ 101 virtual PVMFStatus SetPlayerNodeRegistry(PVPlayerNodeRegistryInterface* aRegistry) = 0; 102 }; 103 104 #endif //PVMF_DATA_SOURCE_INIT_EXTENSION_H_INCLUDED 105 106