mirror of https://bitbucket.org/ausocean/av.git
device/geovision: implement IsRunning method for geovision
This commit is contained in:
parent
0bd21b9003
commit
a123789cac
|
@ -88,11 +88,12 @@ var (
|
|||
// IP camera. This has been designed to implement the GV-BX4700-8F in particular.
|
||||
// Any other models are untested.
|
||||
type GeoVision struct {
|
||||
cfg avconfig.Config
|
||||
log avconfig.Logger
|
||||
rtpClt *rtp.Client
|
||||
rtspClt *rtsp.Client
|
||||
rtcpClt *rtcp.Client
|
||||
cfg avconfig.Config
|
||||
log avconfig.Logger
|
||||
rtpClt *rtp.Client
|
||||
rtspClt *rtsp.Client
|
||||
rtcpClt *rtcp.Client
|
||||
isRunning bool
|
||||
}
|
||||
|
||||
// NewGeoVision returns a new GeoVision.
|
||||
|
@ -278,6 +279,7 @@ func (g *GeoVision) Start() error {
|
|||
}
|
||||
g.log.Log(logger.Debug, pkg+"RTSP server PLAY response", "response", resp.String())
|
||||
g.log.Log(logger.Info, pkg+"play requested, now receiving stream")
|
||||
g.isRunning = true
|
||||
|
||||
return nil
|
||||
}
|
||||
|
@ -299,6 +301,8 @@ func (g *GeoVision) Stop() error {
|
|||
|
||||
g.log.Log(logger.Info, pkg+"RTP, RTSP and RTCP clients stopped and closed")
|
||||
|
||||
g.isRunning = false
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -342,6 +346,5 @@ func parseSvrRTCPPort(resp rtsp.Response) (int, error) {
|
|||
|
||||
// IsRunning is used to determine if the geovision is running.
|
||||
func (g *GeoVision) IsRunning() bool {
|
||||
panic("not implemented")
|
||||
return false
|
||||
return g.isRunning
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue