"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "netcam_rtsp.c" between
motion-release-4.2.2.tar.gz and motion-Release-4.3.0.tar.gz

About: Motion monitors the video signal from one or more cameras and is able to detect motion.

netcam_rtsp.c  (motion-release-4.2.2):netcam_rtsp.c  (motion-Release-4.3.0)
skipping to change at line 226 skipping to change at line 226
* 0 invalid but continue * 0 invalid but continue
* 1 valid data * 1 valid data
*/ */
static int netcam_rtsp_decode_video(struct rtsp_context *rtsp_data){ static int netcam_rtsp_decode_video(struct rtsp_context *rtsp_data){
#if (LIBAVFORMAT_VERSION_MAJOR >= 58) || ((LIBAVFORMAT_VERSION_MAJOR == 57) && ( LIBAVFORMAT_VERSION_MINOR >= 41)) #if (LIBAVFORMAT_VERSION_MAJOR >= 58) || ((LIBAVFORMAT_VERSION_MAJOR == 57) && ( LIBAVFORMAT_VERSION_MINOR >= 41))
int retcd; int retcd;
char errstr[128]; char errstr[128];
/* The Invalid data problem comes frequently. Usually at startup of rtsp ca
meras.
* We now ignore those packets so this function would need to fail on a diff
erent error.
* We should consider adding a maximum count of these errors and reset every
time
* we get a good image.
*/
if (rtsp_data->finish) return 0; /* This just speeds up the shutdown time */ if (rtsp_data->finish) return 0; /* This just speeds up the shutdown time */
retcd = avcodec_send_packet(rtsp_data->codec_context, &rtsp_data->packet_rec v); retcd = avcodec_send_packet(rtsp_data->codec_context, &rtsp_data->packet_rec v);
if ((rtsp_data->interrupted) || (rtsp_data->finish)) return -1; if ((rtsp_data->interrupted) || (rtsp_data->finish)) return -1;
if (retcd == AVERROR_INVALIDDATA) {
MOTION_LOG(INF, TYPE_NETCAM, NO_ERRNO
,_("Ignoring packet with invalid data"));
return 0;
}
if (retcd < 0 && retcd != AVERROR_EOF){ if (retcd < 0 && retcd != AVERROR_EOF){
av_strerror(retcd, errstr, sizeof(errstr)); av_strerror(retcd, errstr, sizeof(errstr));
MOTION_LOG(INF, TYPE_NETCAM, NO_ERRNO MOTION_LOG(INF, TYPE_NETCAM, NO_ERRNO
,_("Error sending packet to codec: %s"), errstr); ,_("Error sending packet to codec: %s"), errstr);
return -1; return -1;
} }
retcd = avcodec_receive_frame(rtsp_data->codec_context, rtsp_data->frame); retcd = avcodec_receive_frame(rtsp_data->codec_context, rtsp_data->frame);
if ((rtsp_data->interrupted) || (rtsp_data->finish)) return -1; if ((rtsp_data->interrupted) || (rtsp_data->finish)) return -1;
if (retcd == AVERROR(EAGAIN)) return 0; if (retcd == AVERROR(EAGAIN)) return 0;
/*
* At least one netcam (Wansview K1) is known to always send a bogus
* packet at the start of the stream. Just grin and bear it...
*/
if (retcd == AVERROR_INVALIDDATA) { if (retcd == AVERROR_INVALIDDATA) {
MOTION_LOG(INF, TYPE_NETCAM, NO_ERRNO MOTION_LOG(INF, TYPE_NETCAM, NO_ERRNO
,_("Ignoring packet with invalid data")); ,_("Ignoring packet with invalid data"));
return 0; return 0;
} }
if (retcd < 0) { if (retcd < 0) {
av_strerror(retcd, errstr, sizeof(errstr)); av_strerror(retcd, errstr, sizeof(errstr));
MOTION_LOG(INF, TYPE_NETCAM, NO_ERRNO MOTION_LOG(INF, TYPE_NETCAM, NO_ERRNO
,_("Error receiving frame from codec: %s"), errstr); ,_("Error receiving frame from codec: %s"), errstr);
skipping to change at line 325 skipping to change at line 331
MOTION_LOG(ERR, TYPE_NETCAM, NO_ERRNO MOTION_LOG(ERR, TYPE_NETCAM, NO_ERRNO
,_("Error decoding video packet: Copying to buffer")); ,_("Error decoding video packet: Copying to buffer"));
return -1; return -1;
} }
rtsp_data->img_recv->used = frame_size; rtsp_data->img_recv->used = frame_size;
return frame_size; return frame_size;
} }
static void netcam_rtsp_decoder_error(struct rtsp_context *rtsp_data, int retcd,
const char* fnc_nm){
char errstr[128];
if (retcd < 0){
av_strerror(retcd, errstr, sizeof(errstr));
MOTION_LOG(ERR, TYPE_NETCAM, NO_ERRNO
,_("%s: %s: %s,Interrupt %s")
,rtsp_data->cameratype,fnc_nm, errstr, rtsp_data->interrupted ? _("T
rue"):_("False"));
} else {
MOTION_LOG(ERR, TYPE_NETCAM, NO_ERRNO
,_("%s: %s: Failed,Interrupt %s"),rtsp_data->cameratype
,fnc_nm, rtsp_data->interrupted ? _("True"):_("False"));
}
if (rtsp_data->decoder_nm != NULL){
MOTION_LOG(NTC, TYPE_NETCAM, NO_ERRNO
,_("%s: Ignoring user requested decoder %s"),rtsp_data->cameratype
,rtsp_data->decoder_nm);
free(rtsp_data->cnt->netcam_decoder);
rtsp_data->cnt->netcam_decoder = NULL;
rtsp_data->decoder_nm = NULL;
}
}
static int netcam_rtsp_open_codec(struct rtsp_context *rtsp_data){ static int netcam_rtsp_open_codec(struct rtsp_context *rtsp_data){
#if (LIBAVFORMAT_VERSION_MAJOR >= 58) || ((LIBAVFORMAT_VERSION_MAJOR == 57) && ( LIBAVFORMAT_VERSION_MINOR >= 41)) #if (LIBAVFORMAT_VERSION_MAJOR >= 58) || ((LIBAVFORMAT_VERSION_MAJOR == 57) && ( LIBAVFORMAT_VERSION_MINOR >= 41))
int retcd; int retcd;
char errstr[128];
AVStream *st; AVStream *st;
AVCodec *decoder = NULL; AVCodec *decoder = NULL;
if (rtsp_data->finish) return -1; /* This just speeds up the shutdown time */ if (rtsp_data->finish) return -1; /* This just speeds up the shutdown time */
retcd = av_find_best_stream(rtsp_data->format_context, AVMEDIA_TYPE_VIDEO, - 1, -1, NULL, 0); retcd = av_find_best_stream(rtsp_data->format_context, AVMEDIA_TYPE_VIDEO, - 1, -1, NULL, 0);
if ((retcd < 0) || (rtsp_data->interrupted)){ if ((retcd < 0) || (rtsp_data->interrupted)){
av_strerror(retcd, errstr, sizeof(errstr)); netcam_rtsp_decoder_error(rtsp_data, retcd, "av_find_best_stream");
MOTION_LOG(ERR, TYPE_NETCAM, NO_ERRNO
,_("%s: av_find_best_stream: %s,Interrupt %s")
,rtsp_data->cameratype, errstr, rtsp_data->interrupted ? _("True"):_
("False"));
return -1; return -1;
} }
rtsp_data->video_stream_index = retcd; rtsp_data->video_stream_index = retcd;
st = rtsp_data->format_context->streams[rtsp_data->video_stream_index]; st = rtsp_data->format_context->streams[rtsp_data->video_stream_index];
decoder = avcodec_find_decoder(st->codecpar->codec_id); if (rtsp_data->decoder_nm != NULL){
decoder = avcodec_find_decoder_by_name(rtsp_data->decoder_nm);
if (decoder == NULL) {
netcam_rtsp_decoder_error(rtsp_data, 0, "avcodec_find_decoder_by_nam
e");
} else {
MOTION_LOG(NTC, TYPE_NETCAM, NO_ERRNO,_("%s: Using decoder %s")
,rtsp_data->cameratype,rtsp_data->decoder_nm);
}
}
if (decoder == NULL) {
decoder = avcodec_find_decoder(st->codecpar->codec_id);
}
if ((decoder == NULL) || (rtsp_data->interrupted)){ if ((decoder == NULL) || (rtsp_data->interrupted)){
MOTION_LOG(ERR, TYPE_NETCAM, NO_ERRNO netcam_rtsp_decoder_error(rtsp_data, 0, "avcodec_find_decoder");
,_("%s: avcodec_find_decoder: Failed,Interrupt %s")
,rtsp_data->cameratype, rtsp_data->interrupted ? _("True"):_("False"
));
return -1; return -1;
} }
rtsp_data->codec_context = avcodec_alloc_context3(decoder); rtsp_data->codec_context = avcodec_alloc_context3(decoder);
if ((rtsp_data->codec_context == NULL) || (rtsp_data->interrupted)){ if ((rtsp_data->codec_context == NULL) || (rtsp_data->interrupted)){
MOTION_LOG(ERR, TYPE_NETCAM, NO_ERRNO netcam_rtsp_decoder_error(rtsp_data, 0, "avcodec_alloc_context3");
,_("%s: avcodec_alloc_context3: Failed,Interrupt %s")
,rtsp_data->cameratype, rtsp_data->interrupted ? _("True"):_("False"
));
return -1; return -1;
} }
retcd = avcodec_parameters_to_context(rtsp_data->codec_context, st->codecpar ); retcd = avcodec_parameters_to_context(rtsp_data->codec_context, st->codecpar );
if ((retcd < 0) || (rtsp_data->interrupted)) { if ((retcd < 0) || (rtsp_data->interrupted)) {
av_strerror(retcd, errstr, sizeof(errstr)); netcam_rtsp_decoder_error(rtsp_data, retcd, "avcodec_alloc_context3");
MOTION_LOG(ERR, TYPE_NETCAM, NO_ERRNO
,_("%s: avcodec_parameters_to_context: %s,Interrupt %s")
,rtsp_data->cameratype, errstr, rtsp_data->interrupted ? _("True"):_
("False"));
return -1; return -1;
} }
retcd = avcodec_open2(rtsp_data->codec_context, decoder, NULL); retcd = avcodec_open2(rtsp_data->codec_context, decoder, NULL);
if ((retcd < 0) || (rtsp_data->interrupted)){ if ((retcd < 0) || (rtsp_data->interrupted)){
av_strerror(retcd, errstr, sizeof(errstr)); netcam_rtsp_decoder_error(rtsp_data, retcd, "avcodec_open2");
MOTION_LOG(ERR, TYPE_NETCAM, NO_ERRNO
,_("%s: avcodec_open2: %s,Interrupt %s")
,rtsp_data->cameratype, errstr, rtsp_data->interrupted ? _("True"):_
("False"));
return -1; return -1;
} }
return 0; return 0;
#else #else
int retcd; int retcd;
char errstr[128];
AVStream *st; AVStream *st;
AVCodec *decoder = NULL; AVCodec *decoder = NULL;
if (rtsp_data->finish) return -1; /* This just speeds up the shutdown time */ if (rtsp_data->finish) return -1; /* This just speeds up the shutdown time */
retcd = av_find_best_stream(rtsp_data->format_context, AVMEDIA_TYPE_VIDEO, - 1, -1, NULL, 0); retcd = av_find_best_stream(rtsp_data->format_context, AVMEDIA_TYPE_VIDEO, - 1, -1, NULL, 0);
if ((retcd < 0) || (rtsp_data->interrupted)){ if ((retcd < 0) || (rtsp_data->interrupted)){
av_strerror(retcd, errstr, sizeof(errstr)); netcam_rtsp_decoder_error(rtsp_data, retcd, "av_find_best_stream");
MOTION_LOG(ERR, TYPE_NETCAM, NO_ERRNO
,_("%s: av_find_best_stream: %s,Interrupt %s")
,rtsp_data->cameratype, errstr, rtsp_data->interrupted ? _("True"):_
("False"));
return -1; return -1;
} }
rtsp_data->video_stream_index = retcd; rtsp_data->video_stream_index = retcd;
st = rtsp_data->format_context->streams[rtsp_data->video_stream_index]; st = rtsp_data->format_context->streams[rtsp_data->video_stream_index];
rtsp_data->codec_context = st->codec; rtsp_data->codec_context = st->codec;
decoder = avcodec_find_decoder(rtsp_data->codec_context->codec_id); decoder = avcodec_find_decoder(rtsp_data->codec_context->codec_id);
if ((decoder == NULL) || (rtsp_data->interrupted)) { if ((decoder == NULL) || (rtsp_data->interrupted)) {
MOTION_LOG(ERR, TYPE_NETCAM, NO_ERRNO netcam_rtsp_decoder_error(rtsp_data, 0, "avcodec_find_decoder");
,_("%s: avcodec_find_decoder: Failed,Interrupt %s") return -1;
,rtsp_data->cameratype, rtsp_data->interrupted ? _("True"):_("False"
));
return -1;
} }
retcd = avcodec_open2(rtsp_data->codec_context, decoder, NULL); retcd = avcodec_open2(rtsp_data->codec_context, decoder, NULL);
if ((retcd < 0) || (rtsp_data->interrupted)){ if ((retcd < 0) || (rtsp_data->interrupted)){
av_strerror(retcd, errstr, sizeof(errstr)); netcam_rtsp_decoder_error(rtsp_data, retcd, "avcodec_open2");
MOTION_LOG(ERR, TYPE_NETCAM, NO_ERRNO
,_("%s: avcodec_open2: %s,Interrupt %s")
,rtsp_data->cameratype, errstr, rtsp_data->interrupted ? _("True"):_
("False"));
return -1; return -1;
} }
return 0; return 0;
#endif #endif
} }
static struct rtsp_context *rtsp_new_context(void){ static struct rtsp_context *rtsp_new_context(void){
struct rtsp_context *ret; struct rtsp_context *ret;
skipping to change at line 976 skipping to change at line 998
rtsp_data->camera_name = cnt->conf.camera_name; rtsp_data->camera_name = cnt->conf.camera_name;
rtsp_data->img_recv = mymalloc(sizeof(netcam_buff)); rtsp_data->img_recv = mymalloc(sizeof(netcam_buff));
rtsp_data->img_recv->ptr = mymalloc(NETCAM_BUFFSIZE); rtsp_data->img_recv->ptr = mymalloc(NETCAM_BUFFSIZE);
rtsp_data->img_latest = mymalloc(sizeof(netcam_buff)); rtsp_data->img_latest = mymalloc(sizeof(netcam_buff));
rtsp_data->img_latest->ptr = mymalloc(NETCAM_BUFFSIZE); rtsp_data->img_latest->ptr = mymalloc(NETCAM_BUFFSIZE);
rtsp_data->pktarray_size = 0; rtsp_data->pktarray_size = 0;
rtsp_data->pktarray_index = -1; rtsp_data->pktarray_index = -1;
rtsp_data->pktarray = NULL; rtsp_data->pktarray = NULL;
rtsp_data->handler_finished = TRUE; rtsp_data->handler_finished = TRUE;
rtsp_data->first_image = TRUE; rtsp_data->first_image = TRUE;
rtsp_data->reconnect_count = 0;
rtsp_data->decoder_nm = cnt->netcam_decoder;
rtsp_data->cnt = cnt;
snprintf(rtsp_data->threadname, 15, "%s",_("Unknown")); snprintf(rtsp_data->threadname, 15, "%s",_("Unknown"));
if (gettimeofday(&rtsp_data->interruptstarttime, NULL) < 0) { if (gettimeofday(&rtsp_data->interruptstarttime, NULL) < 0) {
MOTION_LOG(ERR, TYPE_NETCAM, SHOW_ERRNO, "gettimeofday"); MOTION_LOG(ERR, TYPE_NETCAM, SHOW_ERRNO, "gettimeofday");
} }
if (gettimeofday(&rtsp_data->interruptcurrenttime, NULL) < 0) { if (gettimeofday(&rtsp_data->interruptcurrenttime, NULL) < 0) {
MOTION_LOG(ERR, TYPE_NETCAM, SHOW_ERRNO, "gettimeofday"); MOTION_LOG(ERR, TYPE_NETCAM, SHOW_ERRNO, "gettimeofday");
} }
/* If this is the norm and we have a highres, then disable passthru on the n orm */ /* If this is the norm and we have a highres, then disable passthru on the n orm */
skipping to change at line 1001 skipping to change at line 1026
} }
rtsp_data->interruptduration = 5; rtsp_data->interruptduration = 5;
rtsp_data->interrupted = FALSE; rtsp_data->interrupted = FALSE;
if (gettimeofday(&rtsp_data->frame_curr_tm, NULL) < 0) { if (gettimeofday(&rtsp_data->frame_curr_tm, NULL) < 0) {
MOTION_LOG(ERR, TYPE_NETCAM, SHOW_ERRNO, "gettimeofday"); MOTION_LOG(ERR, TYPE_NETCAM, SHOW_ERRNO, "gettimeofday");
} }
if (gettimeofday(&rtsp_data->frame_prev_tm, NULL) < 0) { if (gettimeofday(&rtsp_data->frame_prev_tm, NULL) < 0) {
MOTION_LOG(ERR, TYPE_NETCAM, SHOW_ERRNO, "gettimeofday"); MOTION_LOG(ERR, TYPE_NETCAM, SHOW_ERRNO, "gettimeofday");
} }
/* Upon startup, we close context and let the handler start it again. Since
* this is a "planned" reconnection, we set our initial connection delay to
be
* equal to the offset that the reconnect will add.
*/
rtsp_data->cnct_delay = 50000;
netcam_rtsp_set_path(cnt, rtsp_data); netcam_rtsp_set_path(cnt, rtsp_data);
} }
static int netcam_rtsp_set_dimensions (struct context *cnt) { static int netcam_rtsp_set_dimensions (struct context *cnt) {
cnt->imgs.width = 0; cnt->imgs.width = 0;
cnt->imgs.height = 0; cnt->imgs.height = 0;
cnt->imgs.size_norm = 0; cnt->imgs.size_norm = 0;
skipping to change at line 1326 skipping to change at line 1346
framerate = rtsp_data->conf->framerate; framerate = rtsp_data->conf->framerate;
if (framerate < 2) framerate = 2; if (framerate < 2) framerate = 2;
if (strcmp(rtsp_data->service,"file") == 0) { if (strcmp(rtsp_data->service,"file") == 0) {
/* For file processing, we try to match exactly the motion loop rate */ /* For file processing, we try to match exactly the motion loop rate */
usec_maxrate = (1000000L / framerate); usec_maxrate = (1000000L / framerate);
} else { } else {
/* We set the capture rate to be a bit faster than the frame rate. This /* We set the capture rate to be a bit faster than the frame rate. This
* should provide the motion loop with a picture whenever it wants one. * should provide the motion loop with a picture whenever it wants one.
* Now, if the user set the framerate really low, then the handler will
* lose connection to the camera. Each time we lose the connection we
* adjust the cnct_delay to shorten the sleep and speed up the captures
*/ */
if (framerate < rtsp_data->src_fps) framerate = rtsp_data->src_fps; if (framerate < rtsp_data->src_fps) framerate = rtsp_data->src_fps;
usec_maxrate = (1000000L / (framerate + 3));
usec_maxrate = (1000000L / (framerate + 3)) + rtsp_data->cnct_delay;
} }
if (gettimeofday(&rtsp_data->frame_curr_tm, NULL) < 0) { if (gettimeofday(&rtsp_data->frame_curr_tm, NULL) < 0) {
MOTION_LOG(ERR, TYPE_NETCAM, SHOW_ERRNO, "gettimeofday"); MOTION_LOG(ERR, TYPE_NETCAM, SHOW_ERRNO, "gettimeofday");
} }
usec_delay = usec_maxrate - usec_delay = usec_maxrate -
((rtsp_data->frame_curr_tm.tv_sec - rtsp_data->frame_prev_tm.tv_sec) * 1 000000L) - ((rtsp_data->frame_curr_tm.tv_sec - rtsp_data->frame_prev_tm.tv_sec) * 1 000000L) -
(rtsp_data->frame_curr_tm.tv_usec - rtsp_data->frame_prev_tm.tv_usec); (rtsp_data->frame_curr_tm.tv_usec - rtsp_data->frame_prev_tm.tv_usec);
if ((usec_delay > 0) && (usec_delay < 1000000L)){ if ((usec_delay > 0) && (usec_delay < 1000000L)){
SLEEP(0, usec_delay * 1000); SLEEP(0, usec_delay * 1000);
} }
} }
static void netcam_rtsp_handler_reconnect(struct rtsp_context *rtsp_data){ static void netcam_rtsp_handler_reconnect(struct rtsp_context *rtsp_data){
long usec_maxrate; int retcd;
int framerate;
if ((rtsp_data->status == RTSP_CONNECTED) || if ((rtsp_data->status == RTSP_CONNECTED) ||
(rtsp_data->status == RTSP_READINGIMAGE)){ (rtsp_data->status == RTSP_READINGIMAGE)){
MOTION_LOG(ERR, TYPE_NETCAM, NO_ERRNO MOTION_LOG(ERR, TYPE_NETCAM, NO_ERRNO
,_("%s: Reconnecting with camera...."),rtsp_data->cameratype); ,_("%s: Reconnecting with camera...."),rtsp_data->cameratype);
} }
rtsp_data->status = RTSP_RECONNECTING;
if (strcmp(rtsp_data->service,"file") != 0) { /*
/* Note that this works in reverse on the times. The last time curr_tm * The retry count of 100 is arbritrary.
was set * We want to try many times quickly to not lose too much information
* was when we had a good image in netcam_rtsp_handler_wait. The prev_ti * before we go into the long wait phase
me was */
* set immediately before we called this function. retcd = netcam_rtsp_connect(rtsp_data);
*/ if (retcd < 0){
framerate = rtsp_data->conf->framerate; if (rtsp_data->reconnect_count < 100){
if (framerate < 2) framerate = 2; rtsp_data->reconnect_count++;
if (framerate < rtsp_data->src_fps) framerate = rtsp_data->src_fps; } else if (rtsp_data->reconnect_count == 100){
MOTION_LOG(NTC, TYPE_NETCAM, NO_ERRNO
if ((rtsp_data->frame_prev_tm.tv_sec - ,_("%s: Camera did not reconnect."), rtsp_data->cameratype);
rtsp_data->frame_curr_tm.tv_sec) < 3600){ MOTION_LOG(NTC, TYPE_NETCAM, NO_ERRNO
rtsp_data->cnct_delay -= 50000; ,_("%s: Checking for camera every 10 seconds."),rtsp_data->camer
usec_maxrate = (1000000L / (framerate+3)) + rtsp_data->cnct_delay; atype);
if (usec_maxrate < 1000){ rtsp_data->reconnect_count++;
rtsp_data->cnct_delay = 1000 - (1000000L / (framerate+3)); SLEEP(10,0);
} } else {
SLEEP(10,0);
} }
} else {
rtsp_data->reconnect_count = 0;
} }
rtsp_data->status = RTSP_RECONNECTING;
netcam_rtsp_connect(rtsp_data);
} }
static void *netcam_rtsp_handler(void *arg){ static void *netcam_rtsp_handler(void *arg){
struct rtsp_context *rtsp_data = arg; struct rtsp_context *rtsp_data = arg;
rtsp_data->handler_finished = FALSE; rtsp_data->handler_finished = FALSE;
util_threadname_set("nc",rtsp_data->threadnbr, rtsp_data->camera_name); util_threadname_set("nc",rtsp_data->threadnbr, rtsp_data->camera_name);
skipping to change at line 1477 skipping to change at line 1494
if (rtsp_data->img_latest->ptr != NULL ) wait_counter = -1; if (rtsp_data->img_latest->ptr != NULL ) wait_counter = -1;
pthread_mutex_unlock(&rtsp_data->mutex); pthread_mutex_unlock(&rtsp_data->mutex);
if (wait_counter > 0 ){ if (wait_counter > 0 ){
MOTION_LOG(INF, TYPE_NETCAM, NO_ERRNO MOTION_LOG(INF, TYPE_NETCAM, NO_ERRNO
,_("%s: Waiting for first image from the handler."),rtsp_data->c ameratype); ,_("%s: Waiting for first image from the handler."),rtsp_data->c ameratype);
SLEEP(0,5000000); SLEEP(0,5000000);
wait_counter--; wait_counter--;
} }
} }
/* Warn the user about a mismatch of camera FPS vs handler capture rate*/
if (rtsp_data->conf->framerate < rtsp_data->src_fps){
MOTION_LOG(NTC, TYPE_NETCAM, NO_ERRNO
, _("Requested frame rate %d FPS is less than camera frame rate %d F
PS")
, rtsp_data->conf->framerate,rtsp_data->src_fps);
MOTION_LOG(NTC, TYPE_NETCAM, NO_ERRNO
, _("Increasing capture rate to %d FPS to match camera.")
, rtsp_data->src_fps);
MOTION_LOG(NTC, TYPE_NETCAM, NO_ERRNO
, _("To lower CPU, change camera FPS to lower rate and decrease I fr
ame interval.")
, rtsp_data->src_fps);
}
return 0; return 0;
} }
/********************************************************* /*********************************************************
* This ends the section of functions that rely upon FFmpeg * This ends the section of functions that rely upon FFmpeg
***********************************************************/ ***********************************************************/
#endif /* End HAVE_FFMPEG */ #endif /* End HAVE_FFMPEG */
 End of changes. 25 change blocks. 
79 lines changed or deleted 107 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)