Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ControlRequestClient ¶
type ControlRequestClient interface { /* InstallReferenceToManager used by a VideoSourceOperator to add a reference of itself into the client @param newManager VideoSourceOperator - reference to the manager */ InstallReferenceToManager(newManager VideoSourceOperator) /* GetVideoSourceInfo query control for a video source's information @param ctxt context.Context - execution context @param sourceName string - video source name @returns video source info */ GetVideoSourceInfo(ctxt context.Context, sourceName string) (common.VideoSource, error) /* ListActiveRecordingsOfSource list all active video recording sessions of a video source @param ctxt context.Context - execution context @param sourceID string - the video source ID @returns all active recording sessions of a video source */ ListActiveRecordingsOfSource(ctxt context.Context, sourceID string) ([]common.Recording, error) /* StopAllAssociatedRecordings request all recording associated this this source is stopped @param ctxt context.Context - execution context @param sourceID string - video source ID */ StopAllAssociatedRecordings(ctxt context.Context, sourceID string) error }
ControlRequestClient request-response client for edge to call control
func NewControlRequestClient ¶
func NewControlRequestClient( ctxt context.Context, clientName string, controlRRTargetID string, coreClient goutils.RequestResponseClient, requestTimeout time.Duration, ) (ControlRequestClient, error)
NewControlRequestClient define a new edge to control request-response client
@param ctxt context.Context - execution context @param clientName string - name of this client instance @param controlRRTargetID string - control's target ID for request-response targeting @param coreClient goutils.RequestResponseClient - core request-response client @param requestTimeout time.Duration - request-response request timeout @returns new client
type VideoSourceOperator ¶
type VideoSourceOperator interface { /* Ready check whether the DB connection is working @param ctxt context.Context - execution context */ Ready(ctxt context.Context) error /* Stop stop any support background tasks which were started @param ctxt context.Context - execution context */ Stop(ctxt context.Context) error /* RecordKnownVideoSource create record for a known video source @param ctxt context.Context - execution context @param id string - source entry ID @param name string - source name @param segmentLen int - target segment length in secs @param playlistURI *string - video source playlist URI @param description *string - optionally, source description @param streaming int - whether the video source is currently streaming */ RecordKnownVideoSource( ctxt context.Context, id, name string, segmentLen int, playlistURI, description *string, streaming int, ) error /* ChangeVideoSourceStreamState change the streaming state for a video source @param ctxt context.Context - execution context @param id string - source ID @param streaming int - new streaming state */ ChangeVideoSourceStreamState(ctxt context.Context, id string, streaming int) error /* StartRecording process new recording request @param ctxt context.Context - execution context @param newRecording common.Recording - new recording session to be started */ StartRecording(ctxt context.Context, newRecording common.Recording) error /* StopRecording process recording stop request @param ctxt context.Context - execution context @param recordingID string - recording session ID @param endTime time.Time */ StopRecording(ctxt context.Context, recordingID string, endTime time.Time) error /* NewSegmentFromSource process new video segment produced by a video source @param ctxt context.Context - execution context @param segment common.VideoSegmentWithData - the new video segment */ NewSegmentFromSource(ctxt context.Context, segment common.VideoSegmentWithData) error /* SyncActiveRecordingState sync the local recording states with that of system control node @param timestamp time.Time - current timestamp */ SyncActiveRecordingState(timestamp time.Time) error /* CacheEntryCount return the number of cached entries @param ctxt context.Context - execution context @returns the number of cached entries */ CacheEntryCount(ctxt context.Context) (int, error) }
VideoSourceOperator video source operations manager
func NewManager ¶
func NewManager( parentCtxt context.Context, params VideoSourceOperatorConfig, rrClient ControlRequestClient, metrics goutils.MetricsCollector, tpMetrics goutils.TaskProcessorMetricHelper, ) (VideoSourceOperator, error)
NewManager define a new video source operator
@param parentCtxt context.Context - parent execution context @param params VideoSourceOperatorConfig - operator configuration @param params rrClient ControlRequestClient - request-response client for edge to call control @param metrics goutils.MetricsCollector - metrics framework client @return new operator
type VideoSourceOperatorConfig ¶
type VideoSourceOperatorConfig struct { // Self a reference to the video source being managed Self common.VideoSource // SelfReqRespTargetID the request-response target ID to send inbound request to this operator SelfReqRespTargetID string // DBConns DB connection manager DBConns db.ConnectionManager // VideoCache video segment cache VideoCache utils.VideoSegmentCache // BroadcastClient message broadcast client BroadcastClient utils.Broadcaster // RecordingSegmentForwarder client for forwarding segments associated with recording sessions RecordingSegmentForwarder forwarder.RecordingSegmentForwarder // LiveStreamSegmentForwarder client for forwarding segments associated with live stream LiveStreamSegmentForwarder forwarder.LiveStreamSegmentForwarder // StatusReportInterval status report interval StatusReportInterval time.Duration }
VideoSourceOperatorConfig video source operations manager configuration
Click to show internal directories.
Click to hide internal directories.