#include <gtest/gtest.h>

#include "FrameDispatchCoordinator.h"
#include "video.h"
#include "audio.h"
#include "MediaFrameListenerBridge.h"
#include "TestCommon.h"
#include "data/FramesArrivalInfo.h"
class TestFrameDispatchCoordinator : public testing::Test, public RTPIncomingMediaStream::Listener
{
public:
	/**
	 * Test dispatching.
	 * 
	 * @param framesInfo	The frame arrival info
	 */
	void TestDispatch(const std::vector<std::tuple<MediaFrame::Type, uint64_t, uint64_t, uint32_t>>& framesInfo);
	
	virtual void onRTP(const RTPIncomingMediaStream* stream,const RTPPacket::shared& packet) override;
	virtual void onBye(const RTPIncomingMediaStream* stream) override {};
	virtual void onEnded(const RTPIncomingMediaStream* stream) override {};
protected:
	
	std::unique_ptr<FrameDispatchCoordinator> dispatch;
	
	std::vector<RTPPacket::shared> dispatchedPackets;
};

void TestFrameDispatchCoordinator::TestDispatch(const std::vector<std::tuple<MediaFrame::Type, uint64_t, uint64_t, uint32_t>>& framesInfo)
{
	std::queue<std::pair<RTPPacket::shared, std::chrono::milliseconds>> audioPackets;
	std::queue<std::pair<RTPPacket::shared, std::chrono::milliseconds>> videoPackets;
	
	TestTimeService eventLoop;
	MediaFrameListenerBridge::shared videoBridge = MediaFrameListenerBridge::Create(eventLoop, 1);
	MediaFrameListenerBridge::shared audioBridge = MediaFrameListenerBridge::Create(eventLoop, 2);
	
	videoBridge->AddListener(this);
	audioBridge->AddListener(this);
	
	// Loop through all frames
	for (auto& f : framesInfo)
	{	
		auto now = std::chrono::milliseconds(std::get<1>(f));
		eventLoop.SetNow(now);	
				
		auto mediaType = std::get<0>(f);
		auto& bridge = mediaType == MediaFrame::Video ? videoBridge : audioBridge;
		
		dispatch->OnFrame(now,
				std::get<2>(f),
				std::get<3>(f),
				*bridge);
		
		std::unique_ptr<MediaFrame> frame;
		
		if (mediaType == MediaFrame::Video)
		{
			frame = std::make_unique<VideoFrame>(VideoCodec::H264);
		}
		else
		{
			frame = std::make_unique<AudioFrame>(AudioCodec::AAC);
		}
		
		frame->SetTimestamp(std::get<2>(f));
		frame->SetClockRate(std::get<3>(f));
		frame->SetLength(100);
		frame->AddRtpPacket(0, 100);
	
		bridge->onMediaFrame(*frame.get());
	}
	
	eventLoop.SetNow(std::chrono::milliseconds(std::numeric_limits<int64_t>::max()));
}


void TestFrameDispatchCoordinator::onRTP(const RTPIncomingMediaStream* stream,const RTPPacket::shared& packet)
{
	dispatchedPackets.push_back(packet);
}


