Detailed Description
The ArchiveExporter Service handles listing files from a remote archive device connected to an Encoder and allows the files to be downloaded.
This allows the footage to be exported at its original recorded quality. The bandwidth at which the files are downloaded can be set.
The ArchiveExporter is both a service (can be used by only 1 application at a time) and a stream (data provider). This interface extends the Stream interface and includes all methods and properties from that interface. The StreamType returned by the Type property of Stream is always ST_ArchiveDownloadService.
Availability
Available in version 6.0 of Decoder SDK. Requires a server version greater than 6.0
#include <ArchiveExporterService.h>
Public Member Functions | |
| DB_EDGEVIS_SDK void | SetListener (IArchiveExportListener *listener) |
| Set the listener for the Archive Export service. More... | |
| DB_EDGEVIS_SDK OpResult | QueryFiles (ArchiveFiles &result, const int64_t start, const int64_t end) |
| Queries the remote archive to get a list of files that are available for download. More... | |
| DB_EDGEVIS_SDK OpResult | QueryFiles (ArchiveFiles &result, const int64_t start, const int64_t end, const ArchiveFileSource source, const int32_t channel) |
| Queries the remote archive to get a list of files that are available for download. More... | |
| DB_EDGEVIS_SDK OpResult | ExportFile (const std::wstring &outFilePath, const ArchiveFile &file, const std::wstring &password=L"") |
| Starts a file read operation. More... | |
| DB_EDGEVIS_SDK void | AbortExport () |
| Aborts the current archive download process. More... | |
| DB_EDGEVIS_SDK int32_t | GetBandwidth () |
| Get the measured bandwidth usage of the archive file download. More... | |
| DB_EDGEVIS_SDK OpResult | SetTargetBandwidth (int32_t bandwidth) |
| Sets the target file download bandwidth. More... | |
| DB_EDGEVIS_SDK int32_t | GetTargetBandwidth () |
| Gets the target file download bandwidth. More... | |
| DB_EDGEVIS_SDK OpResult | SetTargetBandwidthPercentage (int32_t bandwidthPercentage) |
| Sets the target file download bandwidth percentage. More... | |
| DB_EDGEVIS_SDK int32_t | GetTargetBandwidthPercentage () |
| Gets the target file download bandwidth percentage. More... | |
| virtual DB_EDGEVIS_SDK OpResult | Start () |
| Starts the archive service. More... | |
| virtual DB_EDGEVIS_SDK OpResult | Stop () |
| Stops the archive service. More... | |
Public Member Functions inherited from EdgeVisDecoderSDK::Stream | |
| DB_EDGEVIS_SDK StreamType | Type () const |
| Gets the stream type. More... | |
| DB_EDGEVIS_SDK std::wstring | Name () const |
| Gets the stream's name. More... | |
| virtual DB_EDGEVIS_SDK OpResult | SetTransport (TransportType trans) |
| This is underlying transport type. More... | |
| virtual DB_EDGEVIS_SDK TransportType | GetTransport () |
| Gets the stream's transport. More... | |
| DB_EDGEVIS_SDK Encoder | GetEncoder () const |
| Gets the Encoder object that the Stream is on. More... | |
| DB_EDGEVIS_SDK OpResult | Open () |
| Opens the stream. More... | |
| DB_EDGEVIS_SDK void | Close () |
| Closes this stream. More... | |
| virtual DB_EDGEVIS_SDK bool | IsConnected () const |
| Determines if the stream is currently connected (in use). More... | |
| DB_EDGEVIS_SDK void | RegisterListener (IStreamListener *listener) |
| Registers the specified listener to be notified when stream data is received. More... | |
| DB_EDGEVIS_SDK void | UnregisterListener (IStreamListener *listener) |
| Removes the specified listener from the set of listeners to be notified about incoming stream data. More... | |
| DB_EDGEVIS_SDK int64_t | GetTotalBytesSent () |
| Returns the current total number of bytes sent on this stream. More... | |
| DB_EDGEVIS_SDK int64_t | GetTotalBytesReceived () |
| Returns the current total number of bytes received on this stream. More... | |
| DB_EDGEVIS_SDK void | ResetDataUsageStats () |
| Resets the count of the total number of bytes sent and received for this stream. | |
| DB_EDGEVIS_SDK int64_t | GetStreamUseDuration () const |
| Get the duration in milliseconds that the stream has been open. More... | |
| DB_EDGEVIS_SDK int64_t | GetLastStreamUseDuration () const |
| Get the duration in milliseconds that the stream was open on last use. More... | |
| DB_EDGEVIS_SDK void | SetEnableAnalyticsSync (bool enable) |
| Enables or disables synchronization of analytics metadata with audio and video Enabled by default, to disable set to false. More... | |
| DB_EDGEVIS_SDK bool | GetEnableAnalyticsSync () const |
| Returns true if Analytics Sync is enabled. More... | |
Public Member Functions inherited from EdgeVisDecoderSDK::Service | |
| DB_EDGEVIS_SDK std::wstring | ServiceName () const |
| Gets the name of the Service. More... | |
| void | UpdateState (ServiceState state, std::wstring user) |
| Updates the service's state. More... | |
| DB_EDGEVIS_SDK bool | Started () const |
| Determines whether the service has been started or not. More... | |
| DB_EDGEVIS_SDK int32_t | KeepAliveInterval () const |
| Retrieves the keep alive interval for the service. More... | |
| DB_EDGEVIS_SDK int32_t | IdleTimeoutInterval () const |
| Retrieves the idle timeout interval for the service. More... | |
| DB_EDGEVIS_SDK void | SetIdleTimeoutInterval (int32_t idleTimeout) |
| Sets the idle timeout interval for the service. More... | |
| DB_EDGEVIS_SDK bool | KeepAliveTaskRunning () const |
| Determines if the Keep alive task is currently running. More... | |
| DB_EDGEVIS_SDK bool | IdleTimeoutRunning () const |
| Determines if the idle timeout is currently running. More... | |
| DB_EDGEVIS_SDK void | RegisterListener (IServiceListener *listener) |
| Registers the specified listener to be notified when the service state changes. More... | |
| DB_EDGEVIS_SDK void | UnregisterListener (IServiceListener *listener) |
| Removes the specified listener from the set of listeners to be notified about service state changes. More... | |
| DB_EDGEVIS_SDK int64_t | GetServiceUptime () const |
| Retrieve the number of milliseconds since the service was started. More... | |
Member Function Documentation
| DB_EDGEVIS_SDK void EdgeVisDecoderSDK::ArchiveExporterService::SetListener | ( | IArchiveExportListener * | listener | ) |
Set the listener for the Archive Export service.
Class must implement the IArchiveExportListener
| DB_EDGEVIS_SDK OpResult EdgeVisDecoderSDK::ArchiveExporterService::QueryFiles | ( | ArchiveFiles & | result, |
| const int64_t | start, | ||
| const int64_t | end | ||
| ) |
Queries the remote archive to get a list of files that are available for download.
Note that the time window for the file listing is not constrained, but queries for durations longer than a few hours may take a long time to return the result.
- Parameters
-
result Pointer to a list of ArchiveFiles available to download start Reference to a string of metadata associated with the search results. start The start time to query for files from, in ms since epoch. end The end time to query for files to, in ms since epoch.
- Returns
- An OpResult of the query
This query will interrogate the remote archive for available files between a Start time and End time on the specified channel. It will populate the ArchiveFiles with the results.
Example
TBD
TBD
| DB_EDGEVIS_SDK OpResult EdgeVisDecoderSDK::ArchiveExporterService::QueryFiles | ( | ArchiveFiles & | result, |
| const int64_t | start, | ||
| const int64_t | end, | ||
| const ArchiveFileSource | source, | ||
| const int32_t | channel | ||
| ) |
Queries the remote archive to get a list of files that are available for download.
Note that the time window for the file listing is not constrained, but queries for durations longer than a few hours may take a long time to return the result.
- Parameters
-
result Pointer to a list of ArchiveFiles available to download start Reference to a string of metadata associated with the search results. start The start time to query for files from, in ms since epoch. end The end time to query for files to, in ms since epoch. source The sources to include in the query. Only AFS_EDGE is supported at this time. channel The encoder channel to query for files from. If -1, all channels will be included.
- Returns
- An OpResult of the query
This query will interrogate the remote archive for available files between a Start time and End time on the specified channel. It will populate the ArchiveFiles with the results.
Example
TBD
TBD
| DB_EDGEVIS_SDK OpResult EdgeVisDecoderSDK::ArchiveExporterService::ExportFile | ( | const std::wstring & | outFilePath, |
| const ArchiveFile & | file, | ||
| const std::wstring & | password = L"" |
||
| ) |
Starts a file read operation.
The file will begin downloading and being written to disk.
- Parameters
-
outFilePath The path to the folder where the file will be written. This should not include the file name. Passing an empty string for outPath will cause the file to be saved in the current directory. file The ArchiveFile representing the file to be downloaded. password The archive password to use. An empty string if no password is needed.
- Returns
- An OpResult of the query
This will start downloading a file from the remote archive and the contents will be written to disk. The data received is also passed to the client. During the export data chunks may go missing due to not being received properly. These will be automatically re-requested but the data may arrive out of order. It is best to wait until the export has completed before starting any transcode operation. If an export is currently in progress it will be stopped first.
Example
TBD
TBD
| DB_EDGEVIS_SDK void EdgeVisDecoderSDK::ArchiveExporterService::AbortExport | ( | ) |
Aborts the current archive download process.
This will abort an export this is currently in progress
| DB_EDGEVIS_SDK int32_t EdgeVisDecoderSDK::ArchiveExporterService::GetBandwidth | ( | ) |
Get the measured bandwidth usage of the archive file download.
- Returns
- The measured bandwidth in bits per second.
| DB_EDGEVIS_SDK OpResult EdgeVisDecoderSDK::ArchiveExporterService::SetTargetBandwidth | ( | int32_t | bandwidth | ) |
Sets the target file download bandwidth.
- Parameters
-
bandwidth The target file download bandwidth in bits per second.
- Returns
- An OpResult of the request
Sets the target maximum bandwidth in bits per second that a file download will use. This is limited by the current configured maximum and minimum stream bandwidth values, which can be set in EncoderProfile. The default is to use the maximum stream bandwidth. This can be changed while a download is in progress.
| DB_EDGEVIS_SDK int32_t EdgeVisDecoderSDK::ArchiveExporterService::GetTargetBandwidth | ( | ) |
Gets the target file download bandwidth.
- Returns
- The target file download bandwidth in bits per second.
Gets the target maximum bandwidth in bits per second that a file download will use. This is limited to the current configured maximum stream bandwidth, which can be set in EncoderProfile.
| DB_EDGEVIS_SDK OpResult EdgeVisDecoderSDK::ArchiveExporterService::SetTargetBandwidthPercentage | ( | int32_t | bandwidthPercentage | ) |
Sets the target file download bandwidth percentage.
- Parameters
-
bandwidthPercentage The target file download bandwidth percentage.
- Returns
- An OpResult of the request
Sets the target bandwidth percentage that a file download will use. This is limited by the current configured maximum and minimum stream bandwidth values, which can be set in EncoderProfile. This can be changed while a download is in progress.
| DB_EDGEVIS_SDK int32_t EdgeVisDecoderSDK::ArchiveExporterService::GetTargetBandwidthPercentage | ( | ) |
Gets the target file download bandwidth percentage.
- Returns
- The target file download bandwidth percentage.
Gets the target bandwidth percentage that a file download will use.
|
virtual |
Starts the archive service.
- Returns
- An OpResult of the query
This opens the stream from the Encoder. The stream must be opened before any other commands are issued If the stream is already open then any calls to this method will be ignored.
Example
TBD
TBD
Implements EdgeVisDecoderSDK::Service.
|
virtual |
Stops the archive service.
- Returns
- An OpResult of the query
This closes the stream from the Encoder releasing it for other users to access it.
Implements EdgeVisDecoderSDK::Service.
The documentation for this class was generated from the following file:
- SDKs/EdgeVisDecoderSDK/ArchiveExporterService.h

Public Member Functions inherited from