feat: update max_streams
Some checks failed
Build Worker Base and Application Images / deploy-stack (push) Blocked by required conditions
Build Worker Base and Application Images / check-base-changes (push) Successful in 7s
Build Worker Base and Application Images / build-base (push) Has been skipped
Build Worker Base and Application Images / build-docker (push) Has been cancelled
Some checks failed
Build Worker Base and Application Images / deploy-stack (push) Blocked by required conditions
Build Worker Base and Application Images / check-base-changes (push) Successful in 7s
Build Worker Base and Application Images / build-base (push) Has been skipped
Build Worker Base and Application Images / build-docker (push) Has been cancelled
This commit is contained in:
parent
b8de5e191e
commit
f467cb005d
4 changed files with 18 additions and 5 deletions
|
@ -4,7 +4,7 @@ Provides modular frame readers, buffers, and stream management.
|
|||
"""
|
||||
from .readers import RTSPReader, HTTPSnapshotReader
|
||||
from .buffers import FrameBuffer, CacheBuffer, shared_frame_buffer, shared_cache_buffer
|
||||
from .manager import StreamManager, StreamConfig, SubscriptionInfo, shared_stream_manager
|
||||
from .manager import StreamManager, StreamConfig, SubscriptionInfo, shared_stream_manager, initialize_stream_manager
|
||||
|
||||
__all__ = [
|
||||
# Readers
|
||||
|
@ -21,5 +21,6 @@ __all__ = [
|
|||
'StreamManager',
|
||||
'StreamConfig',
|
||||
'SubscriptionInfo',
|
||||
'shared_stream_manager'
|
||||
'shared_stream_manager',
|
||||
'initialize_stream_manager'
|
||||
]
|
|
@ -458,4 +458,11 @@ class StreamManager:
|
|||
|
||||
|
||||
# Global shared instance for application use
|
||||
shared_stream_manager = StreamManager(max_streams=10)
|
||||
# Will be initialized with config value in app.py
|
||||
shared_stream_manager = None
|
||||
|
||||
def initialize_stream_manager(max_streams: int = 10):
|
||||
"""Initialize the global stream manager with config value."""
|
||||
global shared_stream_manager
|
||||
shared_stream_manager = StreamManager(max_streams=max_streams)
|
||||
return shared_stream_manager
|
Loading…
Add table
Add a link
Reference in a new issue