sipxmedialib  Version 3.3
MprFromInputDeviceConstructor.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2006-2007 SIPfoundry Inc.
3 // Licensed by SIPfoundry under the LGPL license.
4 //
5 // Copyright (C) 2006-2007 SIPez LLC.
6 // Licensed to SIPfoundry under a Contributor Agreement.
7 //
8 // $$
10 
11 // Author: Dan Petrie <dpetrie AT SIPez DOT com>
12 
13 #ifndef _MprFromInputDeviceConstructor_h_
14 #define _MprFromInputDeviceConstructor_h_
15 
16 // SYSTEM INCLUDES
17 // APPLICATION INCLUDES
19 #include <mp/MprFromInputDevice.h>
20 //#include <mp/MprFromMic.h>
21 
22 // DEFINES
23 // MACROS
24 // EXTERNAL FUNCTIONS
25 // EXTERNAL VARIABLES
26 // CONSTANTS
27 // STRUCTS
28 // TYPEDEFS
29 // FORWARD DECLARATIONS
31 
38 {
39 /* //////////////////////////// PUBLIC //////////////////////////////////// */
40 public:
41 
42 /* ============================ CREATORS ================================== */
43 
46  MpInputDeviceHandle defaultDriver = 1)
48  0, 1, //minInputs, maxInputs,
49  1, 1) //minOutputs, maxOutputs
50  , mpDefaultManager(defaultManager)
51  , mDefaultDriver(defaultDriver)
52  {
53  };
54 
57 
58 /* ============================ MANIPULATORS ============================== */
59 
61  virtual OsStatus newResource(const UtlString& resourceName,
62  int maxResourcesToCreate,
63  int& numResourcesCreated,
64  MpResource* resourceArray[])
65  {
66  assert(maxResourcesToCreate >= 1);
67  numResourcesCreated = 1;
68  resourceArray[0] = new MprFromInputDevice(resourceName,
71  resourceArray[0]->disable();
72  return(OS_SUCCESS);
73  }
74 
75 /* ============================ ACCESSORS ================================= */
76 
77 /* ============================ INQUIRY =================================== */
78 
79 /* //////////////////////////// PROTECTED ///////////////////////////////// */
80 protected:
81 
85 
87 /* //////////////////////////// PRIVATE /////////////////////////////////// */
88 private:
89 
91  MprFromInputDeviceConstructor(const MprFromInputDeviceConstructor& rMprFromInputDeviceConstructor);
92 
93 
96 
97 };
98 
99 /* ============================ INLINE METHODS ============================ */
100 
101 #endif // _MprFromInputDeviceConstructor_h_
MprFromInputDeviceConstructor is used to construct a FromInputDevice resource.
Definition: MprFromInputDeviceConstructor.h:37
Container of input devices for input drivers and resources.
Definition: MpInputDeviceManager.h:79
virtual ~MprFromInputDeviceConstructor()
Destructor.
Definition: MprFromInputDeviceConstructor.h:56
virtual UtlBoolean disable()
Disable this resource.
Definition: MpResource.cpp:121
MpInputDeviceHandle mDefaultDriver
Definition: MprFromInputDeviceConstructor.h:84
MpInputDeviceManager * mpDefaultManager
Definition: MprFromInputDeviceConstructor.h:82
Resource in which input media from source outside the flowgraph is introduced.
Definition: MprFromInputDevice.h:45
int MpInputDeviceHandle
Definition: MpTypes.h:48
virtual OsStatus newResource(const UtlString &resourceName, int maxResourcesToCreate, int &numResourcesCreated, MpResource *resourceArray[])
Create a new resource.
Definition: MprFromInputDeviceConstructor.h:61
MprFromInputDeviceConstructor(MpInputDeviceManager *defaultManager, MpInputDeviceHandle defaultDriver=1)
Constructor.
Definition: MprFromInputDeviceConstructor.h:45
Abstract base class for all media processing objects.
Definition: MpResource.h:56
MpAudioResourceConstructor is used to construct a specific audio resource type.
Definition: MpAudioResourceConstructor.h:36
#define DEFAULT_FROM_INPUT_DEVICE_RESOURCE_TYPE
Definition: MpResourceFactory.h:22
MprFromInputDeviceConstructor & operator=(const MprFromInputDeviceConstructor &rhs)
Disable assignment operator.