@@ -1234,6 +1234,7 @@ static int motion_init(struct context *cnt)
12341234 cnt -> imgs .width_high = 0 ;
12351235 cnt -> imgs .height_high = 0 ;
12361236 cnt -> imgs .size_high = 0 ;
1237+ cnt -> movie_passthrough = cnt -> conf .movie_passthrough ;
12371238
12381239 MOTION_LOG (NTC , TYPE_ALL , NO_ERRNO
12391240 ,_ ("Camera %d started: motion detection %s" ),
@@ -1245,9 +1246,9 @@ static int motion_init(struct context *cnt)
12451246 if (init_camera_type (cnt ) != 0 ) return -3 ;
12461247
12471248 if ((cnt -> camera_type != CAMERA_TYPE_RTSP ) &&
1248- (cnt -> conf . movie_passthrough )) {
1249+ (cnt -> movie_passthrough )) {
12491250 MOTION_LOG (WRN , TYPE_ALL , NO_ERRNO ,_ ("Pass-through processing disabled." ));
1250- cnt -> conf . movie_passthrough = 0 ;
1251+ cnt -> movie_passthrough = FALSE ;
12511252 }
12521253
12531254 if ((cnt -> conf .height == 0 ) || (cnt -> conf .width == 0 )) {
@@ -1327,6 +1328,7 @@ static int motion_init(struct context *cnt)
13271328 /* contains the moving objects of ref. frame */
13281329 cnt -> imgs .ref_dyn = mymalloc (cnt -> imgs .motionsize * sizeof (* cnt -> imgs .ref_dyn ));
13291330 cnt -> imgs .image_virgin .image_norm = mymalloc (cnt -> imgs .size_norm );
1331+ cnt -> imgs .image_vprvcy .image_norm = mymalloc (cnt -> imgs .size_norm );
13301332 cnt -> imgs .smartmask = mymalloc (cnt -> imgs .motionsize );
13311333 cnt -> imgs .smartmask_final = mymalloc (cnt -> imgs .motionsize );
13321334 cnt -> imgs .smartmask_buffer = mymalloc (cnt -> imgs .motionsize * sizeof (* cnt -> imgs .smartmask_buffer ));
@@ -1625,6 +1627,9 @@ static void motion_cleanup(struct context *cnt) {
16251627 free (cnt -> imgs .image_virgin .image_norm );
16261628 cnt -> imgs .image_virgin .image_norm = NULL ;
16271629
1630+ free (cnt -> imgs .image_vprvcy .image_norm );
1631+ cnt -> imgs .image_vprvcy .image_norm = NULL ;
1632+
16281633 free (cnt -> imgs .labels );
16291634 cnt -> imgs .labels = NULL ;
16301635
@@ -2048,6 +2053,8 @@ static int mlp_capture(struct context *cnt){
20482053
20492054 mlp_mask_privacy (cnt );
20502055
2056+ memcpy (cnt -> imgs .image_vprvcy .image_norm , cnt -> current_image -> image_norm , cnt -> imgs .size_norm );
2057+
20512058 /*
20522059 * If the camera is a netcam we let the camera decide the pace.
20532060 * Otherwise we will keep on adding duplicate frames.
@@ -2121,7 +2128,7 @@ static int mlp_capture(struct context *cnt){
21212128
21222129 if (cnt -> video_dev >= 0 &&
21232130 cnt -> missing_frame_counter < (MISSING_FRAMES_TIMEOUT * cnt -> conf .framerate )) {
2124- memcpy (cnt -> current_image -> image_norm , cnt -> imgs .image_virgin .image_norm , cnt -> imgs .size_norm );
2131+ memcpy (cnt -> current_image -> image_norm , cnt -> imgs .image_vprvcy .image_norm , cnt -> imgs .size_norm );
21252132 } else {
21262133 cnt -> lost_connection = 1 ;
21272134
@@ -2185,9 +2192,9 @@ static void mlp_detection(struct context *cnt){
21852192 * anyway
21862193 */
21872194 if (cnt -> detecting_motion || cnt -> conf .setup_mode )
2188- cnt -> current_image -> diffs = alg_diff_standard (cnt , cnt -> imgs .image_virgin .image_norm );
2195+ cnt -> current_image -> diffs = alg_diff_standard (cnt , cnt -> imgs .image_vprvcy .image_norm );
21892196 else
2190- cnt -> current_image -> diffs = alg_diff (cnt , cnt -> imgs .image_virgin .image_norm );
2197+ cnt -> current_image -> diffs = alg_diff (cnt , cnt -> imgs .image_vprvcy .image_norm );
21912198
21922199 /* Lightswitch feature - has light intensity changed?
21932200 * This can happen due to change of light conditions or due to a sudden change of the camera
@@ -2290,7 +2297,7 @@ static void mlp_tuning(struct context *cnt){
22902297 */
22912298 if ((cnt -> conf .noise_tune && cnt -> shots == 0 ) &&
22922299 (!cnt -> detecting_motion && (cnt -> current_image -> diffs <= cnt -> threshold )))
2293- alg_noise_tune (cnt , cnt -> imgs .image_virgin .image_norm );
2300+ alg_noise_tune (cnt , cnt -> imgs .image_vprvcy .image_norm );
22942301
22952302
22962303 /*
@@ -3125,6 +3132,65 @@ static void motion_camera_ids(void){
31253132 }
31263133}
31273134
3135+ static void motion_ntc (void ){
3136+
3137+ #ifdef HAVE_V4L2
3138+ MOTION_LOG (DBG , TYPE_ALL , NO_ERRNO ,_ ("v4l2 : available" ));
3139+ #else
3140+ MOTION_LOG (DBG , TYPE_ALL , NO_ERRNO ,_ ("v4l2 : not available" ));
3141+ #endif
3142+
3143+ #ifdef HAVE_BKTR
3144+ MOTION_LOG (DBG , TYPE_ALL , NO_ERRNO ,_ ("bktr : available" ));
3145+ #else
3146+ MOTION_LOG (DBG , TYPE_ALL , NO_ERRNO ,_ ("bktr : not available" ));
3147+ #endif
3148+
3149+ #ifdef HAVE_WEBP
3150+ MOTION_LOG (DBG , TYPE_ALL , NO_ERRNO ,_ ("webp : available" ));
3151+ #else
3152+ MOTION_LOG (DBG , TYPE_ALL , NO_ERRNO ,_ ("webp : not available" ));
3153+ #endif
3154+
3155+ #ifdef HAVE_MMAL
3156+ MOTION_LOG (DBG , TYPE_ALL , NO_ERRNO ,_ ("mmal : available" ));
3157+ #else
3158+ MOTION_LOG (DBG , TYPE_ALL , NO_ERRNO ,_ ("mmal : not available" ));
3159+ #endif
3160+
3161+ #ifdef HAVE_FFMPEG
3162+ MOTION_LOG (DBG , TYPE_ALL , NO_ERRNO ,_ ("ffmpeg : available" ));
3163+ #else
3164+ MOTION_LOG (DBG , TYPE_ALL , NO_ERRNO ,_ ("ffmpeg : not available" ));
3165+ #endif
3166+
3167+ #ifdef HAVE_MYSQL
3168+ MOTION_LOG (DBG , TYPE_DB , NO_ERRNO ,_ ("mysql : available" ));
3169+ #else
3170+ MOTION_LOG (DBG , TYPE_DB , NO_ERRNO ,_ ("mysql : not available" ));
3171+ #endif
3172+
3173+ #ifdef HAVE_SQLITE3
3174+ MOTION_LOG (DBG , TYPE_DB , NO_ERRNO ,_ ("sqlite3: available" ));
3175+ #else
3176+ MOTION_LOG (DBG , TYPE_DB , NO_ERRNO ,_ ("sqlite3: not available" ));
3177+ #endif
3178+
3179+ #ifdef HAVE_PGSQL
3180+ MOTION_LOG (DBG , TYPE_DB , NO_ERRNO ,_ ("pgsql : available" ));
3181+ #else
3182+ MOTION_LOG (DBG , TYPE_DB , NO_ERRNO ,_ ("pgsql : not available" ));
3183+ #endif
3184+
3185+ #ifdef HAVE_INTL
3186+ MOTION_LOG (DBG , TYPE_DB , NO_ERRNO ,_ ("nls : available" ));
3187+ #else
3188+ MOTION_LOG (DBG , TYPE_DB , NO_ERRNO ,_ ("nls : not available" ));
3189+ #endif
3190+
3191+
3192+ }
3193+
31283194
31293195/**
31303196 * motion_startup
@@ -3217,6 +3283,8 @@ static void motion_startup(int daemonize, int argc, char *argv[])
32173283
32183284 conf_output_parms (cnt_list );
32193285
3286+ motion_ntc ();
3287+
32203288 motion_camera_ids ();
32213289
32223290 initialize_chars ();
@@ -3254,8 +3322,6 @@ static void motion_start_thread(struct context *cnt){
32543322 snprintf (service ,6 ,"%s" ,cnt -> conf .netcam_url );
32553323 MOTION_LOG (NTC , TYPE_ALL , NO_ERRNO ,_ ("Camera ID: %d Camera Name: %s Service: %s" )
32563324 ,cnt -> camera_id , cnt -> conf .camera_name ,service );
3257- MOTION_LOG (NTC , TYPE_ALL , NO_ERRNO , _ ("Stream port %d" ),
3258- cnt -> conf .stream_port );
32593325 } else {
32603326 MOTION_LOG (NTC , TYPE_ALL , NO_ERRNO ,_ ("Camera ID: %d Camera Name: %s Device: %s" )
32613327 ,cnt -> camera_id , cnt -> conf .camera_name ,cnt -> conf .video_device );
@@ -4039,12 +4105,12 @@ void util_threadname_get(char *threadname){
40394105}
40404106int util_check_passthrough (struct context * cnt ){
40414107#if (HAVE_FFMPEG && LIBAVFORMAT_VERSION_MAJOR < 55 )
4042- if (cnt -> conf . movie_passthrough )
4108+ if (cnt -> movie_passthrough )
40434109 MOTION_LOG (INF , TYPE_NETCAM , NO_ERRNO
40444110 ,_ ("FFMPEG version too old. Disabling pass-through processing." ));
40454111 return 0 ;
40464112#else
4047- if (cnt -> conf . movie_passthrough ){
4113+ if (cnt -> movie_passthrough ){
40484114 MOTION_LOG (INF , TYPE_NETCAM , NO_ERRNO
40494115 ,_ ("pass-through is enabled but is still experimental." ));
40504116 return 1 ;
0 commit comments