Commit Graph

1003 Commits

Author SHA1 Message Date
Isaac Connor dca34544ec move analysis thread into monitor. populate analysis_it and decoder_it in Prime instead of constantly checking for them. Handle cases where LockedPacket are null due to shutdown 2021-03-17 12:47:52 -04:00
Isaac Connor 657a5edda4 If decoding disabled, set signal and last_write_time in the Capture thread. So that zm_watch knows we are alive 2021-03-17 10:11:06 -04:00
Isaac Connor 74616d1061 Update CaptureFPS SQL to just do an update and don't use static sql. TThis may fix a signal 6 crash that we have been seeing 2021-03-17 10:06:45 -04:00
Isaac Connor 12ed02a5b0 Move trigger detection before motion detection. Only wait for decoding if decoding is enabled 2021-03-16 20:07:59 -04:00
Isaac Connor 5e54a63bd5 Only load zones if doing something other than QUERY. Only delete decoder if there is one. 2021-03-16 13:26:40 -04:00
Isaac Connor 76267bc57f put back deleting the raw image when not saving jpegs. We only need it for the snapshot and that should be the alarmed image anyways. 2021-03-16 12:08:11 -04:00
Isaac Connor 9903e909af Rework locking in ZMPacket by using a new class called ZMLockedPacket. 2021-03-15 17:05:30 -04:00
Isaac Connor b238a2bc25 Implement decoder thread, locking is broken 2021-03-15 15:08:43 -04:00
Isaac Connor 644d6d34a4 Must init video_stream_id and audio_stream_id 2021-03-10 17:23:44 -05:00
Isaac Connor 41085c9e5c Remove final bits of zm_video writer. 2021-03-08 22:14:13 -05:00
Isaac Connor e38e8a2775 Actually use zmc_heartbeat_time. Set it on every capture and use it in ShmValid to determine if zmc has gone away. 2021-03-08 09:30:53 -05:00
Peter Keresztes Schmidt 9e77324de4 Replace raw mysql_query calls with the zmDb* functions
With this we can make sure we have proper locking of our DB connection at all times.
2021-03-06 00:12:18 +01:00
Admin fa22129966
Make last_alarm_count last alarmed frame while only in ALARM state to make post_event_count counts since here not alone alarmed frames that don't shot alarms. 2021-03-04 20:20:02 +01:00
Peter Keresztes Schmidt e67626b4e2 logger: Move log_mutex to std::recursive_mutex 2021-03-03 23:31:53 +01:00
Isaac Connor 20fe6153d5 Don't treat data packets as video 2021-03-03 15:52:39 -05:00
Isaac Connor b87d859f72 Set the packet's stream_index to the packetqueue stream. Rename get_ functions to get 2021-03-03 12:06:34 -05:00
Isaac Connor a01a24ec36 Add loading SecondPath in monitor 2021-03-03 09:56:33 -05:00
Isaac Connor 46ec4e75d4 Check codec type instead of stream_index to determine video/audio 2021-03-03 09:52:27 -05:00
Admin 4ff016c991
Make capturing/analysing log lines follow same pattern 2021-03-02 20:51:16 +01:00
Isaac Connor be1b439dcc Add State_Strings and code cleanup. Fix not going into alarm state when already recording. Fixes #3184 2021-03-02 14:42:54 -05:00
Isaac Connor f35a1c70c0 fix build with old avcodec for xenial 2021-03-02 12:07:51 -05:00
Isaac Connor c03d9b2987 Set state before we write packets to event so that the event knows that it is alarmed 2021-03-02 11:47:55 -05:00
Isaac Connor 71d65685b9 Can't clear image data early. Might be needed for snapshot and pre alarm farmes 2021-03-02 11:12:57 -05:00
Isaac Connor 46743ebaab Silence compile warning 2021-03-02 10:00:48 -05:00
Isaac Connor 832eabbd79 Don't both updating analysis fps unless we are doing motion detection 2021-03-02 09:59:32 -05:00
Isaac Connor 1bc5abb9e9 Only include video packets in analysis_image_count 2021-03-01 17:07:09 -05:00
Isaac Connor 51c19912f8 Use analysis_image_count in opening new event log line 2021-03-01 16:56:47 -05:00
Isaac Connor 9302c9506e Add audio_frequency and audio_channels to shared mem and set them in PrimeCapture 2021-03-01 16:49:27 -05:00
Isaac Connor 6e73c08a21 add fifo's for video and audio. Write the packet data to them. Update FifoStream->Fifo 2021-03-01 16:49:26 -05:00
Isaac Connor 6c6d6c51b0 Add RTSPSTreamName loading and write packet data to the video and audio fifos 2021-03-01 16:46:48 -05:00
Isaac Connor 33dbcc449a
Merge pull request #3181 from Carbenium/rgb-const
rgb: Convert some constant defines to constexpr
2021-03-01 09:40:39 -05:00
Isaac Connor 71d864d77b
Merge pull request #3182 from Carbenium/monitor-includes
monitor: Move system includes back to their original location
2021-03-01 09:40:08 -05:00
Peter Keresztes Schmidt 3b3ecb89b2 monitor: Move system includes back to their original location
41dc0212e0 moved the system includes to work around some compilation problems.
The underlying cause has been fixed in cf9406a1e8.
Thus we can move the includes back so the follow the project-wide order.
2021-03-01 00:45:57 +01:00
Peter Keresztes Schmidt 76e6c468e8 rgb: Convert some constant defines to constexpr
Using defines interferes with fmt.
Also rename them according to the Google styleguide.
2021-03-01 00:38:21 +01:00
Admin 741e67e8cd
ALERT also mean warming up with alarm_frame_count value before returning to ALARM.... 2021-02-28 22:42:29 +01:00
Peter Keresztes Schmidt 6a47780f60 Fix a warning reported by -Wextra
/home/peterke/DEV/zoneminder/src/zm_monitor.h: In member function ‘Monitor::TriggerState Monitor::GetTriggerState() const’:
/home/peterke/DEV/zoneminder/src/zm_monitor.h:499:76: warning: enumerated and non-enumerated type in conditional expression [-Wextra]
  499 |   TriggerState GetTriggerState() const { return (TriggerState)(trigger_data?trigger_data->trigger_state:TRIGGER_CANCEL); }
      |                                                                ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2021-02-27 01:27:58 +01:00
