• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 PVMI_MEDIA_IO_FILEOUTPUT_REGISTRY_FACTORY_H_INCLUDED
19 #define PVMI_MEDIA_IO_FILEOUTPUT_REGISTRY_FACTORY_H_INCLUDED
20 
21 #ifndef PVMF_NODE_REGISTRY_H_INCLUDED
22 #include "pvmf_node_registry.h"
23 #endif
24 #ifndef PVMI_CONFIG_AND_CAPABILITY_H_INCLUDED
25 #include "pvmi_config_and_capability.h"
26 #endif
27 
28 /**
29 ** UUID for the component
30 */
31 #define PVMFMediaFileOutputUuid PVUuid(0x71032c90,0xf24c,0x11d9,0x8c,0xd6,0x08,0x00,0x20,0x0c,0x9a,0x66)
32 
33 /**
34 ** A factory class for use with the PVMF Node Registry
35 */
36 
37 class PVMFMediaFileOutputRegistryFactory: public PVMFMediaIOCreationInterface
38         , public PvmiCapabilityAndConfig
39 {
40     public:
41         /*
42         ** Get the default registration info for this component
43         **  @param info (output): component registration info.
44         */
GetDefaultMediaIORegistrationInfo(PVMFMediaIORegistrationInfo & info)45         void GetDefaultMediaIORegistrationInfo(PVMFMediaIORegistrationInfo& info)
46         {
47             info.iUuid = PVMFMediaFileOutputUuid;
48 
49             info.iMediaCategory = "multi";
50             info.iComponentType = "media_output/file";
51             info.iHasHardwareAssist = false;
52 
53             info.iMediaIOCreationInterface = this;
54             info.iMediaIOInstance = NULL;
55 
56             info.iQueryInterface = this;
57 
58             //this component can handle any audio or video format.
59             info.iCapability.AddInputFormat("audio");
60             info.iCapability.AddInputFormat("video");
61         }
62 
63         //from PVMFMediaIOCreationInterface
64         OSCL_IMPORT_REF PvmiMIOControl* CreateMediaIO(OsclAny* aParam);
65         OSCL_IMPORT_REF void ReleaseMediaIO(PvmiMIOControl* aNode);
66 
67         //from PvmiCapabilityAndConfig interface
getParametersSync(PvmiMIOSession,PvmiKeyType,PvmiKvp * &,int &,PvmiCapabilityContext)68         PVMFStatus getParametersSync(PvmiMIOSession , PvmiKeyType ,
69                                      PvmiKvp*& , int& , PvmiCapabilityContext)
70         {
71             return PVMFFailure;//nothing available yet.
72         }
releaseParameters(PvmiMIOSession,PvmiKvp *,int)73         PVMFStatus releaseParameters(PvmiMIOSession , PvmiKvp* , int)
74         {
75             return PVMFFailure;
76         }
setParametersSync(PvmiMIOSession,PvmiKvp * aParameters,int,PvmiKvp * & aRet_kvp)77         void setParametersSync(PvmiMIOSession , PvmiKvp* aParameters,
78                                int , PvmiKvp * & aRet_kvp)
79         {
80             aRet_kvp = aParameters;//fail.
81         }
verifyParametersSync(PvmiMIOSession,PvmiKvp *,int)82         PVMFStatus verifyParametersSync(PvmiMIOSession , PvmiKvp* , int)
83         {
84             return PVMFFailure;
85         }
setObserver(PvmiConfigAndCapabilityCmdObserver *)86         void setObserver(PvmiConfigAndCapabilityCmdObserver*)
87         {}
createContext(PvmiMIOSession,PvmiCapabilityContext &)88         void createContext(PvmiMIOSession , PvmiCapabilityContext&)
89         {}
setContextParameters(PvmiMIOSession,PvmiCapabilityContext &,PvmiKvp *,int)90         void setContextParameters(PvmiMIOSession , PvmiCapabilityContext& , PvmiKvp* , int)
91         {}
DeleteContext(PvmiMIOSession,PvmiCapabilityContext &)92         void DeleteContext(PvmiMIOSession , PvmiCapabilityContext&)
93         {}
94         PVMFCommandId setParametersAsync(PvmiMIOSession , PvmiKvp* , int , PvmiKvp*& , OsclAny* context = NULL)
95         {
96             OSCL_UNUSED_ARG(context);
97             return -1;
98         }
getCapabilityMetric(PvmiMIOSession)99         uint32 getCapabilityMetric(PvmiMIOSession)
100         {
101             return 0;
102         }
103 
104 };
105 
106 
107 #endif //PVMI_MEDIA_IO_FILEOUTPUT_REGISTRY_FACTORY_H_INCLUDED
108 
109 
110 
111 
112 
113