Server
 
로딩중...
검색중...
일치하는것 없음
metadata_parser.hpp 파일 참조

메타데이터 파싱 헤더 파일 더 자세히 ...

#include <vector>
#include <string>
#include <mutex>
#include <cstring>
#include <atomic>
#include <chrono>
#include <queue>
#include "json.hpp"
metadata_parser.hpp에 대한 include 의존 그래프
이 그래프는 이 파일을 직/간접적으로 include 하는 파일들을 보여줍니다.:

이 파일의 소스 코드 페이지로 가기

클래스

struct  ServerBBox
 서버에서 사용하는 BBox(경계 상자) 정보 구조체 더 자세히 ...
 
struct  TimestampedBBox
 BBox와 타임스탬프를 함께 저장하는 구조체 (버퍼용) 더 자세히 ...
 

타입정의

typedef struct ssl_st SSL
 

함수

std::vector< ServerBBoxparseServerBBoxes (const nlohmann::json &bboxArray)
 JSON 배열에서 ServerBBox 벡터로 변환합니다.
 
void start_metadata_parser ()
 메타데이터 파서를 시작합니다.
 
void stop_metadata_parser ()
 메타데이터 파서를 중지합니다.
 
void parse_metadata ()
 RTSP 스트림에서 메타데이터를 파싱하여 BBox 정보를 추출합니다. 파싱된 BBox는 latest_bboxes와 버퍼에 저장됩니다.
 
void update_bbox_buffer (const std::vector< ServerBBox > &new_bboxes)
 새로운 BBox 데이터를 타임스탬프와 함께 버퍼에 추가하고 오래된 데이터를 정리합니다.
 
void clear_bbox_buffer ()
 BBox 버퍼를 완전히 비웁니다.
 
bool send_bboxes_to_client (SSL *ssl)
 버퍼에서 BBox 데이터를 꺼내 클라이언트(SSL)로 전송합니다.
 

변수

std::atomic< int > bbox_buffer_delay_ms
 BBox 버퍼 지연 시간 (ms)
 
std::atomic< int > bbox_send_interval_ms
 BBox 전송 주기 (ms)
 
std::queue< TimestampedBBoxbbox_buffer
 BBox 버퍼 (타임스탬프 포함)
 
std::mutex bbox_buffer_mutex
 bbox_buffer 보호용 뮤텍스
 
std::vector< ServerBBoxlatest_bboxes
 최근에 파싱된 BBox 목록
 
std::mutex bbox_mutex
 latest_bboxes 보호용 뮤텍스
 

상세한 설명

메타데이터 파싱 헤더 파일

이 파일은 RTSP 스트림에서 메타데이터를 파싱하고 BBox 정보를 관리하는 함수와 구조체의 선언을 포함합니다.

함수 Documentation

◆ parseServerBBoxes()

std::vector< ServerBBox > parseServerBBoxes ( const nlohmann::json bboxArray)
inline

JSON 배열에서 ServerBBox 벡터로 변환합니다.

매개변수
bboxArrayBBox 정보가 담긴 nlohmann::json 배열
반환값
ServerBBox 구조체 벡터

◆ send_bboxes_to_client()

bool send_bboxes_to_client ( SSL *  ssl)

버퍼에서 BBox 데이터를 꺼내 클라이언트(SSL)로 전송합니다.

매개변수
sslOpenSSL SSL 포인터
반환값
전송 성공 시 true, 실패 시 false

◆ update_bbox_buffer()

void update_bbox_buffer ( const std::vector< ServerBBox > &  new_bboxes)

새로운 BBox 데이터를 타임스탬프와 함께 버퍼에 추가하고 오래된 데이터를 정리합니다.

매개변수
new_bboxes새로 파싱된 BBox 벡터

변수 Documentation

◆ bbox_buffer

std::queue<TimestampedBBox> bbox_buffer
extern

BBox 버퍼 (타임스탬프 포함)

타임스탬프와 함께 저장된 BBox 데이터를 관리하는 큐입니다.

◆ bbox_buffer_mutex

std::mutex bbox_buffer_mutex
extern

bbox_buffer 보호용 뮤텍스

BBox 버퍼를 보호하기 위한 뮤텍스입니다.

◆ bbox_mutex

std::mutex bbox_mutex
extern

latest_bboxes 보호용 뮤텍스

최근에 파싱된 BBox 목록을 보호하기 위한 뮤텍스입니다.

◆ latest_bboxes

std::vector<ServerBBox> latest_bboxes
extern

최근에 파싱된 BBox 목록

최근에 파싱된 BBox 목록