Commit 0a5e63b6 authored by atraczyk's avatar atraczyk Committed by Guillaume Roguez

media: syntax modifications for native Windows build

- includes <functional> in media_buffer.h for std::function.

- forward declare AudioFrame and DeviceParams as structs in
  media_decoder.h, as they are both defined as such.

- remove AVRational compound literal from media_encoder.cpp.

- use a #pragma message instead of a #warning in Visual Studio

Change-Id: If32cfbb7504d65c9687814dcc3b5dfa859017fc5
Tuleap: #790
Reviewed-by: Guillaume Roguez's avatarGuillaume Roguez <guillaume.roguez@savoirfairelinux.com>
parent 45f3725b
......@@ -23,6 +23,7 @@
#include "config.h"
#include <memory>
#include <functional>
class AVFrame;
......
......@@ -50,12 +50,12 @@ class HardwareAccel;
}
#endif
class AudioFrame;
struct AudioFrame;
class AudioFormat;
class RingBuffer;
class Resampler;
class MediaIOHandle;
class DeviceParams;
struct DeviceParams;
class MediaDecoder {
public:
......
......@@ -594,7 +594,7 @@ void MediaEncoder::prepareEncoderContext(bool is_video)
auto v = av_dict_get(options_, "sample_rate", NULL, 0);
if (v) {
encoderCtx_->sample_rate = atoi(v->value);
encoderCtx_->time_base = (AVRational) {1, encoderCtx_->sample_rate};
encoderCtx_->time_base = AVRational{1, encoderCtx_->sample_rate};
} else {
RING_WARN("[%s] No sample rate set", encoderName);
encoderCtx_->sample_rate = 8000;
......
......@@ -127,7 +127,11 @@ int ff_srtp_decrypt(struct SRTPContext *s, uint8_t *buf, int *lenptr)
{
uint8_t iv[16] = { 0 }, hmac[20];
int len = *lenptr;
#warning seq_largest and roc may be unitialized
#ifdef _MSC_VER
#pragma message (__FILE__ "(" STR2(__LINE__) ") : -NOTE- " seq_largest and roc may be unitialized)
#else
#warning seq_largest and roc may be unitialized
#endif
int av_uninit(seq_largest);
uint32_t ssrc, av_uninit(roc);
uint64_t index;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment