Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section


Column
width35%


Panel
borderColor#CCCCCC
bgColor#FFFFFF
titleBGColor#F0F0F0
borderStylesolid
titleНа странице:
Table of Contents



Column

General information



Ogólne informacje

Eksport jest opisany w proto-plikach The export is described in the proto files ExportService.proto and oraz Export.proto.

The following 6 methods are used for exportNastępujące z 6 metod mogą być użyte do celów eksportu:

  1. ListSessions - is used to get a list of all export operationsużywana w celu pozyskania listy wszystkich operacji eksportu.
  2. StartSession - to start a new export operationw celu rozpoczęcia nowej operacji eksportu.
  3. GetSessionState - to get the status of a specific operationw celu pozyskania statusu określonej operacji.
  4. StopSession - to stop the operationw celu zatrzymania operacji.
  5. DestroySession - to delete the operation along with the export resultsw celu usunięcia operacji wraz z wynikami eksportu.
  6. DownloadFile - to download the export results.

Export tasks are performed not by NativeBL, but by the export agent. Currently, it is impossible to create an export agent via NativeBL, only manually in the Client.

When at least one export agent is created, it can be used to perform operations. If there are several export agents and none of them is explicitly specified in the StartSession method, then the agent with index 1 will be used.

The export operation starts on the node where the camera is located. If the export is started for several cameras, then the first node is used. Note that it is not necessary to connect to each node - the tasks will be forwarded to them automatically.

Export results are generated on the local Axxon Next Server and can be passed by downloading the files using the DownloadFile method, which supports downloading from an arbitrary location in the file.

StartSession method

  1. w celu pobrania wyników eksportu.

Zadania eksportu nie są wykonywane przez NativeBL, lecz przez szablon eksportu. Obecnie nie jest możliwe utworzenie szablonu eksportu poprzez NativeBL; należy zrobić to ręcznie w Kliencie.

Gdy co najmniej jeden szablon eksportu zostanie utworzony, może on być używany w celu przeprowadzania operacji. Jeśli istnieje kilka szablonów eksportu, a żaden z nich nie jest określony w metodzie StartSession, szablon o indeksie 1 zostanie użyty.

Operacje eksportu rozpoczynają się na węźle, na którym kamera jest zlokalizowana. Jeśli eksport zostanie rozpoczęty dla kilku kamer, tylko pierwszy węzeł jest używany. Nie oznacza to, że nie jest wymagane połączenie do każdego węzła - zadanie zostanie przekazane automatycznie.

Wyniki eksportu są generowane na lokalnym Serwerze Axxon Next; mogą one być przekazanie przez pobranie pliku za pośrednictwem metody DownloadFile, która wspiera pobieranie z określonych lokalizacji.

Metoda StartSession

Metoda przekazuje opcje eksportu, które są opisane w The method passes the export options, which are described in the Options message.

Expand
titleClick to expand...


Code Block
message Options
{
    oneof mode
    {
        LiveMode live = 1;
        ArchiveMode archive = 2;
    }
    oneof output_type
    {
        SnapshotType snapshot = 3;
        StreamType stream = 4;
    }
    repeated CommonSetting settings = 5;
    // Maximum size of output file.
    // New file will be created on reaching this value.
    uint64 max_file_size = 6;
    string export_agent_access_point = 100;
}


where,gdzie:

  • oneof - implies the selection of one property that can be set in this operationimplikuje selekcję jednej właściwości, która może być wybrana w operacji.
  • export_agent_access_point - export agent id.ID szablonu eksportu.

Korzystając z kombinacji mode oraz Using the combination of mode and output_type, you can create 4 export types można utworzyć 4 typy eksportu:

  1. LiveMode + SnapshotType - export a frame from live videoeksportowanie stopklatki z wideo na żywo.
  2. LiveMode + StreamType - export a video clip from live videoeksportowanie klipu wideo z wideo na żywo.
  3. ArchiveMode + SnapshotType - export a frame from archiveeksportowanie klatki z archiwum.
  4. ArchiveMode + StreamType - export a video clip from archiveeksportowanie klipu wideo z archiwum.

The Messages LiveMode, ArchiveMode, SnapshotType and StreamType messages contain the parameters for this export type. The CommonSetting message is used to pass general settings for the export operation.oraz StreamType zawierają parametry dla tego typu eksportu. Message CommonSetting jest stosowana w celu przekazywania ogólnych ustawień do operacji eksportu.