TEST_F(TestFrameDispatchCoordinator, testDispatch)
{
	dispatch = std::make_unique<FrameDispatchCoordinator>(0, std::chrono::milliseconds(20), std::make_shared<TestTimeService>());

	ASSERT_NO_FATAL_FAILURE(TestDispatch(TestData::FramesArrivalInfo));

	// We set one packet for one frame, so all the frames should been dispatched.
	ASSERT_EQ(TestData::FramesArrivalInfo.size(), dispatchedPackets.size());
	
	std::vector<std::pair<MediaFrame::Type, uint64_t>> expectedSentPacketsInfo = {
		{ MediaFrame::Audio, 0 },
		{ MediaFrame::Audio, 1920 },
		{ MediaFrame::Audio, 3840 },
		{ MediaFrame::Audio, 5760 },
		{ MediaFrame::Audio, 7680 },
		{ MediaFrame::Audio, 9600 },
		{ MediaFrame::Audio, 11520 },
		{ MediaFrame::Audio, 13440 },
		{ MediaFrame::Audio, 15360 },
		{ MediaFrame::Audio, 17280 },
		{ MediaFrame::Audio, 19200 },
		{ MediaFrame::Audio, 21120 },
		{ MediaFrame::Audio, 23040 },
		{ MediaFrame::Audio, 24960 },
		{ MediaFrame::Audio, 26880 },
		{ MediaFrame::Audio, 28800 },
		{ MediaFrame::Audio, 30720 },
		{ MediaFrame::Audio, 32640 },
		{ MediaFrame::Audio, 34560 },
		{ MediaFrame::Video, 0 },
		{ MediaFrame::Audio, 36480 },
		{ MediaFrame::Video, 3003 },
		{ MediaFrame::Audio, 38400 },
		{ MediaFrame::Audio, 40320 },
		{ MediaFrame::Video, 6006 },
		{ MediaFrame::Audio, 42240 },
		{ MediaFrame::Audio, 44160 },
		{ MediaFrame::Video, 9009 },
		{ MediaFrame::Audio, 46080 },
		{ MediaFrame::Audio, 48000 },
		{ MediaFrame::Video, 12012 },
		{ MediaFrame::Audio, 49920 },
		{ MediaFrame::Audio, 51840 },
		{ MediaFrame::Video, 15015 },
		{ MediaFrame::Audio, 53760 },
		{ MediaFrame::Video, 18018 },
		{ MediaFrame::Audio, 55680 },
		{ MediaFrame::Video, 21021 },
		{ MediaFrame::Audio, 57600 },
		{ MediaFrame::Audio, 59520 },
		{ MediaFrame::Video, 24024 },
		{ MediaFrame::Audio, 61440 },
		{ MediaFrame::Audio, 63360 },
		{ MediaFrame::Video, 27027 },
		{ MediaFrame::Audio, 65280 },
		{ MediaFrame::Video, 30030 },
		{ MediaFrame::Audio, 67200 },
		{ MediaFrame::Audio, 69120 },
		{ MediaFrame::Video, 33033 },
		{ MediaFrame::Audio, 71040 },
		{ MediaFrame::Video, 36036 },
		{ MediaFrame::Audio, 72960 },
		{ MediaFrame::Audio, 74880 },
		{ MediaFrame::Video, 39039 },
		{ MediaFrame::Audio, 76800 },
		{ MediaFrame::Audio, 78720 },
		{ MediaFrame::Video, 42042 },
		{ MediaFrame::Audio, 80640 },
		{ MediaFrame::Video, 45045 },
		{ MediaFrame::Audio, 82560 },
		{ MediaFrame::Audio, 84480 },
		{ MediaFrame::Video, 48048 },
		{ MediaFrame::Audio, 86400 },
		{ MediaFrame::Video, 51051 },
		{ MediaFrame::Audio, 88320 },
		{ MediaFrame::Audio, 90240 },
		{ MediaFrame::Video, 54054 },
		{ MediaFrame::Audio, 92160 },
		{ MediaFrame::Video, 57057 },
		{ MediaFrame::Audio, 94080 },
		{ MediaFrame::Audio, 96000 },
		{ MediaFrame::Video, 60060 },
		{ MediaFrame::Audio, 97920 },
		{ MediaFrame::Video, 63063 },
		{ MediaFrame::Audio, 99840 },
		{ MediaFrame::Audio, 101760 },
		{ MediaFrame::Video, 66066 },
		{ MediaFrame::Audio, 103680 },
		{ MediaFrame::Video, 69069 },
		{ MediaFrame::Audio, 105600 },
		{ MediaFrame::Audio, 107520 },
		{ MediaFrame::Video, 72072 },
		{ MediaFrame::Audio, 109440 },
		{ MediaFrame::Audio, 111360 },
		{ MediaFrame::Video, 75075 },
		{ MediaFrame::Audio, 113280 },
		{ MediaFrame::Video, 78078 },
		{ MediaFrame::Audio, 115200 },
		{ MediaFrame::Audio, 117120 },
		{ MediaFrame::Video, 81081 },
		{ MediaFrame::Audio, 119040 },
		{ MediaFrame::Video, 84084 },
		{ MediaFrame::Audio, 120960 },
		{ MediaFrame::Audio, 122880 },
		{ MediaFrame::Video, 87087 },
		{ MediaFrame::Audio, 124800 },
		{ MediaFrame::Video, 90090 },
		{ MediaFrame::Audio, 126720 },
		{ MediaFrame::Audio, 128640 },
		{ MediaFrame::Video, 93094 },
		{ MediaFrame::Audio, 130560 },
		{ MediaFrame::Audio, 132480 },
		{ MediaFrame::Video, 96096 },
		{ MediaFrame::Audio, 134400 },
		{ MediaFrame::Video, 99099 },
		{ MediaFrame::Audio, 136320 },
		{ MediaFrame::Audio, 138240 },
		{ MediaFrame::Video, 102115 },
		{ MediaFrame::Audio, 140160 },
		{ MediaFrame::Video, 105105 },
		{ MediaFrame::Audio, 142080 },
		{ MediaFrame::Audio, 144000 },
		{ MediaFrame::Video, 108108 },
		{ MediaFrame::Audio, 145920 },
		{ MediaFrame::Video, 111111 },
		{ MediaFrame::Audio, 147840 },
		{ MediaFrame::Audio, 149760 },
		{ MediaFrame::Video, 114115 },
		{ MediaFrame::Audio, 151680 },
		{ MediaFrame::Video, 117117 },
		{ MediaFrame::Audio, 153600 },
		{ MediaFrame::Audio, 155520 },
		{ MediaFrame::Video, 120120 },
		{ MediaFrame::Audio, 157440 },
		{ MediaFrame::Audio, 159360 },
		{ MediaFrame::Video, 123123 },
		{ MediaFrame::Audio, 161280 },
		{ MediaFrame::Video, 126127 },
		{ MediaFrame::Audio, 163200 },
		{ MediaFrame::Audio, 165120 },
		{ MediaFrame::Video, 129130 },
		{ MediaFrame::Audio, 167040 },
		{ MediaFrame::Audio, 168960 },
		{ MediaFrame::Video, 132132 },
		{ MediaFrame::Audio, 170880 },
		{ MediaFrame::Video, 135135 },
		{ MediaFrame::Audio, 172800 },
		{ MediaFrame::Video, 138138 },
		{ MediaFrame::Audio, 174720 },
		{ MediaFrame::Audio, 176640 },
		{ MediaFrame::Video, 141141 },
		{ MediaFrame::Audio, 178560 },
		{ MediaFrame::Audio, 180480 },
		{ MediaFrame::Video, 144144 },
		{ MediaFrame::Audio, 182400 },
		{ MediaFrame::Video, 147147 },
		{ MediaFrame::Audio, 184320 },
		{ MediaFrame::Audio, 186240 },
		{ MediaFrame::Video, 150150 },
		{ MediaFrame::Audio, 188160 },
		{ MediaFrame::Video, 153153 },
		{ MediaFrame::Audio, 190080 },
		{ MediaFrame::Audio, 192000 },
		{ MediaFrame::Video, 156156 },
		{ MediaFrame::Audio, 193920 },
		{ MediaFrame::Audio, 195840 },
		{ MediaFrame::Video, 159159 },
		{ MediaFrame::Audio, 197760 },
		{ MediaFrame::Video, 162162 },
		{ MediaFrame::Audio, 199680 },
		{ MediaFrame::Audio, 201600 },
		{ MediaFrame::Video, 165165 },
		{ MediaFrame::Audio, 203520 },
		{ MediaFrame::Video, 168169 },
		{ MediaFrame::Audio, 205440 },
		{ MediaFrame::Audio, 207360 },
		{ MediaFrame::Video, 171171 },
		{ MediaFrame::Audio, 209280 },
		{ MediaFrame::Video, 174175 },
		{ MediaFrame::Audio, 211200 },
		{ MediaFrame::Audio, 213120 },
		{ MediaFrame::Video, 177178 },
		{ MediaFrame::Audio, 215040 },
		{ MediaFrame::Video, 180180 },
		{ MediaFrame::Audio, 216960 },
		{ MediaFrame::Audio, 218880 },
		{ MediaFrame::Video, 183184 },
		{ MediaFrame::Audio, 220800 },
		{ MediaFrame::Video, 186187 },
		{ MediaFrame::Audio, 222720 },
		{ MediaFrame::Audio, 224640 },
		{ MediaFrame::Video, 189190 },
		{ MediaFrame::Audio, 226560 },
		{ MediaFrame::Audio, 228480 },
		{ MediaFrame::Video, 192193 },
		{ MediaFrame::Audio, 230400 },
		{ MediaFrame::Video, 195196 },
		{ MediaFrame::Audio, 232320 },
		{ MediaFrame::Audio, 234240 },
		{ MediaFrame::Video, 198198 },
		{ MediaFrame::Audio, 236160 },
		{ MediaFrame::Audio, 238080 },
		{ MediaFrame::Video, 201202 },
		{ MediaFrame::Audio, 240000 },
		{ MediaFrame::Video, 204205 },
		{ MediaFrame::Audio, 241920 },
		{ MediaFrame::Video, 207208 },
		{ MediaFrame::Audio, 243840 },
		{ MediaFrame::Audio, 245760 },
		{ MediaFrame::Video, 210211 },
		{ MediaFrame::Audio, 247680 },
		{ MediaFrame::Audio, 249600 },
		{ MediaFrame::Video, 213214 },
		{ MediaFrame::Audio, 251520 },
		{ MediaFrame::Video, 216217 },
		{ MediaFrame::Audio, 253440 },
		{ MediaFrame::Audio, 255360 },
		{ MediaFrame::Video, 219232 },
		{ MediaFrame::Audio, 257280 },
		{ MediaFrame::Video, 222223 },
		{ MediaFrame::Audio, 259200 },
		{ MediaFrame::Audio, 261120 },
		{ MediaFrame::Video, 225226 },
		{ MediaFrame::Audio, 263040 },
		{ MediaFrame::Audio, 264960 },
		{ MediaFrame::Video, 228229 },
		{ MediaFrame::Audio, 266880 },
		{ MediaFrame::Video, 231232 },
		{ MediaFrame::Audio, 268800 },
		{ MediaFrame::Audio, 270720 },
		{ MediaFrame::Video, 234235 },
		{ MediaFrame::Audio, 272640 },
		{ MediaFrame::Video, 237238 },
		{ MediaFrame::Audio, 274560 },
		{ MediaFrame::Audio, 276480 },
		{ MediaFrame::Video, 240241 },
		{ MediaFrame::Audio, 278400 },
		{ MediaFrame::Video, 243244 },
		{ MediaFrame::Audio, 280320 },
		{ MediaFrame::Audio, 282240 },
		{ MediaFrame::Video, 246247 },
		{ MediaFrame::Audio, 284160 },
		{ MediaFrame::Audio, 286080 },
		{ MediaFrame::Video, 249250 },
		{ MediaFrame::Audio, 288000 },
		{ MediaFrame::Video, 252253 },
		{ MediaFrame::Audio, 289920 },
		{ MediaFrame::Audio, 291840 },
		{ MediaFrame::Video, 255256 },
		{ MediaFrame::Audio, 293760 },
		{ MediaFrame::Video, 258259 },
		{ MediaFrame::Audio, 295680 },
		{ MediaFrame::Audio, 297600 },
		{ MediaFrame::Video, 261262 },
		{ MediaFrame::Audio, 299520 },
		{ MediaFrame::Video, 264265 },
		{ MediaFrame::Audio, 301440 },
		{ MediaFrame::Audio, 303360 },
		{ MediaFrame::Video, 267268 },
		{ MediaFrame::Audio, 305280 },
		{ MediaFrame::Video, 270271 },
		{ MediaFrame::Audio, 307200 },
		{ MediaFrame::Audio, 309120 },
		{ MediaFrame::Video, 273274 },
		{ MediaFrame::Audio, 311040 },
		{ MediaFrame::Audio, 312960 },
		{ MediaFrame::Video, 276277 },
		{ MediaFrame::Audio, 314880 },
		{ MediaFrame::Video, 279280 },
		{ MediaFrame::Audio, 316800 },
		{ MediaFrame::Audio, 318720 },
		{ MediaFrame::Video, 282283 },
		{ MediaFrame::Audio, 320640 },
		{ MediaFrame::Video, 285286 },
		{ MediaFrame::Audio, 322560 },
		{ MediaFrame::Audio, 324480 },
		{ MediaFrame::Video, 288289 },
		{ MediaFrame::Audio, 326400 },
		{ MediaFrame::Video, 291292 },
		{ MediaFrame::Audio, 328320 },
		{ MediaFrame::Audio, 330240 },
		{ MediaFrame::Video, 294295 },
		{ MediaFrame::Audio, 332160 },
		{ MediaFrame::Audio, 334080 },
		{ MediaFrame::Video, 297298 },
		{ MediaFrame::Audio, 336000 },
		{ MediaFrame::Video, 300301 },
		{ MediaFrame::Audio, 337920 },
		{ MediaFrame::Audio, 339840 },
		{ MediaFrame::Video, 303304 },
		{ MediaFrame::Audio, 341760 },
		{ MediaFrame::Video, 306307 },
		{ MediaFrame::Audio, 343680 },
		{ MediaFrame::Audio, 345600 },
		{ MediaFrame::Video, 309310 },
		{ MediaFrame::Audio, 347520 },
		{ MediaFrame::Video, 312313 },
		{ MediaFrame::Audio, 349440 },
		{ MediaFrame::Audio, 351360 },
		{ MediaFrame::Video, 315316 },
		{ MediaFrame::Audio, 353280 },
		{ MediaFrame::Video, 318319 },
		{ MediaFrame::Audio, 355200 },
		{ MediaFrame::Audio, 357120 },
		{ MediaFrame::Video, 321322 },
		{ MediaFrame::Audio, 359040 },
		{ MediaFrame::Audio, 360960 },
		{ MediaFrame::Video, 324325 },
		{ MediaFrame::Audio, 362880 },
		{ MediaFrame::Video, 327328 },
		{ MediaFrame::Audio, 364800 },
		{ MediaFrame::Audio, 366720 },
		{ MediaFrame::Video, 330331 },
		{ MediaFrame::Audio, 368640 },
		{ MediaFrame::Video, 333334 },
		{ MediaFrame::Audio, 370560 },
		{ MediaFrame::Audio, 372480 },
		{ MediaFrame::Video, 336356 },
		{ MediaFrame::Audio, 374400 },
		{ MediaFrame::Video, 339340 },
		{ MediaFrame::Audio, 376320 },
		{ MediaFrame::Audio, 378240 },
		{ MediaFrame::Video, 342343 },
		{ MediaFrame::Audio, 380160 },
		{ MediaFrame::Audio, 382080 },
		{ MediaFrame::Video, 345346 },
		{ MediaFrame::Audio, 384000 },
		{ MediaFrame::Video, 348349 },
		{ MediaFrame::Audio, 385920 },
		{ MediaFrame::Audio, 387840 },
		{ MediaFrame::Video, 351352 },
		{ MediaFrame::Audio, 389760 },
		{ MediaFrame::Video, 354355 },
		{ MediaFrame::Audio, 391680 },
		{ MediaFrame::Audio, 393600 },
		{ MediaFrame::Video, 357358 },
		{ MediaFrame::Audio, 395520 },
		{ MediaFrame::Video, 360361 },
		{ MediaFrame::Audio, 397440 },
		{ MediaFrame::Audio, 399360 },
		{ MediaFrame::Video, 363364 },
		{ MediaFrame::Audio, 401280 },
		{ MediaFrame::Video, 366367 },
		{ MediaFrame::Audio, 403200 },
		{ MediaFrame::Audio, 405120 },
		{ MediaFrame::Video, 369370 },
		{ MediaFrame::Audio, 407040 },
		{ MediaFrame::Audio, 408960 },
		{ MediaFrame::Video, 372373 },
		{ MediaFrame::Audio, 410880 },
		{ MediaFrame::Video, 375376 },
		{ MediaFrame::Audio, 412800 },
		{ MediaFrame::Audio, 414720 },
		{ MediaFrame::Video, 378379 },
		{ MediaFrame::Audio, 416640 },
		{ MediaFrame::Video, 381382 },
		{ MediaFrame::Audio, 418560 },
		{ MediaFrame::Audio, 420480 },
		{ MediaFrame::Video, 384385 },
		{ MediaFrame::Audio, 422400 },
		{ MediaFrame::Audio, 424320 },
		{ MediaFrame::Video, 387388 },
		{ MediaFrame::Audio, 426240 },
		{ MediaFrame::Video, 390391 },
		{ MediaFrame::Audio, 428160 },
		{ MediaFrame::Video, 393394 },
		{ MediaFrame::Audio, 430080 },
		{ MediaFrame::Audio, 432000 },
		{ MediaFrame::Video, 396397 },
		{ MediaFrame::Audio, 433920 },
		{ MediaFrame::Audio, 435840 },
		{ MediaFrame::Video, 399400 },
		{ MediaFrame::Audio, 437760 },
		{ MediaFrame::Video, 402403 },
		{ MediaFrame::Audio, 439680 },
		{ MediaFrame::Audio, 441600 },
		{ MediaFrame::Video, 405406 },
		{ MediaFrame::Audio, 443520 },
		{ MediaFrame::Video, 408409 },
		{ MediaFrame::Audio, 445440 },
		{ MediaFrame::Audio, 447360 },
		{ MediaFrame::Video, 411412 },
		{ MediaFrame::Audio, 449280 },
		{ MediaFrame::Audio, 451200 },
		{ MediaFrame::Video, 414415 },
		{ MediaFrame::Audio, 453120 },
		{ MediaFrame::Video, 417419 },
		{ MediaFrame::Audio, 455040 },
		{ MediaFrame::Audio, 456960 },
		{ MediaFrame::Video, 420421 },
		{ MediaFrame::Audio, 458880 },
		{ MediaFrame::Video, 423424 },
		{ MediaFrame::Audio, 460800 },
		{ MediaFrame::Audio, 462720 },
		{ MediaFrame::Video, 426427 },
		{ MediaFrame::Audio, 464640 },
		{ MediaFrame::Video, 429431 },
		{ MediaFrame::Audio, 466560 },
		{ MediaFrame::Audio, 468480 },
		{ MediaFrame::Video, 432433 },
		{ MediaFrame::Audio, 470400 },
		{ MediaFrame::Audio, 472320 },
		{ MediaFrame::Video, 435436 },
		{ MediaFrame::Audio, 474240 },
		{ MediaFrame::Video, 438439 },
		{ MediaFrame::Audio, 476160 },
		{ MediaFrame::Audio, 478080 },
		{ MediaFrame::Video, 441442 },
		{ MediaFrame::Audio, 480000 },
		{ MediaFrame::Video, 444446 },
		{ MediaFrame::Audio, 481920 },
		{ MediaFrame::Audio, 483840 },
		{ MediaFrame::Video, 447448 },
		{ MediaFrame::Audio, 485760 },
		{ MediaFrame::Video, 450451 },
		{ MediaFrame::Audio, 487680 },
		{ MediaFrame::Audio, 489600 },
		{ MediaFrame::Video, 453479 },
		{ MediaFrame::Audio, 491520 },
		{ MediaFrame::Video, 456457 },
		{ MediaFrame::Audio, 493440 },
		{ MediaFrame::Audio, 495360 },
		{ MediaFrame::Video, 459460 },
		{ MediaFrame::Audio, 497280 },
		{ MediaFrame::Audio, 499200 },
		{ MediaFrame::Video, 462463 },
		{ MediaFrame::Audio, 501120 },
		{ MediaFrame::Video, 465466 },
		{ MediaFrame::Audio, 503040 },
		{ MediaFrame::Audio, 504960 },
		{ MediaFrame::Video, 468469 },
		{ MediaFrame::Audio, 506880 },
		{ MediaFrame::Video, 471472 },
		{ MediaFrame::Audio, 508800 },
		{ MediaFrame::Audio, 510720 },
		{ MediaFrame::Video, 474475 },
		{ MediaFrame::Audio, 512640 },
		{ MediaFrame::Video, 477478 },
		{ MediaFrame::Audio, 514560 },
		{ MediaFrame::Audio, 516480 },
		{ MediaFrame::Video, 480482 },
		{ MediaFrame::Audio, 518400 },
		{ MediaFrame::Audio, 520320 },
		{ MediaFrame::Video, 483484 },
		{ MediaFrame::Audio, 522240 },
		{ MediaFrame::Video, 486487 },
		{ MediaFrame::Audio, 524160 },
		{ MediaFrame::Audio, 526080 },
		{ MediaFrame::Video, 489490 },
		{ MediaFrame::Audio, 528000 },
		{ MediaFrame::Video, 492493 },
		{ MediaFrame::Audio, 529920 },
		{ MediaFrame::Audio, 531840 },
		{ MediaFrame::Video, 495496 },
		{ MediaFrame::Audio, 533760 },
		{ MediaFrame::Video, 498500 },
		{ MediaFrame::Audio, 535680 },
		{ MediaFrame::Audio, 537600 },
		{ MediaFrame::Video, 501502 },
		{ MediaFrame::Audio, 539520 },
		{ MediaFrame::Video, 504505 },
		{ MediaFrame::Audio, 541440 },
		{ MediaFrame::Audio, 543360 },
		{ MediaFrame::Video, 507509 },
		{ MediaFrame::Audio, 545280 },
		{ MediaFrame::Audio, 547200 },
		{ MediaFrame::Video, 510512 },
		{ MediaFrame::Audio, 549120 },
		{ MediaFrame::Video, 513514 },
		{ MediaFrame::Audio, 551040 },
		{ MediaFrame::Audio, 552960 },
		{ MediaFrame::Video, 516518 },
		{ MediaFrame::Audio, 554880 },
		{ MediaFrame::Video, 519521 },
		{ MediaFrame::Audio, 556800 },
		{ MediaFrame::Audio, 558720 },
		{ MediaFrame::Video, 522523 },
		{ MediaFrame::Audio, 560640 },
		{ MediaFrame::Video, 525527 },
		{ MediaFrame::Audio, 562560 },
		{ MediaFrame::Audio, 564480 },
		{ MediaFrame::Video, 528530 },
		{ MediaFrame::Audio, 566400 },
		{ MediaFrame::Audio, 568320 },
		{ MediaFrame::Video, 531533 },
		{ MediaFrame::Audio, 570240 },
		{ MediaFrame::Video, 534536 },
		{ MediaFrame::Audio, 572160 },
		{ MediaFrame::Audio, 574080 },
		{ MediaFrame::Video, 537539 },
		{ MediaFrame::Audio, 576000 },
		{ MediaFrame::Video, 540542 },
		{ MediaFrame::Audio, 577920 },
		{ MediaFrame::Audio, 579840 },
		{ MediaFrame::Video, 543545 },
		{ MediaFrame::Audio, 581760 },
		{ MediaFrame::Video, 546548 },
		{ MediaFrame::Audio, 583680 },
		{ MediaFrame::Audio, 585600 },
		{ MediaFrame::Video, 549551 },
		{ MediaFrame::Audio, 587520 },
		{ MediaFrame::Video, 552554 },
		{ MediaFrame::Audio, 589440 },
		{ MediaFrame::Audio, 591360 },
		{ MediaFrame::Video, 555557 },
		{ MediaFrame::Audio, 593280 },
		{ MediaFrame::Audio, 595200 },
		{ MediaFrame::Video, 558560 },
		{ MediaFrame::Audio, 597120 },
		{ MediaFrame::Video, 561563 },
		{ MediaFrame::Audio, 599040 },
		{ MediaFrame::Video, 564566 },
		{ MediaFrame::Audio, 600960 },
		{ MediaFrame::Audio, 602880 },
		{ MediaFrame::Video, 567569 },
		{ MediaFrame::Audio, 604800 },
		{ MediaFrame::Audio, 606720 },
		{ MediaFrame::Video, 570597 },
		{ MediaFrame::Audio, 608640 },
		{ MediaFrame::Video, 573575 },
		{ MediaFrame::Audio, 610560 },
		{ MediaFrame::Audio, 612480 },
		{ MediaFrame::Video, 576578 },
		{ MediaFrame::Audio, 614400 },
		{ MediaFrame::Video, 579581 },
		{ MediaFrame::Audio, 616320 },
		{ MediaFrame::Audio, 618240 },
		{ MediaFrame::Video, 582584 },
		{ MediaFrame::Audio, 620160 },
		{ MediaFrame::Audio, 622080 },
		{ MediaFrame::Video, 585587 },
		{ MediaFrame::Audio, 624000 },
		{ MediaFrame::Video, 588590 },
		{ MediaFrame::Audio, 625920 },
		{ MediaFrame::Audio, 627840 },
		{ MediaFrame::Video, 594596 },
		{ MediaFrame::Audio, 629760 },
		{ MediaFrame::Audio, 631680 },
		{ MediaFrame::Audio, 633600 },
		{ MediaFrame::Video, 597599 },
		{ MediaFrame::Audio, 635520 },
		{ MediaFrame::Audio, 637440 },
		{ MediaFrame::Video, 600602 },
		{ MediaFrame::Audio, 639360 },
		{ MediaFrame::Video, 603605 },
		{ MediaFrame::Audio, 641280 },
		{ MediaFrame::Audio, 643200 },
		{ MediaFrame::Video, 606608 },
		{ MediaFrame::Audio, 645120 },
		{ MediaFrame::Video, 609611 },
		{ MediaFrame::Audio, 647040 },
		{ MediaFrame::Audio, 648960 },
		{ MediaFrame::Video, 612614 },
		{ MediaFrame::Audio, 650880 },
		{ MediaFrame::Video, 615617 },
		{ MediaFrame::Audio, 652800 },
		{ MediaFrame::Audio, 654720 },
		{ MediaFrame::Video, 618620 },
		{ MediaFrame::Audio, 656640 },
		{ MediaFrame::Video, 621623 },
		{ MediaFrame::Audio, 658560 },
		{ MediaFrame::Audio, 660480 },
		{ MediaFrame::Video, 624626 },
		{ MediaFrame::Audio, 662400 },
		{ MediaFrame::Audio, 664320 },
		{ MediaFrame::Video, 627629 },
		{ MediaFrame::Audio, 666240 },
		{ MediaFrame::Video, 630632 },
		{ MediaFrame::Audio, 668160 },
		{ MediaFrame::Audio, 670080 },
		{ MediaFrame::Video, 633635 },
		{ MediaFrame::Audio, 672000 },
		{ MediaFrame::Video, 636638 },
		{ MediaFrame::Audio, 673920 },
		{ MediaFrame::Audio, 675840 },
		{ MediaFrame::Video, 639641 },
		{ MediaFrame::Audio, 677760 },
		{ MediaFrame::Video, 642644 },
		{ MediaFrame::Audio, 679680 },
		{ MediaFrame::Audio, 681600 },
		{ MediaFrame::Video, 645647 },
		{ MediaFrame::Audio, 683520 },
		{ MediaFrame::Video, 648650 },
		{ MediaFrame::Audio, 685440 },
		{ MediaFrame::Audio, 687360 },
		{ MediaFrame::Video, 651653 },
		{ MediaFrame::Audio, 689280 },
		{ MediaFrame::Audio, 691200 },
		{ MediaFrame::Video, 654656 },
		{ MediaFrame::Audio, 693120 },
		{ MediaFrame::Video, 657659 },
		{ MediaFrame::Audio, 695040 },
		{ MediaFrame::Audio, 696960 },
		{ MediaFrame::Video, 660662 },
		{ MediaFrame::Audio, 698880 },
		{ MediaFrame::Video, 663665 },
		{ MediaFrame::Audio, 700800 },
		{ MediaFrame::Audio, 702720 },
		{ MediaFrame::Video, 666668 },
		{ MediaFrame::Audio, 704640 },
		{ MediaFrame::Audio, 706560 },
		{ MediaFrame::Video, 669671 },
		{ MediaFrame::Audio, 708480 },
		{ MediaFrame::Video, 672674 },
		{ MediaFrame::Audio, 710400 },
		{ MediaFrame::Audio, 712320 },
		{ MediaFrame::Video, 675677 },
		{ MediaFrame::Audio, 714240 },
		{ MediaFrame::Video, 678680 },
		{ MediaFrame::Audio, 716160 },
		{ MediaFrame::Audio, 718080 },
		{ MediaFrame::Video, 681683 },
		{ MediaFrame::Audio, 720000 },
		{ MediaFrame::Video, 684686 },
		{ MediaFrame::Audio, 721920 },
		{ MediaFrame::Audio, 723840 },
		{ MediaFrame::Video, 687714 },
		{ MediaFrame::Audio, 725760 },
		{ MediaFrame::Video, 690692 },
		{ MediaFrame::Audio, 727680 },
		{ MediaFrame::Audio, 729600 },
		{ MediaFrame::Video, 693695 },
		{ MediaFrame::Audio, 731520 },
		{ MediaFrame::Audio, 733440 },
		{ MediaFrame::Video, 696698 },
		{ MediaFrame::Audio, 735360 },
		{ MediaFrame::Video, 699701 },
		{ MediaFrame::Audio, 737280 },
		{ MediaFrame::Audio, 739200 },
		{ MediaFrame::Video, 702704 },
		{ MediaFrame::Audio, 741120 },
		{ MediaFrame::Video, 705707 },
		{ MediaFrame::Audio, 743040 },
		{ MediaFrame::Audio, 744960 },
		{ MediaFrame::Video, 708710 },
		{ MediaFrame::Audio, 746880 },
		{ MediaFrame::Video, 711713 },
		{ MediaFrame::Audio, 748800 },
		{ MediaFrame::Audio, 750720 },
		{ MediaFrame::Video, 714716 },
		{ MediaFrame::Audio, 752640 },
		{ MediaFrame::Audio, 754560 },
		{ MediaFrame::Video, 717719 },
		{ MediaFrame::Audio, 756480 },
		{ MediaFrame::Video, 720722 },
		{ MediaFrame::Audio, 758400 },
		{ MediaFrame::Audio, 760320 },
		{ MediaFrame::Video, 723725 },
		{ MediaFrame::Audio, 762240 },
		{ MediaFrame::Video, 726728 },
		{ MediaFrame::Audio, 764160 },
		{ MediaFrame::Audio, 766080 },
		{ MediaFrame::Video, 729731 },
		{ MediaFrame::Audio, 768000 },
		{ MediaFrame::Video, 732734 },
		{ MediaFrame::Audio, 769920 },
		{ MediaFrame::Audio, 771840 },
		{ MediaFrame::Video, 735737 },
		{ MediaFrame::Audio, 773760 },
		{ MediaFrame::Audio, 775680 },
		{ MediaFrame::Video, 738740 },
		{ MediaFrame::Audio, 777600 },
		{ MediaFrame::Video, 741743 },
		{ MediaFrame::Audio, 779520 },
		{ MediaFrame::Audio, 781440 },
		{ MediaFrame::Video, 744746 },
		{ MediaFrame::Audio, 783360 },
		{ MediaFrame::Video, 747749 },
		{ MediaFrame::Audio, 785280 },
		{ MediaFrame::Audio, 787200 },
		{ MediaFrame::Video, 750752 },
		{ MediaFrame::Audio, 789120 },
		{ MediaFrame::Video, 753756 },
		{ MediaFrame::Audio, 791040 },
		{ MediaFrame::Audio, 792960 },
		{ MediaFrame::Video, 756758 },
		{ MediaFrame::Audio, 794880 },
		{ MediaFrame::Video, 759761 },
		{ MediaFrame::Audio, 796800 },
		{ MediaFrame::Audio, 798720 },
		{ MediaFrame::Video, 762764 },
		{ MediaFrame::Audio, 800640 },
		{ MediaFrame::Audio, 802560 },
		{ MediaFrame::Audio, 804480 },
		{ MediaFrame::Video, 768770 },
		{ MediaFrame::Audio, 806400 },
		{ MediaFrame::Audio, 808320 },
		{ MediaFrame::Video, 771773 },
		{ MediaFrame::Audio, 810240 },
		{ MediaFrame::Video, 774776 },
		{ MediaFrame::Audio, 812160 },
		{ MediaFrame::Audio, 814080 },
		{ MediaFrame::Video, 777779 },
		{ MediaFrame::Audio, 816000 },
		{ MediaFrame::Video, 780782 },
		{ MediaFrame::Audio, 817920 },
		{ MediaFrame::Audio, 819840 },
		{ MediaFrame::Video, 783786 },
		{ MediaFrame::Audio, 821760 },
		{ MediaFrame::Video, 786788 },
		{ MediaFrame::Audio, 823680 },
		{ MediaFrame::Audio, 825600 },
		{ MediaFrame::Video, 789791 },
		{ MediaFrame::Audio, 827520 },
		{ MediaFrame::Audio, 829440 },
		{ MediaFrame::Video, 792794 },
		{ MediaFrame::Audio, 831360 },
		{ MediaFrame::Video, 795797 },
		{ MediaFrame::Audio, 833280 },
		{ MediaFrame::Audio, 835200 },
		{ MediaFrame::Video, 798800 },
		{ MediaFrame::Audio, 837120 },
		{ MediaFrame::Video, 801804 },
		{ MediaFrame::Audio, 839040 },
		{ MediaFrame::Audio, 840960 },
		{ MediaFrame::Video, 804837 },
		{ MediaFrame::Audio, 842880 },
		{ MediaFrame::Video, 807809 },
		{ MediaFrame::Audio, 844800 },
		{ MediaFrame::Audio, 846720 },
		{ MediaFrame::Video, 810813 },
		{ MediaFrame::Audio, 848640 },
		{ MediaFrame::Audio, 850560 },
		{ MediaFrame::Video, 813816 },
		{ MediaFrame::Audio, 852480 },
		{ MediaFrame::Video, 816819 },
		{ MediaFrame::Audio, 854400 },
		{ MediaFrame::Audio, 856320 },
		{ MediaFrame::Video, 819821 },
		{ MediaFrame::Audio, 858240 },
		{ MediaFrame::Video, 822824 },
		{ MediaFrame::Audio, 860160 },
		{ MediaFrame::Audio, 862080 },
		{ MediaFrame::Video, 825827 },
		{ MediaFrame::Audio, 864000 },
		{ MediaFrame::Video, 828830 },
		{ MediaFrame::Audio, 865920 },
		{ MediaFrame::Audio, 867840 },
		{ MediaFrame::Video, 831834 },
		{ MediaFrame::Audio, 869760 },
		{ MediaFrame::Audio, 871680 },
		{ MediaFrame::Video, 834836 },
		{ MediaFrame::Audio, 873600 },
		{ MediaFrame::Video, 837839 },
		{ MediaFrame::Audio, 875520 },
		{ MediaFrame::Audio, 877440 },
		{ MediaFrame::Video, 840842 },
		{ MediaFrame::Audio, 879360 },
		{ MediaFrame::Video, 843846 },
		{ MediaFrame::Audio, 881280 },
		{ MediaFrame::Audio, 883200 },
		{ MediaFrame::Video, 846849 },
		{ MediaFrame::Audio, 885120 },
		{ MediaFrame::Video, 849851 },
		{ MediaFrame::Audio, 887040 },
		{ MediaFrame::Audio, 888960 },
		{ MediaFrame::Video, 852854 },
		{ MediaFrame::Audio, 890880 },
		{ MediaFrame::Video, 855858 },
		{ MediaFrame::Audio, 892800 },
		{ MediaFrame::Video, 858861 },
		{ MediaFrame::Audio, 894720 },
		{ MediaFrame::Video, 861863 },
		{ MediaFrame::Audio, 896640 },
		{ MediaFrame::Video, 864866 },
		{ MediaFrame::Video, 867869 }
	};
	
	std::vector<std::pair<MediaFrame::Type, uint64_t>> actualSentPacketsInfo;
	for (auto it : dispatchedPackets)
	{
		actualSentPacketsInfo.emplace_back(it->GetMediaType(), it->GetExtTimestamp());
	}
	
	ASSERT_EQ(expectedSentPacketsInfo, actualSentPacketsInfo);
}

