diff options
Diffstat (limited to 'src/encoder.cc')
-rw-r--r-- | src/encoder.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/encoder.cc b/src/encoder.cc index 3a4ade2..ca8fb4f 100644 --- a/src/encoder.cc +++ b/src/encoder.cc @@ -69,18 +69,14 @@ Encoder::~Encoder() void Encoder::encode() { DVFrame *f; - printf("0\n"); while(*running) { - printf("1\n"); sem_wait(sem); - printf("2\n"); pthread_mutex_lock(mutex); f = queue->pop(); pthread_mutex_unlock(mutex); - printf("3\n"); if((f && record) || (freeze_request != freeze_value) || (shoot_request != shoot_value)) { @@ -91,6 +87,7 @@ void Encoder::encode() h.header.h_data.freeze = (freeze_request != freeze_value); h.header.h_data.snapshot = (shoot_request != shoot_value); h.header.h_data.record = record; + h.header.h_data.savestate = NO_CHANGE; if(freeze_request != freeze_value) freeze_value = freeze_request; if(shoot_request != shoot_value) shoot_value = shoot_request; @@ -147,7 +144,9 @@ void Encoder::start() { } -void Encoder::stop() { +void Encoder::stop(n_savestate save) { + // TODO: set save state in package header. + // TODO: Flush not yet sent video packages. record = 0; if(s) { if(n) delete n; |