Code Monkey home page Code Monkey logo

nginx-live-module's People

Contributors

arut avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nginx-live-module's Issues

Fixed created sockets

Hi. Please take a look.

Since the type of p is ngx_socket_t* (not u_char *).

diff --git a/src/ngx_http_live_module.c b/src/ngx_http_live_module.c
index cfa3905..7e6756b 100644
--- a/src/ngx_http_live_module.c
+++ b/src/ngx_http_live_module.c
@@ -1110,7 +1110,7 @@ ngx_http_live_init_module(ngx_cycle_t *cycle)
     size_t                      buffer_size;
     socklen_t                   olen;
     ngx_uint_t                  n, nfd;
-    ngx_socket_t               *p, fds[2];
+    ngx_socket_t               *sockets, fds[2];
     ngx_core_conf_t            *ccf;
     ngx_pool_cleanup_t         *cln;
     ngx_http_live_main_conf_t  *lmcf;
@@ -1125,13 +1125,13 @@ ngx_http_live_init_module(ngx_cycle_t *cycle)

     nfd = ccf->worker_processes;

-    p = ngx_palloc(cycle->pool, nfd * 2 * sizeof(ngx_socket_t));
-    if (p == NULL) {
+    sockets = ngx_palloc(cycle->pool, nfd * 2 * sizeof(ngx_socket_t));
+    if (sockets == NULL) {
         return NGX_ERROR;
     }

-    lmcf->read_fd = p;
-    lmcf->write_fd = p + nfd * sizeof(ngx_socket_t);
+    lmcf->read_fd = sockets;
+    lmcf->write_fd = sockets + nfd;

     cln = ngx_pool_cleanup_add(cycle->pool, 0);
     if (cln == NULL) {

Fixed process init

Hi.

Take a look, please.

diff --git a/src/ngx_http_live_module.c b/src/ngx_http_live_module.c
index e30812d..d7407c6 100644
--- a/src/ngx_http_live_module.c
+++ b/src/ngx_http_live_module.c
@@ -1291,6 +1291,10 @@ ngx_http_live_init_process(ngx_cycle_t *cycle)

     lmcf = ngx_http_cycle_get_module_main_conf(cycle, ngx_http_live_module);

+    if (ngx_process != NGX_PROCESS_WORKER) {
+        return NGX_OK;
+    }
+
     if (lmcf == NULL || lmcf->nfd == 0) {
         return NGX_OK;
     }

Because the other non-worker processes like cache process is meaningless to involve socketpairs.
And their value of ngx_worker is 0, thus they will occupy the same fd for reading.

for (n = 0; n < lmcf->nfd; n++) {
        if (n == ngx_worker) {
            fd = lmcf->read_fd[n];
            continue;
        }
...

Nginx MPEGTS testing

I have been testing the Live module for re-transmitting MPEG-TS for a project. I followed your short example and it works but only on the first connection. Each re-connect requires that I restart the Nginx service.
I am wondering if I have something misconfigured or missing a step.
Any pointers on where to start troubleshooting would be helpful.
Thank you in advance!

Can't install live module

Hi, I don't know what I'm doing wrong, nginx will install using rtmp and TS module but not with live module. I attached an image of the error I'm getting.

I hope to get some help.
image (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.