Peter Keresztes Schmidt 403061a39c Fix warnings reported by -Wmissing-field-initializers 2021-02-26 22:46:09 +01:00
Isaac Connor 3ce4b3e657 Keep capture_delay in useconds instead of msecs. Fix fps by adding back in the previous sleep_time. Fix crash due to capture_image not being asigned for local cameras 2021-02-25 16:58:54 -05:00
Isaac Connor 224fcd2cd3 Merge branch 'master' of github.com:ZoneMinder/zoneminder 2021-02-25 14:58:45 -05:00
Isaac Connor 8aeb4ab758 Switch db_mutex to a std::mutex. Use modern locking with it. Use zmDbDo or dbQueue.push where appropriate. code cleanup. 2021-02-25 12:26:26 -05:00
Isaac Connor 6c013f0e65 Put back includes needed on FreeBSD. Fixes #3165 2021-02-22 08:03:10 -05:00
Isaac Connor 86d424baf0 Move closeEvent to Close(). If we are closing the camera, we have to close the event as well. 2021-02-19 20:42:36 -05:00
Isaac Connor b9669ad69f Log new signal on signal change 2021-02-19 15:56:30 -05:00
Isaac Connor 4ba290a9ca Use zmDbDo where appropriate and fix some logging while holding the lock 2021-02-19 12:08:19 -05:00
Isaac Connor 045cd219f8 Move clear packetqueue logic to it's own function and call it from the analysis thread. 2021-02-18 19:25:40 -05:00
Isaac Connor 0b0df96271 Merge branch 'master' of github.com:ZoneMinder/zoneminder 2021-02-18 16:05:10 -05:00
Isaac Connor c7dede0083 Cleanups in connect/disconnect 2021-02-18 13:47:27 -05:00
Isaac Connor b1f337b6e7 Move setMaxVideoPackets down to where pre_event_count has a value 2021-02-18 11:54:32 -05:00
Isaac Connor 2a49bd124f Add VNC monitor type 2021-02-17 16:39:16 -05:00
Isaac Connor 33b9dae0f2 fix use of uint32_t for buffer indexes 2021-02-17 13:38:52 -05:00
Isaac Connor 59cdf971fa convert last_read_index and last_write_index to int32_t so that we can have -1 as a value in other functions. 2021-02-16 14:43:52 -05:00
Isaac Connor 41dc0212e0 Move include of algorithm up to top to hopefully fix issues with min and max being defined elsewhere and so compile fails 2021-02-16 10:39:04 -05:00
Isaac Connor a82247b105 Some cleanups in disconnect 2021-02-16 10:39:04 -05:00
Isaac Connor 5a910c4a4b use lock_guard instead of unique_lock 2021-02-12 10:45:32 -05:00
Isaac Connor 2cb6d21faf get rid of while loop in ::Analyze. Switch login on if Ready() to bail early so we don't indent so much. 2021-02-12 10:38:21 -05:00
Isaac Connor 4915e940b7 clean out old mutex. Add event_mutex to protect around event creation/deletion 2021-02-12 10:14:35 -05:00
Peter Keresztes Schmidt 3d759e1fe0 Monitor: Some reformatting of previously touched lines 2021-02-11 20:02:08 +01:00
Peter Keresztes Schmidt c0151caa64 Monitor: Signal by making the camera a unique_ptr the ownership relation
In addition we get RAII and thus automatic destruction of the camera when the monitor is destructed.

