sipxmedialib  Version 3.3
MprEncodeConstructor.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2008 SIPfoundry Inc.
3 // Licensed by SIPfoundry under the LGPL license.
4 //
5 // Copyright (C) 2008 SIPez LLC.
6 // Licensed to SIPfoundry under a Contributor Agreement.
7 //
8 // $$
10 
11 // Author: Alexander Chemeris <Alexander DOT Chemeris AT SIPez DOT com>
12 
13 #ifndef _MprEncodeConstructor_h_
14 #define _MprEncodeConstructor_h_
15 
16 // SYSTEM INCLUDES
17 // APPLICATION INCLUDES
19 #include <mp/MprEncode.h>
20 
21 // DEFINES
22 // MACROS
23 // EXTERNAL FUNCTIONS
24 // EXTERNAL VARIABLES
25 // CONSTANTS
26 // STRUCTS
27 // TYPEDEFS
28 // FORWARD DECLARATIONS
29 
34 {
35 /* //////////////////////////// PUBLIC //////////////////////////////////// */
36 public:
37 
38 /* ============================ CREATORS ================================== */
39 
43  1, 1, //minInputs, maxInputs,
44  1, 1) //minOutputs, maxOutputs
45  {
46  }
47 
49  virtual ~MprEncodeConstructor() {}
50 
51 /* ============================ MANIPULATORS ============================== */
52 
54  virtual OsStatus newResource(const UtlString& resourceName,
55  int maxResourcesToCreate,
56  int& numResourcesCreated,
57  MpResource* resourceArray[])
58  {
59  MprEncode *pEncode = new MprEncode(resourceName);
60 
61  // Return created resource
62  assert(maxResourcesToCreate >= 1);
63  numResourcesCreated = 1;
64  resourceArray[0] = pEncode;
65  resourceArray[0]->disable();
66 
67  return OS_SUCCESS;
68  }
69 
70 /* ============================ ACCESSORS ================================= */
71 
72 /* ============================ INQUIRY =================================== */
73 
74 /* //////////////////////////// PROTECTED ///////////////////////////////// */
75 protected:
76 
77 /* //////////////////////////// PRIVATE /////////////////////////////////// */
78 private:
79 
81  MprEncodeConstructor(const MprEncodeConstructor& rMprEncodeConstructor);
82 
85 
86 };
87 
88 /* ============================ INLINE METHODS ============================ */
89 
90 #endif // _MprEncodeConstructor_h_
MprEncodeConstructor & operator=(const MprEncodeConstructor &rhs)
Disabled assignment operator.
MprEncodeConstructor()
Constructor.
Definition: MprEncodeConstructor.h:41
virtual UtlBoolean disable()
Disable this resource.
Definition: MpResource.cpp:121
MprEncodeConstructor is used to construct a Decode resource.
Definition: MprEncodeConstructor.h:33
The "Encode" media processing resource.
Definition: MprEncode.h:41
virtual OsStatus newResource(const UtlString &resourceName, int maxResourcesToCreate, int &numResourcesCreated, MpResource *resourceArray[])
Create a new resource.
Definition: MprEncodeConstructor.h:54
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_ENCODE_RESOURCE_TYPE
Definition: MpResourceFactory.h:33
virtual ~MprEncodeConstructor()
Destructor.
Definition: MprEncodeConstructor.h:49