This file is indexed.

/usr/include/sipxtapi/mp/MprToOutputDevice.h is in libsipxtapi-dev 3.3.0~test17-2.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
//  
// Copyright (C) 2007-2008 SIPez LLC. 
// Licensed to SIPfoundry under a Contributor Agreement. 
//
// Copyright (C) 2007-2008 SIPfoundry Inc.
// Licensed by SIPfoundry under the LGPL license.
//
// $$
///////////////////////////////////////////////////////////////////////////////

// Author: Alexander Chemeris <Alexander DOT Chemeris AT SIPez DOT com>

#ifndef _MprToOutputDevice_h_
#define _MprToOutputDevice_h_

// SYSTEM INCLUDES

// APPLICATION INCLUDES
#include <mp/MpAudioResource.h>
#include <mp/MpResourceMsg.h>
#include <mp/MpResampler.h>
#include <os/OsMsgPool.h>

// DEFINES
// MACROS
// EXTERNAL FUNCTIONS
// EXTERNAL VARIABLES
// CONSTANTS
// STRUCTS
// TYPEDEFS
// FORWARD DECLARATIONS
class MpOutputDeviceManager;

/**
*  @brief Resource in which input media from source outside the flowgraph
*         is introduced.
*
*  The MprToOutputDevice get frames of media from its MpOutputDeviceManager.
*  The MpOutputDeviceManager provides some simple buffering of frames from 
*  each device for a small window of time.  It is the MprToOutputDevice
*  responsibility to decide how current to keep (e.g. delay to prevent
*  starvation) with the frames in the MpOutputDeviceManager for the specific
*  device to which is sent output.
*
*  The MprToOutputDevice also maintains so called "copy queue" - a queue to
*  which a copies of buffers are sent. Only copies of buffers accepted by
*  the device are sent to the copy queue. This queue is usually used by echo
*  canceler.
*/
class MprToOutputDevice : public MpAudioResource
{
/* //////////////////////////// PUBLIC //////////////////////////////////// */
public:

/* ============================ CREATORS ================================== */
///@name Creators
//@{

     /// Default constructor
   MprToOutputDevice(const UtlString& rName, 
                     MpOutputDeviceManager* deviceManager,
                     MpOutputDeviceHandle deviceId);

     /// Destructor
   virtual
   ~MprToOutputDevice();

//@}

/* ============================ MANIPULATORS ============================== */
///@name Manipulators
//@{

     /// Send message to enable/disable copy queue.
   static OsStatus enableCopyQ(const UtlString& namedResource, 
                               OsMsgQ& fgQ,
                               UtlBoolean enable);
     /**<
     *  @param[in] namedResource - the name of the resource to send a message to.
     *  @param[in] fgQ - the queue of the flowgraph containing the resource which
     *             the message is to be received by.
     *  @param[in] enable - TRUE to enable copy queue, FALSE to disable it.
     *  @returns the result of attempting to queue the message to this resource.
     */

     /// Send message to enable/disable copy queue.
   OsStatus enableCopyQ(UtlBoolean enable);
     /**<
     *  @param[in] enable - TRUE to enable copy queue, FALSE to disable it.
     *  @returns the result of attempting to queue the message to this resource.
     */

//@}

/* ============================ ACCESSORS ================================= */
///@name Accessors
//@{

     /// Get pointer to the copy queue.
   inline OsMsgQ *getCopyQ();

//@}

/* ============================ INQUIRY =================================== */
///@name Inquiry
//@{

//@}

/* //////////////////////////// PROTECTED ///////////////////////////////// */
protected:


/* //////////////////////////// PRIVATE /////////////////////////////////// */
private:

   typedef enum
   {
      MPRM_ENABLE_COPY_QUEUE = MpResourceMsg::MPRM_EXTERNAL_MESSAGE_START,
      MPRM_DISABLE_COPY_QUEUE
   } AddlResMsgTypes;

   virtual UtlBoolean doProcessFrame(MpBufPtr inBufs[],
                                     MpBufPtr outBufs[],
                                     int inBufsSize,
                                     int outBufsSize,
                                     UtlBoolean isEnabled,
                                     int samplesPerFrame,
                                     int samplesPerSecond);

   MpOutputDeviceManager* mpOutputDeviceManager;
   UtlBoolean mFrameTimeInitialized;
   MpFrameTime mFrameTime;
   MpFrameTime mMixerBufferPosition;
   MpFrameTime mLastPushedTime;
   MpOutputDeviceHandle mDeviceId;
   MpResamplerBase *mpResampler;

   OsMsgQ mCopyQ;    ///< Queue for the copy of data sent to output device.
                     ///< It is usually used by acoustic echo canceler.
   OsMsgPool mCopyQPool; ///< Pool for messages to be sent to mCopyQ.
   UtlBoolean mIsCopyQEnabled; ///< Should we copy data to mCopyQ or not?

     /// @copydoc MpResource::handleMessage()
   virtual UtlBoolean handleMessage(MpResourceMsg& rMsg);

     /// @copydoc MpResource::handleEnable()
   virtual UtlBoolean handleEnable();

     /// Copy constructor (not implemented for this class)
   MprToOutputDevice(const MprToOutputDevice& rMprToOutputDevice);

     /// Assignment operator (not implemented for this class)
   MprToOutputDevice& operator=(const MprToOutputDevice& rhs);

};

/* ============================ INLINE METHODS ============================ */

OsMsgQ *MprToOutputDevice::getCopyQ()
{
   return &mCopyQ;
}

#endif  // _MprToOutputDevice_h_