Monitor API change: getCamera -> LoadCamera
If additional properties of the camera are needed externally they should be exposed directly via Monitor.
2021-02-11 19:22:22 +01:00
Peter Keresztes Schmidt 91aeb325dd Monitor: Close monitor on destruction
This ensures the proper shutdown sequence when not calling Close() externally (e.g when reconnecting).
2021-02-11 19:22:22 +01:00
Peter Keresztes Schmidt 0a665c0710 Monitor: Close the associated camera when closing the monitor
The camera is owned by the monitor. There is no reason to keep the camera open, when the owner is closed.
2021-02-11 19:22:22 +01:00
Isaac Connor cca4d18d26 need <algorithm> for std::max 2021-02-10 17:29:51 -05:00
Isaac Connor 51f2d120e4 Free raw image after motion detection when doing passthrough and not saving jpegs 2021-02-10 17:07:58 -05:00
Isaac Connor 393e8b582a Move the logic of whether to queue a packet into packetqueue::queuePacket 2021-02-10 14:11:00 -05:00
Isaac Connor 0a1bd3537d ready_count is now max(warmup_count,pre_event_count). This should ensure that we have enough packets in the packet queue when creating an event. 2021-02-10 13:54:20 -05:00
Peter Keresztes Schmidt 2f5dff7244 Monitor: Don't push packets into the packet queue when in Monitor mode
There is no consumer for the packets in this mode, so don't queue them up. This saves quite a bit of RAM for mode of operation.
2021-02-10 16:13:47 +01:00
Isaac Connor fab7efa003 Fix PrimeCapture on local cams. We need to be able to call it for each monitor 2021-02-09 20:29:37 -05:00
Isaac Connor 727594e3af Fix rotated images by allocating image with camera dimensions 2021-02-09 14:53:14 -05:00
Isaac Connor 05b5927f01 Don't queue audio packets if we aren't saving audio 2021-02-09 11:54:38 -05:00
Peter Keresztes Schmidt 6fd6654488 Monitor: Don't segfault in closeEvent if mmap is already unmapped 2021-02-08 19:47:40 +01:00
Isaac Connor 192aae8e30 small space and code doc 2021-02-08 09:04:06 -05:00
Isaac Connor 061140958c Only update videodata if shared_data is active 2021-02-08 09:04:06 -05:00
Peter Keresztes Schmidt 3376b44290 Monitor: Fix a segfault when loading local cameras 2021-02-08 12:25:18 +01:00
Peter Keresztes Schmidt f43507dce0 Use the power of smart pointers to manage Monitor instances 2021-02-07 21:20:45 +01:00
Isaac Connor ace93e2422 fix event start packets getting deleted while writing because we don't have a lock on them. 2021-02-06 20:11:38 -05:00
Isaac Connor c28e1b09e5 Fix compile when using sysv shm 2021-02-06 20:11:38 -05:00
Isaac Connor 513739aeb5
Merge pull request #3127 from Carbenium/header-cleanup
Cleanup and reorganize includes
2021-02-04 12:52:04 -05:00
Peter Keresztes Schmidt 0dbc39ee25 Cleanup and reorganize includes
With this commit a unified structure for includes is introduced.
The general rules:
 * Only include what you need
 * Include wherever possible in the cpp and forward-declare in the header

 The includes are sorted in a local to global fashion. This means for the include order:
  0. If cpp file: The corresponding h file and an empty line
  1. Includes from the project sorted alphabetically
  2. System/library includes sorted alphabetically
  3. Conditional includes
