@@ -46,6 +46,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
46
46
#include "osd.h"
47
47
#include "avahi.h"
48
48
#include "cec.h"
49
+ #include "snapshot.h"
49
50
50
51
struct codecs_t {
51
52
struct codec_t vcodec ; // Video
@@ -360,16 +361,14 @@ int read_config(char* configfile,struct htsp_t *htsp)
360
361
361
362
if (read != -1 ) {
362
363
htsp -> host = malloc (1024 );
363
- int res = sscanf (line ,"%s %d" ,htsp -> host ,& htsp -> port );
364
- fprintf (stderr ,"read %s %d" ,htsp -> host ,htsp -> port );
364
+ sscanf (line ,"%s %d" ,htsp -> host ,& htsp -> port );
365
365
}
366
366
367
367
read = getline (& line , & len , fp );
368
368
if (read != -1 ) {
369
369
htsp -> user = malloc (1024 );
370
370
htsp -> password = malloc (1024 );
371
- int res = sscanf (line ,"%s %s" ,htsp -> user ,htsp -> password );
372
- fprintf (stderr ,"read %s %s" ,htsp -> user ,htsp -> password );
371
+ sscanf (line ,"%s %s" ,htsp -> user ,htsp -> password );
373
372
}
374
373
fclose (fp );
375
374
return 0 ;
@@ -800,6 +799,8 @@ int main(int argc, char* argv[])
800
799
htsp_send_skip (& htsp ,30 ); // +30 seconds
801
800
break ;
802
801
802
+ case 's' :
803
+ save_snapshot ();
803
804
break ;
804
805
805
806
default :
0 commit comments