| OLD | NEW |
| 1 /* | 1 /* |
| 2 * RTMP network protocol | 2 * RTMP network protocol |
| 3 * Copyright (c) 2009 Kostya Shishkov | 3 * Copyright (c) 2009 Kostya Shishkov |
| 4 * | 4 * |
| 5 * This file is part of FFmpeg. | 5 * This file is part of FFmpeg. |
| 6 * | 6 * |
| 7 * FFmpeg is free software; you can redistribute it and/or | 7 * FFmpeg is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Lesser General Public | 8 * modify it under the terms of the GNU Lesser General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2.1 of the License, or (at your option) any later version. | 10 * version 2.1 of the License, or (at your option) any later version. |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #include "avformat.h" | 31 #include "avformat.h" |
| 32 #include "internal.h" | 32 #include "internal.h" |
| 33 | 33 |
| 34 #include "network.h" | 34 #include "network.h" |
| 35 | 35 |
| 36 #include "flv.h" | 36 #include "flv.h" |
| 37 #include "rtmp.h" | 37 #include "rtmp.h" |
| 38 #include "rtmppkt.h" | 38 #include "rtmppkt.h" |
| 39 | 39 |
| 40 /* we can't use av_log() with URLContext yet... */ | 40 /* we can't use av_log() with URLContext yet... */ |
| 41 #if LIBAVFORMAT_VERSION_MAJOR < 53 | 41 #if FF_API_URL_CLASS |
| 42 #define LOG_CONTEXT s |
| 43 #else |
| 42 #define LOG_CONTEXT NULL | 44 #define LOG_CONTEXT NULL |
| 43 #else | |
| 44 #define LOG_CONTEXT s | |
| 45 #endif | 45 #endif |
| 46 | 46 |
| 47 //#define DEBUG | 47 //#define DEBUG |
| 48 | 48 |
| 49 /** RTMP protocol handler state */ | 49 /** RTMP protocol handler state */ |
| 50 typedef enum { | 50 typedef enum { |
| 51 STATE_START, ///< client has not done anything yet | 51 STATE_START, ///< client has not done anything yet |
| 52 STATE_HANDSHAKED, ///< client has performed handshake | 52 STATE_HANDSHAKED, ///< client has performed handshake |
| 53 STATE_RELEASING, ///< client releasing stream before publish it (for output
) | 53 STATE_RELEASING, ///< client releasing stream before publish it (for output
) |
| 54 STATE_FCPUBLISH, ///< client FCPublishing stream (for output) | 54 STATE_FCPUBLISH, ///< client FCPublishing stream (for output) |
| (...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 990 } | 990 } |
| 991 | 991 |
| 992 URLProtocol rtmp_protocol = { | 992 URLProtocol rtmp_protocol = { |
| 993 "rtmp", | 993 "rtmp", |
| 994 rtmp_open, | 994 rtmp_open, |
| 995 rtmp_read, | 995 rtmp_read, |
| 996 rtmp_write, | 996 rtmp_write, |
| 997 NULL, /* seek */ | 997 NULL, /* seek */ |
| 998 rtmp_close, | 998 rtmp_close, |
| 999 }; | 999 }; |
| OLD | NEW |