2021-02-04 18:02:01 +01:00
Isaac Connor 046e352304 improvements to fps reporting. In analysis, we report based on image packets processed, but the fps value is calculated based on the count of images we did motion detection on. We no longer count audio packets in capture fps reporting. 2021-02-04 11:50:01 -05:00
Isaac Connor c61e6a8c56 If there is an open event in disconnect close it. The idea is that by the time we get to the destructor we should be all shut down 2021-02-03 17:04:40 -05:00
Isaac Connor cb60b6c141 Fix bulk frame code and move it to event. Revert base score to 0. Fix cause of continuous events. Move GetState to .h 2021-02-03 16:57:44 -05:00
Isaac Connor be1db1ff20 Score should be a signed int 2021-02-03 09:08:06 -05:00
Isaac Connor 0958768ce5 Fix no bulk frames by setting score to -1 which means BULK. It will get changed to 0 or more by later code. Fixes #3121 2021-02-02 23:19:53 -05:00
Isaac Connor 38368a8b9d remove deprecated video_buffer_duration stuff. Fix loading monitor column order 2021-02-02 23:19:53 -05:00
Isaac Connor afa5e27d56 load RTSPServer column as well. start_it needs to be tracked by packetqueue. We no longer close the camera in Monitor::Close because we need to clear the packetqueue, then wait for threads to finish, THEN close camera. So that logic needs to move to zmc 2021-02-02 23:19:52 -05:00
Peter Keresztes Schmidt e09fa1bebf Remove includes of <cinttypes>
Instead of including <cinttypes> directly, zm_define.h should be used
to get the typedef'ed types as well.
2021-02-02 21:37:26 +01:00
Isaac Connor a5417cfe6c NULL=>nullptr. Update analysis_fps earlier on startup 2021-02-01 16:01:09 -05:00
Isaac Connor 0676c7cfb4 Use packetqueue::free_it to release iterators 2021-02-01 10:24:58 -05:00
Isaac Connor dd57d05f40 Convert packetqueue from a pointer to a packetqueue to a member packetqueue that is always available. Add methods to set packetqueue parameters. Emptying the queue is now in packetqueue::clear() 2021-01-31 21:31:33 -05:00
Isaac Connor e08060af3f Free linked monitors 2021-01-31 11:57:43 -05:00
Isaac Connor e084780123 Remove no longer used pre_event buffer and event_delete_thread 2021-01-31 10:09:03 -05:00
Isaac Connor 00114d32bc Minor code improvements ostly just being more specific about parenthesis 2021-01-30 20:35:10 -05:00
Isaac Connor b93aab6a11 turn off hwtransfer direct to image. Too compliated for now with not enough benefit 2021-01-30 12:34:29 -05:00
Isaac Connor ac88567ee2 fix 2021-01-29 17:32:22 -05:00
Isaac Connor 5581cdafb6 must increment iterators in the packetqueue lock 2021-01-29 17:30:39 -05:00
Isaac Connor 7923e0c279 fix min_section_length not being honoured 2021-01-27 18:13:16 -05:00
Isaac Connor 1ca93c4211 accept packets with image as video 2021-01-27 12:49:54 -05:00
Isaac Connor 4dcce4ac95 Merge branch 'rtsp_server' 2021-01-26 14:22:10 -05:00
Isaac Connor e4831909d6 get_packet can return null if we are terminating 2021-01-26 12:22:26 -05:00
Isaac Connor f9fc10b394 When not capturing don't try to create mmap. Fixes #3112 2021-01-22 12:23:13 -05:00
Isaac Connor f1686cfe9a When not capturing don't try to create mmap. Fixes #3112 2021-01-22 12:11:43 -05:00
Isaac Connor 66c78e5a9b Merge branch 'zma_to_thread' into rtsp_server 2021-01-19 13:43:25 -05:00
Isaac Connor 256080abb1 Fix crash of Reload() due to Load() clearing shared_data and mem_ptr. Load() shouldn't do these kinds of initialisations. 2021-01-19 09:44:53 -05:00
Isaac Connor 68b0f7e1b5 initialize packetqueue, analysis_it, storage and videostore in Monitor constructor initializer. Only delete packetqeuue if it has been created. 2021-01-15 14:42:26 -05:00
Isaac Connor 10e56df53c analysis_limit > cpature fps: only log a warning if we have actually been capturing for a while. If doing passthrough, need to start continuous event from last keyframe 2021-01-15 11:54:36 -05:00
Isaac Connor 164a0f5a44 Need to use get_packet so that packets getting written to event are locked. Because queuePacket might delete them. 2021-01-12 14:11:47 -05:00
Isaac Connor e8d06f702c Handle signal loss, improve debugging 2021-01-11 13:46:50 -05:00
Isaac Connor 46a8bb22fb get camera if we havn't already. Don't delete the timestamp in shared zmpackets because it is just a pointer to shmem. Set it to null instead so that ~ZMpacket doesn't try to free it 2021-01-11 13:46:50 -05:00
Isaac Connor 65fc5bf478 move code from Load for purpose==ANALYSIS because it will never run. Analysis is a thread now and must assume that PrimeCapture has already succeeded. 2021-01-11 13:46:50 -05:00
Isaac Connor da7a50c92d Rename H264PASSTHROUGH to just PASSTHROUGH. Start with last_signal set to true so that we don't have a signal change event on startup. Use new generic packetqueue functions 2021-01-11 13:46:50 -05:00
Isaac Connor e1f6f5984d Handle signal loss, improve debugging 2021-01-11 13:35:48 -05:00
Isaac Connor a6aefcf477 get camera if we havn't already. Don't delete the timestamp in shared zmpackets because it is just a pointer to shmem. Set it to null instead so that ~ZMpacket doesn't try to free it 2021-01-08 15:49:09 -05:00
Isaac Connor ff3bc981de move code from Load for purpose==ANALYSIS because it will never run. Analysis is a thread now and must assume that PrimeCapture has already succeeded. 2021-01-07 09:40:24 -05:00
Isaac Connor e93a895f28 Rename H264PASSTHROUGH to just PASSTHROUGH. Start with last_signal set to true so that we don't have a signal change event on startup. Use new generic packetqueue functions 2021-01-06 11:31:31 -05:00
Isaac Connor f61210c91f remove old code using image_buffer in zm_packets 2020-12-30 21:23:29 -05:00
Isaac Connor 284b9f963f Merge branch 'master' into zma_to_thread 2020-12-29 12:18:26 -05:00
Isaac Connor 197f9bdd9e indenting fix. Don't update reference image if not doing motion detection. Decouple the image buffer from the packetqueue. So always allocate a new image. Then copy decoded image to image buffer if required. 2020-12-27 12:00:18 -05:00
Isaac Connor ddf66bc9b5
Merge pull request #3100 from vertigeaux/share_frame_scores
save frame scores to SharedData for use with linked monitors
2020-12-24 11:08:25 -05:00
Isaac Connor 1ffc233593 Move some initialisation into MOnitor() initialisation. Update UpdateAnalysisFPS to use more doubles instead of integers to get better numbers. Move capture FPS updating to UpdateCaptureFPS and use doubles there too. remove some dead code and add some debugging 2020-12-23 18:50:07 -05:00
Isaac Connor fb2793d337 use nullptr instead of 0 when init'ing event 2020-12-23 09:11:33 -05:00
Isaac Connor a1917d83d0 Merge branch 'master' into zma_to_thread 2020-12-22 19:52:09 -05:00
Vertigeaux 1416cbb03c save frame scores to SharedData for use with linked monitors 2020-12-22 17:44:53 -06:00
Isaac Connor d6486d1a7e use nullptr instead of 0 when init'ing event 2020-12-22 15:44:07 -05:00
Isaac Connor 4bea286cfe Use new get_event_start_packet_it function to start the new event with the right packet. 2020-12-22 10:22:28 -05:00
Isaac Connor bc03afa166 Merge branch 'rtsp_server' into zma_to_thread 2020-12-17 10:21:51 -05:00
Isaac Connor 8d52baeee2 Merge branch 'master' into rtsp_server
Cleanup Analysis a bit. We can't skip packets just because they are audio. Clean up the state machine transitions a bit to make them a little more readable.
Change logic of PrimeCapture, success MUST return 1.  0 means no error but also no success.
Debugging and braces improvements in local_camera.
2020-12-17 10:16:54 -05:00
Isaac Connor 08d82fb86a use nullptr instead of 0 when init'ing event 2020-12-15 18:25:17 -05:00
Isaac Connor da18305729 Remove some dead code and debugging 2020-12-15 15:59:46 -05:00
Isaac Connor 0702b64cc4 Merge branch 'master' into zma_to_thread 2020-12-15 10:51:40 -05:00
Isaac Connor 99e7ae3505 Merge branch 'master' into rtsp_server 2020-12-15 10:14:19 -05:00
Isaac Connor 97b0ea2b73 Add missing columns to sql to load monitors. Add code to do DecodeEnabled. Handle audio packets 2020-12-12 18:52:57 -05:00
Isaac Connor f77292e6cc Move the decoding_enabled logic to constructor to save a few cycles 2020-12-10 16:23:08 -05:00
Isaac Connor 7f72d5399f add decoding_enabled and DecodingEnabled function 2020-12-10 14:05:46 -05:00
Isaac Connor 6bf5d1b5a1 Fixes to analysis_fps vs analysis_fps_limit. Fixes to logic in analysis. Make capture_fps and analysis_fps be part of shared mem. 2020-12-09 15:00:11 -05:00
Isaac Connor b261fbb397 Merge branch 'master' into zma_to_thread 2020-12-07 16:26:26 -05:00
Isaac Connor 36b5702c50 Increase LinkedMonitor debugging. Fix LinkedMonitors. Fixes #3091 2020-12-05 19:36:44 -05:00
Isaac Connor 4d33667a85 Merge branch 'release-1.34' 2020-12-05 16:51:42 -05:00
Bluemax d8993931da Improve group permissions (mode 660)
Make /dev/shm files 660.
2020-12-02 21:27:00 +01:00
Isaac Connor 03f033cf36 cleanup MOnitor destructor. Most of the freeing is done in disconnect now. Fixes zms crash 2020-11-19 16:39:14 -05:00
Isaac Connor 634a3dbe81 fix crashes/memleaks when waiting for a zmc process to start. Fix other memleaks 2020-11-19 10:43:02 -05:00
Isaac Connor 6542072334 fix logic causing segfault instead of waiting for zmc. Remove trailing whitespaces 2020-11-18 09:56:13 -05:00
Isaac Connor d2a203014f rename diagpipe-r so that we don't have to create directories in SOCKS_DIR 2020-11-13 17:05:03 -05:00
Isaac Connor 08a8155b47 Implement a Monitor::disconnect function. Fix Fatals during connect and cleanup Analysis Monitor code to wait around for zmc. Handle zmc going away gracefully. Fixes a slow zma startup due to zmc not being setup yet. 2020-11-13 12:27:51 -05:00
Isaac Connor df783f4835 Merge branch 'master' into zma_to_thread 2020-11-12 12:53:55 -05:00
Isaac Connor de74a15ab1 Move diag_fifo pipes in SOCKS_DIR instead of assigned Storage area. Storage areas could be a fs that cannot handle sockets or fifos like NFS. 2020-11-12 11:53:51 -05:00
Isaac Connor f91dcc9b60 declar rc as int 2020-11-11 20:05:47 -05:00
Isaac Connor 9636a76ccf drop db lock before reporting mysql_errors 2020-11-11 17:42:29 -05:00
Isaac Connor 27f336975c Merge branch 'master' of github.com:ZoneMinder/zoneminder 2020-11-05 18:12:43 -05:00
Isaac Connor 33f58add11 Rename StartTime, EndTime in Events to StartDateTime and EndDateTime 2020-11-04 13:49:47 -05:00
Isaac Connor 296f6af7fb Remove dirty hack that sets EndTime from monitor. It can get set in event destructor 2020-11-01 17:15:42 -05:00
Isaac Connor 2eda49333f Merge branch 'master' into zma_to_thread 2020-10-20 16:20:29 -04:00