driver

package
v0.0.0-...-f6902ab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2023 License: Apache-2.0 Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Events = struct {
	/** Error Response */
	OnError int32
	/** New subscription Buffer Notification */
	OnAvailableImage int32
	/** New publication Buffer Notification */
	OnPublicationReady int32
	/** Operation Succeeded */
	OnOperationSuccess int32
	/** Inform client of timeout and removal of inactive image */
	OnUnavailableImage int32
	/** New Exclusive Publication Buffer notification */
	OnExclusivePublicationReady int32
	/** New subscription notification */
	OnSubscriptionReady int32
	/** New counter notification */
	OnCounterReady int32
	/** inform clients of removal of counter */
	OnUnavailableCounter int32
	/** inform clients of client timeout */
	OnClientTimeout int32
}{
	0x0F01,
	0x0F02,
	0x0F03,
	0x0F04,
	0x0F05,
	0x0F06,
	0x0F07,
	0x0F08,
	0x0F09,
	0x0F0A,
}

Functions

This section is empty.

Types

type Listener

type Listener interface {
	OnNewPublication(streamID int32, sessionID int32, positionLimitCounterID int32, channelStatusIndicatorID int32,
		logFileName string, correlationID int64, registrationID int64)
	OnNewExclusivePublication(streamID int32, sessionID int32, positionLimitCounterID int32, channelStatusIndicatorID int32,
		logFileName string, correlationID int64, registrationID int64)
	OnAvailableImage(streamID int32, sessionID int32, logFilename string, sourceIdentity string,
		subscriberPositionID int32, subsRegID int64, correlationID int64)
	OnUnavailableImage(correlationID int64, subscriptionRegistrationID int64)
	OnOperationSuccess(correlationID int64)
	OnErrorResponse(offendingCommandCorrelationID int64, errorCode int32, errorMessage string)
	OnChannelEndpointError(correlationID int64, errorMessage string)
	OnSubscriptionReady(correlationID int64, channelStatusIndicatorID int32)
	OnAvailableCounter(correlationID int64, counterID int32)
	OnUnavailableCounter(correlationID int64, counterID int32)
	OnClientTimeout(clientID int64)
}

type ListenerAdapter

type ListenerAdapter struct {
	// contains filtered or unexported fields
}

func NewAdapter

func NewAdapter(driverListener Listener, broadcastReceiver *broadcast.CopyReceiver) *ListenerAdapter

func (*ListenerAdapter) ReceiveMessages

func (adapter *ListenerAdapter) ReceiveMessages() int

type Proxy

type Proxy struct {
	// contains filtered or unexported fields
}

Proxy is a media driver proxy class that is used to send commands

func (*Proxy) AddCounter

func (driver *Proxy) AddCounter(typeId int32, keyBuffer *atomic.Buffer, keyOffset int32, keyLength int32,
	labelBuffer *atomic.Buffer, labelOffset int32, labelLength int32) (int64, error)

AddCounter adds a new counter with a type id plus the label and key are provided in buffers.

func (*Proxy) AddCounterByLabel

func (driver *Proxy) AddCounterByLabel(typeId int32, label string) (int64, error)

AddCounterByLabel adds a new counter with a type id and label. The key will be blank.

func (*Proxy) AddDestination

func (driver *Proxy) AddDestination(registrationID int64, channel string) (int64, error)

AddDestination sends driver command to add a destination to an existing Publication.

func (*Proxy) AddExclusivePublication

func (driver *Proxy) AddExclusivePublication(channel string, streamID int32) (int64, error)

AddExclusivePublication sends driver command to add new publication

func (*Proxy) AddPublication

func (driver *Proxy) AddPublication(channel string, streamID int32) (int64, error)

AddPublication sends driver command to add new publication

func (*Proxy) AddRcvDestination

func (driver *Proxy) AddRcvDestination(registrationID int64, channel string) (int64, error)

AddRcvDestination sends driver command to add a destination to the receive channel of an existing MDS Subscription.

func (*Proxy) AddSubscription

func (driver *Proxy) AddSubscription(channel string, streamID int32) (int64, error)

AddSubscription sends driver command to add new subscription

func (*Proxy) ClientClose

func (driver *Proxy) ClientClose() error

ClientClose sends a client close to the driver.

func (*Proxy) ClientID

func (driver *Proxy) ClientID() int64

ClientID returns the client ID for this connection to the driver.

func (*Proxy) Init

func (driver *Proxy) Init(buffer *rb.ManyToOne) *Proxy

Init initializes media driver proxy class

func (*Proxy) NextCorrelationID

func (driver *Proxy) NextCorrelationID() int64

NextCorrelationID generates the next correlation id that is unique for the connected Media Driver.

func (*Proxy) RemoveCounter

func (driver *Proxy) RemoveCounter(registrationId int64) (int64, error)

RemoveCounter instructs the media driver to remove an existing counter by its registration id. Returns the correlation id for the command.

func (*Proxy) RemoveDestination

func (driver *Proxy) RemoveDestination(registrationID int64, channel string) (int64, error)

RemoveDestination sends driver command to remove a destination from an existing Publication.

func (*Proxy) RemovePublication

func (driver *Proxy) RemovePublication(registrationID int64) error

RemovePublication sends driver command to remove publication

func (*Proxy) RemoveRcvDestination

func (driver *Proxy) RemoveRcvDestination(registrationID int64, channel string) (int64, error)

RemoveRcvDestination sends driver command to remove a destination from the receive channel of an existing MDS Subscription.

func (*Proxy) RemoveSubscription

func (driver *Proxy) RemoveSubscription(registrationID int64) error

RemoveSubscription sends driver command to remove subscription

func (*Proxy) TimeOfLastDriverKeepalive

func (driver *Proxy) TimeOfLastDriverKeepalive() int64

TimeOfLastDriverKeepalive gets the time of the last keep alive update sent to media driver

type SubscriberPosition

type SubscriberPosition struct {
	// contains filtered or unexported fields
}

func (*SubscriberPosition) IndicatorID

func (pos *SubscriberPosition) IndicatorID() int32

func (*SubscriberPosition) RegistrationID

func (pos *SubscriberPosition) RegistrationID() int64

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL