From 9ec08f248ed93dbcae5810bedfe0593731ec7117 Mon Sep 17 00:00:00 2001
From: Nathan Harris <nharris@eoimaging.com>
Date: Wed, 10 Jun 2009 16:48:23 -0400
Subject: mythtv-svn: updated to 20684

---
 abs/core-testing/mythtv/trunk/morethemes/PKGBUILD  |   2 +-
 abs/core-testing/mythtv/trunk/mp_all.sh            |   2 +-
 abs/core-testing/mythtv/trunk/mytharchive/PKGBUILD |   2 +-
 abs/core-testing/mythtv/trunk/mythbrowser/PKGBUILD |   2 +-
 abs/core-testing/mythtv/trunk/mythflix/PKGBUILD    |   2 +-
 abs/core-testing/mythtv/trunk/mythgallery/PKGBUILD |   2 +-
 abs/core-testing/mythtv/trunk/mythgame/PKGBUILD    |   2 +-
 abs/core-testing/mythtv/trunk/mythmovies/PKGBUILD  |   2 +-
 abs/core-testing/mythtv/trunk/mythmusic/PKGBUILD   |   2 +-
 abs/core-testing/mythtv/trunk/mythnews/PKGBUILD    |   2 +-
 abs/core-testing/mythtv/trunk/myththemes/PKGBUILD  |   2 +-
 .../mythtv/DeviceReadBuffer-polltimeout.2.patch    | 219 ---------------------
 abs/core-testing/mythtv/trunk/mythtv/PKGBUILD      |   7 +-
 abs/core-testing/mythtv/trunk/mythvideo/PKGBUILD   |   2 +-
 abs/core-testing/mythtv/trunk/mythweather/PKGBUILD |   2 +-
 abs/core-testing/mythtv/trunk/mythweb/PKGBUILD     |   2 +-
 .../mythtv/trunk/mythzoneminder/PKGBUILD           |   2 +-
 17 files changed, 18 insertions(+), 238 deletions(-)
 delete mode 100644 abs/core-testing/mythtv/trunk/mythtv/DeviceReadBuffer-polltimeout.2.patch

diff --git a/abs/core-testing/mythtv/trunk/morethemes/PKGBUILD b/abs/core-testing/mythtv/trunk/morethemes/PKGBUILD
index 4e920a7..5f12179 100644
--- a/abs/core-testing/mythtv/trunk/morethemes/PKGBUILD
+++ b/abs/core-testing/mythtv/trunk/morethemes/PKGBUILD
@@ -1,5 +1,5 @@
 pkgname=morethemes-svn
-pkgver=20586
+pkgver=20684
 pkgrel=1
 pkgdesc="Additional themes for MythTV"
 url="http://www.mythtv.org"
diff --git a/abs/core-testing/mythtv/trunk/mp_all.sh b/abs/core-testing/mythtv/trunk/mp_all.sh
index aa95719..47f70ba 100755
--- a/abs/core-testing/mythtv/trunk/mp_all.sh
+++ b/abs/core-testing/mythtv/trunk/mp_all.sh
@@ -1,5 +1,5 @@
 #!/bin/sh
-_svnver=20586
+_svnver=20684
 
 # NOTE: Make sure to build and install mythtv first BEFORE building anything else
 buildlist=('mythtv' 'mytharchive' 'mythbrowser' 'mythflix' 'mythgallery' 'mythgame' 'mythmovies' 'mythmusic' 'mythnews' 'mythvideo' 'mythweather' 'mythzoneminder' 'mythweb' 'myththemes' 'morethemes')
diff --git a/abs/core-testing/mythtv/trunk/mytharchive/PKGBUILD b/abs/core-testing/mythtv/trunk/mytharchive/PKGBUILD
index d4967a7..917d741 100644
--- a/abs/core-testing/mythtv/trunk/mytharchive/PKGBUILD
+++ b/abs/core-testing/mythtv/trunk/mytharchive/PKGBUILD
@@ -1,5 +1,5 @@
 pkgname=mytharchive-svn
-pkgver=20586
+pkgver=20684
 pkgrel=1
 pkgdesc="MythTV plugin that lets you create DVDs from or archive your recorded shows."
 url="http://www.mythtv.org"
