Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GPU memory leak and other minor enhancements #7

Merged
merged 6 commits into from
Feb 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions ml/gst/gst_data.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import time
import collections
from enum import Enum
from typing import Any
from dataclasses import dataclass

import numpy as np
Expand All @@ -10,14 +11,18 @@ class MESSAGE_TYPE(Enum):
ERROR = 1
FRAME = 2

@dataclass
class StreamInfo:
frame_count: int = 0
rtcp_ntp_time_epoch_ns: int = -1
rtcp_buffer_timestamp: int = -1

@dataclass
class FRAME:
data: np.ndarray
timestamp: float
height: int
width: int
channels: int
duration: int
data: np.ndarray = None
timestamp: float = -1
pts: int = -1
duration: int = -1

@dataclass
class RTSP_CONFIG:
Expand Down
Loading