summaryrefslogtreecommitdiff
path: root/src/encoder.cc
diff options
context:
space:
mode:
authordeva <deva>2005-04-14 17:28:21 +0000
committerdeva <deva>2005-04-14 17:28:21 +0000
commitd5e1739f5288355869eccd53ab3eb1a4000d1cab (patch)
tree15f9f20fb8d5c92fbf0b2ef5e34f150ce660168f /src/encoder.cc
parentf742dd679138b1e3428b72e8f934fee15ade9ecb (diff)
Unified the frame types.
Diffstat (limited to 'src/encoder.cc')
-rw-r--r--src/encoder.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/encoder.cc b/src/encoder.cc
index ca8fb4f..a762c99 100644
--- a/src/encoder.cc
+++ b/src/encoder.cc
@@ -30,7 +30,7 @@ Encoder::Encoder(Error* err,
const char *gip,
const int gport,
sem_t *gsem,
- Queue<DVFrame> *gqueue,
+ Queue<Frame> *gqueue,
pthread_mutex_t *gmutex,
volatile int *grunning)
{
@@ -68,7 +68,7 @@ Encoder::~Encoder()
void Encoder::encode()
{
- DVFrame *f;
+ Frame *f;
while(*running) {
sem_wait(sem);
@@ -92,10 +92,11 @@ void Encoder::encode()
if(freeze_request != freeze_value) freeze_value = freeze_request;
if(shoot_request != shoot_value) shoot_value = shoot_request;
- n->sendPackage(&h, f->frame, sizeof(f->frame));
+ n->sendPackage(&h, f->data, f->size);
+
+ free(f->data);
+ delete f;
}
-
- if(f) delete f;
}
pthread_exit(NULL);
}