sipxmedialib  Version 3.3
MprToOutputDeviceConstructor.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2006-2013 SIPez LLC. All rights reserved.
3 //
4 // Copyright (C) 2006-2007 SIPfoundry Inc.
5 // Licensed by SIPfoundry under the LGPL license.
6 //
7 // $$
9 
10 // Author: Dan Petrie <dpetrie AT SIPez DOT com>
11 
12 #ifndef _MprToOutputDeviceConstructor_h_
13 #define _MprToOutputDeviceConstructor_h_
14 
15 // SYSTEM INCLUDES
16 // APPLICATION INCLUDES
18 #include <mp/MprToOutputDevice.h>
19 //#include <mp/MprToSpkr.h>
20 
21 // DEFINES
22 // MACROS
23 // EXTERNAL FUNCTIONS
24 // EXTERNAL VARIABLES
25 // CONSTANTS
26 // STRUCTS
27 // TYPEDEFS
28 // FORWARD DECLARATIONS
30 
37 {
38 /* //////////////////////////// PUBLIC //////////////////////////////////// */
39 public:
40 
41 /* ============================ CREATORS ================================== */
42 
45  MpOutputDeviceHandle defaultDriver = 1)
47  0, 1, //minInputs, maxInputs,
48  1, 1) //minOutputs, maxOutputs
49  , mpDefaultManager(defaultManager)
50  , mDefaultDriver(defaultDriver)
51  {
52  };
53 
56 
57 /* ============================ MANIPULATORS ============================== */
58 
60  virtual OsStatus newResource(const UtlString& resourceName,
61  int maxResourcesToCreate,
62  int& numResourcesCreated,
63  MpResource* resourceArray[])
64  {
65  assert(maxResourcesToCreate >= 1);
66  numResourcesCreated = 1;
67  resourceArray[0] = new MprToOutputDevice(resourceName,
70  resourceArray[0]->disable();
71  return(OS_SUCCESS);
72  }
73 
74 /* ============================ ACCESSORS ================================= */
75 
76 /* ============================ INQUIRY =================================== */
77 
78 /* //////////////////////////// PROTECTED ///////////////////////////////// */
79 protected:
80 
84 
86 /* //////////////////////////// PRIVATE /////////////////////////////////// */
87 private:
88 
90  MprToOutputDeviceConstructor(const MprToOutputDeviceConstructor& rMprToOutputDeviceConstructor);
91 
92 
95 
96 };
97 
98 /* ============================ INLINE METHODS ============================ */
99 
100 #endif // _MprToOutputDeviceConstructor_h_
MpOutputDeviceHandle mDefaultDriver
Definition: MprToOutputDeviceConstructor.h:83
MpOutputDeviceManager * mpDefaultManager
Definition: MprToOutputDeviceConstructor.h:81
MprToOutputDeviceConstructor is used to construct a ToOutputDevice resource.
Definition: MprToOutputDeviceConstructor.h:36
MprToOutputDeviceConstructor & operator=(const MprToOutputDeviceConstructor &rhs)
Disable assignment operator.
virtual OsStatus newResource(const UtlString &resourceName, int maxResourcesToCreate, int &numResourcesCreated, MpResource *resourceArray[])
Create a new resource.
Definition: MprToOutputDeviceConstructor.h:60
Resource in which input media from source outside the flowgraph is introduced.
Definition: MprToOutputDevice.h:50
#define DEFAULT_TO_OUTPUT_DEVICE_RESOURCE_TYPE
Definition: MpResourceFactory.h:24
MprToOutputDeviceConstructor(MpOutputDeviceManager *defaultManager, MpOutputDeviceHandle defaultDriver=1)
Constructor.
Definition: MprToOutputDeviceConstructor.h:44
virtual UtlBoolean disable()
Disable this resource.
Definition: MpResource.cpp:121
int MpOutputDeviceHandle
Definition: MpTypes.h:50
virtual ~MprToOutputDeviceConstructor()
Destructor.
Definition: MprToOutputDeviceConstructor.h:55
Container of output devices.
Definition: MpOutputDeviceManager.h:66
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