*/
#include <unistd.h>
#include <stdlib.h>
+#include <signal.h>
+#include <pthread.h>
#include <libavformat/avformat.h>
#include <libavdevice/avdevice.h>
opkt = pkt_encode(os, f);
if (opkt) {
pkt_send(os, opkt);
+ printf("opkt size: %d\n", opkt->size);
}
}
//rt_job_end();
block_signals();
-#ifdef CONFIG_STREAMER_WITH_FRSH
+#ifdef CONFIG_FFMPEG_WITH_FRSH
ret = frsh_init();
if (ret) PERROR_AND_EXIT(ret, "frsh_init1");
/* fill default network contract params */
udp_budget = 50000;
udp_period = 500;
-#endif /*CONFIG_STREAMER_WITH_FRSH*/
+#endif /*CONFIG_FFMPEG_WITH_FRSH*/
avcodec_register_all();
av_register_all();
os->streams[0]->codec->width = s->streams[0]->codec->width;
os->streams[0]->codec->height = s->streams[0]->codec->height;
os->streams[0]->codec->time_base = s->streams[0]->codec->time_base;
+ os->streams[0]->codec->bit_rate = 300000;
codec_connect(s->streams[0]->codec, os->streams[0]->codec);
out_codec_open(os);
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;
printf("Finishing\n");
+ close_output_stream(os);
#else
pthread_attr_t attr;
pthread_t streamer_th;
pthread_join(streamer_th, (void**) NULL);
printf("Finishing\n");
+
+ close_output_stream(os);
#endif
return 0;