How to recive frames from network optix to plugin?
AnsweredI am new to network optix plugin. I want to build a new plugin where my first part is receiving all the frames from network optix camera. I have sample application of stub application. I went into the code, but i couldn't understand what exactly it is doing? could someone guide me how to receive all the frames from nx?
any docs to understand stub application (programmatically)?
any help would be appreciable
-
Hello Mohamed,
The best thing to start getting familiar with Nx Meta SDK would be checking our Knowledge Base.
I would recommend you this section first:
https://support.networkoptix.com/hc/en-us/sections/360004090353-Integrating-Video-Analytics
All 10 topics of those are very helpful. E.g. point 4 describes the functions that should be used to send the video from camera to plugin.
More specific implementation data(classes hierarchy, classes index, classes and functions descriptions) could be found in html documentation delivered with every metadata sdk package, "docs" folder.
-
Thanks for the response. I am trying to run the script one by one. I tried to compile camera_manager.cpp script using g++ -std=c++11 camera_manager.cpp. I am getting
nx/sdk/metadata/common_video_frame_processing_camera_manager.h:7:34: fatal error: plugins/plugin_tools.h: No such file or directory
compilation terminated.I copied contents of stub folder (metadata_sdk/samples/stub_metadata_plugin/src/nx/mediaserver_plugins/metadata/stub) to metadata_sdk/src.
My directory structure looks like below,
.
├── camera_manager.cpp
├── camera_manager.h
├── new.cpp
├── nx
│ └── sdk
│ ├── common.h
│ ├── metadata
│ │ ├── audio_frame.h
│ │ ├── camera_manager.h
│ │ ├── common_attribute.cpp
│ │ ├── common_attribute.h
│ │ ├── common_event.cpp
│ │ ├── common_event.h
│ │ ├── common_event_metadata_packet.cpp
│ │ ├── common_event_metadata_packet.h
│ │ ├── common_metadata_packet.cpp
│ │ ├── common_metadata_packet.h
│ │ ├── common_object.cpp
│ │ ├── common_object.h
│ │ ├── common_plugin.cpp
│ │ ├── common_plugin.h
│ │ ├── common_video_frame_processing_camera_manager.cpp
│ │ ├── common_video_frame_processing_camera_manager.h
│ │ ├── compressed_audio_packet.h
│ │ ├── compressed_media_packet.h
│ │ ├── compressed_video_packet.h
│ │ ├── consuming_camera_manager.h
│ │ ├── data_packet.h
│ │ ├── events_metadata_packet.h
│ │ ├── iterable_metadata_packet.h
│ │ ├── media_context.h
│ │ ├── media_frame.h
│ │ ├── metadata_item.h
│ │ ├── metadata_packet.h
│ │ ├── objects_metadata_packet.h
│ │ ├── pixel_format.cpp
│ │ ├── pixel_format.h
│ │ ├── plugin.h
│ │ ├── uncompressed_video_frame.h
│ │ └── video_frame.h
│ ├── utils.cpp
│ └── utils.h
├── plugin.cpp
├── plugin.h
├── plugins
│ ├── plugin_api.h
│ ├── plugin_container_api.h
│ └── plugin_tools.h
└── stub_metadata_plugin_ini.h4 directories, 45 files
I feel the issue is location setup. please help me to get rid of this issue.
-
Mohamed,
Sorry, we don't really get what you're trying to achieve here.
Looks like camera_manager.cpp is taken from another SDK pack(Cross-platform - SDK: Camera) which should be used to create the new type of camera resources within the server and is quite isolated from the Metadata SDK.
I would recommend you work on both plugins independently.
-
Hello Mohamed,
As my colleague rightly mentioned there are several independent SDK for different purposes.
- Metadata SDK
- Video source SDK
- Storage SDK
You can read here in more detail https://support.networkoptix.com/hc/en-us/articles/202856206-Nx-Server-Plugin-SDK-C-
For your objective "to recive frames from network optix to plugin" the Metadata SDK should be used.
This SDK is supplied with source code of several example plugins:
- sample_analytics_plugin
- stub_analytics_plugin
located in samples folder.
The SDK contains as well the set of build_samples script files for several platforms for building example plugins right away.
You probably want just start one of these script files (depending on your platform) to get acquainted with compilation process.
Next, you probably want to look into the source code of theses plugins and try to play around with the code: make some changes, recompile etc.
And definitely you should read the SDK documentation, located in docs folder.
Please sign in to leave a comment.
Comments
4 comments