diff --git a/abs/core-testing/mythtv/trunk/mythbrowser/PKGBUILD b/abs/core-testing/mythtv/trunk/mythbrowser/PKGBUILD
index 8152586..466263b 100644
--- a/abs/core-testing/mythtv/trunk/mythbrowser/PKGBUILD
+++ b/abs/core-testing/mythtv/trunk/mythbrowser/PKGBUILD
@@ -1,5 +1,5 @@
 pkgname=mythbrowser-svn
-pkgver=20586
+pkgver=20684
 pkgrel=1
 pkgdesc="Mini web browser for MythTV"
 url="http://www.mythtv.org"
diff --git a/abs/core-testing/mythtv/trunk/mythflix/PKGBUILD b/abs/core-testing/mythtv/trunk/mythflix/PKGBUILD
index d5ed49f..7f12ef5 100644
--- a/abs/core-testing/mythtv/trunk/mythflix/PKGBUILD
+++ b/abs/core-testing/mythtv/trunk/mythflix/PKGBUILD
@@ -1,5 +1,5 @@
 pkgname=mythflix-svn
-pkgver=20586
+pkgver=20684
 pkgrel=1
 pkgdesc="Netflix access plugin for MythTV"
 url="http://www.mythtv.org"
diff --git a/abs/core-testing/mythtv/trunk/mythgallery/PKGBUILD b/abs/core-testing/mythtv/trunk/mythgallery/PKGBUILD
index d849c09..77100ed 100644
--- a/abs/core-testing/mythtv/trunk/mythgallery/PKGBUILD
+++ b/abs/core-testing/mythtv/trunk/mythgallery/PKGBUILD
@@ -1,5 +1,5 @@
 pkgname=mythgallery-svn
-pkgver=20586
+pkgver=20684
 pkgrel=1
 pkgdesc="Image gallery plugin for MythTV"
 url="http://www.mythtv.org"
diff --git a/abs/core-testing/mythtv/trunk/mythgame/PKGBUILD b/abs/core-testing/mythtv/trunk/mythgame/PKGBUILD
index e2431b8..6bbd780 100644
--- a/abs/core-testing/mythtv/trunk/mythgame/PKGBUILD
+++ b/abs/core-testing/mythtv/trunk/mythgame/PKGBUILD
@@ -1,5 +1,5 @@
 pkgname=mythgame-svn
-pkgver=20586
+pkgver=20684
 pkgrel=1
 pkgdesc="Emulation plugin for MythTV"
 url="http://www.mythtv.org"
diff --git a/abs/core-testing/mythtv/trunk/mythmovies/PKGBUILD b/abs/core-testing/mythtv/trunk/mythmovies/PKGBUILD
index 846dc17..6b6fc7c 100644
--- a/abs/core-testing/mythtv/trunk/mythmovies/PKGBUILD
+++ b/abs/core-testing/mythtv/trunk/mythmovies/PKGBUILD
@@ -1,5 +1,5 @@
 pkgname=mythmovies-svn
-pkgver=20586
+pkgver=20684
 pkgrel=1
 pkgdesc="Displays information about movies playing in the area."
 url="http://www.mythtv.org"
diff --git a/abs/core-testing/mythtv/trunk/mythmusic/PKGBUILD b/abs/core-testing/mythtv/trunk/mythmusic/PKGBUILD
index 9af2e84..4c255df 100644
--- a/abs/core-testing/mythtv/trunk/mythmusic/PKGBUILD
+++ b/abs/core-testing/mythtv/trunk/mythmusic/PKGBUILD
@@ -1,5 +1,5 @@
 pkgname=mythmusic-svn
-pkgver=20586
+pkgver=20684
 pkgrel=1
 pkgdesc="Music playing plugin for MythTV"
 url="http://www.mythtv.org"
diff --git a/abs/core-testing/mythtv/trunk/mythnews/PKGBUILD b/abs/core-testing/mythtv/trunk/mythnews/PKGBUILD
index 33c7b02..0bb3b5a 100644
--- a/abs/core-testing/mythtv/trunk/mythnews/PKGBUILD
+++ b/abs/core-testing/mythtv/trunk/mythnews/PKGBUILD
@@ -1,5 +1,5 @@
 pkgname=mythnews-svn
