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 pvmi_media_io_clock_extension.h 20 * @brief Extension clock interface for media i/o components 21 */ 22 23 #ifndef PVMI_MEDIA_IO_CLOCK_EXTENSION_H_INCLUDED 24 #define PVMI_MEDIA_IO_CLOCK_EXTENSION_H_INCLUDED 25 26 #ifndef OSCL_BASE_H_INCLUDED 27 #include "oscl_base.h" 28 #endif 29 #ifndef OSCL_STRING_H_INCLUDED 30 #include "oscl_string.h" 31 #endif 32 33 #ifndef PVMF_MEDIA_CLOCK_H_INCLUDED 34 #include "pvmf_media_clock.h" 35 #endif 36 37 38 #ifndef PV_UUID_H_INCLUDED 39 #include "pv_uuid.h" 40 #endif 41 #ifndef PV_INTERFACE_H_INCLUDED 42 #include "pv_interface.h" 43 #endif 44 45 46 #define PvmiClockExtensionInterfaceUuid PVUuid(0x5411dd90,0xe335,0x4b06,0xbe,0xe4,0x7c,0x81,0x40,0x6a,0xf3,0xaa) 47 48 /** 49 * PvmiClockExtensionInterface allows an external client to set the clock through this 50 * extension interface. 51 */ 52 class PvmiClockExtensionInterface : public PVInterface 53 { 54 public: 55 /** 56 * Register a reference to this interface. 57 */ 58 virtual void addRef() = 0; 59 60 /** 61 * Remove a reference to this interface. 62 */ 63 virtual void removeRef() = 0; 64 65 /** 66 * Query for an instance of a particular interface. 67 * 68 * @param uuid Uuid of the requested interface 69 * @param iface Output parameter where pointer to an instance of the 70 * requested interface will be stored if it is supported by this object 71 * @return true if the requested interface is supported, else false 72 */ 73 virtual bool queryInterface(const PVUuid& uuid, PVInterface*& iface) = 0; 74 75 /** 76 * This method allows the media I/O component to accept an OSCL clock 77 * 78 * @param clockVal the Instance of OSCL Clock 79 * @return Completion status of this method. 80 */ 81 virtual PVMFStatus SetClock(PVMFMediaClock *clockVal) = 0; 82 }; 83 84 #endif // PVMI_MEDIA_IO_CLOCK_EXTENSION_H_INCLUDED 85 86 87