]> rtime.felk.cvut.cz Git - frescor/streamer.git/blobdiff - streamer.c
Easy switch between FRSH and non-FRSH version of FFMPEG
[frescor/streamer.git] / streamer.c
index 1f85ce40850d0775b7ff99488bcd6f95b552a808..c046e19c4da9a3ce1ae45e509e5a447d4d724e03 100644 (file)
@@ -5,6 +5,8 @@
  */
 #include <unistd.h>
 #include <stdlib.h>
+#include <signal.h>
+#include <pthread.h>
 
 #include <libavformat/avformat.h>
 #include <libavdevice/avdevice.h>
@@ -218,7 +220,7 @@ int main(int argc, char *argv[])
   dump_format(os, 0, os->filename, 1);
   sdp_print(os, sdp_file);
 
-#ifdef CONFIG_AQUOSA 
+#if CONFIG_STREAMER_WITH_FRSH && CONFIG_AQUOSA 
   frsh_thread_attr_t frsh_attr;
   frsh_thread_id_t thread;
   frsh_vres_id_t cpu_vres;
@@ -263,6 +265,7 @@ int main(int argc, char *argv[])
 
        printf("Finishing\n");
 
+        close_output_stream(os);
 #else
        pthread_attr_t attr;
        pthread_t streamer_th;
@@ -280,6 +283,8 @@ int main(int argc, char *argv[])
        pthread_join(streamer_th, (void**) NULL);
 
        printf("Finishing\n");
+
+        close_output_stream(os);
 #endif
 
   return 0;