mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 579517 follow-up: Remove NSPR types that crept in
This commit is contained in:
parent
e6d815c2e1
commit
c284b98070
@ -43,7 +43,7 @@ nsDOMMediaStream::GetCurrentTime(double *aCurrentTime)
|
||||
}
|
||||
|
||||
already_AddRefed<nsDOMMediaStream>
|
||||
nsDOMMediaStream::CreateInputStream(PRUint32 aHintContents)
|
||||
nsDOMMediaStream::CreateInputStream(uint32_t aHintContents)
|
||||
{
|
||||
nsRefPtr<nsDOMMediaStream> stream = new nsDOMMediaStream();
|
||||
stream->SetHintContents(aHintContents);
|
||||
|
@ -875,8 +875,8 @@ CopyFromUriToFile(nsCString aSpec, nsIFile* aLocalFile)
|
||||
|
||||
char buf[JAR_READ_BUFFER_SIZE];
|
||||
while (true) {
|
||||
PRUint32 read;
|
||||
PRUint32 written;
|
||||
uint32_t read;
|
||||
uint32_t written;
|
||||
|
||||
rv = inputStream->Read(buf, JAR_READ_BUFFER_SIZE, &read);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
@ -947,7 +947,7 @@ void ExtractFontsFromJar(nsIFile* aLocalDir)
|
||||
continue;
|
||||
}
|
||||
|
||||
PRInt32 lastSlash = path.RFindChar('/');
|
||||
int32_t lastSlash = path.RFindChar('/');
|
||||
nsCString fileName;
|
||||
if (lastSlash == kNotFound) {
|
||||
fileName = path;
|
||||
|
@ -869,7 +869,7 @@ short vcmCreateRemoteStream(
|
||||
const char *peerconnection,
|
||||
int *pc_stream_id,
|
||||
vcm_media_payload_type_t payload) {
|
||||
PRUint32 hints = 0;
|
||||
uint32_t hints = 0;
|
||||
nsresult res;
|
||||
|
||||
CSFLogDebug( logTag, "%s", __FUNCTION__);
|
||||
@ -2476,7 +2476,7 @@ vcmCreateTransportFlow(sipcc::PeerConnectionImpl *pc, int level, bool rtcp,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
std::vector<PRUint16> srtp_ciphers;
|
||||
std::vector<uint16_t> srtp_ciphers;
|
||||
srtp_ciphers.push_back(SRTP_AES128_CM_HMAC_SHA1_80);
|
||||
srtp_ciphers.push_back(SRTP_AES128_CM_HMAC_SHA1_32);
|
||||
|
||||
|
@ -109,7 +109,7 @@ nsresult MediaPipeline::TransportReady(TransportFlow *flow) {
|
||||
flow->GetLayer(TransportLayerDtls::ID()));
|
||||
MOZ_ASSERT(dtls); // DTLS is mandatory
|
||||
|
||||
PRUint16 cipher_suite;
|
||||
uint16_t cipher_suite;
|
||||
res = dtls->GetSrtpCipher(&cipher_suite);
|
||||
if (NS_FAILED(res)) {
|
||||
MOZ_MTLOG(PR_LOG_ERROR, "Failed to negotiate DTLS-SRTP. This is an error");
|
||||
@ -491,7 +491,7 @@ void MediaPipelineTransmit::PipelineListener::
|
||||
NotifyQueuedTrackChanges(MediaStreamGraph* graph, TrackID tid,
|
||||
TrackRate rate,
|
||||
TrackTicks offset,
|
||||
PRUint32 events,
|
||||
uint32_t events,
|
||||
const MediaSegment& queued_media) {
|
||||
if (!pipeline_)
|
||||
return; // Detached
|
||||
@ -563,13 +563,13 @@ void MediaPipelineTransmit::ProcessAudioChunk(AudioSessionConduit *conduit,
|
||||
// Code based on nsAudioStream
|
||||
const short* buf = static_cast<const short *>(chunk.mBuffer->Data());
|
||||
|
||||
PRInt32 volume = PRInt32((1 << 16) * chunk.mVolume);
|
||||
for (PRUint32 i = 0; i < chunk.mDuration; ++i) {
|
||||
int32_t volume = int32_t((1 << 16) * chunk.mVolume);
|
||||
for (uint32_t i = 0; i < chunk.mDuration; ++i) {
|
||||
int16_t s = buf[i];
|
||||
#if defined(IS_BIG_ENDIAN)
|
||||
s = ((s & 0x00ff) << 8) | ((s & 0xff00) >> 8);
|
||||
#endif
|
||||
samples[i] = short((PRInt32(s) * volume) >> 16);
|
||||
samples[i] = short((int32_t(s) * volume) >> 16);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -580,7 +580,7 @@ void MediaPipelineTransmit::ProcessAudioChunk(AudioSessionConduit *conduit,
|
||||
}
|
||||
} else {
|
||||
// This means silence.
|
||||
for (PRUint32 i = 0; i < chunk.mDuration; ++i) {
|
||||
for (uint32_t i = 0; i < chunk.mDuration; ++i) {
|
||||
samples[i] = 0;
|
||||
}
|
||||
}
|
||||
@ -751,9 +751,9 @@ void MediaPipelineReceiveVideo::PipelineRenderer::RenderVideoFrame(
|
||||
nsRefPtr<layers::Image> image = image_container_->CreateImage(&format, 1);
|
||||
|
||||
layers::PlanarYCbCrImage* videoImage = static_cast<layers::PlanarYCbCrImage*>(image.get());
|
||||
PRUint8* frame = const_cast<PRUint8*>(static_cast<const PRUint8*> (buffer));
|
||||
const PRUint8 lumaBpp = 8;
|
||||
const PRUint8 chromaBpp = 4;
|
||||
uint8_t* frame = const_cast<uint8_t*>(static_cast<const uint8_t*> (buffer));
|
||||
const uint8_t lumaBpp = 8;
|
||||
const uint8_t chromaBpp = 4;
|
||||
|
||||
layers::PlanarYCbCrImage::Data data;
|
||||
data.mYChannel = frame;
|
||||
|
@ -203,7 +203,7 @@ class MediaPipelineTransmit : public MediaPipeline {
|
||||
virtual void NotifyQueuedTrackChanges(MediaStreamGraph* graph, TrackID tid,
|
||||
TrackRate rate,
|
||||
TrackTicks offset,
|
||||
PRUint32 events,
|
||||
uint32_t events,
|
||||
const MediaSegment& queued_media);
|
||||
virtual void NotifyPull(MediaStreamGraph* aGraph, StreamTime aDesiredTime) {}
|
||||
|
||||
@ -292,7 +292,7 @@ class MediaPipelineReceiveAudio : public MediaPipelineReceive {
|
||||
virtual void NotifyQueuedTrackChanges(MediaStreamGraph* graph, TrackID tid,
|
||||
TrackRate rate,
|
||||
TrackTicks offset,
|
||||
PRUint32 events,
|
||||
uint32_t events,
|
||||
const MediaSegment& queued_media) {}
|
||||
virtual void NotifyPull(MediaStreamGraph* aGraph, StreamTime aDesiredTime);
|
||||
|
||||
|
@ -97,7 +97,7 @@ public:
|
||||
std::string statestr = mInfo->callStateToString(state);
|
||||
|
||||
nsDOMMediaStream* stream;
|
||||
PRUint32 hint;
|
||||
uint32_t hint;
|
||||
|
||||
switch (state) {
|
||||
case CREATEOFFER:
|
||||
@ -215,7 +215,7 @@ LocalSourceStreamInfo::NotifyQueuedTrackChanges(
|
||||
mozilla::TrackID aID,
|
||||
mozilla::TrackRate aTrackRate,
|
||||
mozilla::TrackTicks aTrackOffset,
|
||||
PRUint32 aTrackEvents,
|
||||
uint32_t aTrackEvents,
|
||||
const mozilla::MediaSegment& aQueuedMedia)
|
||||
{
|
||||
/* TODO: use this callback to keep track of changes to the MediaStream */
|
||||
@ -294,7 +294,7 @@ PeerConnectionImpl::~PeerConnectionImpl()
|
||||
|
||||
// One level of indirection so we can use WrapRunnable in CreateMediaStream.
|
||||
nsresult
|
||||
PeerConnectionImpl::MakeMediaStream(PRUint32 aHint, nsIDOMMediaStream** aRetval)
|
||||
PeerConnectionImpl::MakeMediaStream(uint32_t aHint, nsIDOMMediaStream** aRetval)
|
||||
{
|
||||
MOZ_ASSERT(aRetval);
|
||||
|
||||
@ -321,7 +321,7 @@ PeerConnectionImpl::MakeRemoteSource(nsDOMMediaStream* aStream, RemoteSourceStre
|
||||
}
|
||||
|
||||
nsresult
|
||||
PeerConnectionImpl::CreateRemoteSourceStreamInfo(PRUint32 aHint, RemoteSourceStreamInfo** aInfo)
|
||||
PeerConnectionImpl::CreateRemoteSourceStreamInfo(uint32_t aHint, RemoteSourceStreamInfo** aInfo)
|
||||
{
|
||||
MOZ_ASSERT(aInfo);
|
||||
|
||||
@ -509,7 +509,7 @@ PeerConnectionImpl::Initialize(IPeerConnectionObserver* aObserver,
|
||||
}
|
||||
|
||||
nsresult
|
||||
PeerConnectionImpl::CreateFakeMediaStream(PRUint32 aHint, nsIDOMMediaStream** aRetval)
|
||||
PeerConnectionImpl::CreateFakeMediaStream(uint32_t aHint, nsIDOMMediaStream** aRetval)
|
||||
{
|
||||
MOZ_ASSERT(aRetval);
|
||||
|
||||
@ -551,9 +551,9 @@ PeerConnectionImpl::CreateFakeMediaStream(PRUint32 aHint, nsIDOMMediaStream** aR
|
||||
// tests to work (it doesn't have a window available) we ifdef the following
|
||||
// two implementations.
|
||||
NS_IMETHODIMP
|
||||
PeerConnectionImpl::ConnectDataConnection(PRUint16 aLocalport,
|
||||
PRUint16 aRemoteport,
|
||||
PRUint16 aNumstreams)
|
||||
PeerConnectionImpl::ConnectDataConnection(uint16_t aLocalport,
|
||||
uint16_t aRemoteport,
|
||||
uint16_t aNumstreams)
|
||||
{
|
||||
#ifdef MOZILLA_INTERNAL_API
|
||||
mDataConnection = new mozilla::DataChannelConnection(this);
|
||||
@ -576,10 +576,10 @@ PeerConnectionImpl::ConnectDataConnection(PRUint16 aLocalport,
|
||||
|
||||
NS_IMETHODIMP
|
||||
PeerConnectionImpl::CreateDataChannel(const nsACString& aLabel,
|
||||
PRUint16 aType,
|
||||
uint16_t aType,
|
||||
bool outOfOrderAllowed,
|
||||
PRUint16 aMaxTime,
|
||||
PRUint16 aMaxNum,
|
||||
uint16_t aMaxTime,
|
||||
uint16_t aMaxNum,
|
||||
nsIDOMDataChannel** aRetval)
|
||||
{
|
||||
MOZ_ASSERT(aRetval);
|
||||
@ -701,7 +701,7 @@ PeerConnectionImpl::CreateAnswer(const char* aHints, const char* aOffer) {
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
PeerConnectionImpl::SetLocalDescription(PRInt32 aAction, const char* aSDP) {
|
||||
PeerConnectionImpl::SetLocalDescription(int32_t aAction, const char* aSDP) {
|
||||
MOZ_ASSERT(aSDP);
|
||||
|
||||
CheckIceState();
|
||||
@ -711,7 +711,7 @@ PeerConnectionImpl::SetLocalDescription(PRInt32 aAction, const char* aSDP) {
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
PeerConnectionImpl::SetRemoteDescription(PRInt32 action, const char* aSDP) {
|
||||
PeerConnectionImpl::SetRemoteDescription(int32_t action, const char* aSDP) {
|
||||
MOZ_ASSERT(aSDP);
|
||||
|
||||
CheckIceState();
|
||||
@ -731,7 +731,7 @@ PeerConnectionImpl::AddStream(nsIDOMMediaStream* aMediaStream)
|
||||
|
||||
// TODO(ekr@rtfm.com): Remove these asserts?
|
||||
// Adding tracks here based on nsDOMMediaStream expectation settings
|
||||
PRUint32 hints = stream->GetHintContents();
|
||||
uint32_t hints = stream->GetHintContents();
|
||||
|
||||
if (!(hints & (nsDOMMediaStream::HINT_CONTENTS_AUDIO |
|
||||
nsDOMMediaStream::HINT_CONTENTS_VIDEO))) {
|
||||
@ -796,7 +796,7 @@ PeerConnectionImpl::RemoveStream(nsIDOMMediaStream* aMediaStream)
|
||||
for (uint32_t u = 0; u < mLocalSourceStreams.Length(); u++) {
|
||||
nsRefPtr<LocalSourceStreamInfo> localSourceStream = mLocalSourceStreams[u];
|
||||
if (localSourceStream->GetMediaStream() == stream) {
|
||||
PRUint32 hints = stream->GetHintContents();
|
||||
uint32_t hints = stream->GetHintContents();
|
||||
if (hints & nsDOMMediaStream::HINT_CONTENTS_AUDIO) {
|
||||
// <emannion> This API will change when we implement multiple streams
|
||||
// It will only need the ID
|
||||
@ -892,7 +892,7 @@ PeerConnectionImpl::GetRemoteDescription(char** aSDP)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
PeerConnectionImpl::GetReadyState(PRUint32* aState)
|
||||
PeerConnectionImpl::GetReadyState(uint32_t* aState)
|
||||
{
|
||||
MOZ_ASSERT(aState);
|
||||
|
||||
@ -901,7 +901,7 @@ PeerConnectionImpl::GetReadyState(PRUint32* aState)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
PeerConnectionImpl::GetSipccState(PRUint32* aState)
|
||||
PeerConnectionImpl::GetSipccState(uint32_t* aState)
|
||||
{
|
||||
MOZ_ASSERT(aState);
|
||||
|
||||
@ -911,7 +911,7 @@ PeerConnectionImpl::GetSipccState(PRUint32* aState)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
PeerConnectionImpl::GetIceState(PRUint32* aState)
|
||||
PeerConnectionImpl::GetIceState(uint32_t* aState)
|
||||
{
|
||||
MOZ_ASSERT(aState);
|
||||
|
||||
@ -956,11 +956,11 @@ void
|
||||
PeerConnectionImpl::DisconnectMediaStreams()
|
||||
{
|
||||
// TODO(ekr@rtfm.com): Lock
|
||||
for (PRUint32 i=0; i < mLocalSourceStreams.Length(); ++i) {
|
||||
for (uint32_t i=0; i < mLocalSourceStreams.Length(); ++i) {
|
||||
mLocalSourceStreams[i]->Detach();
|
||||
}
|
||||
|
||||
for (PRUint32 i=0; i < mRemoteSourceStreams.Length(); ++i) {
|
||||
for (uint32_t i=0; i < mRemoteSourceStreams.Length(); ++i) {
|
||||
mRemoteSourceStreams[i]->Detach();
|
||||
}
|
||||
|
||||
|
@ -112,8 +112,8 @@ class Fake_VideoGenerator {
|
||||
static void Callback(nsITimer* timer, void *arg) {
|
||||
Fake_VideoGenerator* gen = static_cast<Fake_VideoGenerator*>(arg);
|
||||
|
||||
const PRUint32 WIDTH = 640;
|
||||
const PRUint32 HEIGHT = 480;
|
||||
const uint32_t WIDTH = 640;
|
||||
const uint32_t HEIGHT = 480;
|
||||
|
||||
// Allocate a single blank Image
|
||||
mozilla::ImageFormat format = mozilla::PLANAR_YCBCR;
|
||||
@ -125,18 +125,18 @@ class Fake_VideoGenerator {
|
||||
int len = ((WIDTH * HEIGHT) * 3 / 2);
|
||||
mozilla::layers::PlanarYCbCrImage* planar =
|
||||
static_cast<mozilla::layers::PlanarYCbCrImage*>(image.get());
|
||||
PRUint8* frame = (PRUint8*) PR_Malloc(len);
|
||||
uint8_t* frame = (uint8_t*) PR_Malloc(len);
|
||||
++gen->mCount;
|
||||
memset(frame, (gen->mCount / 8) & 0xff, len); // Rotating colors
|
||||
|
||||
const PRUint8 lumaBpp = 8;
|
||||
const PRUint8 chromaBpp = 4;
|
||||
const uint8_t lumaBpp = 8;
|
||||
const uint8_t chromaBpp = 4;
|
||||
|
||||
mozilla::layers::PlanarYCbCrImage::Data data;
|
||||
data.mYChannel = frame;
|
||||
data.mYSize = gfxIntSize(WIDTH, HEIGHT);
|
||||
data.mYStride = (PRInt32) (WIDTH * lumaBpp / 8.0);
|
||||
data.mCbCrStride = (PRInt32) (WIDTH * chromaBpp / 8.0);
|
||||
data.mYStride = (int32_t) (WIDTH * lumaBpp / 8.0);
|
||||
data.mCbCrStride = (int32_t) (WIDTH * chromaBpp / 8.0);
|
||||
data.mCbChannel = frame + HEIGHT * data.mYStride;
|
||||
data.mCrChannel = data.mCbChannel + HEIGHT * data.mCbCrStride / 2;
|
||||
data.mCbCrSize = gfxIntSize(WIDTH / 2, HEIGHT / 2);
|
||||
@ -183,7 +183,7 @@ public:
|
||||
mozilla::TrackID aID,
|
||||
mozilla::TrackRate aTrackRate,
|
||||
mozilla::TrackTicks aTrackOffset,
|
||||
PRUint32 aTrackEvents,
|
||||
uint32_t aTrackEvents,
|
||||
const mozilla::MediaSegment& aQueuedMedia
|
||||
);
|
||||
|
||||
@ -294,7 +294,7 @@ public:
|
||||
static void Shutdown();
|
||||
|
||||
Role GetRole() const { return mRole; }
|
||||
nsresult CreateRemoteSourceStreamInfo(PRUint32 aHint, RemoteSourceStreamInfo** aInfo);
|
||||
nsresult CreateRemoteSourceStreamInfo(uint32_t aHint, RemoteSourceStreamInfo** aInfo);
|
||||
|
||||
// Implementation of the only observer we need
|
||||
virtual void onCallEvent(
|
||||
@ -368,7 +368,7 @@ public:
|
||||
mozilla::RefPtr<DtlsIdentity> const GetIdentity() { return mIdentity; }
|
||||
|
||||
// Create a fake media stream
|
||||
nsresult CreateFakeMediaStream(PRUint32 hint, nsIDOMMediaStream** retval);
|
||||
nsresult CreateFakeMediaStream(uint32_t hint, nsIDOMMediaStream** retval);
|
||||
|
||||
private:
|
||||
PeerConnectionImpl(const PeerConnectionImpl&rhs);
|
||||
@ -389,7 +389,7 @@ private:
|
||||
// Shutdown media transport. Must be called on STS thread.
|
||||
void ShutdownMediaTransport();
|
||||
|
||||
nsresult MakeMediaStream(PRUint32 aHint, nsIDOMMediaStream** aStream);
|
||||
nsresult MakeMediaStream(uint32_t aHint, nsIDOMMediaStream** aStream);
|
||||
nsresult MakeRemoteSource(nsDOMMediaStream* aStream, RemoteSourceStreamInfo** aInfo);
|
||||
|
||||
// The role we are adopting
|
||||
|
@ -39,7 +39,7 @@ public:
|
||||
virtual void NotifyQueuedTrackChanges(mozilla::MediaStreamGraph* aGraph, mozilla::TrackID aID,
|
||||
mozilla::TrackRate aTrackRate,
|
||||
mozilla::TrackTicks aTrackOffset,
|
||||
PRUint32 aTrackEvents,
|
||||
uint32_t aTrackEvents,
|
||||
const mozilla::MediaSegment& aQueuedMedia) = 0;
|
||||
virtual void NotifyPull(mozilla::MediaStreamGraph* aGraph, mozilla::StreamTime aDesiredTime) = 0;
|
||||
|
||||
@ -146,7 +146,7 @@ public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIDOMMEDIASTREAM
|
||||
|
||||
static already_AddRefed<Fake_nsDOMMediaStream> CreateInputStream(PRUint32 aHintContents) {
|
||||
static already_AddRefed<Fake_nsDOMMediaStream> CreateInputStream(uint32_t aHintContents) {
|
||||
Fake_SourceMediaStream *source = new Fake_SourceMediaStream();
|
||||
|
||||
Fake_nsDOMMediaStream *ds = new Fake_nsDOMMediaStream(source);
|
||||
@ -164,15 +164,15 @@ public:
|
||||
HINT_CONTENTS_AUDIO = 0x00000001U,
|
||||
HINT_CONTENTS_VIDEO = 0x00000002U
|
||||
};
|
||||
PRUint32 GetHintContents() const { return mHintContents; }
|
||||
void SetHintContents(PRUint32 aHintContents) { mHintContents = aHintContents; }
|
||||
uint32_t GetHintContents() const { return mHintContents; }
|
||||
void SetHintContents(uint32_t aHintContents) { mHintContents = aHintContents; }
|
||||
|
||||
private:
|
||||
Fake_MediaStream *mMediaStream;
|
||||
|
||||
// tells the SDP generator about whether this
|
||||
// MediaStream probably has audio and/or video
|
||||
PRUint32 mHintContents;
|
||||
uint32_t mHintContents;
|
||||
};
|
||||
|
||||
class Fake_MediaStreamGraph
|
||||
|
@ -140,11 +140,11 @@ Fake_VideoStreamSource::Notify(nsITimer* aTimer)
|
||||
nsRefPtr<mozilla::layers::PlanarYCbCrImage> image = new
|
||||
mozilla::layers::PlanarYCbCrImage(&bin);
|
||||
|
||||
const PRUint8 lumaBpp = 8;
|
||||
const PRUint8 chromaBpp = 4;
|
||||
const uint8_t lumaBpp = 8;
|
||||
const uint8_t chromaBpp = 4;
|
||||
|
||||
int len = ((WIDTH * HEIGHT) * 3 / 2);
|
||||
PRUint8* frame = (PRUint8*) PR_Malloc(len);
|
||||
uint8_t* frame = (uint8_t*) PR_Malloc(len);
|
||||
memset(frame, 0x80, len); // Gray
|
||||
|
||||
mozilla::layers::PlanarYCbCrImage::Data data;
|
||||
@ -176,12 +176,12 @@ mozilla::layers::BufferRecycleBin::BufferRecycleBin() :
|
||||
mLock("mozilla.layers.BufferRecycleBin.mLock") {
|
||||
}
|
||||
|
||||
void mozilla::layers::BufferRecycleBin::RecycleBuffer(PRUint8* buffer, PRUint32 size) {
|
||||
void mozilla::layers::BufferRecycleBin::RecycleBuffer(uint8_t* buffer, uint32_t size) {
|
||||
PR_Free(buffer);
|
||||
}
|
||||
|
||||
PRUint8 *mozilla::layers::BufferRecycleBin::GetBuffer(PRUint32 size) {
|
||||
return (PRUint8 *)PR_MALLOC(size);
|
||||
uint8_t *mozilla::layers::BufferRecycleBin::GetBuffer(uint32_t size) {
|
||||
return (uint8_t *)PR_MALLOC(size);
|
||||
}
|
||||
|
||||
// YCbCrImage constructor (from ImageLayers.cpp)
|
||||
|
@ -74,7 +74,7 @@ public:
|
||||
{
|
||||
|
||||
int len = ((width * height) * 3 / 2);
|
||||
PRUint8* frame = (PRUint8*) PR_MALLOC(len);
|
||||
uint8_t* frame = (uint8_t*) PR_MALLOC(len);
|
||||
int numFrames = 121;
|
||||
memset(frame, COLOR, len);
|
||||
|
||||
|
@ -70,7 +70,7 @@ class TestAgent {
|
||||
|
||||
ASSERT_EQ((nsresult)NS_OK, audio_flow_->PushLayer(audio_prsock_));
|
||||
|
||||
std::vector<PRUint16> ciphers;
|
||||
std::vector<uint16_t> ciphers;
|
||||
ciphers.push_back(SRTP_AES128_CM_HMAC_SHA1_80);
|
||||
audio_dtls_->SetSrtpCiphers(ciphers);
|
||||
audio_dtls_->SetIdentity(DtlsIdentity::Generate());
|
||||
|
@ -105,8 +105,8 @@ public:
|
||||
|
||||
ResponseState state;
|
||||
char *lastString;
|
||||
PRUint32 lastStatusCode;
|
||||
PRUint32 lastStateType;
|
||||
uint32_t lastStatusCode;
|
||||
uint32_t lastStateType;
|
||||
bool onAddStreamCalled;
|
||||
|
||||
private:
|
||||
@ -126,7 +126,7 @@ TestObserver::OnCreateOfferSuccess(const char* offer)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
TestObserver::OnCreateOfferError(PRUint32 code)
|
||||
TestObserver::OnCreateOfferError(uint32_t code)
|
||||
{
|
||||
state = stateError;
|
||||
cout << "onCreateOfferError" << endl;
|
||||
@ -144,7 +144,7 @@ TestObserver::OnCreateAnswerSuccess(const char* answer)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
TestObserver::OnCreateAnswerError(PRUint32 code)
|
||||
TestObserver::OnCreateAnswerError(uint32_t code)
|
||||
{
|
||||
state = stateError;
|
||||
lastStatusCode = code;
|
||||
@ -152,7 +152,7 @@ TestObserver::OnCreateAnswerError(PRUint32 code)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
TestObserver::OnSetLocalDescriptionSuccess(PRUint32 code)
|
||||
TestObserver::OnSetLocalDescriptionSuccess(uint32_t code)
|
||||
{
|
||||
state = stateSuccess;
|
||||
lastStatusCode = code;
|
||||
@ -160,7 +160,7 @@ TestObserver::OnSetLocalDescriptionSuccess(PRUint32 code)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
TestObserver::OnSetRemoteDescriptionSuccess(PRUint32 code)
|
||||
TestObserver::OnSetRemoteDescriptionSuccess(uint32_t code)
|
||||
{
|
||||
state = stateSuccess;
|
||||
lastStatusCode = code;
|
||||
@ -168,7 +168,7 @@ TestObserver::OnSetRemoteDescriptionSuccess(PRUint32 code)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
TestObserver::OnSetLocalDescriptionError(PRUint32 code)
|
||||
TestObserver::OnSetLocalDescriptionError(uint32_t code)
|
||||
{
|
||||
state = stateError;
|
||||
lastStatusCode = code;
|
||||
@ -176,7 +176,7 @@ TestObserver::OnSetLocalDescriptionError(PRUint32 code)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
TestObserver::OnSetRemoteDescriptionError(PRUint32 code)
|
||||
TestObserver::OnSetRemoteDescriptionError(uint32_t code)
|
||||
{
|
||||
state = stateError;
|
||||
lastStatusCode = code;
|
||||
@ -202,10 +202,10 @@ TestObserver::NotifyDataChannel(nsIDOMDataChannel *channel)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
TestObserver::OnStateChange(PRUint32 state_type)
|
||||
TestObserver::OnStateChange(uint32_t state_type)
|
||||
{
|
||||
nsresult rv;
|
||||
PRUint32 gotstate;
|
||||
uint32_t gotstate;
|
||||
|
||||
switch (state_type)
|
||||
{
|
||||
@ -450,17 +450,17 @@ class SignalingAgent {
|
||||
cout << "Init Complete" << endl;
|
||||
}
|
||||
|
||||
PRUint32 sipcc_state()
|
||||
uint32_t sipcc_state()
|
||||
{
|
||||
PRUint32 res;
|
||||
uint32_t res;
|
||||
|
||||
pc->GetSipccState(&res);
|
||||
return res;
|
||||
}
|
||||
|
||||
PRUint32 ice_state()
|
||||
uint32_t ice_state()
|
||||
{
|
||||
PRUint32 res;
|
||||
uint32_t res;
|
||||
|
||||
pc->GetIceState(&res);
|
||||
return res;
|
||||
@ -495,7 +495,7 @@ class SignalingAgent {
|
||||
nsRefPtr<nsDOMMediaStream> domMediaStream = new nsDOMMediaStream(audio_stream);
|
||||
domMediaStream_ = domMediaStream;
|
||||
|
||||
PRUint32 aHintContents = 0;
|
||||
uint32_t aHintContents = 0;
|
||||
|
||||
if (audio) {
|
||||
aHintContents |= nsDOMMediaStream::HINT_CONTENTS_AUDIO;
|
||||
@ -542,7 +542,7 @@ class SignalingAgent {
|
||||
|
||||
void CreateOfferRemoveStream(const char* hints, bool audio, bool video) {
|
||||
|
||||
PRUint32 aHintContents = 0;
|
||||
uint32_t aHintContents = 0;
|
||||
|
||||
if (!audio) {
|
||||
aHintContents |= nsDOMMediaStream::HINT_CONTENTS_VIDEO;
|
||||
@ -590,7 +590,7 @@ class SignalingAgent {
|
||||
|
||||
|
||||
bool IceCompleted() {
|
||||
PRUint32 state;
|
||||
uint32_t state;
|
||||
pc->GetIceState(&state);
|
||||
return state == sipcc::PeerConnectionImpl::kIceConnected;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user