add possibliity to filter recorded data
authorFelix Domke <tmbinc@elitedvb.net>
Thu, 2 Feb 2006 23:12:40 +0000 (23:12 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Thu, 2 Feb 2006 23:12:40 +0000 (23:12 +0000)
lib/base/filepush.cpp
lib/base/filepush.h

index 705dbb5..3901e76 100644 (file)
@@ -49,6 +49,7 @@ void eFilePushThread::thread()
                if (m_buf_start != m_buf_end)
                {
                                // TODO: take care of boundaries.
+                       filterRecordData(m_buffer + m_buf_start, m_buf_end - m_buf_start);
                        int w = write(m_fd_dest, m_buffer + m_buf_start, m_buf_end - m_buf_start);
 //                     eDebug("wrote %d bytes", w);
                        if (w <= 0)
@@ -204,3 +205,9 @@ void eFilePushThread::recvEvent(const int &evt)
 {
        m_event(evt);
 }
+
+void eFilePushThread::filterRecordData(const char *data, int len)
+{
+       /* do nothing */
+}
+
index f47d8e9..e471b29 100644 (file)
@@ -33,9 +33,11 @@ public:
        
        enum { evtEOF, evtReadError, evtWriteError, evtUser };
        Signal1<void,int> m_event;
-
+       
                /* you can send private events if you want */
        void sendEvent(int evt);
+protected:
+       virtual void filterRecordData(const char *data, int len);
 private:
        iFilePushScatterGather *m_sg;
        int m_stop;