ONVIF device server - Important classes
Make sure you also check ONVIF device server's companion project: Onvif Device Reference Design |
ONVIF device server |
---|
Introduction |
User Guide |
Getting Started |
Examples |
Evaluating |
Contact Us |
Server
This is the class that allows to initiate the server and set the necessary attributes and interactions with the implementation or use of the library. Using this class you can :
- Set the network handler class.
- Enable and disable the autosave function.
- Set the device security, network, and media capabilities.
- Load and save the media configurations.
- Set the default media profiles.
- Set the system manager.
- Set the device information, for example, the firmware version.
DataSourceDecorator
This class is used by the server to manage the files, meaning, how they are written (encoded or not), and read. This class should be implemented, overriding the next two methods:
- readData:Reads the data of a file, decoding it if it was decoded.
- writeData(data):Encodes and write the data to a file.
iMediaClient
This class is used by the server to generate and manage the streams, this class should be implemented and has 4 methods that should be implemented:
- getVideoEncoders: Returns the available video encoders as configured by the programmer.
- getVideoSources: Returns the available video sources as configured by the programmer
- update:Updates a video stream, this function is called each time a video encoder, source or profile is updated.
- streamDelete:Removes a video stream, this function is called when a profile is removed.
iSystem
This interface is used by the server to reboot and get the date and time of the device, it has two methods that should be implemented:
- reboot: Reboots the system.
- getSystemDateAndTime: gets the date and time of the server.
MediaServiceCapabilities and DeviceCapabilities
These two classes hold the available capabilities of the server, that contain all the necessary methods to get and set said capabilities, allowing the programmer to enable and disable them at will. This is not to say that all capabilities are supported by the library right now.
iNetwork
This interface is used by the server to manage the network interfaces, it contains 2 methods that should be implemented:
- getNetworkInterfaces: Gets all the available interfaces that the server can use.
- setNetworkInterface: Modifies the configuration of a network interface, normally a configuration file.
VideoEncoder
This class represents a physical video encoder, this class is used, with the VideoEncoderSettings class, to set the available encoders that the server can use, it has the following attributes that you can set:
- Encoding interval
- Birate limit
- gov Lenght
- Profile
- Width
- Height
- Quality
- FrameRate
- Fixed framerate
VideoSource
This class represents a physical video sources, this class is used, with the VideoSourceSettings class, to set the available sources that the server can use, it has the following attributes that you can set:
- Name
- Framerate
- width
- height
- x
- y
VideoSourceSettings
This class holds the maximum and minimum settings for the video sources, these maximums and minimums are held in a map that contains their names as keys.
VideoEncoderSettings
This class holds two video encoders that set the max and min settings of a video encoder, it also holds a list of resolutions width x height and supported profiles, for the different types of encoders.
Example sequence diagram
The following diagram shows an example flow that illustrates the interaction between the client application (Player), ONVIF Device Server (the library), and User Application implementing the iMediaClient interface.