Bug 1252737 - use size_t instead of uint32_t for InitEncode(). r=jesup
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Wed, 02 Mar 2016 13:05:43 +0900
changeset 324872 b9a420d13d5cc7e6c23896dd468c9f087fa16c55
parent 324813 a269b54d4fb5f3b3bfcdf5ea87899d469f7ea552
child 324873 e68e5d3f9101b314eab0eb78fe6f2bbc56383d76
push id1128
push userjlund@mozilla.com
push dateWed, 01 Jun 2016 01:31:59 +0000
treeherdermozilla-release@fe0d30de989d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup
bugs1252737
milestone47.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1252737 - use size_t instead of uint32_t for InitEncode(). r=jesup Although 3rd parameter VideoEncodeer::InitEncode() is defiend as size_t, WebrtcIMXH264VideoCodec and WebrtcMediaCodecVP8VideoCodec uses uint32_t. This will cause build error for 64bit platform. MozReview-Commit-ID: 20NgE5e7Cuz
media/webrtc/signaling/src/media-conduit/WebrtcMediaCodecVP8VideoCodec.cpp
media/webrtc/signaling/src/media-conduit/WebrtcMediaCodecVP8VideoCodec.h
media/webrtc/signaling/src/media-conduit/WebrtcOMXH264VideoCodec.cpp
media/webrtc/signaling/src/media-conduit/WebrtcOMXH264VideoCodec.h
--- a/media/webrtc/signaling/src/media-conduit/WebrtcMediaCodecVP8VideoCodec.cpp
+++ b/media/webrtc/signaling/src/media-conduit/WebrtcMediaCodecVP8VideoCodec.cpp
@@ -618,17 +618,17 @@ WebrtcMediaCodecVP8VideoEncoder::VerifyA
         mEncodedImage._size = minimumSize;
     }
     return 0;
 }
 
 int32_t WebrtcMediaCodecVP8VideoEncoder::InitEncode(
     const webrtc::VideoCodec* codecSettings,
     int32_t numberOfCores,
-    uint32_t maxPayloadSize) {
+    size_t maxPayloadSize) {
   mMaxPayloadSize = maxPayloadSize;
   CSFLogDebug(logTag,  "%s, w = %d, h = %d", __FUNCTION__, codecSettings->width, codecSettings->height);
 
   return WEBRTC_VIDEO_CODEC_OK;
 }
 
 int32_t WebrtcMediaCodecVP8VideoEncoder::Encode(
     const webrtc::I420VideoFrame& inputImage,
--- a/media/webrtc/signaling/src/media-conduit/WebrtcMediaCodecVP8VideoCodec.h
+++ b/media/webrtc/signaling/src/media-conduit/WebrtcMediaCodecVP8VideoCodec.h
@@ -29,18 +29,18 @@ public:
   WebrtcMediaCodecVP8VideoEncoder();
 
   virtual ~WebrtcMediaCodecVP8VideoEncoder() override;
 
   // Implement VideoEncoder interface.
   virtual uint64_t PluginID() const override { return 0; }
 
   virtual int32_t InitEncode(const webrtc::VideoCodec* codecSettings,
-                              int32_t numberOfCores,
-                              uint32_t maxPayloadSize) override;
+                             int32_t numberOfCores,
+                             size_t maxPayloadSize) override;
 
   virtual int32_t Encode(const webrtc::I420VideoFrame& inputImage,
                           const webrtc::CodecSpecificInfo* codecSpecificInfo,
                           const std::vector<webrtc::VideoFrameType>* frame_types) override;
 
   virtual int32_t RegisterEncodeCompleteCallback(webrtc::EncodedImageCallback* callback) override;
 
   virtual int32_t Release() override;
--- a/media/webrtc/signaling/src/media-conduit/WebrtcOMXH264VideoCodec.cpp
+++ b/media/webrtc/signaling/src/media-conduit/WebrtcOMXH264VideoCodec.cpp
@@ -836,17 +836,17 @@ WebrtcOMXH264VideoEncoder::WebrtcOMXH264
 {
   mReservation = new OMXCodecReservation(true);
   CODEC_LOGD("WebrtcOMXH264VideoEncoder:%p constructed", this);
 }
 
 int32_t
 WebrtcOMXH264VideoEncoder::InitEncode(const webrtc::VideoCodec* aCodecSettings,
                                       int32_t aNumOfCores,
-                                      uint32_t aMaxPayloadSize)
+                                      size_t aMaxPayloadSize)
 {
   CODEC_LOGD("WebrtcOMXH264VideoEncoder:%p init", this);
 
   if (mOMX == nullptr) {
     nsAutoPtr<OMXVideoEncoder> omx(OMXCodecWrapper::CreateAVCEncoder());
     if (NS_WARN_IF(omx == nullptr)) {
       return WEBRTC_VIDEO_CODEC_ERROR;
     }
--- a/media/webrtc/signaling/src/media-conduit/WebrtcOMXH264VideoCodec.h
+++ b/media/webrtc/signaling/src/media-conduit/WebrtcOMXH264VideoCodec.h
@@ -35,17 +35,17 @@ public:
 
   virtual ~WebrtcOMXH264VideoEncoder();
 
   // Implement VideoEncoder interface.
   virtual uint64_t PluginID() const override { return 0; }
 
   virtual int32_t InitEncode(const webrtc::VideoCodec* aCodecSettings,
                              int32_t aNumOfCores,
-                             uint32_t aMaxPayloadSize) override;
+                             size_t aMaxPayloadSize) override;
 
   virtual int32_t Encode(const webrtc::I420VideoFrame& aInputImage,
                          const webrtc::CodecSpecificInfo* aCodecSpecificInfo,
                          const std::vector<webrtc::VideoFrameType>* aFrameTypes) override;
 
   virtual int32_t RegisterEncodeCompleteCallback(webrtc::EncodedImageCallback* aCallback) override;
 
   virtual int32_t Release() override;