Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adds a new wizard to automatically set up Audio/Video streaming on

virtual servers. It also adds a little cookbook recommending to use
the wizard for setting the most common streaming configuration.


git-svn-id: svn://cherokee-project.com/cherokee/trunk@3587 5dc97367-97f1-0310-9951-d761b3857238
  • Loading branch information...
commit 2496a8d3bf23b2931d4478be0ca7caafedd936bb 1 parent 206a2d2
@alobbs alobbs authored
View
3  admin/Makefile.am
@@ -119,7 +119,8 @@ Wizard_Drupal.py \
Wizard_RoR.py \
Wizard_Mailman.py \
Wizard_Icons.py \
-Wizard_CommonStatic.py
+Wizard_CommonStatic.py \
+Wizard_Streaming.py
endif
adminpy_DATA = $(admin_data)
View
43 admin/Wizard_Streaming.py
@@ -0,0 +1,43 @@
+from config import *
+from util import *
+from Wizard import *
+from configured import *
+
+EXTENSIONS = 'mp3,ogv,flv,mov,ogg,mp4'
+
+CONFIG = """
+%(rule_pre)s!match = extensions
+%(rule_pre)s!match!extensions = %(extensions)s
+%(rule_pre)s!handler = streaming
+%(rule_pre)s!handler!rate = 1
+%(rule_pre)s!handler!rate_factor = 0.5
+%(rule_pre)s!handler!rate_boost = 5
+"""
+
+class Wizard_Rules_Streaming (Wizard):
+ ICON = "streaming.png"
+ DESC = "Adds a rule to stream media files."
+
+ def __init__ (self, cfg, pre):
+ Wizard.__init__ (self, cfg, pre)
+ self.name = "Media Streaming"
+
+ def show (self):
+ rules = self._cfg.keys('%s!rule'%(self._pre))
+ for r in rules:
+ if self._cfg.get_val ('%s!rule!%s!match'%(self._pre, r)) != 'extensions':
+ continue
+ if self._cfg.get_val ('%s!rule!%s!match!extensions'%(self._pre, r)) == EXTENSIONS:
+ self.no_show = "Media streaming is already configured."
+ return False
+ return True
+
+ def _run (self, uri, post):
+ _, rule_pre = cfg_vsrv_rule_get_next (self._cfg, self._pre)
+ if not rule_pre:
+ return self.report_error ("Couldn't add a new rule.")
+
+ extensions = EXTENSIONS
+ config = CONFIG % (locals())
+
+ self._apply_cfg_chunk (config)
View
3  admin/static/images/wizards/Makefile.am
@@ -11,7 +11,8 @@ drupal.png \
ror.png \
mailman.png \
icons.png \
-common_static.png
+common_static.png \
+streaming.png
EXTRA_DIST = \
$(wizards_DATA)
View
BIN  admin/static/images/wizards/streaming.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
1  doc/Makefile.am
@@ -67,6 +67,7 @@ cookbook_trac.html \
cookbook_phpbb.html \
cookbook_phpmyadmin.html \
cookbook_managing_logs.html \
+cookbook_streaming.html \
modules.html \
modules_balancers.html \
modules_balancers_ip_hash.html \
View
11 doc/cookbook.txt
@@ -9,10 +9,14 @@
. link:cookbook_optimizations.html[Optimizing Cherokee]: Recommendations and tweaks.
. link:cookbook_redirs.html[Redirections]: Common redirection examples.
. link:cookbook_ssl.html[SSL/TLS, certs]: Secure connection tips.
- . link:cookbook_alfresco.html[Alfresco]: How to run Alfresco on Cherokee.
- . link:cookbook_mono.html[ASP.NET]: How to run ASP.NET apps with Mono and Cherokee.
+ . link:cookbook_streaming.html[Streaming]: How to stream Audio and Video with Cherokee.
+ . link:cookbook_php.html[PHP]: How to run PHP apps with Cherokee.
+ . link:cookbook_ror.html[Ruby on Rails]: How to run Ruby on Rails apps with Cherokee.
. link:cookbook_django.html[Django]: How to run Django apps with Cherokee.
. link:cookbook_drupal.html[Drupal]: How to run Drupal on Cherokee.
+ . link:cookbook_wordpress.html[Wordpress]: How to run Wordpress on Cherokee.
+ . link:cookbook_alfresco.html[Alfresco]: How to run Alfresco on Cherokee.
+ . link:cookbook_mono.html[ASP.NET]: How to run ASP.NET apps with Mono and Cherokee.
. link:cookbook_glassfish.html[GlassFish]: How to run Java apps with Cherokee.
. link:cookbook_joomla.html[Joomla]: How to run Joomla on Cherokee.
. link:cookbook_kumbia.html[Kumbia]: How to run Kumbia apps with Cherokee.
@@ -20,12 +24,9 @@
. link:cookbook_mailman.html[Mailman]: How to run Mailman on Cherokee.
. link:cookbook_moodle.html[Moodle]: How to run Moodle on Cherokee.
. link:cookbook_nagios.html[Nagios]: How to run Nagios with Cheroke.
- . link:cookbook_php.html[PHP]: How to run PHP apps with Cherokee.
. link:cookbook_phpbb.html[phpBB]: How to run phpBB on Cherokee.
. link:cookbook_phpmyadmin.html[phpMyAdmin]: How to run phpMyAdmin on Cherokee.
- . link:cookbook_ror.html[Ruby on Rails]: How to run Ruby on Rails apps with Cherokee.
. link:cookbook_sugarcrm.html[SugarCRM]: How to run SugarCRM on Cherokee.
. link:cookbook_symfony.html[Symfony]: How to run Symfony apps with Cherokee.
. link:cookbook_trac.html[Trac]: How to run Trac on Cherokee.
- . link:cookbook_wordpress.html[Wordpress]: How to run Wordpress on Cherokee.
. link:cookbook_zend.html[Zend]: How to run Zend apps with Cherokee.
View
26 doc/cookbook_streaming.txt
@@ -0,0 +1,26 @@
+== link:index.html[Index] -> link:cookbook.html[Cookbook]
+
+Cookbook: Streaming Audio and Video
+-----------------------------------
+
+It's really easy to configure Cherokee so it streams audio and video
+files instead of sending then as a regular file.
+
+The first thing you have to ensure is that Cherokee has been compiled
+with the required libraries. In this case, the FFMpeg library set is
+required. Cherokee uses it to extract information of the media files.
+
+[[wizard]]
+Standard configuration
+~~~~~~~~~~~~~~~~~~~~~~
+
+To configure Cherokee to stream media files is trivial. The only thing
+you will have to do is to choose the virtual server on which you want
+to enable the streaming functionality, and then click on `Wizard`.
+
+image::media/images/admin_vserver_wizard.png[Virtual Server Wizards]
+
+Once in there, the only thing left to do is to click `Misc` and run
+the Streaming wizard. Right after which the virtual server will be
+ready to stream your media files, including MP3, OGG, OGV, MP4, etc.
+
View
11 doc/index.txt
@@ -53,10 +53,14 @@ link:cookbook.html[Cookbook]: Recipes for specific tasks
. link:cookbook_optimizations.html[Optimizing Cherokee]: Recommendations and tweaks.
. link:cookbook_redirs.html[Redirections]: Common redirection examples.
. link:cookbook_ssl.html[SSL/TLS, certs]: Secure connection tips.
- . link:cookbook_alfresco.html[Alfresco]: How to run Alfresco on Cherokee.
- . link:cookbook_mono.html[ASP.NET]: How to run ASP.NET apps with Mono and Cherokee.
+ . link:cookbook_streaming.html[Streaming]: How to stream Audio and Video with Cherokee.
+ . link:cookbook_php.html[PHP]: How to run PHP apps with Cherokee.
+ . link:cookbook_ror.html[Ruby on Rails]: How to run Ruby on Rails apps with Cherokee.
. link:cookbook_django.html[Django]: How to run Django apps with Cherokee.
. link:cookbook_drupal.html[Drupal]: How to run Drupal on Cherokee.
+ . link:cookbook_wordpress.html[Wordpress]: How to run Wordpress on Cherokee.
+ . link:cookbook_alfresco.html[Alfresco]: How to run Alfresco on Cherokee.
+ . link:cookbook_mono.html[ASP.NET]: How to run ASP.NET apps with Mono and Cherokee.
. link:cookbook_glassfish.html[GlassFish]: How to run Java apps with Cherokee.
. link:cookbook_joomla.html[Joomla]: How to run Joomla on Cherokee.
. link:cookbook_kumbia.html[Kumbia]: How to run Kumbia apps with Cherokee.
@@ -64,14 +68,11 @@ link:cookbook.html[Cookbook]: Recipes for specific tasks
. link:cookbook_mailman.html[Mailman]: How to run Mailman on Cherokee.
. link:cookbook_moodle.html[Moodle]: How to run Moodle on Cherokee.
. link:cookbook_nagios.html[Nagios]: How to run Nagios with Cheroke.
- . link:cookbook_php.html[PHP]: How to run PHP apps with Cherokee.
. link:cookbook_phpbb.html[phpBB]: How to run phpBB on Cherokee.
. link:cookbook_phpmyadmin.html[phpMyAdmin]: How to run phpMyAdmin on Cherokee.
- . link:cookbook_ror.html[Ruby on Rails]: How to run Ruby on Rails apps with Cherokee.
. link:cookbook_sugarcrm.html[SugarCRM]: How to run SugarCRM on Cherokee.
. link:cookbook_symfony.html[Symfony]: How to run Symfony apps with Cherokee.
. link:cookbook_trac.html[Trac]: How to run Trac on Cherokee.
- . link:cookbook_wordpress.html[Wordpress]: How to run Wordpress on Cherokee.
. link:cookbook_zend.html[Zend]: How to run Zend apps with Cherokee.
*********************************
Please sign in to comment.
Something went wrong with that request. Please try again.