summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordeva <deva>2005-10-08 16:24:33 +0000
committerdeva <deva>2005-10-08 16:24:33 +0000
commit1d30dc5da0c148982032a2b5a5bdece10b3e80ae (patch)
tree4e698b0a27d2cfb98c95a536f361ce1145f8a119
parent48775e1ce9eb0dd53908110454d068a8b16a66ec (diff)
*** empty log message ***R0_3_0
-rw-r--r--etc/miav.conf10
-rw-r--r--src/mov_encoder.cc2
-rw-r--r--src/mov_encoder.h4
-rw-r--r--src/mov_encoder_thread.cc3
-rw-r--r--src/mov_encoder_thread.h2
-rw-r--r--src/threadsafe_queue_fifo.cc23
-rw-r--r--src/threadsafe_queue_fifo.h12
7 files changed, 32 insertions, 24 deletions
diff --git a/etc/miav.conf b/etc/miav.conf
index 50d36b7..708b4f6 100644
--- a/etc/miav.conf
+++ b/etc/miav.conf
@@ -35,6 +35,16 @@ server_group = "miav"
server_movie_root = "/home/miav/miav_movie_files"
server_image_root = "/home/miav/miav_image_files"
+# Multicast adresses:
+# 224.0.0.1 All systems on this subnet
+# 224.0.0.2 All routers on this subnet
+# 224.0.0.5 OSPF routers
+# 224.0.0.6 OSPF designated routers
+# 224.0.0.12 DHCP server/relay agent
+server_multicast = false
+server_multicast_addr = "224.0.0.1"
+server_multicast_port = 1234
+
# Video output controls. A sequence of I and P, where I is keyframes
# which is fast to create, but uses a lot of discspace.
# B uses changes since last frame, is more cpu intensive, but uses a
diff --git a/src/mov_encoder.cc b/src/mov_encoder.cc
index a455f42..1132b63 100644
--- a/src/mov_encoder.cc
+++ b/src/mov_encoder.cc
@@ -45,7 +45,7 @@
#include "libfame_wrapper.h"
MovEncoder::MovEncoder(volatile bool *r, sem_t *r_sem,
- ThreadSafeQueueFIFO<FrameVector*> *in,
+ ThreadSafeQueueFIFO *in,
ThreadSafeQueuePriority *video_out,
ThreadSafeQueuePriority *audio_out,
Info *i)
diff --git a/src/mov_encoder.h b/src/mov_encoder.h
index ace016c..8910f4b 100644
--- a/src/mov_encoder.h
+++ b/src/mov_encoder.h
@@ -54,7 +54,7 @@ using namespace std;
class MovEncoder : public Thread {
public:
MovEncoder(volatile bool *r, sem_t *r_sem,
- ThreadSafeQueueFIFO< FrameVector*> *in,
+ ThreadSafeQueueFIFO *in,
ThreadSafeQueuePriority *video_out,
ThreadSafeQueuePriority *audio_out,
Info *info);
@@ -68,7 +68,7 @@ private:
Info *info;
// Input queue
- ThreadSafeQueueFIFO< FrameVector* > *inputqueue;
+ ThreadSafeQueueFIFO *inputqueue;
// Output queues
ThreadSafeQueuePriority *video_output_queue;
diff --git a/src/mov_encoder_thread.cc b/src/mov_encoder_thread.cc
index 7c7f5d9..2e4c16b 100644
--- a/src/mov_encoder_thread.cc
+++ b/src/mov_encoder_thread.cc
@@ -35,7 +35,8 @@ MovEncoderThread::MovEncoderThread(const char *cpr, Info *i)
info->info("MovEncoderThread");
// Queue
- inputqueue = new ThreadSafeQueueFIFO<FrameVector*>();
+ // inputqueue = new ThreadSafeQueueFIFO<FrameVector*>();
+ inputqueue = new ThreadSafeQueueFIFO();
// Initialize read semaphore
sem_init(&read_sem, 0, 0);
diff --git a/src/mov_encoder_thread.h b/src/mov_encoder_thread.h
index 8cc24f8..3e7c1aa 100644
--- a/src/mov_encoder_thread.h
+++ b/src/mov_encoder_thread.h
@@ -58,7 +58,7 @@ private:
Info *info;
// FrameVectorQueue *inputqueue;
- ThreadSafeQueueFIFO< FrameVector* > *inputqueue;
+ ThreadSafeQueueFIFO *inputqueue;
FrameVector *block;
//thread stuff
diff --git a/src/threadsafe_queue_fifo.cc b/src/threadsafe_queue_fifo.cc
index 50c1067..6dbcb67 100644
--- a/src/threadsafe_queue_fifo.cc
+++ b/src/threadsafe_queue_fifo.cc
@@ -27,43 +27,38 @@
#include "config.h"
#include "threadsafe_queue_fifo.h"
-template <typename T>
-ThreadSafeQueueFIFO<T>::ThreadSafeQueueFIFO()
+ThreadSafeQueueFIFO::ThreadSafeQueueFIFO()
{
}
-template <typename T>
-ThreadSafeQueueFIFO<T>::~ThreadSafeQueueFIFO()
+ThreadSafeQueueFIFO::~ThreadSafeQueueFIFO()
{
}
-template <typename T>
-void ThreadSafeQueueFIFO<T>::push(T t)
+void ThreadSafeQueueFIFO::push(FrameVector *framevector)
{
mutex.lock();
- queue.push(t);
+ queue.push(framevector);
mutex.unlock();
semaphore.post();
}
-template <typename T>
-T ThreadSafeQueueFIFO<T>::pop()
+FrameVector *ThreadSafeQueueFIFO::pop()
{
semaphore.wait();
- T t;
+ FrameVector *framevector;
mutex.lock();
- t = queue.front();
+ framevector = queue.front();
queue.pop();
mutex.unlock();
- return t;
+ return framevector;
}
-template <typename T>
-int ThreadSafeQueueFIFO<T>::size()
+int ThreadSafeQueueFIFO::size()
{
int sz;
diff --git a/src/threadsafe_queue_fifo.h b/src/threadsafe_queue_fifo.h
index 9baf82e..ee3ac3b 100644
--- a/src/threadsafe_queue_fifo.h
+++ b/src/threadsafe_queue_fifo.h
@@ -29,20 +29,22 @@
#define __MIAV_THREADSAFE_QUEUE_FIFO_H__
#include "threadsafe_queue.h"
+
+#include "frame.h"
+
#include <queue>
-template <typename T>
-class ThreadSafeQueueFIFO: public ThreadSafeQueue<T> {
+class ThreadSafeQueueFIFO: public ThreadSafeQueue<FrameVector*> {
public:
ThreadSafeQueueFIFO();
~ThreadSafeQueueFIFO();
- void push(T t);
- T pop();
+ void push(FrameVector* framevector);
+ FrameVector* pop();
int size();
private:
- std::queue<T> queue;
+ std::queue<FrameVector*> queue;
};
#endif/*__MIAV_THREADSAFE_QUEUE_FIFO_H__*/