Lista głównych parametrów eksportuThe list of main export parameters:

Expand
titleClick to expand...


Parameter
Parametr
Export type
Typ eksportu
DescriptionMaximum file size (see
Opis
Options max_file_size
Export a video clip
Eksportowanie klipu wideoMaksymalny rozmiar pliku (zobacz:
Konfigurowanie opcji eksportu).
Options export_agent_access_point
All
WszystkieID szablonu eksportu
Export agent id
.
StreamType format
Export a video clipOutput
Eksportowanie klipu wideoFormat pliku wyjściowego
file format
.
SnapshotType format
Export a frame
Eksportowanie klatkiFormat pliku wyjściowego
Output file format
.
ArchiveMode/LiveMode Source origin
All
Wszystkie
Video source (see Get video cameras list and their parameters using gRPC API methods
Źródło wideo (zobacz: Pozyskaj listę kamer oraz ich parametrów za pomocą metod gRPC API (DomainService)).
ArchiveMode Source storages
Export from archive
Eksportowanie z archiwumArchiwum (zobacz: Pozyskaj listę kamer oraz ich parametrów za pomocą metod gRPC API
Archive (see Get video cameras list and their parameters using gRPC API methods
(DomainService)).
ArchiveMode start_timestamp
Export from archiveTimestamp of the export interval start
Eksportowanie z archiwumZnacznik czasu startu eksportowanego interwału czasowego.
ArchiveMode end_timestamp
Export from archive
Eksportowanie z archiwumZnacznik czasu końca eksportowanego interwału czasowego
Timestamp of the export interval end
.
CommonSetting comment
All
Wszystkie
Comment.
Komentarz
CommonSetting timestamp_format
All
Wszystkie
Timestamp format
Format stopklatki.
CommonSetting text_place
AllPlace for comment
WszystkieMiejsce na komentarz.
CommonSetting text_color
All
WszystkieKolor tekstu komentarza
Comment text color
.
CommonSetting burn_subtitle
All
Wszystkie
Text overlay
Wyświetlanie tekstu (yes
or
lub no).
CommonSetting apply_mask
All
Wszystkie
Mask overlay
Wyświetlanie maski (yes
or
lub no).
StreamSetting video_quality
Export a video clip
Eksportowanie klipu wideoJakość strumienia wideo
Video stream quality
.
StreamSetting video_codec
Export a video clip
Eksportowanie klipu wideoKodek wideo
Video codec
.
StreamSetting audio_quality
Export a video clipAudio stream quality
Eksportowanie klipu wideoJakość strumienia audio.
StreamSetting audio_codec
Export a video clip
Eksportowanie klipu wideoKodek audio
Audio codec
.
StreamSetting frame_frequency
Export a video clipFrame frequency
Eksportowanie klipu wideoCzęstotliwość klatek.
SnapshotSetting pdf_layout
Export a framePDF file orientation
Eksportowanie klatkiUkład strony PDF.
SnapshotSetting snapshot_place
Export a frameFrame location in the PDF file
Eksportowanie klatkiLokalizacja klatki w pliku PDF.
SnapshotSetting comment_place
Export a frameComment location in the PDF file
Eksportowanie klatkiLokalizacja komentarza w pliku PDF.
SnapshotSetting timestamp_place
Export a frameTimestamp location in the PDF file
Eksportowanie klatkiLokalizacja znacznika czasu w pliku PDF.
SourceSetting crop_area
All
Wszystkie
Export area (see
Obszar eksportu (zobacz: Konfigurowanie obszaru eksportu oraz masek).
SourceSetting mask_space
All
Wszystkie
Mask
Maska.
SourceSetting text_place
All
WszystkieMiejsce na komentarz
Place for comment
.
SourceSetting text_color
AllComment text color.

For each export type, there are timeouts after which the operation is stopped if the GetSessionState method was not executed.

The timeout is counted from the moment the export operation was started and/or from the moment the GetSessionState method was last executed.

The timeout for exporting a video clip from live video is 5 minutes, for all other export types - 30 minutes.

The id of the export operation will be received as the response to this method.

ListSessions method

The SessionInfo message for each export operation will be received as the response to this method. If one response does not fit all the operations, then there will also be the next_page_token for the next page.

The SessionInfo message contains:

WszystkieKolor tekstu komentarza.


Dla każdego typu eksportu istnieje okres oczekiwania, po upłynięciu którego operacja jest zatrzymywana, o ile nie została wykonana metoda GetSessionState.

Okres oczekiwania jest wyliczany począwszy od chwili rozpoczęcia operacji i/lub od chwili, w której ostatnio użyta została metoda GetSessionState.

Okres oczekiwania dla eksportowania klipów wideo to 5 minut; dla wszystkich typów eksportu - 30 minut.

ID operacji eksportu będzie otrzymane jako odpowiedź do tej metody.

Metoda ListSessions

Message SessionInfo dla każdej operacji eksportu będzie otrzymywana jako odpowiedź do tej metody. Jeśli odpowiedź nie zawiera wszystkich operacji, będzie zawarty next_page_token do przejścia do następnej strony.

Message SessionInfo zawiera:

  1. ID operacji eksportu oraz jej właściwości.
  2. Status eksportu

  3. id of the export operation and its properties.
  4. export status.

    Code Block
    enum EState
    {
        S_NONE      = 0;
        S_RUNNING   = 1;
        S_COMPLETED = 2;
        S_REMOVED   = 3;
    }

    where the gdzie status S_COMPLETED status does not guarantee that the export was successful.nie oznacza, że eksport zakończył się powodzeniem.

  5. Jeśli istnieją wyniki operacji eksportu, zostanie wysłana wiadomość ResultIf there are export operation results, then a Result message will be received.

    Code Block
    message Result
    {
        message File
        {
            string path = 1;
            uint64 size = 2;
            string min_timestamp = 3;
            string max_timestamp = 4;
            string mime_type = 5;
        }
        repeated File files = 1;
        bool succeeded = 2;
    }

    where,gdzie:

    1. succeeded - indicates that the export was successfulmówi, że operacja eksportu została zakończona powodzeniem;

    2. message File - describes the list of files ready for download, including the conditional path to be used in the DownloadFile method and size.

After the export operation status changes to S_COMPLETED, you have 1 hour to download the files from the Server. Note that the timeout is reset to zero after the GetSessionState and DownloadFile methods are executed.

If the timeout is exceeded, the files will be deleted from the Server.

GetSessionState method

The id of the export operation is passed in the method.

Its EState status will be received in response to this method.

If there are export operation results, then a Result message will be received.

StopSession method

The id of the export operation is passed in the method.

Its updated EState status will be received in response to this method.

DownloadFile method

The method can be used only after the export operation is completed.

The following data is passed in the method:

    1. określa listę plików gotowych do pobrania, wliczając w to warunkową ścieżkę do użytku w metodzie DownloadFile, oraz ich wielkość.

Po zmianie statusu operacji eksportu na S_COMPLETED, limit czasu na pobranie plików z Serwera to 1 godzina. Timeout jest resetowany do zera po wykonaniu jednej z metod: GetSessionState lub DownloadFile.

Jeśli timeout zostanie przekroczony, pliki zostaną usunięte z Serwera.

Metoda GetSessionState

ID operacji eksportu jest przekazywane przy tej metodzie.

Status EState zostanie przekazany w odpowiedzi na tę metodę.

Jeśli istnieją wyniki operacji eksportu, wiadomosć Result zostanie wysłana.

Metoda StopSession

ID operacji eksportu jest przekazywane przy tej metodzie.

Zaktualizowany status EState zostanie przekazany w odpowiedzi na tę metodę.

Metoda DownloadFile

Metoda ta może zostać użyta tylko w sytuacji, gdy operacja eksportu została już wykonana.

Następujące dane są przekazywane w tej metodzie:

  1. ID operacji eksportu;
  2. ścieżka do pliku
  3. export operation id;
  4. path to the file;
  5. chunk_size_kb - data block sizewielkość bloku danych;
  6. start_from_chunk_index - serial number of the data block.

In response to this method, FileChunk messages will be received with file data blocks, which will be coming until the entire file is downloaded.

DestroySession method

  1. numer seryjny bloku danych.

W odniesieniu do tej metody wiadomości FileChunk zostaną przesłane wraz z blokami danych plików, które będą przesyłane, aż cały plik zostanie pobrany.

Metoda DestroySession

ID operacji eksportu jest przekazywane w tej metodzieThe id of the export operation is passed in the method