Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mod_flvx upstream + tune patches + debian package dir
- Loading branch information
Osvaldo Santana Neto
committed
Mar 5, 2010
0 parents
commit 8a0df23
Showing
15 changed files
with
426 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
.libs | ||
*-stamp | ||
*.lo | ||
*.la | ||
*.slo.libs | ||
*-stamp | ||
*.lo | ||
*.la | ||
*.slo.libs | ||
*-stamp | ||
*.lo | ||
*.la | ||
*.slo.libs | ||
*-stamp | ||
*.lo | ||
*.la | ||
*.slo.libs | ||
*-stamp | ||
*.lo | ||
*.la | ||
*.slo.libs | ||
*-stamp | ||
*.lo | ||
*.la | ||
*.slo.libs | ||
*-stamp | ||
*.lo | ||
*.la | ||
*.slo.libs | ||
*-stamp | ||
*.lo | ||
*.la | ||
*.slo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
This package is using dpatch patch system. | ||
|
||
To get the fully patched source after unpacking the source package, cd to | ||
the root level of the source package and run `./debian/rules patch` | ||
|
||
See /usr/share/doc/dpatch/README.source.gz for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
mod-flvx (0.0.1-1) unstable; urgency=low | ||
|
||
* Initial release (upstream version) | ||
* Tune Patches from Artur Bodera (artur@bodera.com) | ||
|
||
-- Osvaldo Santana Neto <osantana@triveos.com> Fri, 5 Mar 2010 10:28:00 -0300 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Source: mod-flvx | ||
Section: python | ||
Priority: optional | ||
Maintainer: Osvaldo Santana Neto <osantana@triveos.com> | ||
Uploaders: Osvaldo Santana Neto <osantana@triveos.com> | ||
Build-Depends: debhelper (>= 5), apache2-threaded-dev, dpatch | ||
Homepage: http://people.apache.org/~pquerna/modules/mod_flvx.c | ||
Standards-Version: 3.8.1 | ||
|
||
Package: libapache2-mod-flvx | ||
Architecture: any | ||
Depends: apache2, apache2.2-common, ${shlibs:Depends}, ${misc:Depends}, ${python:Depends} | ||
Suggests: apache2-mpm-worker | apache2-mpm-event | ||
Description: FLV pseudo-stream module for Apache | ||
The mod_flvx is a module that enables Apache to serve videos using | ||
a pseudo-stream mode. This mode requires a compliant Flash Player. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
This package was debianized by Osvaldo Santana Neto <osantana@triveos.com> on | ||
Fri, 5 Jul 2010 10:46:00 -0300. | ||
|
||
Based on mod_wsgi package by Bernd Zeimetz <bernd@bzed.de>. | ||
|
||
It was downloaded from http://people.apache.org/~pquerna/modules/mod_flvx.c | ||
|
||
Upstream Author: | ||
|
||
Paul Querna <pquerna@apache.org> | ||
Artur Bodera <artur@bodera.com> (Tune patches) | ||
|
||
Copyright: | ||
|
||
Copyright 2006 Paul Querna | ||
|
||
License: | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
|
||
On Debian systems the full text of the Apache License, Version 2, | ||
can be found in `/usr/share/common-licenses/Apache-2.0'. | ||
|
||
The Debian packaging is © 010 Osvaldo Santana Neto <osantana@triveos.com> and | ||
is licensed under the Apache License, Version 2.0, see below. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<IfModule mod_flvx.c> | ||
AddHandler flv-stream .flv | ||
</IfModule> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
LoadModule flvx_module /usr/lib/apache2/modules/mod_flvx.so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
debian/flvx.load etc/apache2/mods-available | ||
debian/flvx.conf etc/apache2/mods-available |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
apache_force_reload() { | ||
if apache2ctl configtest 2>/dev/null; then | ||
invoke-rc.d apache2 force-reload || true | ||
else | ||
echo "Your apache2 configuration is broken, please fix it and restart apache2 manually." | ||
fi | ||
} | ||
|
||
if [ -z "$2" ]; then | ||
if [ -e /etc/apache2/apache2.conf ]; then | ||
a2enmod flvx >/dev/null || true | ||
apache_force_reload | ||
fi | ||
else | ||
#we're upgrading | ||
if [ -e /etc/apache2/mods-enabled/flvx.load ]; then | ||
apache_force_reload | ||
fi | ||
fi | ||
|
||
#DEBHELPER# | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#! /bin/sh | ||
set -e | ||
|
||
if [ "$1" = "purge" -o "$1" = "remove" ]; then | ||
# remove pseudo conffile | ||
test -e /etc/apache2/mods-available/flvx.load && rm -f /etc/apache2/mods-available/flvx.load | ||
fi | ||
if [ "$1" = "purge" -a -e /etc/apache2/mods-available/flvx.conf ]; then | ||
# remove conffile | ||
rm -f /etc/apache2/mods-available/flvx.conf | ||
fi | ||
|
||
#DEBHELPER# | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then | ||
a2dismod flvx || true | ||
fi | ||
|
||
#DEBHELPER# | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
#! /bin/sh /usr/share/dpatch/dpatch-run | ||
## mod_flvx_tune.dpatch by <osantana@localhost> | ||
## | ||
## All lines beginning with `## DP:' are a description of the patch. | ||
## DP: No description. | ||
|
||
@DPATCH@ | ||
diff -urNad mod-flvx-0.0~/mod_flvx.c mod-flvx-0.0/mod_flvx.c | ||
--- mod-flvx-0.0~/mod_flvx.c 2007-03-08 02:08:06.000000000 +0000 | ||
+++ mod-flvx-0.0/mod_flvx.c 2010-03-05 14:43:57.000000000 +0000 | ||
@@ -13,6 +13,29 @@ | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
+ * | ||
+ * Modified on 4.II.2008 by Artur Bodera (artur@bodera.com) | ||
+ * - added offset reset if invalid | ||
+ * - fixed content-length header generation | ||
+ * - added last-modified header | ||
+ * - inspiration: http://apachedev.ru/2006/07/13/mod_flvx-peredacha-potokovogo-flash-video | ||
+ * | ||
+ * Usage: | ||
+ * 1. Compile and install with apxs tool: | ||
+ * apxs -c -i ./mod_flvx.c | ||
+ * | ||
+ * (http://httpd.apache.org/docs/2.0/programs/apxs.html) | ||
+ * | ||
+ * 2. Add the following lines to your httpd.conf or create a | ||
+ * dedicated /etc/httpd/conf.d/mod_flvx.conf config file: | ||
+ * | ||
+ * LoadModule flvx_module modules/mod_flvx.so | ||
+ * AddHandler flv-stream .flv | ||
+ * | ||
+ * 3. Restart Apache! | ||
+ * | ||
+ * 4. Now your flv files can be streamed using ?start= parameter | ||
+ * | ||
*/ | ||
|
||
#include "httpd.h" | ||
@@ -21,6 +44,7 @@ | ||
#include "http_protocol.h" | ||
#include "http_log.h" | ||
#include "apr_buckets.h" | ||
+#include "apr_strings.h" | ||
|
||
#define FLVX_HANDLER "flv-stream" | ||
|
||
@@ -79,6 +103,9 @@ | ||
} | ||
else { | ||
length = fi.size; | ||
+ | ||
+ /* Offset should be reset if invalid (mod by Artur Bodera (artur@bodera.com) */ | ||
+ offset = 0; | ||
} | ||
|
||
bb = apr_brigade_create(r->pool, r->connection->bucket_alloc); | ||
@@ -95,7 +122,13 @@ | ||
apr_brigade_insert_file(bb, fp, offset, length, r->pool); | ||
|
||
ap_set_content_type(r, "video/x-flv"); | ||
- ap_set_content_length(r, length); | ||
+ | ||
+ /* Content length should include FLV header (mod by Artur Bodera (artur@bodera.com) */ | ||
+ ap_set_content_length(r, length + FLVX_HEADER_LEN); | ||
+ | ||
+ /* Add last-modified headers (mod by Artur Bodera (artur@bodera.com) */ | ||
+ ap_update_mtime(r, r->finfo.mtime); | ||
+ ap_set_last_modified(r); | ||
|
||
return ap_pass_brigade(r->output_filters, bb); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#!/usr/bin/make -f | ||
#vim:noet | ||
|
||
PACKAGE=libapache2-mod-flvx | ||
|
||
# Uncomment this to turn on verbose mode. | ||
#export DH_VERBOSE=1 | ||
|
||
# we need dpatch | ||
include /usr/share/dpatch/dpatch.make | ||
|
||
APXS2=/usr/bin/apxs2 | ||
|
||
build-stamp: | ||
$(APXS2) -c mod_flvx.c | ||
touch $@ | ||
|
||
build: patch build-stamp | ||
|
||
clean: unpatch | ||
dh_testdir | ||
dh_testroot | ||
rm -rf build-stamp mod_flvx.{lo,la,slo} .libs | ||
dh_clean | ||
|
||
install-clean: | ||
dh_testdir | ||
dh_testroot | ||
dh_clean -k | ||
dh_installdirs | ||
|
||
install: build install-clean | ||
mkdir -p $(CURDIR)/debian/$(PACKAGE)/usr/lib/apache2/modules | ||
cp $(CURDIR)/.libs/mod_flvx.so \ | ||
$(CURDIR)/debian/$(PACKAGE)/usr/lib/apache2/modules/mod_flvx.so | ||
|
||
|
||
# Build architecture-independent files here. | ||
binary-indep: build install | ||
|
||
# Build architecture-dependent files here. | ||
binary-arch: build install | ||
dh_testdir | ||
dh_testroot | ||
dh_installchangelogs | ||
dh_installdocs | ||
dh_install | ||
dh_installman | ||
dh_strip | ||
dh_compress | ||
dh_fixperms | ||
dh_installdeb | ||
dh_shlibdeps | ||
dh_gencontrol | ||
dh_md5sums | ||
dh_builddeb | ||
|
||
binary: binary-indep binary-arch | ||
.PHONY: build clean binary-indep binary-arch binary install | ||
.PHONY: clean-patched patch unpatch |
Oops, something went wrong.