1234567891011121314151617 |
- #include <gtest/gtest.h>
- #include "rtp.h"
- #include "rtpsession.h"
- TEST(TestRTPSession, CreateSocket)
- {
- rtp_session_t* rtp_sess;
- int rc = rtp_session_create("127.0.0.1", 1024, 2, &rtp_sess);
- ASSERT_TRUE(rc == 0);
- EXPECT_TRUE(0 == rtp_session_reset(rtp_sess, 3, "99.12.22.154", 5096, 5096 + 1));
- int rtp_fd = -1;
- rtp_session_get_raw_fd(rtp_sess, &rtp_fd, NULL);
- EXPECT_TRUE(rtp_fd != -1);
- rtp_session_destroy(rtp_sess);
- }
|