You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
906B

  1. /*
  2. * Copyright (c) 2016 The ZLToolKit project authors. All Rights Reserved.
  3. *
  4. * This file is part of ZLToolKit(https://github.com/xia-chu/ZLToolKit).
  5. *
  6. * Use of this source code is governed by MIT license that can be found in the
  7. * LICENSE file in the root of the source tree. All contributing project authors
  8. * may be found in the AUTHORS file in the root of the source tree.
  9. */
  10. #include <iostream>
  11. #include "Util/logger.h"
  12. #include "../webrtc/Nack.h"
  13. using namespace std;
  14. using namespace toolkit;
  15. using namespace mediakit;
  16. extern void testFCI();
  17. int main() {
  18. Logger::Instance().add(std::make_shared<ConsoleChannel>());
  19. srand((unsigned) time(NULL));
  20. NackContext ctx;
  21. for (int i = 1; i < 1000; ++i) {
  22. if (i % (1 + (rand() % 30)) == 0) {
  23. DebugL << "drop:" << i;
  24. } else {
  25. ctx.received(i);
  26. }
  27. }
  28. sleep(1);
  29. return 0;
  30. }