Advertisement
Guest User

Untitled

a guest
Sep 17th, 2020
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. static int vidtv_start_streaming(struct vidtv_dvb *dvb)
  2. {
  3. struct vidtv_mux_init_args mux_args = {0};
  4. struct device *dev = &dvb->pdev->dev;
  5. u32 mux_buf_sz;
  6.  
  7. if (dvb->streaming) {
  8. dev_warn_ratelimited(dev, "Already streaming. Skipping.\n");
  9. return 0;
  10. }
  11.  
  12. mux_buf_sz = (mux_buf_sz_pkts) ? mux_buf_sz_pkts : vidtv_bridge_mux_buf_sz_for_mux_rate();
  13.  
  14. mux_args.mux_rate_kbytes_sec = mux_rate_kbytes_sec;
  15. mux_args.on_new_packets_available_cb = vidtv_bridge_on_new_pkts_avail;
  16. mux_args.mux_buf_sz = mux_buf_sz;
  17. mux_args.pcr_period_usecs = pcr_period_msec * 1000;
  18. mux_args.si_period_usecs = si_period_msec * 1000;
  19. mux_args.pcr_pid = pcr_pid;
  20. mux_args.transport_stream_id = VIDTV_DEFAULT_TS_ID;
  21. mux_args.priv = dvb;
  22.  
  23. dvb->streaming = true;
  24. dvb->mux = vidtv_mux_init(dvb->fe[0], dev, mux_args);
  25. vidtv_mux_start_thread(dvb->mux);
  26.  
  27. dev_dbg_ratelimited(dev, "Started streaming\n");
  28. return 0;
  29. }
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement