void OfferAnswer()
 {
   CreateOffer();
   CreateAnswer();
   Negotiate();
   SanityCheck();
 }
TEST_F(JsepTrackTest, SimulcastAnswerer)
{
  Init(SdpMediaSection::kVideo);
  std::vector<JsepTrack::JsConstraints> constraints;
  constraints.push_back(MakeConstraints("foo", 40000));
  constraints.push_back(MakeConstraints("bar", 10000));
  mSendAns->SetJsConstraints(constraints);
  CreateOffer();
  // Add simulcast/rid to offer
  JsepTrack::AddToMsection(constraints, sdp::kRecv, &GetOffer());
  CreateAnswer();
  Negotiate();
  ASSERT_TRUE(mSendAns->GetNegotiatedDetails());
  ASSERT_EQ(2U, mSendAns->GetNegotiatedDetails()->GetEncodingCount());
  ASSERT_EQ("foo", mSendAns->GetNegotiatedDetails()->GetEncoding(0).mRid);
  ASSERT_EQ(40000U,
      mSendAns->GetNegotiatedDetails()->GetEncoding(0).mConstraints.maxBr);
  ASSERT_EQ("bar", mSendAns->GetNegotiatedDetails()->GetEncoding(1).mRid);
  ASSERT_EQ(10000U,
      mSendAns->GetNegotiatedDetails()->GetEncoding(1).mConstraints.maxBr);
}
示例#3
0
//---------------------------------------------------------------------------
void __fastcall TMainForm::FormCreate(TObject *Sender)
{
	Log::d("Main form alive");
	FInAppPurchase = new TInAppPurchase(this);
    // Set the license Key for Android only
	// You can get this license from your Google Dev. Console.
	FInAppPurchase->ApplicationLicenseKey = "";
	FInAppPurchase->ProductIDs->Add(NoAdsID);
	FInAppPurchase->ProductIDs->Add(EuropeID);
	Log::d("Setting up IAP");
	FInAppPurchase->OnSetupComplete = &InAppPurchaseOnSetupComplete;
	FInAppPurchase->OnProductsRequestResponse = &InAppPurchaseProductsRequestResponse;
	FInAppPurchase->OnError = &InAppPurchaseError;
	FInAppPurchase->OnPurchaseCompleted = &InAppPurchasePurchaseCompleted;
	FInAppPurchase->SetupInAppPurchase();
	East = true;
	West = true;
	Central = true;
	CreateQuiz();
	CreateScore(QuizForm);
	CreateAnswer(QuizForm);
}