sipxmedialib  Version 3.3
plgg726.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2007-2017 SIPez LLC. All rights reserved.
3 //
4 // Copyright (C) 2007 SIPfoundry Inc.
5 // Licensed by SIPfoundry under the LGPL license.
6 //
7 // $$
9 
10 // Author: Sergey Kostanbaev <Sergey DOT Kostanbaev AT sipez DOT com>
11 
12 #ifndef _plgg726_h_
13 #define _plgg726_h_
14 #ifdef __pingtel_on_posix__
15 # include <mp/MpTypes.h>
16 # include <config.h>
17 # include <spandsp/telephony.h>
18 #else
19  // On Windows we always could use latest SpanDSP, so we do not need HAVE_OLD_LIBSPANDSP
20 # undef HAVE_OLD_LIBSPANDSP
21 #endif
22 #include <mp/codecs/PlgDefsV1.h>
23 
24 #if HAVE_OLD_LIBSPANDSP
25 # define G726_PACKING_NONE 0
26 # define G726_PACKING_LEFT 1
27 # define G726_ENCODING_LINEAR 0
28 #else
29 # include <spandsp/bitstream.h>
30 #endif
31 
32 #include <spandsp/g726.h>
33 
34 
35 int internal_decode_g726(void* handle, const void* pCodedData,
36  unsigned cbCodedPacketSize, void* pAudioBuffer,
37  unsigned cbBufferSize, unsigned *pcbCodedSize,
38  const struct RtpHeader* pRtpHeader);
39 
40 int internal_encode_g726(void* handle, const void* pAudioBuffer,
41  unsigned cbAudioSamples, int* rSamplesConsumed,
42  void* pCodedData, unsigned cbMaxCodedData,
43  int* pcbCodedSize, unsigned* pbSendNow);
44 
45 #endif
46 
47 
48 
RTP header as described in RFC 3550.
Definition: RtpHeader.h:43
int internal_encode_g726(void *handle, const void *pAudioBuffer, unsigned cbAudioSamples, int *rSamplesConsumed, void *pCodedData, unsigned cbMaxCodedData, int *pcbCodedSize, unsigned *pbSendNow)
int internal_decode_g726(void *handle, const void *pCodedData, unsigned cbCodedPacketSize, void *pAudioBuffer, unsigned cbBufferSize, unsigned *pcbCodedSize, const struct RtpHeader *pRtpHeader)