Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

65 wiersze
2.0KB

  1. #include "sdp-payload.h"
  2. #include "rtp-profile.h"
  3. #include <assert.h>
  4. #include <errno.h>
  5. int sdp_payload_video(uint8_t* data, int bytes, int rtp, const char* proto, unsigned short port, int payload, int frequence, const void* extra, int extra_size)
  6. {
  7. switch (rtp)
  8. {
  9. case RTP_PAYLOAD_H264:
  10. return sdp_h264(data, bytes, proto, port, payload, frequence, extra, extra_size);
  11. case RTP_PAYLOAD_H265:
  12. return sdp_h265(data, bytes, proto, port, payload, frequence, extra, extra_size);
  13. case RTP_PAYLOAD_MP2T:
  14. return sdp_mpeg2_ts(data, bytes, proto, port);
  15. case RTP_PAYLOAD_MP2P:
  16. return sdp_mpeg2_ps(data, bytes, proto, port, payload);
  17. case RTP_PAYLOAD_VP8:
  18. return sdp_vp8(data, bytes, proto, port, payload);
  19. case RTP_PAYLOAD_VP9:
  20. return sdp_vp9(data, bytes, proto, port, payload);
  21. case RTP_PAYLOAD_AV1:
  22. case RTP_PAYLOAD_AV1X:
  23. return sdp_av1(data, bytes, proto, port, payload, frequence, extra, extra_size);
  24. case RTP_PAYLOAD_MP4ES:
  25. return sdp_mpeg4_es(data, bytes, proto, port, payload, frequence, extra, extra_size);
  26. default:
  27. assert(0);
  28. return -EPROTONOSUPPORT;
  29. }
  30. }
  31. int sdp_payload_audio(uint8_t* data, int bytes, int rtp, const char* proto, unsigned short port, int payload, int sample_rate, int channel_count, const void* extra, int extra_size)
  32. {
  33. switch (rtp)
  34. {
  35. case RTP_PAYLOAD_LATM:
  36. return sdp_aac_latm(data, bytes, proto, port, payload, sample_rate, channel_count, extra, extra_size);
  37. case RTP_PAYLOAD_MP4A:
  38. return sdp_aac_generic(data, bytes, proto, port, payload, sample_rate, channel_count, extra, extra_size);
  39. case RTP_PAYLOAD_OPUS:
  40. return sdp_opus(data, bytes, proto, port, payload, sample_rate, channel_count, extra, extra_size);
  41. case RTP_PAYLOAD_PCMU:
  42. return sdp_g711u(data, bytes, proto, port);
  43. case RTP_PAYLOAD_PCMA:
  44. return sdp_g711a(data, bytes, proto, port);
  45. default:
  46. assert(0);
  47. return -EPROTONOSUPPORT;
  48. }
  49. }