Ticket #6499: mjpg-streamer_6499.diff

File mjpg-streamer_6499.diff, 3.5 KB (added by swalker, 8 years ago)

Any testers?

  • packages/multimedia/mjpg-streamer/files/mjpg-streamer.init

     
    11#!/bin/sh /etc/rc.common 
    2 # Copyright (C) 2009 OpenWrt.org 
     2# Copyright (C) 2009-2010 OpenWrt.org 
    33START=50 
    44 
    55SSD=start-stop-daemon 
     
    1212        config_get device core device 
    1313        config_get resolution core resolution 
    1414        config_get fps core fps 
     15        config_get www core www 
    1516        config_get port core port 
    1617        config_get_bool enabled core enabled 
    17         [ $enabled -gt 0 -a -c $device ] && sleep 3 && $SSD -S -m -p $PIDF -q -x $PROG -- --input "input_uvc.so --device $device --fps $fps --resolution $resolution" --output "output_http.so --port $port" & 
     18 
     19        [ $enabled -gt 0 -a -c $device ] && { 
     20                sleep 3 
     21                $SSD -S -b -m -p $PIDF -q -x $PROG -- \ 
     22                        --input "input_uvc.so --device $device --fps $fps --resolution $resolution" \ 
     23                        --output "output_http.so --www $www --port $port" 
     24        } 
    1825} 
    1926 
    2027stop() { 
  • packages/multimedia/mjpg-streamer/files/mjpg-streamer.config

     
    22        option device           "/dev/video0" 
    33        option resolution       "640x480" 
    44        option fps              "5" 
     5        option www              "/www/webcam/" 
    56        option port             "8080" 
    67        option enabled          "true" 
  • packages/multimedia/mjpg-streamer/Makefile

     
    11# 
    2 # Copyright (C) 2006-2009 OpenWrt.org 
     2# Copyright (C) 2006-2010 OpenWrt.org 
    33# 
    44# This is free software, licensed under the GNU General Public License v2. 
    55# See /LICENSE for more information. 
     
    88include $(TOPDIR)/rules.mk 
    99 
    1010PKG_NAME:=mjpg-streamer 
    11 PKG_REV:=84 
     11PKG_REV:=94 
    1212PKG_VERSION:=r$(PKG_REV) 
    13 PKG_RELEASE:=2 
     13PKG_RELEASE:=1 
    1414 
    1515PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 
    1616PKG_SOURCE_URL:=https://mjpg-streamer.svn.sourceforge.net/svnroot/mjpg-streamer/mjpg-streamer/ 
     
    3232        Streaming application for Linux-UVC compatible webcams 
    3333endef 
    3434 
     35define Package/mjpg-streamer/conffiles 
     36/etc/config/mjpg-streamer 
     37endef 
     38 
    3539EXTRA_CFLAGS += $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS) 
    3640 
    3741define Package/mjpg-streamer/install 
    3842        $(INSTALL_DIR) $(1)/usr/bin 
    3943        $(INSTALL_BIN) $(PKG_BUILD_DIR)/mjpg_streamer $(1)/usr/bin/ 
    4044        $(INSTALL_DIR) $(1)/etc/config 
    41         $(CP) ./files/mjpg-streamer.config $(1)/etc/config/mjpg-streamer 
     45        $(INSTALL_CONF) ./files/mjpg-streamer.config $(1)/etc/config/mjpg-streamer 
    4246        $(INSTALL_DIR) $(1)/etc/init.d 
    4347        $(INSTALL_BIN) ./files/mjpg-streamer.init $(1)/etc/init.d/mjpg-streamer 
    4448        $(INSTALL_DIR) $(1)/usr/lib 
    45         $(CP) $(foreach input_plugin,file uvc gspcav1,$(PKG_BUILD_DIR)/input_$(input_plugin).so) $(1)/usr/lib 
    46         $(CP) $(foreach output_plugin,http file autofocus,$(PKG_BUILD_DIR)/output_$(output_plugin).so) $(1)/usr/lib 
     49        $(INSTALL_BIN) $(PKG_BUILD_DIR)/input_{control,file,gspcav1,uvc}.so $(1)/usr/lib/ 
     50        $(INSTALL_BIN) $(PKG_BUILD_DIR)/output_{autofocus,file,http}.so $(1)/usr/lib/ 
     51        $(INSTALL_DIR) $(1)/www/webcam 
     52        $(INSTALL_DATA) $(PKG_BUILD_DIR)/www/* $(1)/www/webcam/ 
    4753        $(INSTALL_DIR) $(1)/etc/hotplug.d/usb 
    4854        $(INSTALL_DATA) ./files/mjpg-streamer.hotplug $(1)/etc/hotplug.d/usb/20-mjpg-streamer 
    4955endef