]>
Commit | Line | Data |
---|---|---|
d38018f1 AM |
1 | From dd5f2aa117c617e1f0fde26f8fd58903be2d85e8 Mon Sep 17 00:00:00 2001 |
2 | From: Roman Arutyunyan <arut@qip.ru> | |
3 | Date: Wed, 17 Sep 2014 07:10:38 +0400 | |
4 | Subject: [PATCH] fixed compilation | |
5 | ||
6 | --- | |
7 | ngx_rtmp.c | 4 ++++ | |
8 | ngx_rtmp.h | 9 +++++++++ | |
9 | ngx_rtmp_play_module.c | 8 +++++++- | |
10 | 3 files changed, 20 insertions(+), 1 deletion(-) | |
11 | ||
12 | diff --git a/ngx_rtmp.c b/ngx_rtmp.c | |
13 | index c079c90..e525a93 100644 | |
14 | --- a/ngx_rtmp.c | |
15 | +++ b/ngx_rtmp.c | |
16 | @@ -31,7 +31,11 @@ static char * ngx_rtmp_merge_applications(ngx_conf_t *cf, | |
17 | ngx_uint_t ctx_index); | |
18 | ||
19 | ||
20 | +#if (nginx_version >= 1007005) | |
21 | +ngx_thread_volatile ngx_queue_t ngx_rtmp_init_queue; | |
22 | +#else | |
23 | ngx_thread_volatile ngx_event_t *ngx_rtmp_init_queue; | |
24 | +#endif | |
25 | ||
26 | ||
27 | ngx_uint_t ngx_rtmp_max_module; | |
28 | diff --git a/ngx_rtmp.h b/ngx_rtmp.h | |
29 | index d3648f7..b87e99e 100644 | |
30 | --- a/ngx_rtmp.h | |
31 | +++ b/ngx_rtmp.h | |
32 | @@ -12,6 +12,7 @@ | |
33 | #include <ngx_core.h> | |
34 | #include <ngx_event.h> | |
35 | #include <ngx_event_connect.h> | |
36 | +#include <nginx.h> | |
37 | ||
38 | #include "ngx_rtmp_amf.h" | |
39 | #include "ngx_rtmp_bandwidth.h" | |
40 | @@ -198,7 +199,11 @@ typedef struct { | |
41 | ngx_str_t *addr_text; | |
42 | int connected; | |
43 | ||
44 | +#if (nginx_version >= 1007005) | |
45 | + ngx_queue_t posted_dry_events; | |
46 | +#else | |
47 | ngx_event_t *posted_dry_events; | |
48 | +#endif | |
49 | ||
50 | /* client buffer time in msec */ | |
51 | uint32_t buflen; | |
52 | @@ -602,7 +607,11 @@ extern ngx_rtmp_bandwidth_t ngx_rtmp_bw_in; | |
53 | ||
54 | ||
55 | extern ngx_uint_t ngx_rtmp_naccepted; | |
56 | +#if (nginx_version >= 1007005) | |
57 | +extern ngx_thread_volatile ngx_queue_t ngx_rtmp_init_queue; | |
58 | +#else | |
59 | extern ngx_thread_volatile ngx_event_t *ngx_rtmp_init_queue; | |
60 | +#endif | |
61 | ||
62 | extern ngx_uint_t ngx_rtmp_max_module; | |
63 | extern ngx_module_t ngx_rtmp_core_module; | |
64 | diff --git a/ngx_rtmp_play_module.c b/ngx_rtmp_play_module.c | |
65 | index acaa46c..f6ea6c3 100644 | |
66 | --- a/ngx_rtmp_play_module.c | |
67 | +++ b/ngx_rtmp_play_module.c | |
68 | @@ -6,6 +6,7 @@ | |
69 | ||
70 | #include <ngx_config.h> | |
71 | #include <ngx_core.h> | |
72 | +#include <nginx.h> | |
73 | #include "ngx_rtmp_play_module.h" | |
74 | #include "ngx_rtmp_cmd_module.h" | |
75 | #include "ngx_rtmp_netcall_module.h" | |
76 | @@ -430,7 +431,12 @@ ngx_rtmp_play_do_stop(ngx_rtmp_session_t *s) | |
77 | ngx_del_timer(&ctx->send_evt); | |
78 | } | |
79 | ||
80 | - if (ctx->send_evt.prev) { | |
81 | +#if (nginx_version >= 1007005) | |
82 | + if (ctx->send_evt.posted) | |
83 | +#else | |
84 | + if (ctx->send_evt.prev) | |
85 | +#endif | |
86 | + { | |
87 | ngx_delete_posted_event((&ctx->send_evt)); | |
88 | } | |
89 |