Advertisement
Guest User

Untitled

a guest
Oct 24th, 2013
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. #include "subprocess.hpp"
  2. #include "macros.hpp"
  3. #include "utils.hpp"
  4. #include <fstream>
  5.  
  6. const std::string g_textcolor = "110";
  7. const std::string g_program_name = "rtsptester";
  8. std::ofstream g_log("log", std::ios::app);
  9.  
  10. #define CONNECTION_COUNT 100
  11.  
  12. int main()
  13. {
  14. for(int i = 0; i < CONNECTION_COUNT; i++)
  15. {
  16. std::string log = "FFREPORT=file=logs/" + tostring(i);
  17. create_process("/usr/local/bin/ffmpeg", {"-y", "-rtsp_transport", "tcp", "-i", "rtsp://127.0.0.1:8554/test", "-c", "copy", "-t", "60", "-f", "mp4", "/dev/null"},
  18. {log}, true);
  19. }
  20.  
  21. VERBOSE("Done spawning, starting wait loop");
  22. subprocess_wait_loop(WaitLoopOptions::VERBOSE);
  23.  
  24. return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement