mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
srs-librtmp add rtmp prefix for rtmp apis. 2.0.29
This commit is contained in:
parent
180106ce70
commit
aa69f6197a
13 changed files with 95 additions and 95 deletions
|
@ -55,19 +55,19 @@ int main(int argc, char** argv)
|
|||
srs_human_trace("rtmp url: %s", argv[1]);
|
||||
srs_rtmp_t rtmp = srs_rtmp_create(argv[1]);
|
||||
|
||||
if (srs_simple_handshake(rtmp) != 0) {
|
||||
if (srs_rtmp_handshake(rtmp) != 0) {
|
||||
srs_human_trace("simple handshake failed.");
|
||||
goto rtmp_destroy;
|
||||
}
|
||||
srs_human_trace("simple handshake success");
|
||||
|
||||
if (srs_connect_app(rtmp) != 0) {
|
||||
if (srs_rtmp_connect_app(rtmp) != 0) {
|
||||
srs_human_trace("connect vhost/app failed.");
|
||||
goto rtmp_destroy;
|
||||
}
|
||||
srs_human_trace("connect vhost/app success");
|
||||
|
||||
if (srs_publish_stream(rtmp) != 0) {
|
||||
if (srs_rtmp_publish_stream(rtmp) != 0) {
|
||||
srs_human_trace("publish stream failed.");
|
||||
goto rtmp_destroy;
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ int main(int argc, char** argv)
|
|||
|
||||
timestamp += 40;
|
||||
|
||||
if (srs_write_packet(rtmp, type, timestamp, data, size) != 0) {
|
||||
if (srs_rtmp_write_packet(rtmp, type, timestamp, data, size) != 0) {
|
||||
goto rtmp_destroy;
|
||||
}
|
||||
srs_human_trace("sent packet: type=%s, time=%d, size=%d",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue