mirror of
https://github.com/gowvp/gb28181.git
synced 2026-04-22 15:07:10 +08:00
update readme
This commit is contained in:
@@ -20,8 +20,8 @@ go wvp 是 Go 语言实现的开源 GB28181 解决方案,基于 GB28181-2022
|
||||
|
||||
|
||||
|
||||
||||
|
||||
|-|-|-|
|
||||
|||||
|
||||
|-|-|-|-|
|
||||
|
||||
|
||||
|
||||
@@ -256,6 +256,8 @@ services:
|
||||
- [x] 音频支持 g711a/g711u/aac
|
||||
- [x] 快照
|
||||
- [x] 支持跨域
|
||||
- [x] 支持中文和 English
|
||||
- [x] 支持 onvif
|
||||
- [ ] 设备云台控制
|
||||
- [ ] 录像回放
|
||||
- [ ] 报警事件订阅
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 43 KiB |
@@ -16,7 +16,7 @@ func (a *Adapter) OnStreamChanged(ctx context.Context, stream string) error {
|
||||
if err := a.adapter.Store().Channel().Get(ctx, &ch, orm.Where("id=?", stream)); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := a.adapter.EditPlaying(ctx, ch.DeviceID, ch.ChannelID, false); err != nil {
|
||||
if err := a.adapter.EditPlayingByID(ctx, ch.ID, false); err != nil {
|
||||
slog.ErrorContext(ctx, "编辑播放状态失败", "err", err)
|
||||
}
|
||||
return nil
|
||||
|
||||
@@ -81,6 +81,16 @@ func (g Adapter) Edit(deviceID string, changeFn func(*Device)) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (g Adapter) EditPlayingByID(ctx context.Context, id string, playing bool) error {
|
||||
var ch Channel
|
||||
if err := g.store.Channel().Edit(ctx, &ch, func(c *Channel) {
|
||||
c.IsPlaying = playing
|
||||
}, orm.Where("id=?", id)); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (g Adapter) EditPlaying(ctx context.Context, deviceID, channelID string, playing bool) error {
|
||||
var ch Channel
|
||||
if err := g.store.Channel().Edit(ctx, &ch, func(c *Channel) {
|
||||
|
||||
Reference in New Issue
Block a user