-pkgver=20586
+pkgver=20684
 pkgrel=1
 pkgdesc="News checking plugin for MythTV"
 url="http://www.mythtv.org"
diff --git a/abs/core-testing/mythtv/trunk/myththemes/PKGBUILD b/abs/core-testing/mythtv/trunk/myththemes/PKGBUILD
index f20a50e..dd58a50 100755
--- a/abs/core-testing/mythtv/trunk/myththemes/PKGBUILD
+++ b/abs/core-testing/mythtv/trunk/myththemes/PKGBUILD
@@ -1,5 +1,5 @@
 pkgname=myththemes-svn
-pkgver=20586
+pkgver=20684
 pkgrel=1
 pkgdesc="Themes for MythTV"
 url="http://www.mythtv.org"
diff --git a/abs/core-testing/mythtv/trunk/mythtv/DeviceReadBuffer-polltimeout.2.patch b/abs/core-testing/mythtv/trunk/mythtv/DeviceReadBuffer-polltimeout.2.patch
deleted file mode 100644
index 5bb713f..0000000
--- a/abs/core-testing/mythtv/trunk/mythtv/DeviceReadBuffer-polltimeout.2.patch
+++ /dev/null
@@ -1,219 +0,0 @@
-Index: libs/libmythtv/DeviceReadBuffer.h
-===================================================================
---- libs/libmythtv/DeviceReadBuffer.h	(revision 18515)
-+++ libs/libmythtv/DeviceReadBuffer.h	(working copy)
-@@ -59,7 +59,7 @@
-     void IncrReadPointer(uint len);
- 
-     bool HandlePausing(void);
--    bool Poll(void) const;
-+    bool Poll(void);
-     uint WaitForUnused(uint bytes_needed) const;
-     uint WaitForUsed  (uint bytes_needed) const;
- 
-Index: libs/libmythtv/DeviceReadBuffer.cpp
-===================================================================
---- libs/libmythtv/DeviceReadBuffer.cpp	(revision 18515)
-+++ libs/libmythtv/DeviceReadBuffer.cpp	(working copy)
-@@ -90,9 +90,14 @@
- 
- void DeviceReadBuffer::Start(void)
- {
--    lock.lock();
--    bool was_running = running;
--    lock.unlock();
-+    bool was_running;
-+
-+    {
-+        QMutexLocker locker(&lock);
-+        was_running = running;
-+        error = false;
-+    }
-+
-     if (was_running)
-     {
-         VERBOSE(VB_IMPORTANT, LOC_ERR + "Start(): Already running.");
-@@ -104,6 +109,8 @@
-     {
-         VERBOSE(VB_IMPORTANT,
-                 LOC_ERR + QString("Start(): pthread_create failed.") + ENO);
-+
-+        QMutexLocker locker(&lock);
-         error = true;
-     }
- }
-@@ -118,21 +125,25 @@
-     used          = 0;
-     readPtr       = buffer;
-     writePtr      = buffer;
-+
-+    error         = false;
- }
- 
- void DeviceReadBuffer::Stop(void)
- {
-     bool was_running = IsRunning();
--    lock.lock();
--    run = false;
--    lock.unlock();
- 
-     if (!was_running)
-     {
--        VERBOSE(VB_IMPORTANT, LOC_ERR + "Stop(): Not running.");
-+        VERBOSE(VB_IMPORTANT, LOC + "Stop(): Not running.");
-         return;
-     }
- 
-+    {
-+        QMutexLocker locker(&lock);
-+        run = false;
-+    }
-+
-     pthread_join(thread, NULL);
- }
- 
-@@ -229,10 +240,11 @@
- {
-     uint      errcnt = 0;
- 
--    lock.lock();
--    run     = true;
--    running = true;
--    lock.unlock();
-+    {
-+        QMutexLocker locker(&lock);
-+        run     = true;
-+        running = true;
-+    }
- 
-     while (run)
-     {
-@@ -248,6 +260,15 @@
-         if (using_poll && !Poll())
-             continue;
- 
-+        {
-+            QMutexLocker locker(&lock);
-+            if (error)
-+            {
-+                VERBOSE(VB_RECORD, LOC + "fill_ringbuffer: error state");
-+                break;
-+            }
-+        }
-+
-         // Limit read size for faster return from read
-         size_t read_size =
-             min(dev_read_size, (size_t) WaitForUnused(TSPacket::SIZE));
-@@ -268,9 +289,10 @@
-         }
-     }
- 
--    lock.lock();
--    running = false;
--    lock.unlock();
-+    {
-+        QMutexLocker locker(&lock);
-+        running = false;
-+    }
- }
- 
- bool DeviceReadBuffer::HandlePausing(void)
-@@ -293,7 +315,7 @@
-     return true;
- }
- 
--bool DeviceReadBuffer::Poll(void) const
-+bool DeviceReadBuffer::Poll(void)
- {
- #ifdef USING_MINGW
- #warning mingw DeviceReadBuffer::Poll
-@@ -302,31 +324,53 @@
-     return false;
- #else
-     bool retval = true;
--    while (true)
-+    uint timeout_cnt = 0;
-+
-+    for (;;)
-     {
-         struct pollfd polls;
-         polls.fd      = _stream_fd;
-         polls.events  = POLLIN;
-         polls.revents = 0;
- 
--        int ret = poll(&polls, 1 /*number of polls*/, 10 /*msec*/);
--        if (IsPauseRequested() || !IsOpen() || !run)
-+        int ret = poll(&polls, 1 /*number of polls*/, 250 /*msec*/);
-+
-+        if (polls.revents & (POLLERR | POLLHUP | POLLNVAL))
-         {
-+            VERBOSE(VB_IMPORTANT, LOC + "poll error");
-+            error = true;
-+            return true;
-+        }
-+
-+        if (!run || !IsOpen() || IsPauseRequested())
-+        {
-             retval = false;
-             break; // are we supposed to pause, stop, etc.
-         }
- 
-         if (ret > 0)
-             break; // we have data to read :)
--        if ((-1 == ret) && (EOVERFLOW == errno))
--            break; // we have an error to handle
--
--        if ((-1 == ret) && ((EAGAIN == errno) || (EINTR  == errno)))
--            continue; // errors that tell you to try again
--        if (ret == 0)
--            continue; // timed out, try again
--
--        usleep(2500);
-+        if (ret < 0)
-+        {
-+            if ((EOVERFLOW == errno))
-+                break; // we have an error to handle
-+            if ((EAGAIN == errno) || (EINTR  == errno))
-+                continue; // errors that tell you to try again
-+            usleep(2500);
-+        }
-+        else //  ret == 0
-+        {
-+            if (++timeout_cnt > 9)
-+            {
-+                VERBOSE(VB_RECORD, LOC_ERR + "Poll giving up");
-+                QMutexLocker locker(&lock);
-+                error = true;
-+                return true;
-+            }
-+            if (timeout_cnt % 2)
-+                VERBOSE(VB_RECORD, LOC_ERR + QString("Poll timeout (%1)")
-+                        .arg(timeout_cnt));
-+        }
-     }
-     return retval;
- #endif //!USING_MINGW
-@@ -360,9 +404,9 @@
- 
-         if (++errcnt > 5)
-         {
--            lock.lock();
-+            QMutexLocker locker(&lock);
-+            VERBOSE(VB_RECORD, LOC + "Too many errors.");
-             error = true;
--            lock.unlock();
-             return false;
-         }
- 
-@@ -376,10 +420,8 @@
-             VERBOSE(VB_IMPORTANT, LOC +
-                     QString("End-Of-File? fd(%1)").arg(_stream_fd));
- 
--            lock.lock();
-+            QMutexLocker locker(&lock);
-             eof = true;
--            lock.unlock();
--
-             return false;
-         }
-         usleep(500);
diff --git a/abs/core-testing/mythtv/trunk/mythtv/PKGBUILD b/abs/core-testing/mythtv/trunk/mythtv/PKGBUILD
index b2b943e..a4cbd8d 100755
--- a/abs/core-testing/mythtv/trunk/mythtv/PKGBUILD
+++ b/abs/core-testing/mythtv/trunk/mythtv/PKGBUILD
@@ -1,5 +1,5 @@
 pkgname=mythtv-svn
