| die letzten Änderungen * Seitenstruktur * Stichwortsuche :


logo_puschin.jpg

Startseite

Knowledge base



Kontakt

Impressum

Knowledge base - C

Knowledge base

3 Benutzer online Druckversion




zurück



C
mjpg_streamer mit Logging über CURL

Makefile:

# we are using the libraries "libpthread" and "libdl"
# libpthread is used to run several tasks (virtually) in parallel
# libdl is used to load the plugins (shared objects) at runtime
LFLAGS += -lpthread -ldl -lcurl



plugins/output_http/httpd.c:

#include <limits.h>
#include <curl/curl.h>
#include <linux/version.h>

...

// syslog(LOG_INFO, "serving client: %s\n", name);

                    char *request;
                    request = malloc(64);
                    sprintf(request, "http://192.168.179.200/mjpg_streamer.php?ip=%s&port=%d", name, htons(pcontext->conf.port));

                    CURL *curl;
                    CURLcode res;

                    curl = curl_easy_init();
                    if(curl) {
                        curl_easy_setopt(curl, CURLOPT_URL, request);
                        res = curl_easy_perform(curl);
                        /* always cleanup */
                        curl_easy_cleanup(curl);
                    }
                    free(request);
                    request = NULL;

                    DBG("serving client: %s\n", name);
                }


zurück



Knowledge base wurde zuletzt bearbeitet am 12.07.13 durch Frank

www.puschin.de
login

<body bgcolor='#FFFFFF' link='#000000' vlink='#000000' alink='#000000' text='#000000'><font face='Verdana' size='2'><strong>www.puschin.de</strong><br>Die Webseite http://www.puschin.de bietet eine interessante Webseite zu vielen Themen aus dem Bereich Linux und Windows. Man findet hier Tipps und Tricks zu cms php apache postfix openxchange tomcat windows linux firewall <br><br><font face='Verdana' size='2'><li><a href='cms.php?print=&aktion=thema_anzeigen&menue_id=191'>Startseite</a><font face='Verdana' size='2'><li><a href='cms.php?print=&aktion=thema_anzeigen&menue_id=63'>Knowledge base</a><font face='Verdana' size='2'><li><a href='cms.php?print=&aktion=thema_anzeigen&menue_id=57'>Kontakt</a><font face='Verdana' size='2'><li><a href='cms.php?print=&aktion=thema_anzeigen&menue_id=9'>Impressum</a></body>