From 3a34c0590f6a68fb131e7407aa66b2210b829382 Mon Sep 17 00:00:00 2001
From: Marco Villegas <marvil07@gmail.com>
Date: Sun, 22 Jan 2012 23:25:58 -0500
Subject: [PATCH] archive.org support

---
 video_filter.codecs.inc |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/video_filter.codecs.inc b/video_filter.codecs.inc
index d377bf3..cb765d8 100644
--- a/video_filter.codecs.inc
+++ b/video_filter.codecs.inc
@@ -177,6 +177,14 @@ function video_filter_codec_info() {
     'ratio' => 16 / 9,
   );
 
+  $codecs['archive'] = array(
+    'name' => t('Archive.org'),
+    'sample_url' => 'http://www.archive.org/details/DrupalconBoston2008-TheStateOfDrupal',
+    'callback' => 'video_filter_archive',
+    'regexp' => '/archive\.org\/details\/([\w-_]+)/i',
+    'ratio' => 4 / 3,
+  );
+
   return $codecs;
 }
 
@@ -398,3 +406,9 @@ function video_filter_teachertube($video) {
 
   return video_filter_flash($video, $params);
 }
+
+function video_filter_archive($video) {
+  $html = sprintf('<iframe src="http://www.archive.org/embed/%s" width="%d" height="%d" frameborder="0"></iframe>', $video['codec']['matches'][1], $video['width'], $video['height']);
+
+  return $html;
+}
-- 
1.7.8.3

