This file is indexed.

/usr/include/sipxtapi/mp/MpEncoderBase.h is in libsipxtapi-dev 3.3.0~test17-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
166
167
//  
// Copyright (C) 2006-2011 SIPez LLC.  All rights reserved.
// Licensed to SIPfoundry under a Contributor Agreement. 
//
// Copyright (C) 2004-2008 SIPfoundry Inc.
// Licensed by SIPfoundry under the LGPL license.
//
// Copyright (C) 2004-2006 Pingtel Corp.  All rights reserved.
// Licensed to SIPfoundry under a Contributor Agreement.
//
// $$
///////////////////////////////////////////////////////////////////////////////

#ifndef _MpEncoderBase_h_
#define _MpEncoderBase_h_

// SYSTEM INCLUDES

// APPLICATION INCLUDES
#include "os/OsStatus.h"
#include "mp/MpAudioBuf.h"
#include "mp/MpCodecInfo.h"
#include "mp/MpPlgStaffV1.h"

// DEFINES
// MACROS
// EXTERNAL FUNCTIONS
// EXTERNAL VARIABLES
// CONSTANTS
// STRUCTS
// TYPEDEFS
// FORWARD DECLARATIONS

/// Base class for all media processing encoders.
class MpEncoderBase
{
/* //////////////////////////// PUBLIC //////////////////////////////////// */
public:

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

     /// Constructor
   MpEncoderBase(int payloadType,
                 const MpCodecCallInfoV1& callInfo,
                 const MppCodecInfoV1_1& codecInfo,
                 const char* defaultFmtp);
     /**<
     *  @param[in] payloadType - RTP payload type associated with this encoder.
     *  @param[in] callInfo - codec manipulator functions.
     *  @param[in] codecInfo - codec information struct.
     *  @param[in] defaultFmtp - default codec fmtp string.
     */

     /// Destructor
   ~MpEncoderBase();

     /// Initializes encoder with given fmtp parameters
   OsStatus initEncode(const char* fmt);
     /**<
     *  @retval OS_SUCCESS - Success.
     *  @retval OS_FAILED - Failure.
     */

     /// Initializes encoder with default fmtp parameters
   OsStatus initEncode();
     /**<
     *  @retval OS_SUCCESS - Success.
     *  @retval OS_FAILED - Failure.
     */

     /// Frees all memory allocated to the encoder by initEncode()
   OsStatus freeEncode();
     /**<
     *  @retval OS_SUCCESS - Success.
     *  @retval OS_INVALID_STATE - Object has already been freed.
     */

//@}

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

     /// Encode audio samples
   OsStatus encode(const MpAudioSample* pAudioSamples,
                   const int numSamples,
                   int& rSamplesConsumed,
                   unsigned char* pCodeBuf,
                   const int bytesLeft,
                   int& rSizeInBytes,
                   UtlBoolean& isPacketReady,
                   UtlBoolean& isPacketSilent,
                   UtlBoolean& shouldSetMarker);
     /**<
     *  Processes the array of audio samples.  If sufficient samples to encode
     *  a frame are now available, the encoded data will be written to the
     *  \p pCodeBuf array.  The number of bytes written to the
     *  \p pCodeBuf array is returned in \p rSizeInBytes.
     *
     *  @param[in]  pAudioSamples - Pointer to array of PCM samples.
     *  @param[in]  numSamples - Number of samples at pAudioSamples.
     *  @param[out] rSamplesConsumed - Number of samples encoded.
     *  @param[out] pCodeBuf - Pointer to array for encoded data.
     *  @param[in]  bytesLeft - Number of bytes available at pCodeBuf.
     *  @param[out] rSizeInBytes - Number of bytes written to the <i>pCodeBuf</i> array.
     *  @param[out] isPacketReady - If TRUE, encoder finished encoding, so packet
     *              may be sent. If DTX is enabled, \p sendNow should be set
     *              to TRUE for all supressed packets too along with 
     *              \p isPacketSilent set to TRUE.
     *  @param[out] isPacketSilent - If TRUE, packet may be not transmitted
     *              if DTX is enabled, if FALSE, packet contain active voice
     *              data and should always be transmitted. Value of
     *              \p isPacketSilent is ignored with \p isPacketReady is set
     *              to FALSE.
     *
     *  @retval OS_SUCCESS - Success.
     */


//@}

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

     /// Get static information about the encoder
   const MpCodecInfo* getInfo() const;
     /**<
     *  @returns A pointer to an MpCodecInfo object that provides static
     *           information about the encoder.
     */

     /// Returns the RTP payload type associated with this encoder.
   int getPayloadType();

//@}

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

//@}

/* //////////////////////////// PROTECTED ///////////////////////////////// */

/* //////////////////////////// PRIVATE /////////////////////////////////// */
private:
   int mPayloadType;           ///< RTP payload type, associated with this codec.
   MpCodecInfo mCodecInfo;     ///< Codec info structure
   void* plgHandle;            ///< Internal codec handle.
   const MpCodecCallInfoV1& mCallInfo; ///< Actual codec's manipulator functions.
   UtlBoolean mInitialized;    ///< Is codec initialized?
   const char* mDefaultFmtp;   ///< Default fmtp string.

     /// Copy constructor
   MpEncoderBase(const MpEncoderBase& rMpEncoderBase);

     /// Assignment operator
   MpEncoderBase& operator=(const MpEncoderBase& rhs);

};

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

#endif  // _MpEncoderBase_h_