메타데이터 파싱 헤더 파일 더 자세히 ...
#include <vector>
#include <string>
#include <mutex>
#include <cstring>
#include <atomic>
#include <chrono>
#include <queue>
#include "json.hpp"
클래스 | |
struct | ServerBBox |
서버에서 사용하는 BBox(경계 상자) 정보 구조체 더 자세히 ... | |
struct | TimestampedBBox |
BBox와 타임스탬프를 함께 저장하는 구조체 (버퍼용) 더 자세히 ... | |
타입정의 | |
typedef struct ssl_st | SSL |
함수 | |
std::vector< ServerBBox > | parseServerBBoxes (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< TimestampedBBox > | bbox_buffer |
BBox 버퍼 (타임스탬프 포함) | |
std::mutex | bbox_buffer_mutex |
bbox_buffer 보호용 뮤텍스 | |
std::vector< ServerBBox > | latest_bboxes |
최근에 파싱된 BBox 목록 | |
std::mutex | bbox_mutex |
latest_bboxes 보호용 뮤텍스 | |
메타데이터 파싱 헤더 파일
이 파일은 RTSP 스트림에서 메타데이터를 파싱하고 BBox 정보를 관리하는 함수와 구조체의 선언을 포함합니다.
|
inline |
bool send_bboxes_to_client | ( | SSL * | ssl | ) |
버퍼에서 BBox 데이터를 꺼내 클라이언트(SSL)로 전송합니다.
ssl | OpenSSL SSL 포인터 |
void update_bbox_buffer | ( | const std::vector< ServerBBox > & | new_bboxes | ) |
새로운 BBox 데이터를 타임스탬프와 함께 버퍼에 추가하고 오래된 데이터를 정리합니다.
new_bboxes | 새로 파싱된 BBox 벡터 |
|
extern |
BBox 버퍼 (타임스탬프 포함)
타임스탬프와 함께 저장된 BBox 데이터를 관리하는 큐입니다.
|
extern |
bbox_buffer 보호용 뮤텍스
BBox 버퍼를 보호하기 위한 뮤텍스입니다.
|
extern |
latest_bboxes 보호용 뮤텍스
최근에 파싱된 BBox 목록을 보호하기 위한 뮤텍스입니다.
|
extern |
최근에 파싱된 BBox 목록
최근에 파싱된 BBox 목록