19db372cdc
- Introduced comprehensive data structures for ONVIF device information, capabilities, media profiles, and configurations. - Added types for device services, network settings, imaging options, audio/video configurations, and user management. - Implemented structures for handling various ONVIF features including PTZ control, event subscriptions, and analytics configurations. - Enhanced support for network protocols, security settings, and system logging.
29 lines
426 B
Go
29 lines
426 B
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"log"
|
|
|
|
"github.com/0x524a/onvif-go/server"
|
|
)
|
|
|
|
func main() {
|
|
fmt.Println("Starting ONVIF Server on port 8081...")
|
|
fmt.Println("Press Ctrl+C to stop")
|
|
fmt.Println()
|
|
|
|
config := server.DefaultConfig()
|
|
config.Port = 8081
|
|
|
|
srv, err := server.New(config)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
|
|
ctx := context.Background()
|
|
if err := srv.Start(ctx); err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
}
|