audio_frame2: added const semantics

This commit is contained in:
Martin Pulec
2014-08-21 13:45:57 +02:00
parent db9c8cb04f
commit ef733c6f9e
12 changed files with 41 additions and 40 deletions

View File

@@ -67,7 +67,6 @@
#include "perf.h"
#include "audio/audio.h"
#include "audio/codec.h"
#include "audio/utils.h"
#include "crypto/openssl_encrypt.h"
#include "module.h"
#include "rtp/fec.h"
@@ -633,7 +632,7 @@ tx_send_base(struct tx *tx, struct video_frame *frame, struct rtp *rtp_session,
* This multiplication scheme relies upon the fact, that our RTP/pbuf implementation is
* not sensitive to packet duplication. Otherwise, we can get into serious problems.
*/
void audio_tx_send(struct tx* tx, struct rtp *rtp_session, audio_frame2 * buffer)
void audio_tx_send(struct tx* tx, struct rtp *rtp_session, const audio_frame2 * buffer)
{
int pt; /* PT set for audio in our packet format */
unsigned int pos = 0u,
@@ -794,7 +793,7 @@ void audio_tx_send(struct tx* tx, struct rtp *rtp_session, audio_frame2 * buffer
* as the mulaw and A-law standards (dynamic or std PT).
*/
void audio_tx_send_standard(struct tx* tx, struct rtp *rtp_session,
audio_frame2 * buffer) {
const audio_frame2 * buffer) {
//TODO to be more abstract in order to accept A-law too and other supported standards with such implementation
assert(buffer->get_codec() == AC_MULAW || buffer->get_codec() == AC_ALAW);