Bug 1033833 - finish plumbing offerToReceiveAudio|Video to long. r=abr
authorJan-Ivar Bruaroey <jib@mozilla.com>
Fri, 18 Jul 2014 18:08:30 -0400
changeset 195268 2fd3b40213101d11eb3d0ef89346e0711b9b17bd
parent 195267 4c72ab9bc7016f4e6b3d5035c4cca22117d0e9d5
child 195269 ca3ce71016b0c11bada64b68a6c5cb82b2c2be4d
push id7844
push userkwierso@gmail.com
push dateTue, 22 Jul 2014 00:39:28 +0000
treeherderfx-team@ab423e358a05 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersabr
bugs1033833
milestone33.0a1
Bug 1033833 - finish plumbing offerToReceiveAudio|Video to long. r=abr
media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.cpp
media/webrtc/signaling/src/sipcc/include/cc_constants.h
media/webrtc/signaling/test/signaling_unittests.cpp
--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.cpp
+++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.cpp
@@ -59,20 +59,20 @@ static void
 Apply(const Optional<bool> &aSrc, cc_boolean_option_t *aDst) {
   if (aSrc.WasPassed()) {
     aDst->was_passed = true;
     aDst->value = aSrc.Value();
   }
 }
 
 static void
-Apply(const Optional<int32_t> &aSrc, cc_boolean_option_t *aDst) {
+Apply(const Optional<int32_t> &aSrc, cc_int32_option_t *aDst) {
   if (aSrc.WasPassed()) {
     aDst->was_passed = true;
-    aDst->value = !!aSrc.Value();
+    aDst->value = aSrc.Value();
   }
 }
 #endif
 
 SipccOfferOptions::SipccOfferOptions() {
   memset(&mOptions, 0, sizeof(mOptions));
 }
 
--- a/media/webrtc/signaling/src/sipcc/include/cc_constants.h
+++ b/media/webrtc/signaling/src/sipcc/include/cc_constants.h
@@ -576,16 +576,21 @@ typedef enum {
 } cc_media_type_t;
 
 typedef struct {
   cc_boolean was_passed;
   cc_boolean value;
 } cc_boolean_option_t;
 
 typedef struct {
-  cc_boolean_option_t offer_to_receive_audio;
-  cc_boolean_option_t offer_to_receive_video;
+  cc_boolean was_passed;
+  cc_int32_t value;
+} cc_int32_option_t;
+
+typedef struct {
+  cc_int32_option_t offer_to_receive_audio;
+  cc_int32_option_t offer_to_receive_video;
   cc_boolean_option_t moz_dont_offer_datachannel;
   cc_boolean_option_t moz_bundle_only;
 } cc_media_options_t;
 
 #endif /* _CC_CONSTANTS_H_ */
 
--- a/media/webrtc/signaling/test/signaling_unittests.cpp
+++ b/media/webrtc/signaling/test/signaling_unittests.cpp
@@ -80,31 +80,31 @@ uint16_t kBogusSrflxPort(1001);
 
 namespace sipcc {
 
 // We can't use webidl bindings here because it uses nsString,
 // so we pass options in using SipccOfferOptions instead
 
   class OfferOptions : public mozilla::SipccOfferOptions {
 public:
-  void setBooleanOption(const char *namePtr, bool value) {
-    cc_boolean_option_t &member (getMember(namePtr));
+  void setInt32Option(const char *namePtr, int32_t value) {
+    auto &member = getMember(namePtr);
     member.was_passed = true;
     member.value = value;
   }
 private:
-  cc_boolean_option_t &getMember(const char *namePtr) {
+  cc_int32_option_t &getMember(const char *namePtr) {
     if (strcmp(namePtr, "OfferToReceiveAudio") == 0) {
         return mOptions.offer_to_receive_audio;
     }
     if (strcmp(namePtr, "OfferToReceiveVideo") == 0) {
         return mOptions.offer_to_receive_video;
     }
     MOZ_ASSERT(false);
-    return mOptions.moz_dont_offer_datachannel;
+    return mOptions.offer_to_receive_video;
   }
 };
 }
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 namespace test {
@@ -1725,18 +1725,18 @@ public:
     ASSERT_TRUE_WAIT(a1_->IceCompleted() == true, kDefaultTimeout);
     ASSERT_TRUE_WAIT(a2_->IceCompleted() == true, kDefaultTimeout);
   }
 
   void CreateOfferRemoveStream(sipcc::OfferOptions& options,
                                uint32_t hints, uint32_t sdpCheck) {
     EnsureInit();
     sipcc::OfferOptions aoptions;
-    aoptions.setBooleanOption("OfferToReceiveAudio", true);
-    aoptions.setBooleanOption("OfferToReceiveVideo", true);
+    aoptions.setInt32Option("OfferToReceiveAudio", true);
+    aoptions.setInt32Option("OfferToReceiveVideo", true);
     a1_->CreateOffer(aoptions, OFFER_AV, SHOULD_SENDRECV_AV );
     a1_->CreateOfferRemoveStream(options, hints, sdpCheck);
   }
 
   void CreateOfferAudioOnly(sipcc::OfferOptions& options,
                             uint32_t sdpCheck) {
     EnsureInit();
     a1_->CreateOffer(options, OFFER_AUDIO, sdpCheck);
@@ -1960,267 +1960,267 @@ TEST_F(SignalingTest, CreateOfferAudioVi
 {
   sipcc::OfferOptions options;
   CreateOffer(options, OFFER_AV, SHOULD_SENDRECV_AV);
 }
 
 TEST_F(SignalingTest, CreateOfferNoVideoStreamRecvVideo)
 {
   sipcc::OfferOptions options;
-  options.setBooleanOption("OfferToReceiveAudio", true);
-  options.setBooleanOption("OfferToReceiveVideo", true);
+  options.setInt32Option("OfferToReceiveAudio", true);
+  options.setInt32Option("OfferToReceiveVideo", true);
   CreateOffer(options, OFFER_AUDIO,
               SHOULD_SENDRECV_AUDIO | SHOULD_RECV_VIDEO);
 }
 
 TEST_F(SignalingTest, CreateOfferNoAudioStreamRecvAudio)
 {
   sipcc::OfferOptions options;
-  options.setBooleanOption("OfferToReceiveAudio", true);
-  options.setBooleanOption("OfferToReceiveVideo", true);
+  options.setInt32Option("OfferToReceiveAudio", true);
+  options.setInt32Option("OfferToReceiveVideo", true);
   CreateOffer(options, OFFER_VIDEO,
               SHOULD_RECV_AUDIO | SHOULD_SENDRECV_VIDEO);
 }
 
 TEST_F(SignalingTest, CreateOfferNoVideoStream)
 {
   sipcc::OfferOptions options;
-  options.setBooleanOption("OfferToReceiveAudio", true);
-  options.setBooleanOption("OfferToReceiveVideo", false);
+  options.setInt32Option("OfferToReceiveAudio", true);
+  options.setInt32Option("OfferToReceiveVideo", false);
   CreateOffer(options, OFFER_AUDIO,
               SHOULD_SENDRECV_AUDIO | SHOULD_OMIT_VIDEO);
 }
 
 TEST_F(SignalingTest, CreateOfferNoAudioStream)
 {
   sipcc::OfferOptions options;
-  options.setBooleanOption("OfferToReceiveAudio", false);
-  options.setBooleanOption("OfferToReceiveVideo", true);
+  options.setInt32Option("OfferToReceiveAudio", false);
+  options.setInt32Option("OfferToReceiveVideo", true);
   CreateOffer(options, OFFER_VIDEO,
               SHOULD_OMIT_AUDIO | SHOULD_SENDRECV_VIDEO);
 }
 
 TEST_F(SignalingTest, CreateOfferDontReceiveAudio)
 {
   sipcc::OfferOptions options;
-  options.setBooleanOption("OfferToReceiveAudio", false);
-  options.setBooleanOption("OfferToReceiveVideo", true);
+  options.setInt32Option("OfferToReceiveAudio", false);
+  options.setInt32Option("OfferToReceiveVideo", true);
   CreateOffer(options, OFFER_AV,
               SHOULD_SEND_AUDIO | SHOULD_SENDRECV_VIDEO);
 }
 
 TEST_F(SignalingTest, CreateOfferDontReceiveVideo)
 {
   sipcc::OfferOptions options;
-  options.setBooleanOption("OfferToReceiveAudio", true);
-  options.setBooleanOption("OfferToReceiveVideo", false);
+  options.setInt32Option("OfferToReceiveAudio", true);
+  options.setInt32Option("OfferToReceiveVideo", false);
   CreateOffer(options, OFFER_AV,
               SHOULD_SENDRECV_AUDIO | SHOULD_SEND_VIDEO);
 }
 
 // XXX Disabled pending resolution of Bug 840728
 TEST_F(SignalingTest, DISABLED_CreateOfferRemoveAudioStream)
 {
   sipcc::OfferOptions options;
-  options.setBooleanOption("OfferToReceiveAudio", true);
-  options.setBooleanOption("OfferToReceiveVideo", true);
+  options.setInt32Option("OfferToReceiveAudio", true);
+  options.setInt32Option("OfferToReceiveVideo", true);
   CreateOfferRemoveStream(options, DOMMediaStream::HINT_CONTENTS_AUDIO,
               SHOULD_RECV_AUDIO | SHOULD_SENDRECV_VIDEO);
 }
 
 // XXX Disabled pending resolution of Bug 840728
 TEST_F(SignalingTest, DISABLED_CreateOfferDontReceiveAudioRemoveAudioStream)
 {
   sipcc::OfferOptions options;
-  options.setBooleanOption("OfferToReceiveAudio", false);
-  options.setBooleanOption("OfferToReceiveVideo", true);
+  options.setInt32Option("OfferToReceiveAudio", false);
+  options.setInt32Option("OfferToReceiveVideo", true);
   CreateOfferRemoveStream(options, DOMMediaStream::HINT_CONTENTS_AUDIO,
               SHOULD_SENDRECV_VIDEO);
 }
 
 // XXX Disabled pending resolution of Bug 840728
 TEST_F(SignalingTest, DISABLED_CreateOfferDontReceiveVideoRemoveVideoStream)
 {
   sipcc::OfferOptions options;
-  options.setBooleanOption("OfferToReceiveAudio", true);
-  options.setBooleanOption("OfferToReceiveVideo", false);
+  options.setInt32Option("OfferToReceiveAudio", true);
+  options.setInt32Option("OfferToReceiveVideo", false);
   CreateOfferRemoveStream(options, DOMMediaStream::HINT_CONTENTS_VIDEO,
               SHOULD_SENDRECV_AUDIO);
 }
 
 TEST_F(SignalingTest, OfferAnswerNothingDisabled)
 {
   sipcc::OfferOptions options;
   OfferAnswer(options, OFFER_AV | ANSWER_AV, false,
               SHOULD_SENDRECV_AV, SHOULD_SENDRECV_AV);
 }
 
 // XXX reject streams has changed. Re-enable when we can stop() received stream
 TEST_F(SignalingTest, DISABLED_OfferAnswerDontReceiveAudioOnOffer)
 {
   sipcc::OfferOptions options;
-  options.setBooleanOption("OfferToReceiveAudio", false);
-  options.setBooleanOption("OfferToReceiveVideo", true);
+  options.setInt32Option("OfferToReceiveAudio", false);
+  options.setInt32Option("OfferToReceiveVideo", true);
   OfferAnswer(options, OFFER_AV | ANSWER_AV,
               false, SHOULD_SEND_AUDIO | SHOULD_SENDRECV_VIDEO,
               SHOULD_RECV_AUDIO | SHOULD_SENDRECV_VIDEO);
 }
 
 // XXX reject streams has changed. Re-enable when we can stop() received stream
 TEST_F(SignalingTest, DISABLED_OfferAnswerDontReceiveVideoOnOffer)
 {
   sipcc::OfferOptions options;
-  options.setBooleanOption("OfferToReceiveAudio", true);
-  options.setBooleanOption("OfferToReceiveVideo", false);
+  options.setInt32Option("OfferToReceiveAudio", true);
+  options.setInt32Option("OfferToReceiveVideo", false);
   OfferAnswer(options, OFFER_AV | ANSWER_AV,
               false, SHOULD_SENDRECV_AUDIO | SHOULD_SEND_VIDEO,
               SHOULD_SENDRECV_AUDIO | SHOULD_RECV_VIDEO);
 }
 
 // XXX reject streams has changed. Re-enable when we can stop() received stream
 TEST_F(SignalingTest, DISABLED_OfferAnswerDontReceiveAudioOnAnswer)
 {
   sipcc::OfferOptions options;
-  options.setBooleanOption("OfferToReceiveAudio", true);
-  options.setBooleanOption("OfferToReceiveVideo", true);
+  options.setInt32Option("OfferToReceiveAudio", true);
+  options.setInt32Option("OfferToReceiveVideo", true);
   OfferAnswer(options, OFFER_AV | ANSWER_AV,
               false, SHOULD_SENDRECV_AV,
               SHOULD_SEND_AUDIO | SHOULD_SENDRECV_VIDEO);
 }
 
 // XXX reject streams has changed. Re-enable when we can stop() received stream
 TEST_F(SignalingTest, DISABLED_OfferAnswerDontReceiveVideoOnAnswer)
 {
   sipcc::OfferOptions options;
-  options.setBooleanOption("OfferToReceiveAudio", true);
-  options.setBooleanOption("OfferToReceiveVideo", true);
+  options.setInt32Option("OfferToReceiveAudio", true);
+  options.setInt32Option("OfferToReceiveVideo", true);
   OfferAnswer(options, OFFER_AV | ANSWER_AV,
               false, SHOULD_SENDRECV_AV,
               SHOULD_SENDRECV_AUDIO | SHOULD_SEND_VIDEO);
 }
 
 // XXX reject streams has changed. Re-enable when we can stop() received stream
 TEST_F(SignalingTest, DISABLED_OfferAnswerDontAddAudioStreamOnOfferRecvAudio)
 {
   sipcc::OfferOptions options;
-  options.setBooleanOption("OfferToReceiveAudio", true);
-  options.setBooleanOption("OfferToReceiveVideo", true);
+  options.setInt32Option("OfferToReceiveAudio", true);
+  options.setInt32Option("OfferToReceiveVideo", true);
   OfferAnswer(options, OFFER_VIDEO | ANSWER_AV,
               false, SHOULD_RECV_AUDIO | SHOULD_SENDRECV_VIDEO,
               SHOULD_SEND_AUDIO | SHOULD_SENDRECV_VIDEO);
 }
 
 // XXX reject streams has changed. Re-enable when we can stop() received stream
 TEST_F(SignalingTest, DISABLED_OfferAnswerDontAddAudioStreamOnOffer)
 {
   sipcc::OfferOptions options;
-  options.setBooleanOption("OfferToReceiveAudio", false);
-  options.setBooleanOption("OfferToReceiveVideo", true);
+  options.setInt32Option("OfferToReceiveAudio", false);
+  options.setInt32Option("OfferToReceiveVideo", true);
   OfferAnswer(options, OFFER_VIDEO | ANSWER_AV,
               false, SHOULD_OMIT_AUDIO | SHOULD_SENDRECV_VIDEO,
               SHOULD_OMIT_AUDIO | SHOULD_SENDRECV_VIDEO);
 }
 
 // XXX reject streams has changed. Re-enable when we can stop() received stream
 TEST_F(SignalingTest, DISABLED_OfferAnswerDontAddVideoStreamOnOfferRecvVideo)
 {
   sipcc::OfferOptions options;
-  options.setBooleanOption("OfferToReceiveAudio", true);
-  options.setBooleanOption("OfferToReceiveVideo", true);
+  options.setInt32Option("OfferToReceiveAudio", true);
+  options.setInt32Option("OfferToReceiveVideo", true);
   OfferAnswer(options, OFFER_AUDIO | ANSWER_AV,
               false, SHOULD_SENDRECV_AUDIO | SHOULD_RECV_VIDEO,
               SHOULD_SENDRECV_AUDIO | SHOULD_SEND_VIDEO);
 }
 
 // XXX reject streams has changed. Re-enable when we can stop() received stream
 TEST_F(SignalingTest, DISABLED_OfferAnswerDontAddVideoStreamOnOffer)
 {
   sipcc::OfferOptions options;
-  options.setBooleanOption("OfferToReceiveAudio", true);
-  options.setBooleanOption("OfferToReceiveVideo", false);
+  options.setInt32Option("OfferToReceiveAudio", true);
+  options.setInt32Option("OfferToReceiveVideo", false);
   OfferAnswer(options, OFFER_AUDIO | ANSWER_AV,
               false, SHOULD_SENDRECV_AUDIO | SHOULD_OMIT_VIDEO,
               SHOULD_SENDRECV_AUDIO | SHOULD_OMIT_VIDEO);
 }
 
 // XXX reject streams has changed. Re-enable when we can stop() received stream
 TEST_F(SignalingTest, DISABLED_OfferAnswerDontAddAudioStreamOnAnswer)
 {
   sipcc::OfferOptions options;
-  options.setBooleanOption("OfferToReceiveAudio", true);
-  options.setBooleanOption("OfferToReceiveVideo", true);
+  options.setInt32Option("OfferToReceiveAudio", true);
+  options.setInt32Option("OfferToReceiveVideo", true);
   OfferAnswer(options, OFFER_AV | ANSWER_VIDEO,
               false, SHOULD_SENDRECV_AV,
               SHOULD_RECV_AUDIO | SHOULD_SENDRECV_VIDEO);
 }
 
 // XXX reject streams has changed. Re-enable when we can stop() received stream
 TEST_F(SignalingTest, DISABLED_OfferAnswerDontAddVideoStreamOnAnswer)
 {
   sipcc::OfferOptions options;
-  options.setBooleanOption("OfferToReceiveAudio", true);
-  options.setBooleanOption("OfferToReceiveVideo", true);
+  options.setInt32Option("OfferToReceiveAudio", true);
+  options.setInt32Option("OfferToReceiveVideo", true);
   OfferAnswer(options, OFFER_AV | ANSWER_AUDIO,
               false, SHOULD_SENDRECV_AV,
               SHOULD_SENDRECV_AUDIO | SHOULD_RECV_VIDEO);
 }
 
 // XXX reject streams has changed. Re-enable when we can stop() received stream
 TEST_F(SignalingTest,
        DISABLED_OfferAnswerDontAddVideoStreamOnAnswerDontReceiveVideoOnAnswer)
 {
   sipcc::OfferOptions options;
-  options.setBooleanOption("OfferToReceiveAudio", true);
-  options.setBooleanOption("OfferToReceiveVideo", true);
+  options.setInt32Option("OfferToReceiveAudio", true);
+  options.setInt32Option("OfferToReceiveVideo", true);
   OfferAnswer(options, OFFER_AV | ANSWER_AUDIO,
               false, SHOULD_SENDRECV_AV, SHOULD_SENDRECV_AUDIO );
 }
 
 // XXX reject streams has changed. Re-enable when we can stop() received stream
 TEST_F(SignalingTest,
        DISABLED_OfferAnswerDontAddAudioStreamOnAnswerDontReceiveAudioOnAnswer)
 {
   sipcc::OfferOptions options;
-  options.setBooleanOption("OfferToReceiveAudio", true);
-  options.setBooleanOption("OfferToReceiveVideo", true);
+  options.setInt32Option("OfferToReceiveAudio", true);
+  options.setInt32Option("OfferToReceiveVideo", true);
   OfferAnswer(options, OFFER_AV | ANSWER_VIDEO,
               false, SHOULD_SENDRECV_AV,
               SHOULD_REJECT_AUDIO | SHOULD_SENDRECV_VIDEO);
 }
 
 // XXX reject streams has changed. Re-enable when we can stop() received stream
 TEST_F(SignalingTest,
        DISABLED_OfferAnswerDontAddAudioStreamOnOfferDontReceiveAudioOnOffer)
 {
   sipcc::OfferOptions options;
-  options.setBooleanOption("OfferToReceiveAudio", false);
-  options.setBooleanOption("OfferToReceiveVideo", true);
+  options.setInt32Option("OfferToReceiveAudio", false);
+  options.setInt32Option("OfferToReceiveVideo", true);
   OfferAnswer(options, OFFER_VIDEO | ANSWER_AV,
               false, SHOULD_SENDRECV_VIDEO, SHOULD_SENDRECV_VIDEO);
 }
 
 // XXX reject streams has changed. Re-enable when we can stop() received stream
 TEST_F(SignalingTest,
        DISABLED_OfferAnswerDontAddVideoStreamOnOfferDontReceiveVideoOnOffer)
 {
   sipcc::OfferOptions options;
-  options.setBooleanOption("OfferToReceiveAudio", true);
-  options.setBooleanOption("OfferToReceiveVideo", false);
+  options.setInt32Option("OfferToReceiveAudio", true);
+  options.setInt32Option("OfferToReceiveVideo", false);
   OfferAnswer(options, OFFER_AUDIO | ANSWER_AV,
               false, SHOULD_SENDRECV_AUDIO | SHOULD_OMIT_VIDEO,
               SHOULD_SENDRECV_AUDIO | SHOULD_OMIT_VIDEO);
 }
 
 // XXX reject streams has changed. Re-enable when we can stop() received stream
 TEST_F(SignalingTest,
   DISABLED_OfferAnswerDontReceiveAudioNoAudioStreamOnOfferDontReceiveVideoOnAnswer)
 {
   sipcc::OfferOptions options;
-  options.setBooleanOption("OfferToReceiveAudio", false);
-  options.setBooleanOption("OfferToReceiveVideo", true);
+  options.setInt32Option("OfferToReceiveAudio", false);
+  options.setInt32Option("OfferToReceiveVideo", true);
   OfferAnswer(options, OFFER_VIDEO | ANSWER_AV,
               false, SHOULD_SENDRECV_VIDEO, SHOULD_SEND_VIDEO);
 }
 
 TEST_F(SignalingTest, CreateOfferAddCandidate)
 {
   sipcc::OfferOptions options;
   CreateOfferAddCandidate(options, strSampleCandidate.c_str(),
@@ -2235,55 +2235,55 @@ TEST_F(SignalingTest, AddIceCandidateEar
                        strSampleMid.c_str(), nSamplelevel);
 }
 
 // XXX adam@nostrum.com -- This test seems questionable; we need to think
 // through what actually needs to be tested here.
 TEST_F(SignalingTest, DISABLED_OfferAnswerReNegotiateOfferAnswerDontReceiveVideoNoVideoStream)
 {
   sipcc::OfferOptions aoptions;
-  aoptions.setBooleanOption("OfferToReceiveAudio", true);
-  aoptions.setBooleanOption("OfferToReceiveVideo", true);
+  aoptions.setInt32Option("OfferToReceiveAudio", true);
+  aoptions.setInt32Option("OfferToReceiveVideo", true);
 
   sipcc::OfferOptions boptions;
-  boptions.setBooleanOption("OfferToReceiveAudio", true);
-  boptions.setBooleanOption("OfferToReceiveVideo", false);
+  boptions.setInt32Option("OfferToReceiveAudio", true);
+  boptions.setInt32Option("OfferToReceiveVideo", false);
 
   OfferAnswer(aoptions, OFFER_AV | ANSWER_AV,
               false, SHOULD_SENDRECV_AV, SHOULD_SENDRECV_AV);
   OfferAnswer(boptions, OFFER_AUDIO | ANSWER_AV,
               false, SHOULD_SENDRECV_AUDIO | SHOULD_SEND_VIDEO,
               SHOULD_SENDRECV_AUDIO | SHOULD_INACTIVE_VIDEO);
 }
 
 TEST_F(SignalingTest, OfferAnswerDontAddAudioStreamOnAnswerNoOptions)
 {
   sipcc::OfferOptions options;
-  options.setBooleanOption("OfferToReceiveAudio", true);
-  options.setBooleanOption("OfferToReceiveVideo", true);
+  options.setInt32Option("OfferToReceiveAudio", true);
+  options.setInt32Option("OfferToReceiveVideo", true);
   OfferAnswer(options, OFFER_AV | ANSWER_VIDEO,
               false, SHOULD_SENDRECV_AV,
               SHOULD_RECV_AUDIO | SHOULD_SENDRECV_VIDEO);
 }
 
 TEST_F(SignalingTest, OfferAnswerDontAddVideoStreamOnAnswerNoOptions)
 {
   sipcc::OfferOptions options;
-  options.setBooleanOption("OfferToReceiveAudio", true);
-  options.setBooleanOption("OfferToReceiveVideo", true);
+  options.setInt32Option("OfferToReceiveAudio", true);
+  options.setInt32Option("OfferToReceiveVideo", true);
   OfferAnswer(options, OFFER_AV | ANSWER_AUDIO,
               false, SHOULD_SENDRECV_AV,
               SHOULD_SENDRECV_AUDIO | SHOULD_RECV_VIDEO);
 }
 
 TEST_F(SignalingTest, OfferAnswerDontAddAudioVideoStreamsOnAnswerNoOptions)
 {
   sipcc::OfferOptions options;
-  options.setBooleanOption("OfferToReceiveAudio", true);
-  options.setBooleanOption("OfferToReceiveVideo", true);
+  options.setInt32Option("OfferToReceiveAudio", true);
+  options.setInt32Option("OfferToReceiveVideo", true);
   OfferAnswer(options, OFFER_AV | ANSWER_NONE,
               false, SHOULD_SENDRECV_AV,
               SHOULD_RECV_AUDIO | SHOULD_RECV_VIDEO);
 }
 
 TEST_F(SignalingTest, FullCall)
 {
   sipcc::OfferOptions options;
@@ -2333,18 +2333,18 @@ TEST_F(SignalingTest, FullCallAudioOnly)
 }
 
 // FIXME -- reject offered stream by .stop()ing the MST that was offered instead,
 // or by setting .active property to false on the created RTPReceiver object.
 TEST_F(SignalingTest, DISABLED_FullCallAnswererRejectsVideo)
 {
   sipcc::OfferOptions offeroptions;
   sipcc::OfferOptions answeroptions;
-  answeroptions.setBooleanOption("offerToReceiveAudio", true);
-  answeroptions.setBooleanOption("offerToReceiveVideo", false);
+  answeroptions.setInt32Option("offerToReceiveAudio", true);
+  answeroptions.setInt32Option("offerToReceiveVideo", false);
   OfferAnswer(offeroptions, OFFER_AV | ANSWER_AUDIO,
               true, SHOULD_SENDRECV_AV, SHOULD_SENDRECV_AUDIO);
 
   // Wait for some data to get written
   ASSERT_TRUE_WAIT(a1_->GetPacketsSent(0) >= 40 &&
                    a2_->GetPacketsReceived(0) >= 40, kDefaultTimeout * 2);
 
   a1_->CloseSendStreams();