TEST_F(TestFrameDispatchCoordinator, testLatencyReduction)
{	
	dispatch = std::make_unique<FrameDispatchCoordinator>(0, std::chrono::milliseconds(3), std::make_shared<TestTimeService>());
	ASSERT_NO_FATAL_FAILURE(TestDispatch(TestData::FramesArrivalInfo));
	
	// We set one packet for one frame, so all the frames should been dispatched.
	ASSERT_EQ(TestData::FramesArrivalInfo.size(), dispatchedPackets.size());

	std::vector<std::pair<MediaFrame::Type, uint64_t>> expectedSentPacketsInfo = {
		{ MediaFrame::Audio, 0 },
		{ MediaFrame::Audio, 1920 },
		{ MediaFrame::Audio, 3840 },
		{ MediaFrame::Audio, 5760 },
		{ MediaFrame::Audio, 7680 },
		{ MediaFrame::Audio, 9600 },
		{ MediaFrame::Audio, 11520 },
		{ MediaFrame::Audio, 13440 },
		{ MediaFrame::Audio, 15360 },
		{ MediaFrame::Audio, 17280 },
		{ MediaFrame::Audio, 19200 },
		{ MediaFrame::Audio, 21120 },
		{ MediaFrame::Audio, 23040 },
		{ MediaFrame::Audio, 24960 },
		{ MediaFrame::Audio, 26880 },
		{ MediaFrame::Audio, 28800 },
		{ MediaFrame::Audio, 30720 },
		{ MediaFrame::Audio, 32640 },
		{ MediaFrame::Audio, 34560 },
		{ MediaFrame::Video, 0 },
		{ MediaFrame::Audio, 36480 },
		{ MediaFrame::Video, 3003 },
		{ MediaFrame::Audio, 38400 },
		{ MediaFrame::Audio, 40320 },
		{ MediaFrame::Video, 6006 },
		{ MediaFrame::Audio, 42240 },
		{ MediaFrame::Audio, 44160 },
		{ MediaFrame::Video, 9009 },
		{ MediaFrame::Audio, 46080 },
		{ MediaFrame::Audio, 48000 },
		{ MediaFrame::Video, 12012 },
		{ MediaFrame::Audio, 49920 },
		{ MediaFrame::Audio, 51840 },
		{ MediaFrame::Video, 15015 },
		{ MediaFrame::Audio, 53760 },
		{ MediaFrame::Video, 18018 },
		{ MediaFrame::Audio, 55680 },
		{ MediaFrame::Video, 21021 },
		{ MediaFrame::Audio, 57600 },
		{ MediaFrame::Audio, 59520 },
		{ MediaFrame::Video, 24024 },
		{ MediaFrame::Audio, 61440 },
		{ MediaFrame::Audio, 63360 },
		{ MediaFrame::Video, 27027 },
		{ MediaFrame::Audio, 65280 },
		{ MediaFrame::Video, 30030 },
		{ MediaFrame::Audio, 67200 },
		{ MediaFrame::Audio, 69120 },
		{ MediaFrame::Video, 33033 },
		{ MediaFrame::Audio, 71040 },
		{ MediaFrame::Video, 36036 },
		{ MediaFrame::Audio, 72960 },
		{ MediaFrame::Audio, 74880 },
		{ MediaFrame::Video, 39039 },
		{ MediaFrame::Audio, 76800 },
		{ MediaFrame::Audio, 78720 },
		{ MediaFrame::Video, 42042 },
		{ MediaFrame::Audio, 80640 },
		{ MediaFrame::Video, 45045 },
		{ MediaFrame::Audio, 82560 },
		{ MediaFrame::Audio, 84480 },
		{ MediaFrame::Video, 48048 },
		{ MediaFrame::Audio, 86400 },
		{ MediaFrame::Video, 51051 },
		{ MediaFrame::Audio, 88320 },
		{ MediaFrame::Audio, 90240 },
		{ MediaFrame::Video, 54054 },
		{ MediaFrame::Audio, 92160 },
		{ MediaFrame::Video, 57057 },
		{ MediaFrame::Audio, 94080 },
		{ MediaFrame::Audio, 96000 },
		{ MediaFrame::Video, 60060 },
		{ MediaFrame::Audio, 97920 },
		{ MediaFrame::Video, 63063 },
		{ MediaFrame::Audio, 99840 },
		{ MediaFrame::Audio, 101760 },
		{ MediaFrame::Video, 66066 },
		{ MediaFrame::Audio, 103680 },
		{ MediaFrame::Video, 69069 },
		{ MediaFrame::Audio, 105600 },
		{ MediaFrame::Audio, 107520 },
		{ MediaFrame::Video, 72072 },
		{ MediaFrame::Audio, 109440 },
		{ MediaFrame::Audio, 111360 },
		{ MediaFrame::Video, 75075 },
		{ MediaFrame::Audio, 113280 },
		{ MediaFrame::Video, 78078 },
		{ MediaFrame::Audio, 115200 },
		{ MediaFrame::Audio, 117120 },
		{ MediaFrame::Video, 81081 },
		{ MediaFrame::Audio, 119040 },
		{ MediaFrame::Video, 84084 },
		{ MediaFrame::Audio, 120960 },
		{ MediaFrame::Audio, 122880 },
		{ MediaFrame::Video, 87087 },
		{ MediaFrame::Audio, 124800 },
		{ MediaFrame::Video, 90090 },
		{ MediaFrame::Audio, 126720 },
		{ MediaFrame::Audio, 128640 },
		{ MediaFrame::Video, 93094 },
		{ MediaFrame::Audio, 130560 },
		{ MediaFrame::Audio, 132480 },
		{ MediaFrame::Video, 96096 },
		{ MediaFrame::Audio, 134400 },
		{ MediaFrame::Video, 99099 },
		{ MediaFrame::Audio, 136320 },
		{ MediaFrame::Audio, 138240 },
		{ MediaFrame::Video, 102115 },
		{ MediaFrame::Audio, 140160 },
		{ MediaFrame::Video, 105105 },
		{ MediaFrame::Audio, 142080 },
		{ MediaFrame::Audio, 144000 },
		{ MediaFrame::Video, 108108 },
		{ MediaFrame::Audio, 145920 },
		{ MediaFrame::Video, 111111 },
		{ MediaFrame::Audio, 147840 },
		{ MediaFrame::Audio, 149760 },
		{ MediaFrame::Video, 114115 },
		{ MediaFrame::Audio, 151680 },
		{ MediaFrame::Video, 117117 },
		{ MediaFrame::Audio, 153600 },
		{ MediaFrame::Audio, 155520 },
		{ MediaFrame::Video, 120120 },
		{ MediaFrame::Audio, 157440 },
		{ MediaFrame::Audio, 159360 },
		{ MediaFrame::Video, 123123 },
		{ MediaFrame::Audio, 161280 },
		{ MediaFrame::Video, 126127 },
		{ MediaFrame::Audio, 163200 },
		{ MediaFrame::Audio, 165120 },
		{ MediaFrame::Video, 129130 },
		{ MediaFrame::Audio, 167040 },
		{ MediaFrame::Audio, 168960 },
		{ MediaFrame::Video, 132132 },
		{ MediaFrame::Audio, 170880 },
		{ MediaFrame::Video, 135135 },
		{ MediaFrame::Audio, 172800 },
		{ MediaFrame::Video, 138138 },
		{ MediaFrame::Audio, 174720 },
		{ MediaFrame::Audio, 176640 },
		{ MediaFrame::Video, 141141 },
		{ MediaFrame::Audio, 178560 },
		{ MediaFrame::Audio, 180480 },
		{ MediaFrame::Video, 144144 },
		{ MediaFrame::Audio, 182400 },
		{ MediaFrame::Video, 147147 },
		{ MediaFrame::Audio, 184320 },
		{ MediaFrame::Audio, 186240 },
		{ MediaFrame::Video, 150150 },
		{ MediaFrame::Audio, 188160 },
		{ MediaFrame::Video, 153153 },
		{ MediaFrame::Audio, 190080 },
		{ MediaFrame::Audio, 192000 },
		{ MediaFrame::Video, 156156 },
		{ MediaFrame::Audio, 193920 },
		{ MediaFrame::Audio, 195840 },
		{ MediaFrame::Video, 159159 },
		{ MediaFrame::Audio, 197760 },
		{ MediaFrame::Video, 162162 },
		{ MediaFrame::Audio, 199680 },
		{ MediaFrame::Audio, 201600 },
		{ MediaFrame::Video, 165165 },
		{ MediaFrame::Audio, 203520 },
		{ MediaFrame::Video, 168169 },
		{ MediaFrame::Audio, 205440 },
		{ MediaFrame::Audio, 207360 },
		{ MediaFrame::Video, 171171 },
		{ MediaFrame::Audio, 209280 },
		{ MediaFrame::Video, 174175 },
		{ MediaFrame::Audio, 211200 },
		{ MediaFrame::Audio, 213120 },
		{ MediaFrame::Video, 177178 },
		{ MediaFrame::Audio, 215040 },
		{ MediaFrame::Video, 180180 },
		{ MediaFrame::Audio, 216960 },
		{ MediaFrame::Audio, 218880 },
		{ MediaFrame::Video, 183184 },
		{ MediaFrame::Audio, 220800 },
		{ MediaFrame::Video, 186187 },
		{ MediaFrame::Audio, 222720 },
		{ MediaFrame::Audio, 224640 },
		{ MediaFrame::Video, 189190 },
		{ MediaFrame::Audio, 226560 },
		{ MediaFrame::Audio, 228480 },
		{ MediaFrame::Video, 192193 },
		{ MediaFrame::Audio, 230400 },
		{ MediaFrame::Video, 195196 },
		{ MediaFrame::Audio, 232320 },
		{ MediaFrame::Audio, 234240 },
		{ MediaFrame::Video, 198198 },
		{ MediaFrame::Audio, 236160 },
		{ MediaFrame::Audio, 238080 },
		{ MediaFrame::Video, 201202 },
		{ MediaFrame::Audio, 240000 },
		{ MediaFrame::Video, 204205 },
		{ MediaFrame::Audio, 241920 },
		{ MediaFrame::Video, 207208 },
		{ MediaFrame::Audio, 243840 },
		{ MediaFrame::Audio, 245760 },
		{ MediaFrame::Video, 210211 },
		{ MediaFrame::Audio, 247680 },
		{ MediaFrame::Audio, 249600 },
		{ MediaFrame::Video, 213214 },
		{ MediaFrame::Audio, 251520 },
		{ MediaFrame::Video, 216217 },
		{ MediaFrame::Audio, 253440 },
		{ MediaFrame::Audio, 255360 },
		{ MediaFrame::Video, 219232 },
		{ MediaFrame::Audio, 257280 },
		{ MediaFrame::Video, 222223 },
		{ MediaFrame::Audio, 259200 },
		{ MediaFrame::Audio, 261120 },
		{ MediaFrame::Video, 225226 },
		{ MediaFrame::Audio, 263040 },
		{ MediaFrame::Audio, 264960 },
		{ MediaFrame::Video, 228229 },
		{ MediaFrame::Audio, 266880 },
		{ MediaFrame::Video, 231232 },
		{ MediaFrame::Audio, 268800 },
		{ MediaFrame::Audio, 270720 },
		{ MediaFrame::Video, 234235 },
		{ MediaFrame::Audio, 272640 },
		{ MediaFrame::Video, 237238 },
		{ MediaFrame::Audio, 274560 },
		{ MediaFrame::Audio, 276480 },
		{ MediaFrame::Video, 240241 },
		{ MediaFrame::Audio, 278400 },
		{ MediaFrame::Video, 243244 },
		{ MediaFrame::Audio, 280320 },
		{ MediaFrame::Audio, 282240 },
		{ MediaFrame::Video, 246247 },
		{ MediaFrame::Audio, 284160 },
		{ MediaFrame::Audio, 286080 },
		{ MediaFrame::Video, 249250 },
		{ MediaFrame::Audio, 288000 },
		{ MediaFrame::Video, 252253 },
		{ MediaFrame::Audio, 289920 },
		{ MediaFrame::Audio, 291840 },
		{ MediaFrame::Video, 255256 },
		{ MediaFrame::Audio, 293760 },
		{ MediaFrame::Video, 258259 },
		{ MediaFrame::Audio, 295680 },
		{ MediaFrame::Audio, 297600 },
		{ MediaFrame::Video, 261262 },
		{ MediaFrame::Audio, 299520 },
		{ MediaFrame::Video, 264265 },
		{ MediaFrame::Audio, 301440 },
		{ MediaFrame::Audio, 303360 },
		{ MediaFrame::Video, 267268 },
		{ MediaFrame::Audio, 305280 },
		{ MediaFrame::Video, 270271 },
		{ MediaFrame::Audio, 307200 },
		{ MediaFrame::Audio, 309120 },
		{ MediaFrame::Video, 273274 },
		{ MediaFrame::Audio, 311040 },
		{ MediaFrame::Audio, 312960 },
		{ MediaFrame::Video, 276277 },
		{ MediaFrame::Audio, 314880 },
		{ MediaFrame::Video, 279280 },
		{ MediaFrame::Audio, 316800 },
		{ MediaFrame::Audio, 318720 },
		{ MediaFrame::Video, 282283 },
		{ MediaFrame::Audio, 320640 },
		{ MediaFrame::Video, 285286 },
		{ MediaFrame::Audio, 322560 },
		{ MediaFrame::Audio, 324480 },
		{ MediaFrame::Video, 288289 },
		{ MediaFrame::Audio, 326400 },
		{ MediaFrame::Video, 291292 },
		{ MediaFrame::Audio, 328320 },
		{ MediaFrame::Audio, 330240 },
		{ MediaFrame::Video, 294295 },
		{ MediaFrame::Audio, 332160 },
		{ MediaFrame::Audio, 334080 },
		{ MediaFrame::Video, 297298 },
		{ MediaFrame::Audio, 336000 },
		{ MediaFrame::Video, 300301 },
		{ MediaFrame::Audio, 337920 },
		{ MediaFrame::Audio, 339840 },
		{ MediaFrame::Video, 303304 },
		{ MediaFrame::Audio, 341760 },
		{ MediaFrame::Video, 306307 },
		{ MediaFrame::Audio, 343680 },
		{ MediaFrame::Audio, 345600 },
		{ MediaFrame::Video, 309310 },
		{ MediaFrame::Audio, 347520 },
		{ MediaFrame::Video, 312313 },
		{ MediaFrame::Audio, 349440 },
		{ MediaFrame::Audio, 351360 },
		{ MediaFrame::Video, 315316 },
		{ MediaFrame::Audio, 353280 },
		{ MediaFrame::Video, 318319 },
		{ MediaFrame::Audio, 355200 },
		{ MediaFrame::Audio, 357120 },
		{ MediaFrame::Video, 321322 },
		{ MediaFrame::Audio, 359040 },
		{ MediaFrame::Audio, 360960 },
		{ MediaFrame::Video, 324325 },
		{ MediaFrame::Audio, 362880 },
		{ MediaFrame::Video, 327328 },
		{ MediaFrame::Audio, 364800 },
		{ MediaFrame::Audio, 366720 },
		{ MediaFrame::Video, 330331 },
		{ MediaFrame::Audio, 368640 },
		{ MediaFrame::Video, 333334 },
		{ MediaFrame::Audio, 370560 },
		{ MediaFrame::Audio, 372480 },
		{ MediaFrame::Video, 336356 },
		{ MediaFrame::Audio, 374400 },
		{ MediaFrame::Video, 339340 },
		{ MediaFrame::Audio, 376320 },
		{ MediaFrame::Audio, 378240 },
		{ MediaFrame::Video, 342343 },
		{ MediaFrame::Audio, 380160 },
		{ MediaFrame::Audio, 382080 },
		{ MediaFrame::Video, 345346 },
		{ MediaFrame::Audio, 384000 },
		{ MediaFrame::Video, 348349 },
		{ MediaFrame::Audio, 385920 },
		{ MediaFrame::Audio, 387840 },
		{ MediaFrame::Video, 351352 },
		{ MediaFrame::Audio, 389760 },
		{ MediaFrame::Video, 354355 },
		{ MediaFrame::Audio, 391680 },
		{ MediaFrame::Audio, 393600 },
		{ MediaFrame::Video, 357358 },
		{ MediaFrame::Audio, 395520 },
		{ MediaFrame::Audio, 397440 },
		{ MediaFrame::Video, 360361 },
		{ MediaFrame::Audio, 399360 },
		{ MediaFrame::Video, 363364 },
		{ MediaFrame::Audio, 401280 },
		{ MediaFrame::Video, 366367 },
		{ MediaFrame::Audio, 403200 },
		{ MediaFrame::Audio, 405120 },
		{ MediaFrame::Video, 369370 },
		{ MediaFrame::Audio, 407040 },
		{ MediaFrame::Audio, 408960 },
		{ MediaFrame::Video, 372373 },
		{ MediaFrame::Audio, 410880 },
		{ MediaFrame::Video, 375376 },
		{ MediaFrame::Audio, 412800 },
		{ MediaFrame::Audio, 414720 },
		{ MediaFrame::Video, 378379 },
		{ MediaFrame::Audio, 416640 },
		{ MediaFrame::Video, 381382 },
		{ MediaFrame::Audio, 418560 },
		{ MediaFrame::Audio, 420480 },
		{ MediaFrame::Video, 384385 },
		{ MediaFrame::Audio, 422400 },
		{ MediaFrame::Video, 387388 },
		{ MediaFrame::Audio, 424320 },
		{ MediaFrame::Audio, 426240 },
		{ MediaFrame::Video, 390391 },
		{ MediaFrame::Audio, 428160 },
		{ MediaFrame::Video, 393394 },
		{ MediaFrame::Audio, 430080 },
		{ MediaFrame::Audio, 432000 },
		{ MediaFrame::Video, 396397 },
		{ MediaFrame::Audio, 433920 },
		{ MediaFrame::Audio, 435840 },
		{ MediaFrame::Video, 399400 },
		{ MediaFrame::Audio, 437760 },
		{ MediaFrame::Video, 402403 },
		{ MediaFrame::Audio, 439680 },
		{ MediaFrame::Audio, 441600 },
		{ MediaFrame::Video, 405406 },
		{ MediaFrame::Audio, 443520 },
		{ MediaFrame::Video, 408409 },
		{ MediaFrame::Audio, 445440 },
		{ MediaFrame::Audio, 447360 },
		{ MediaFrame::Video, 411412 },
		{ MediaFrame::Audio, 449280 },
		{ MediaFrame::Video, 414415 },
		{ MediaFrame::Audio, 451200 },
		{ MediaFrame::Audio, 453120 },
		{ MediaFrame::Video, 417419 },
		{ MediaFrame::Audio, 455040 },
		{ MediaFrame::Video, 420421 },
		{ MediaFrame::Audio, 456960 },
		{ MediaFrame::Audio, 458880 },
		{ MediaFrame::Video, 423424 },
		{ MediaFrame::Audio, 460800 },
		{ MediaFrame::Video, 426427 },
		{ MediaFrame::Audio, 462720 },
		{ MediaFrame::Audio, 464640 },
		{ MediaFrame::Video, 429431 },
		{ MediaFrame::Audio, 466560 },
		{ MediaFrame::Audio, 468480 },
		{ MediaFrame::Video, 432433 },
		{ MediaFrame::Audio, 470400 },
		{ MediaFrame::Audio, 472320 },
		{ MediaFrame::Video, 435436 },
		{ MediaFrame::Audio, 474240 },
		{ MediaFrame::Video, 438439 },
		{ MediaFrame::Audio, 476160 },
		{ MediaFrame::Audio, 478080 },
		{ MediaFrame::Video, 441442 },
		{ MediaFrame::Audio, 480000 },
		{ MediaFrame::Video, 444446 },
		{ MediaFrame::Audio, 481920 },
		{ MediaFrame::Audio, 483840 },
		{ MediaFrame::Video, 447448 },
		{ MediaFrame::Audio, 485760 },
		{ MediaFrame::Video, 450451 },
		{ MediaFrame::Audio, 487680 },
		{ MediaFrame::Audio, 489600 },
		{ MediaFrame::Video, 453479 },
		{ MediaFrame::Audio, 491520 },
		{ MediaFrame::Video, 456457 },
		{ MediaFrame::Audio, 493440 },
		{ MediaFrame::Audio, 495360 },
		{ MediaFrame::Video, 459460 },
		{ MediaFrame::Audio, 497280 },
		{ MediaFrame::Audio, 499200 },
		{ MediaFrame::Video, 462463 },
		{ MediaFrame::Audio, 501120 },
		{ MediaFrame::Video, 465466 },
		{ MediaFrame::Audio, 503040 },
		{ MediaFrame::Audio, 504960 },
		{ MediaFrame::Video, 468469 },
		{ MediaFrame::Audio, 506880 },
		{ MediaFrame::Video, 471472 },
		{ MediaFrame::Audio, 508800 },
		{ MediaFrame::Audio, 510720 },
		{ MediaFrame::Video, 474475 },
		{ MediaFrame::Audio, 512640 },
		{ MediaFrame::Video, 477478 },
		{ MediaFrame::Audio, 514560 },
		{ MediaFrame::Audio, 516480 },
		{ MediaFrame::Video, 480482 },
		{ MediaFrame::Audio, 518400 },
		{ MediaFrame::Audio, 520320 },
		{ MediaFrame::Video, 483484 },
		{ MediaFrame::Audio, 522240 },
		{ MediaFrame::Video, 486487 },
		{ MediaFrame::Audio, 524160 },
		{ MediaFrame::Audio, 526080 },
		{ MediaFrame::Video, 489490 },
		{ MediaFrame::Audio, 528000 },
		{ MediaFrame::Video, 492493 },
		{ MediaFrame::Audio, 529920 },
		{ MediaFrame::Audio, 531840 },
		{ MediaFrame::Video, 495496 },
		{ MediaFrame::Audio, 533760 },
		{ MediaFrame::Video, 498500 },
		{ MediaFrame::Audio, 535680 },
		{ MediaFrame::Audio, 537600 },
		{ MediaFrame::Video, 501502 },
		{ MediaFrame::Audio, 539520 },
		{ MediaFrame::Video, 504505 },
		{ MediaFrame::Audio, 541440 },
		{ MediaFrame::Audio, 543360 },
		{ MediaFrame::Video, 507509 },
		{ MediaFrame::Audio, 545280 },
		{ MediaFrame::Audio, 547200 },
		{ MediaFrame::Video, 510512 },
		{ MediaFrame::Audio, 549120 },
		{ MediaFrame::Video, 513514 },
		{ MediaFrame::Audio, 551040 },
		{ MediaFrame::Audio, 552960 },
		{ MediaFrame::Video, 516518 },
		{ MediaFrame::Audio, 554880 },
		{ MediaFrame::Video, 519521 },
		{ MediaFrame::Audio, 556800 },
		{ MediaFrame::Audio, 558720 },
		{ MediaFrame::Video, 522523 },
		{ MediaFrame::Audio, 560640 },
		{ MediaFrame::Video, 525527 },
		{ MediaFrame::Audio, 562560 },
		{ MediaFrame::Audio, 564480 },
		{ MediaFrame::Video, 528530 },
		{ MediaFrame::Audio, 566400 },
		{ MediaFrame::Audio, 568320 },
		{ MediaFrame::Video, 531533 },
		{ MediaFrame::Audio, 570240 },
		{ MediaFrame::Video, 534536 },
		{ MediaFrame::Audio, 572160 },
		{ MediaFrame::Audio, 574080 },
		{ MediaFrame::Video, 537539 },
		{ MediaFrame::Audio, 576000 },
		{ MediaFrame::Video, 540542 },
		{ MediaFrame::Audio, 577920 },
		{ MediaFrame::Audio, 579840 },
		{ MediaFrame::Video, 543545 },
		{ MediaFrame::Audio, 581760 },
		{ MediaFrame::Video, 546548 },
		{ MediaFrame::Audio, 583680 },
		{ MediaFrame::Audio, 585600 },
		{ MediaFrame::Video, 549551 },
		{ MediaFrame::Audio, 587520 },
		{ MediaFrame::Video, 552554 },
		{ MediaFrame::Audio, 589440 },
		{ MediaFrame::Audio, 591360 },
		{ MediaFrame::Video, 555557 },
		{ MediaFrame::Audio, 593280 },
		{ MediaFrame::Audio, 595200 },
		{ MediaFrame::Video, 558560 },
		{ MediaFrame::Audio, 597120 },
		{ MediaFrame::Video, 561563 },
		{ MediaFrame::Audio, 599040 },
		{ MediaFrame::Video, 564566 },
		{ MediaFrame::Audio, 600960 },
		{ MediaFrame::Audio, 602880 },
		{ MediaFrame::Video, 567569 },
		{ MediaFrame::Audio, 604800 },
		{ MediaFrame::Audio, 606720 },
		{ MediaFrame::Video, 570597 },
		{ MediaFrame::Audio, 608640 },
		{ MediaFrame::Video, 573575 },
		{ MediaFrame::Audio, 610560 },
		{ MediaFrame::Audio, 612480 },
		{ MediaFrame::Video, 576578 },
		{ MediaFrame::Audio, 614400 },
		{ MediaFrame::Video, 579581 },
		{ MediaFrame::Audio, 616320 },
		{ MediaFrame::Audio, 618240 },
		{ MediaFrame::Video, 582584 },
		{ MediaFrame::Audio, 620160 },
		{ MediaFrame::Audio, 622080 },
		{ MediaFrame::Video, 585587 },
		{ MediaFrame::Audio, 624000 },
		{ MediaFrame::Video, 588590 },
		{ MediaFrame::Audio, 625920 },
		{ MediaFrame::Audio, 627840 },
		{ MediaFrame::Video, 594596 },
		{ MediaFrame::Audio, 629760 },
		{ MediaFrame::Audio, 631680 },
		{ MediaFrame::Audio, 633600 },
		{ MediaFrame::Video, 597599 },
		{ MediaFrame::Audio, 635520 },
		{ MediaFrame::Audio, 637440 },
		{ MediaFrame::Video, 600602 },
		{ MediaFrame::Audio, 639360 },
		{ MediaFrame::Video, 603605 },
		{ MediaFrame::Audio, 641280 },
		{ MediaFrame::Audio, 643200 },
		{ MediaFrame::Video, 606608 },
		{ MediaFrame::Audio, 645120 },
		{ MediaFrame::Video, 609611 },
		{ MediaFrame::Audio, 647040 },
		{ MediaFrame::Audio, 648960 },
		{ MediaFrame::Video, 612614 },
		{ MediaFrame::Audio, 650880 },
		{ MediaFrame::Video, 615617 },
		{ MediaFrame::Audio, 652800 },
		{ MediaFrame::Audio, 654720 },
		{ MediaFrame::Video, 618620 },
		{ MediaFrame::Audio, 656640 },
		{ MediaFrame::Video, 621623 },
		{ MediaFrame::Audio, 658560 },
		{ MediaFrame::Audio, 660480 },
		{ MediaFrame::Video, 624626 },
		{ MediaFrame::Audio, 662400 },
		{ MediaFrame::Audio, 664320 },
		{ MediaFrame::Video, 627629 },
		{ MediaFrame::Audio, 666240 },
		{ MediaFrame::Video, 630632 },
		{ MediaFrame::Audio, 668160 },
		{ MediaFrame::Audio, 670080 },
		{ MediaFrame::Video, 633635 },
		{ MediaFrame::Audio, 672000 },
		{ MediaFrame::Video, 636638 },
		{ MediaFrame::Audio, 673920 },
		{ MediaFrame::Audio, 675840 },
		{ MediaFrame::Video, 639641 },
		{ MediaFrame::Audio, 677760 },
		{ MediaFrame::Video, 642644 },
		{ MediaFrame::Audio, 679680 },
		{ MediaFrame::Audio, 681600 },
		{ MediaFrame::Video, 645647 },
		{ MediaFrame::Audio, 683520 },
		{ MediaFrame::Video, 648650 },
		{ MediaFrame::Audio, 685440 },
		{ MediaFrame::Audio, 687360 },
		{ MediaFrame::Video, 651653 },
		{ MediaFrame::Audio, 689280 },
		{ MediaFrame::Audio, 691200 },
		{ MediaFrame::Video, 654656 },
		{ MediaFrame::Audio, 693120 },
		{ MediaFrame::Video, 657659 },
		{ MediaFrame::Audio, 695040 },
		{ MediaFrame::Audio, 696960 },
		{ MediaFrame::Video, 660662 },
		{ MediaFrame::Audio, 698880 },
		{ MediaFrame::Video, 663665 },
		{ MediaFrame::Audio, 700800 },
		{ MediaFrame::Audio, 702720 },
		{ MediaFrame::Video, 666668 },
		{ MediaFrame::Audio, 704640 },
		{ MediaFrame::Audio, 706560 },
		{ MediaFrame::Video, 669671 },
		{ MediaFrame::Audio, 708480 },
		{ MediaFrame::Video, 672674 },
		{ MediaFrame::Audio, 710400 },
		{ MediaFrame::Audio, 712320 },
		{ MediaFrame::Video, 675677 },
		{ MediaFrame::Audio, 714240 },
		{ MediaFrame::Video, 678680 },
		{ MediaFrame::Audio, 716160 },
		{ MediaFrame::Audio, 718080 },
		{ MediaFrame::Video, 681683 },
		{ MediaFrame::Audio, 720000 },
		{ MediaFrame::Video, 684686 },
		{ MediaFrame::Audio, 721920 },
		{ MediaFrame::Audio, 723840 },
		{ MediaFrame::Video, 687714 },
		{ MediaFrame::Audio, 725760 },
		{ MediaFrame::Video, 690692 },
		{ MediaFrame::Audio, 727680 },
		{ MediaFrame::Audio, 729600 },
		{ MediaFrame::Video, 693695 },
		{ MediaFrame::Audio, 731520 },
		{ MediaFrame::Audio, 733440 },
		{ MediaFrame::Video, 696698 },
		{ MediaFrame::Audio, 735360 },
		{ MediaFrame::Video, 699701 },
		{ MediaFrame::Audio, 737280 },
		{ MediaFrame::Audio, 739200 },
		{ MediaFrame::Video, 702704 },
		{ MediaFrame::Audio, 741120 },
		{ MediaFrame::Video, 705707 },
		{ MediaFrame::Audio, 743040 },
		{ MediaFrame::Audio, 744960 },
		{ MediaFrame::Video, 708710 },
		{ MediaFrame::Audio, 746880 },
		{ MediaFrame::Video, 711713 },
		{ MediaFrame::Audio, 748800 },
		{ MediaFrame::Audio, 750720 },
		{ MediaFrame::Video, 714716 },
		{ MediaFrame::Audio, 752640 },
		{ MediaFrame::Audio, 754560 },
		{ MediaFrame::Video, 717719 },
		{ MediaFrame::Audio, 756480 },
		{ MediaFrame::Video, 720722 },
		{ MediaFrame::Audio, 758400 },
		{ MediaFrame::Audio, 760320 },
		{ MediaFrame::Video, 723725 },
		{ MediaFrame::Audio, 762240 },
		{ MediaFrame::Video, 726728 },
		{ MediaFrame::Audio, 764160 },
		{ MediaFrame::Audio, 766080 },
		{ MediaFrame::Video, 729731 },
		{ MediaFrame::Audio, 768000 },
		{ MediaFrame::Video, 732734 },
		{ MediaFrame::Audio, 769920 },
		{ MediaFrame::Audio, 771840 },
		{ MediaFrame::Video, 735737 },
		{ MediaFrame::Audio, 773760 },
		{ MediaFrame::Audio, 775680 },
		{ MediaFrame::Video, 738740 },
		{ MediaFrame::Audio, 777600 },
		{ MediaFrame::Video, 741743 },
		{ MediaFrame::Audio, 779520 },
		{ MediaFrame::Audio, 781440 },
		{ MediaFrame::Video, 744746 },
		{ MediaFrame::Audio, 783360 },
		{ MediaFrame::Video, 747749 },
		{ MediaFrame::Audio, 785280 },
		{ MediaFrame::Audio, 787200 },
		{ MediaFrame::Video, 750752 },
		{ MediaFrame::Audio, 789120 },
		{ MediaFrame::Video, 753756 },
		{ MediaFrame::Audio, 791040 },
		{ MediaFrame::Audio, 792960 },
		{ MediaFrame::Video, 756758 },
		{ MediaFrame::Audio, 794880 },
		{ MediaFrame::Video, 759761 },
		{ MediaFrame::Audio, 796800 },
		{ MediaFrame::Audio, 798720 },
		{ MediaFrame::Video, 762764 },
		{ MediaFrame::Audio, 800640 },
		{ MediaFrame::Audio, 802560 },
		{ MediaFrame::Audio, 804480 },
		{ MediaFrame::Video, 768770 },
		{ MediaFrame::Audio, 806400 },
		{ MediaFrame::Audio, 808320 },
		{ MediaFrame::Video, 771773 },
		{ MediaFrame::Audio, 810240 },
		{ MediaFrame::Video, 774776 },
		{ MediaFrame::Audio, 812160 },
		{ MediaFrame::Audio, 814080 },
		{ MediaFrame::Video, 777779 },
		{ MediaFrame::Audio, 816000 },
		{ MediaFrame::Video, 780782 },
		{ MediaFrame::Audio, 817920 },
		{ MediaFrame::Audio, 819840 },
		{ MediaFrame::Video, 783786 },
		{ MediaFrame::Audio, 821760 },
		{ MediaFrame::Video, 786788 },
		{ MediaFrame::Audio, 823680 },
		{ MediaFrame::Audio, 825600 },
		{ MediaFrame::Video, 789791 },
		{ MediaFrame::Audio, 827520 },
		{ MediaFrame::Audio, 829440 },
		{ MediaFrame::Video, 792794 },
		{ MediaFrame::Audio, 831360 },
		{ MediaFrame::Video, 795797 },
		{ MediaFrame::Audio, 833280 },
		{ MediaFrame::Audio, 835200 },
		{ MediaFrame::Video, 798800 },
		{ MediaFrame::Audio, 837120 },
		{ MediaFrame::Video, 801804 },
		{ MediaFrame::Audio, 839040 },
		{ MediaFrame::Audio, 840960 },
		{ MediaFrame::Video, 804837 },
		{ MediaFrame::Audio, 842880 },
		{ MediaFrame::Video, 807809 },
		{ MediaFrame::Audio, 844800 },
		{ MediaFrame::Audio, 846720 },
		{ MediaFrame::Video, 810813 },
		{ MediaFrame::Audio, 848640 },
		{ MediaFrame::Audio, 850560 },
		{ MediaFrame::Video, 813816 },
		{ MediaFrame::Audio, 852480 },
		{ MediaFrame::Video, 816819 },
		{ MediaFrame::Audio, 854400 },
		{ MediaFrame::Audio, 856320 },
		{ MediaFrame::Video, 819821 },
		{ MediaFrame::Audio, 858240 },
		{ MediaFrame::Video, 822824 },
		{ MediaFrame::Audio, 860160 },
		{ MediaFrame::Audio, 862080 },
		{ MediaFrame::Video, 825827 },
		{ MediaFrame::Audio, 864000 },
		{ MediaFrame::Video, 828830 },
		{ MediaFrame::Audio, 865920 },
		{ MediaFrame::Audio, 867840 },
		{ MediaFrame::Video, 831834 },
		{ MediaFrame::Audio, 869760 },
		{ MediaFrame::Audio, 871680 },
		{ MediaFrame::Video, 834836 },
		{ MediaFrame::Audio, 873600 },
		{ MediaFrame::Video, 837839 },
		{ MediaFrame::Audio, 875520 },
		{ MediaFrame::Audio, 877440 },
		{ MediaFrame::Video, 840842 },
		{ MediaFrame::Audio, 879360 },
		{ MediaFrame::Video, 843846 },
		{ MediaFrame::Audio, 881280 },
		{ MediaFrame::Audio, 883200 },
		{ MediaFrame::Video, 846849 },
		{ MediaFrame::Audio, 885120 },
		{ MediaFrame::Video, 849851 },
		{ MediaFrame::Audio, 887040 },
		{ MediaFrame::Audio, 888960 },
		{ MediaFrame::Video, 852854 },
		{ MediaFrame::Audio, 890880 },
		{ MediaFrame::Video, 855858 },
		{ MediaFrame::Audio, 892800 },
		{ MediaFrame::Video, 858861 },
		{ MediaFrame::Audio, 894720 },
		{ MediaFrame::Video, 861863 },
		{ MediaFrame::Audio, 896640 },
		{ MediaFrame::Video, 864866 },
		{ MediaFrame::Video, 867869 }
	};
	
	std::vector<std::pair<MediaFrame::Type, uint64_t>> actualSentPacketsInfo;
	for (auto it : dispatchedPackets)
	{
		actualSentPacketsInfo.emplace_back(it->GetMediaType(), it->GetExtTimestamp());
	}
		
	ASSERT_EQ(expectedSentPacketsInfo, actualSentPacketsInfo);
}
