summaryrefslogtreecommitdiff
path: root/src/encoder.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/encoder.cc')
-rw-r--r--src/encoder.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/encoder.cc b/src/encoder.cc
index 208dd79..b4227b0 100644
--- a/src/encoder.cc
+++ b/src/encoder.cc
@@ -65,6 +65,8 @@ Encoder::Encoder(Info *ginfo,
frozen = false;
+ savestate = NO_CHANGE;
+
// shoot_request = 0;
// shoot_value = 0;
// freeze_request = 0;
@@ -116,7 +118,7 @@ void Encoder::encode()
h.header.h_data.freeze = frame->freeze;
h.header.h_data.snapshot = frame->shoot;
h.header.h_data.record = frame->record;
- h.header.h_data.savestate = NO_CHANGE;
+ h.header.h_data.savestate = savestate;//NO_CHANGE;
// if(freeze_request != freeze_value) freeze_value = freeze_request;
// if(shoot_request != shoot_value) shoot_value = shoot_request;
@@ -192,7 +194,8 @@ void Encoder::shoot()
}
-void Encoder::thread_main() {
+void Encoder::thread_main()
+{
encode();
if(s) {
if(n) delete n;
@@ -204,7 +207,8 @@ void Encoder::thread_main() {
}
-void Encoder::start() {
+void Encoder::start()
+{
/*
if(!s) {
s = new Socket(port, errobj);
@@ -216,7 +220,9 @@ void Encoder::start() {
}
-void Encoder::stop(n_savestate save) {
+void Encoder::stop(n_savestate save)
+{
+ savestate = save;
/*
struct timespec ts;
// TODO: set save state in package header.