-pkgver=20586
+pkgver=20684
 pkgrel=1
 pkgdesc="A personal video recorder for Linux"
 url="http://www.mythtv.org"
@@ -16,8 +16,8 @@ groups=('pvr')
 #MAKEFLAGS="-j6"
 install='mythtv.install'
 
-patchs=('smolt_jump.patch' 'myththemedmenu.h.patch' 'myththemedmenu.cpp.patch' 'DeviceReadBuffer-polltimeout.2.patch')
-#patchs=('svn_main_menu_popup.patch' 'smolt_jump.patch' 'DeviceReadBuffer-polltimeout.2.patch')
+patchs=('smolt_jump.patch' 'myththemedmenu.h.patch' 'myththemedmenu.cpp.patch')
+#patchs=('svn_main_menu_popup.patch' 'smolt_jump.patch')
 source=('mythbackend' 'myth.sh' `echo ${patchs[@]:0}` 'mythbackend.lr' 'mythfrontend.lr' 'pretty')
 arch=('i686' 'x86_64')
 #md5sums=()
@@ -83,6 +83,5 @@ build() {
 	mkdir -p $startdir/pkg/etc/cron.hourly/
 	cp $startdir/src/pretty $startdir/pkg/etc/cron.hourly/
 
-
 }
 
diff --git a/abs/core-testing/mythtv/trunk/mythvideo/PKGBUILD b/abs/core-testing/mythtv/trunk/mythvideo/PKGBUILD
index a8598c1..9611b87 100644
--- a/abs/core-testing/mythtv/trunk/mythvideo/PKGBUILD
+++ b/abs/core-testing/mythtv/trunk/mythvideo/PKGBUILD
@@ -1,5 +1,5 @@
 pkgname=mythvideo-svn
