| 1866 | } |
| 1867 | |
| 1868 | static av_cold int whip_init(AVFormatContext *s) |
| 1869 | { |
| 1870 | int ret; |
| 1871 | WHIPContext *whip = s->priv_data; |
| 1872 | |
| 1873 | if ((ret = initialize(s)) < 0) |
| 1874 | goto end; |
| 1875 | |
| 1876 | if ((ret = parse_codec(s)) < 0) |
| 1877 | goto end; |
| 1878 | |
| 1879 | if ((ret = generate_sdp_offer(s)) < 0) |
| 1880 | goto end; |
| 1881 | |
| 1882 | if ((ret = exchange_sdp(s)) < 0) |
| 1883 | goto end; |
| 1884 | |
| 1885 | if ((ret = parse_answer(s)) < 0) |
| 1886 | goto end; |
| 1887 | |
| 1888 | if ((ret = udp_connect(s)) < 0) |
| 1889 | goto end; |
| 1890 | |
| 1891 | if ((ret = ice_dtls_handshake(s)) < 0) |
| 1892 | goto end; |
| 1893 | |
| 1894 | if ((ret = setup_srtp(s)) < 0) |
| 1895 | goto end; |
| 1896 | |
| 1897 | if ((ret = create_rtp_muxer(s)) < 0) |
| 1898 | goto end; |
| 1899 | |
| 1900 | end: |
| 1901 | if (ret < 0) |
| 1902 | whip->state = WHIP_STATE_FAILED; |
| 1903 | return ret; |
| 1904 | } |
| 1905 | |
| 1906 | /** |
| 1907 | * See https://datatracker.ietf.org/doc/html/rfc4588#section-4 |
nothing calls this directly
no test coverage detected