-pkgver=20586
+pkgver=20684
 pkgrel=1
 pkgdesc="Video playback and browsing plugin for MythTV"
 url="http://www.mythtv.org"
diff --git a/abs/core-testing/mythtv/trunk/mythweather/PKGBUILD b/abs/core-testing/mythtv/trunk/mythweather/PKGBUILD
index c4beb8c..675418c 100644
--- a/abs/core-testing/mythtv/trunk/mythweather/PKGBUILD
+++ b/abs/core-testing/mythtv/trunk/mythweather/PKGBUILD
@@ -1,5 +1,5 @@
 pkgname=mythweather-svn
-pkgver=20586
+pkgver=20684
 pkgrel=1
 pkgdesc="Weather checking plugin for MythTV"
 url="http://www.mythtv.org"
diff --git a/abs/core-testing/mythtv/trunk/mythweb/PKGBUILD b/abs/core-testing/mythtv/trunk/mythweb/PKGBUILD
index 533e4f4..11d02c0 100644
--- a/abs/core-testing/mythtv/trunk/mythweb/PKGBUILD
+++ b/abs/core-testing/mythtv/trunk/mythweb/PKGBUILD
@@ -1,5 +1,5 @@
 pkgname=mythweb-svn
-pkgver=20586
+pkgver=20684
 pkgrel=1
 pkgdesc="Web interface for MythTV's backend"
 url="http://www.mythtv.org"
diff --git a/abs/core-testing/mythtv/trunk/mythzoneminder/PKGBUILD b/abs/core-testing/mythtv/trunk/mythzoneminder/PKGBUILD
index 398253e..c01bef8 100644
--- a/abs/core-testing/mythtv/trunk/mythzoneminder/PKGBUILD
+++ b/abs/core-testing/mythtv/trunk/mythzoneminder/PKGBUILD
@@ -1,5 +1,5 @@
 pkgname=mythzoneminder-svn
-pkgver=20586
+pkgver=20684
 pkgrel=1
 pkgdesc="Integrates ZoneMinder into MythTV"
 url="http://www.mythtv.org"
-- 
cgit v0.12

