From bc34702a9d6ccae119c6de991c8be3e8191b8957 Mon Sep 17 00:00:00 2001 From: Ondrej Sery Date: Fri, 4 Nov 2022 17:06:38 +0100 Subject: [PATCH] Generate Media10 client. --- cmd/gonvif/main.go | 1 + cmd/gonvif/media/cmd.go | 9 +- cmd/gonvif/media/get-profiles.go | 18 +- cmd/gonvif/media/get-snapshot-uri.go | 8 +- cmd/gonvif/media/get-stream-uri.go | 20 +- cmd/gonvif/media/set-synchronization-point.go | 4 +- cmd/gonvif/media2/cmd.go | 36 + .../get-analytics-configurations.go | 0 cmd/gonvif/media2/get-profiles.go | 39 + cmd/gonvif/media2/get-snapshot-uri.go | 37 + cmd/gonvif/media2/get-stream-uri.go | 43 + .../get-video-encoder-configurations.go | 0 .../get-video-source-configurations.go | 0 .../media2/set-synchronization-point.go | 37 + .../onvif/www_onvif_org/ver10/media/wsdl/0.go | 3060 +++++++++++++++++ .../onvif/www_onvif_org/ver10/schema/1.go | 6 +- pkg/gonvif/client.go | 13 + 17 files changed, 3298 insertions(+), 33 deletions(-) create mode 100644 cmd/gonvif/media2/cmd.go rename cmd/gonvif/{media => media2}/get-analytics-configurations.go (100%) create mode 100644 cmd/gonvif/media2/get-profiles.go create mode 100644 cmd/gonvif/media2/get-snapshot-uri.go create mode 100644 cmd/gonvif/media2/get-stream-uri.go rename cmd/gonvif/{media => media2}/get-video-encoder-configurations.go (100%) rename cmd/gonvif/{media => media2}/get-video-source-configurations.go (100%) create mode 100644 cmd/gonvif/media2/set-synchronization-point.go create mode 100644 pkg/generated/onvif/www_onvif_org/ver10/media/wsdl/0.go diff --git a/cmd/gonvif/main.go b/cmd/gonvif/main.go index a5e338f..9e3e406 100644 --- a/cmd/gonvif/main.go +++ b/cmd/gonvif/main.go @@ -9,6 +9,7 @@ import ( _ "github.com/eyetowers/gonvif/cmd/gonvif/device" _ "github.com/eyetowers/gonvif/cmd/gonvif/imaging" _ "github.com/eyetowers/gonvif/cmd/gonvif/media" + _ "github.com/eyetowers/gonvif/cmd/gonvif/media2" _ "github.com/eyetowers/gonvif/cmd/gonvif/ptz" "github.com/eyetowers/gonvif/cmd/gonvif/root" ) diff --git a/cmd/gonvif/media/cmd.go b/cmd/gonvif/media/cmd.go index bf0a5af..1873d2f 100644 --- a/cmd/gonvif/media/cmd.go +++ b/cmd/gonvif/media/cmd.go @@ -4,7 +4,7 @@ import ( "github.com/spf13/cobra" "github.com/eyetowers/gonvif/cmd/gonvif/root" - "github.com/eyetowers/gonvif/pkg/generated/onvif/www_onvif_org/ver20/media/wsdl" + "github.com/eyetowers/gonvif/pkg/generated/onvif/www_onvif_org/ver10/media/wsdl" "github.com/eyetowers/gonvif/pkg/gonvif" ) @@ -17,20 +17,17 @@ func init() { root.RequireAuthFlags(cmd) root.Command.AddCommand(cmd) cmd.AddCommand( - getAnalyticsConfigurations, getProfiles, getSnapshotURI, getStreamURI, - getVideoEncoderConfigurations, - getVideoSourceConfigurations, setSynchronizationPoint, ) } -func ServiceClient(url, username, password string, verbose bool) (wsdl.Media2, error) { +func ServiceClient(url, username, password string, verbose bool) (wsdl.Media, error) { onvif, err := gonvif.New(url, username, password, verbose) if err != nil { return nil, err } - return onvif.Media2() + return onvif.Media() } diff --git a/cmd/gonvif/media/get-profiles.go b/cmd/gonvif/media/get-profiles.go index cef2299..14ed3b7 100644 --- a/cmd/gonvif/media/get-profiles.go +++ b/cmd/gonvif/media/get-profiles.go @@ -4,11 +4,7 @@ import ( "github.com/spf13/cobra" "github.com/eyetowers/gonvif/cmd/gonvif/root" - "github.com/eyetowers/gonvif/pkg/generated/onvif/www_onvif_org/ver20/media/wsdl" -) - -var ( - types []string + "github.com/eyetowers/gonvif/pkg/generated/onvif/www_onvif_org/ver10/media/wsdl" ) var getProfiles = &cobra.Command{ @@ -20,18 +16,12 @@ var getProfiles = &cobra.Command{ if err != nil { return err } - return runGetProfiles(client, types) + return runGetProfiles(client) }, } -func init() { - getProfiles.Flags().StringArrayVarP(&types, "types", "t", []string{"All"}, "Types of profile configurations to include") -} - -func runGetProfiles(client wsdl.Media2, types []string) error { - resp, err := client.GetProfiles(&wsdl.GetProfiles{ - Type: types, - }) +func runGetProfiles(client wsdl.Media) error { + resp, err := client.GetProfiles(&wsdl.GetProfiles{}) if err != nil { return err } diff --git a/cmd/gonvif/media/get-snapshot-uri.go b/cmd/gonvif/media/get-snapshot-uri.go index 628eafb..42116b9 100644 --- a/cmd/gonvif/media/get-snapshot-uri.go +++ b/cmd/gonvif/media/get-snapshot-uri.go @@ -4,10 +4,14 @@ import ( "github.com/spf13/cobra" "github.com/eyetowers/gonvif/cmd/gonvif/root" - "github.com/eyetowers/gonvif/pkg/generated/onvif/www_onvif_org/ver20/media/wsdl" + "github.com/eyetowers/gonvif/pkg/generated/onvif/www_onvif_org/ver10/media/wsdl" "github.com/eyetowers/gonvif/pkg/util" ) +var ( + profileToken string +) + var getSnapshotURI = &cobra.Command{ Use: "get-snapshot-uri", Short: "Get Onvif device media snapshot URI", @@ -26,7 +30,7 @@ func init() { root.MustMarkFlagRequired(getSnapshotURI, "profile_token") } -func runGetSnapshotURI(client wsdl.Media2, profileToken string) error { +func runGetSnapshotURI(client wsdl.Media, profileToken string) error { resp, err := client.GetSnapshotUri(&wsdl.GetSnapshotUri{ ProfileToken: util.NewReferenceTokenPtr(profileToken), }) diff --git a/cmd/gonvif/media/get-stream-uri.go b/cmd/gonvif/media/get-stream-uri.go index 6d51374..50fc589 100644 --- a/cmd/gonvif/media/get-stream-uri.go +++ b/cmd/gonvif/media/get-stream-uri.go @@ -4,12 +4,14 @@ import ( "github.com/spf13/cobra" "github.com/eyetowers/gonvif/cmd/gonvif/root" - "github.com/eyetowers/gonvif/pkg/generated/onvif/www_onvif_org/ver20/media/wsdl" + "github.com/eyetowers/gonvif/pkg/generated/onvif/www_onvif_org/ver10/media/wsdl" + "github.com/eyetowers/gonvif/pkg/generated/onvif/www_onvif_org/ver10/schema" "github.com/eyetowers/gonvif/pkg/util" ) var ( protocol string + stream string ) var getStreamURI = &cobra.Command{ @@ -21,20 +23,28 @@ var getStreamURI = &cobra.Command{ if err != nil { return err } - return runGetStreamURI(client, profileToken, protocol) + return runGetStreamURI(client, profileToken, protocol, stream) }, } func init() { getStreamURI.Flags().StringVarP(&profileToken, "profile_token", "t", "", "The ProfileToken element indicates the media profile to use and will define the configuration of the content of the stream.") - getStreamURI.Flags().StringVarP(&protocol, "protocol", "r", "RTSP", "Defines the network protocol for streaming (RtspUnicast, RtspMulticast, RTSP, RtspOverHttp).") + getStreamURI.Flags().StringVarP(&protocol, "protocol", "r", "RTSP", "Defines the network protocol for streaming (UDP, TCP, RTSP, HTTP).") + getStreamURI.Flags().StringVarP(&stream, "stream", "s", "RTP-Unicast", "Defines the stream type for streaming (RTP-Unicast, RTP-Multicast).") root.MustMarkFlagRequired(getStreamURI, "profile_token") } -func runGetStreamURI(client wsdl.Media2, profileToken string, protocol string) error { +func runGetStreamURI(client wsdl.Media, profileToken string, protocol string, stream string) error { + p := schema.TransportProtocol(protocol) + s := schema.StreamType(stream) resp, err := client.GetStreamUri(&wsdl.GetStreamUri{ ProfileToken: util.NewReferenceTokenPtr(profileToken), - Protocol: protocol, + StreamSetup: &schema.StreamSetup{ + Stream: &s, + Transport: &schema.Transport{ + Protocol: &p, + }, + }, }) if err != nil { return err diff --git a/cmd/gonvif/media/set-synchronization-point.go b/cmd/gonvif/media/set-synchronization-point.go index 12f86e9..f4dfd65 100644 --- a/cmd/gonvif/media/set-synchronization-point.go +++ b/cmd/gonvif/media/set-synchronization-point.go @@ -4,7 +4,7 @@ import ( "github.com/spf13/cobra" "github.com/eyetowers/gonvif/cmd/gonvif/root" - "github.com/eyetowers/gonvif/pkg/generated/onvif/www_onvif_org/ver20/media/wsdl" + "github.com/eyetowers/gonvif/pkg/generated/onvif/www_onvif_org/ver10/media/wsdl" "github.com/eyetowers/gonvif/pkg/util" ) @@ -26,7 +26,7 @@ func init() { root.MustMarkFlagRequired(setSynchronizationPoint, "profile_token") } -func runSetSynchronizationPoint(client wsdl.Media2, profileToken string) error { +func runSetSynchronizationPoint(client wsdl.Media, profileToken string) error { resp, err := client.SetSynchronizationPoint(&wsdl.SetSynchronizationPoint{ ProfileToken: util.NewReferenceTokenPtr(profileToken), }) diff --git a/cmd/gonvif/media2/cmd.go b/cmd/gonvif/media2/cmd.go new file mode 100644 index 0000000..3098afb --- /dev/null +++ b/cmd/gonvif/media2/cmd.go @@ -0,0 +1,36 @@ +package media + +import ( + "github.com/spf13/cobra" + + "github.com/eyetowers/gonvif/cmd/gonvif/root" + "github.com/eyetowers/gonvif/pkg/generated/onvif/www_onvif_org/ver20/media/wsdl" + "github.com/eyetowers/gonvif/pkg/gonvif" +) + +var cmd = &cobra.Command{ + Use: "media2", + Short: "Manipulate Onvif device media features.", +} + +func init() { + root.RequireAuthFlags(cmd) + root.Command.AddCommand(cmd) + cmd.AddCommand( + getAnalyticsConfigurations, + getProfiles, + getSnapshotURI, + getStreamURI, + getVideoEncoderConfigurations, + getVideoSourceConfigurations, + setSynchronizationPoint, + ) +} + +func ServiceClient(url, username, password string, verbose bool) (wsdl.Media2, error) { + onvif, err := gonvif.New(url, username, password, verbose) + if err != nil { + return nil, err + } + return onvif.Media2() +} diff --git a/cmd/gonvif/media/get-analytics-configurations.go b/cmd/gonvif/media2/get-analytics-configurations.go similarity index 100% rename from cmd/gonvif/media/get-analytics-configurations.go rename to cmd/gonvif/media2/get-analytics-configurations.go diff --git a/cmd/gonvif/media2/get-profiles.go b/cmd/gonvif/media2/get-profiles.go new file mode 100644 index 0000000..cef2299 --- /dev/null +++ b/cmd/gonvif/media2/get-profiles.go @@ -0,0 +1,39 @@ +package media + +import ( + "github.com/spf13/cobra" + + "github.com/eyetowers/gonvif/cmd/gonvif/root" + "github.com/eyetowers/gonvif/pkg/generated/onvif/www_onvif_org/ver20/media/wsdl" +) + +var ( + types []string +) + +var getProfiles = &cobra.Command{ + Use: "get-profiles", + Short: "List Onvif device media profiles", + Args: cobra.NoArgs, + RunE: func(cmd *cobra.Command, args []string) error { + client, err := ServiceClient(root.URL, root.Username, root.Password, root.Verbose) + if err != nil { + return err + } + return runGetProfiles(client, types) + }, +} + +func init() { + getProfiles.Flags().StringArrayVarP(&types, "types", "t", []string{"All"}, "Types of profile configurations to include") +} + +func runGetProfiles(client wsdl.Media2, types []string) error { + resp, err := client.GetProfiles(&wsdl.GetProfiles{ + Type: types, + }) + if err != nil { + return err + } + return root.OutputJSON(resp) +} diff --git a/cmd/gonvif/media2/get-snapshot-uri.go b/cmd/gonvif/media2/get-snapshot-uri.go new file mode 100644 index 0000000..628eafb --- /dev/null +++ b/cmd/gonvif/media2/get-snapshot-uri.go @@ -0,0 +1,37 @@ +package media + +import ( + "github.com/spf13/cobra" + + "github.com/eyetowers/gonvif/cmd/gonvif/root" + "github.com/eyetowers/gonvif/pkg/generated/onvif/www_onvif_org/ver20/media/wsdl" + "github.com/eyetowers/gonvif/pkg/util" +) + +var getSnapshotURI = &cobra.Command{ + Use: "get-snapshot-uri", + Short: "Get Onvif device media snapshot URI", + Args: cobra.NoArgs, + RunE: func(cmd *cobra.Command, args []string) error { + client, err := ServiceClient(root.URL, root.Username, root.Password, root.Verbose) + if err != nil { + return err + } + return runGetSnapshotURI(client, profileToken) + }, +} + +func init() { + getSnapshotURI.Flags().StringVarP(&profileToken, "profile_token", "t", "", "The ProfileToken element indicates the media profile to use and will define the source and dimensions of the snapshot.") + root.MustMarkFlagRequired(getSnapshotURI, "profile_token") +} + +func runGetSnapshotURI(client wsdl.Media2, profileToken string) error { + resp, err := client.GetSnapshotUri(&wsdl.GetSnapshotUri{ + ProfileToken: util.NewReferenceTokenPtr(profileToken), + }) + if err != nil { + return err + } + return root.OutputJSON(resp) +} diff --git a/cmd/gonvif/media2/get-stream-uri.go b/cmd/gonvif/media2/get-stream-uri.go new file mode 100644 index 0000000..6d51374 --- /dev/null +++ b/cmd/gonvif/media2/get-stream-uri.go @@ -0,0 +1,43 @@ +package media + +import ( + "github.com/spf13/cobra" + + "github.com/eyetowers/gonvif/cmd/gonvif/root" + "github.com/eyetowers/gonvif/pkg/generated/onvif/www_onvif_org/ver20/media/wsdl" + "github.com/eyetowers/gonvif/pkg/util" +) + +var ( + protocol string +) + +var getStreamURI = &cobra.Command{ + Use: "get-stream-uri", + Short: "Get Onvif device media stream URI", + Args: cobra.NoArgs, + RunE: func(cmd *cobra.Command, args []string) error { + client, err := ServiceClient(root.URL, root.Username, root.Password, root.Verbose) + if err != nil { + return err + } + return runGetStreamURI(client, profileToken, protocol) + }, +} + +func init() { + getStreamURI.Flags().StringVarP(&profileToken, "profile_token", "t", "", "The ProfileToken element indicates the media profile to use and will define the configuration of the content of the stream.") + getStreamURI.Flags().StringVarP(&protocol, "protocol", "r", "RTSP", "Defines the network protocol for streaming (RtspUnicast, RtspMulticast, RTSP, RtspOverHttp).") + root.MustMarkFlagRequired(getStreamURI, "profile_token") +} + +func runGetStreamURI(client wsdl.Media2, profileToken string, protocol string) error { + resp, err := client.GetStreamUri(&wsdl.GetStreamUri{ + ProfileToken: util.NewReferenceTokenPtr(profileToken), + Protocol: protocol, + }) + if err != nil { + return err + } + return root.OutputJSON(resp) +} diff --git a/cmd/gonvif/media/get-video-encoder-configurations.go b/cmd/gonvif/media2/get-video-encoder-configurations.go similarity index 100% rename from cmd/gonvif/media/get-video-encoder-configurations.go rename to cmd/gonvif/media2/get-video-encoder-configurations.go diff --git a/cmd/gonvif/media/get-video-source-configurations.go b/cmd/gonvif/media2/get-video-source-configurations.go similarity index 100% rename from cmd/gonvif/media/get-video-source-configurations.go rename to cmd/gonvif/media2/get-video-source-configurations.go diff --git a/cmd/gonvif/media2/set-synchronization-point.go b/cmd/gonvif/media2/set-synchronization-point.go new file mode 100644 index 0000000..12f86e9 --- /dev/null +++ b/cmd/gonvif/media2/set-synchronization-point.go @@ -0,0 +1,37 @@ +package media + +import ( + "github.com/spf13/cobra" + + "github.com/eyetowers/gonvif/cmd/gonvif/root" + "github.com/eyetowers/gonvif/pkg/generated/onvif/www_onvif_org/ver20/media/wsdl" + "github.com/eyetowers/gonvif/pkg/util" +) + +var setSynchronizationPoint = &cobra.Command{ + Use: "set-synchronization-point", + Short: "Request Onvif device to insert a key frame into all streams for the given profile", + Args: cobra.NoArgs, + RunE: func(cmd *cobra.Command, args []string) error { + client, err := ServiceClient(root.URL, root.Username, root.Password, root.Verbose) + if err != nil { + return err + } + return runSetSynchronizationPoint(client, profileToken) + }, +} + +func init() { + setSynchronizationPoint.Flags().StringVarP(&profileToken, "profile_token", "t", "", "The ProfileToken element indicates the media profile to use and will define the source and dimensions of the snapshot.") + root.MustMarkFlagRequired(setSynchronizationPoint, "profile_token") +} + +func runSetSynchronizationPoint(client wsdl.Media2, profileToken string) error { + resp, err := client.SetSynchronizationPoint(&wsdl.SetSynchronizationPoint{ + ProfileToken: util.NewReferenceTokenPtr(profileToken), + }) + if err != nil { + return err + } + return root.OutputJSON(resp) +} diff --git a/pkg/generated/onvif/www_onvif_org/ver10/media/wsdl/0.go b/pkg/generated/onvif/www_onvif_org/ver10/media/wsdl/0.go new file mode 100644 index 0000000..fef634d --- /dev/null +++ b/pkg/generated/onvif/www_onvif_org/ver10/media/wsdl/0.go @@ -0,0 +1,3060 @@ +// Code generated by gowsdl DO NOT EDIT. + +package wsdl + +import ( + "context" + "encoding/xml" + "github.com/eyetowers/gowsdl/soap" + "time" + + tt "github.com/eyetowers/gonvif/pkg/generated/onvif/www_onvif_org/ver10/schema" +) + +// against "unused imports" +var _ time.Time +var _ xml.Name +var _ context.Context +var _ soap.SOAPEnvelope + +type GetServiceCapabilities struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetServiceCapabilities" json:"-"` +} + +type GetServiceCapabilitiesResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetServiceCapabilitiesResponse" json:"-"` + + // The capabilities for the media service is returned in the Capabilities element. + Capabilities *Capabilities `xml:"Capabilities,omitempty" json:"Capabilities,omitempty"` +} + +type GetVideoSources struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetVideoSources" json:"-"` +} + +type GetVideoSourcesResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetVideoSourcesResponse" json:"-"` + + // List of existing Video Sources + VideoSources []*tt.VideoSource `xml:"VideoSources,omitempty" json:"VideoSources,omitempty"` +} + +type GetAudioSources struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetAudioSources" json:"-"` +} + +type GetAudioSourcesResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetAudioSourcesResponse" json:"-"` + + // List of existing Audio Sources + AudioSources []*tt.AudioSource `xml:"AudioSources,omitempty" json:"AudioSources,omitempty"` +} + +type GetAudioOutputs struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetAudioOutputs" json:"-"` +} + +type GetAudioOutputsResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetAudioOutputsResponse" json:"-"` + + // List of existing Audio Outputs + AudioOutputs []*tt.AudioOutput `xml:"AudioOutputs,omitempty" json:"AudioOutputs,omitempty"` +} + +type CreateProfile struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl CreateProfile" json:"-"` + + // friendly name of the profile to be created + Name *tt.Name `xml:"Name,omitempty" json:"Name,omitempty"` + + // Optional token, specifying the unique identifier of the new profile. A device supports at least a token length of 12 characters and characters "A-Z" | "a-z" | "0-9" | "-.". + Token *tt.ReferenceToken `xml:"Token,omitempty" json:"Token,omitempty"` +} + +type CreateProfileResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl CreateProfileResponse" json:"-"` + + // returns the new created profile + Profile *tt.Profile `xml:"Profile,omitempty" json:"Profile,omitempty"` +} + +type GetProfile struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetProfile" json:"-"` + + // this command requests a specific profile + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` +} + +type GetProfileResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetProfileResponse" json:"-"` + + // returns the requested media profile + Profile *tt.Profile `xml:"Profile,omitempty" json:"Profile,omitempty"` +} + +type GetProfiles struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetProfiles" json:"-"` +} + +type GetProfilesResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetProfilesResponse" json:"-"` + + // lists all profiles that exist in the media service + Profiles []*tt.Profile `xml:"Profiles,omitempty" json:"Profiles,omitempty"` +} + +type AddVideoEncoderConfiguration struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl AddVideoEncoderConfiguration" json:"-"` + + // Reference to the profile where the configuration should be added + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` + + // Contains a reference to the VideoEncoderConfiguration to add + ConfigurationToken *tt.ReferenceToken `xml:"ConfigurationToken,omitempty" json:"ConfigurationToken,omitempty"` +} + +type AddVideoEncoderConfigurationResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl AddVideoEncoderConfigurationResponse" json:"-"` +} + +type RemoveVideoEncoderConfiguration struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl RemoveVideoEncoderConfiguration" json:"-"` + + // Contains a reference to the media profile from which the + // VideoEncoderConfiguration shall be removed. + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` +} + +type RemoveVideoEncoderConfigurationResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl RemoveVideoEncoderConfigurationResponse" json:"-"` +} + +type AddVideoSourceConfiguration struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl AddVideoSourceConfiguration" json:"-"` + + // Reference to the profile where the configuration should be added + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` + + // Contains a reference to the VideoSourceConfiguration to add + ConfigurationToken *tt.ReferenceToken `xml:"ConfigurationToken,omitempty" json:"ConfigurationToken,omitempty"` +} + +type AddVideoSourceConfigurationResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl AddVideoSourceConfigurationResponse" json:"-"` +} + +type RemoveVideoSourceConfiguration struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl RemoveVideoSourceConfiguration" json:"-"` + + // Contains a reference to the media profile from which the + // VideoSourceConfiguration shall be removed. + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` +} + +type RemoveVideoSourceConfigurationResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl RemoveVideoSourceConfigurationResponse" json:"-"` +} + +type AddAudioEncoderConfiguration struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl AddAudioEncoderConfiguration" json:"-"` + + // Reference to the profile where the configuration should be added + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` + + // Contains a reference to the AudioEncoderConfiguration to add + ConfigurationToken *tt.ReferenceToken `xml:"ConfigurationToken,omitempty" json:"ConfigurationToken,omitempty"` +} + +type AddAudioEncoderConfigurationResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl AddAudioEncoderConfigurationResponse" json:"-"` +} + +type RemoveAudioEncoderConfiguration struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl RemoveAudioEncoderConfiguration" json:"-"` + + // Contains a reference to the media profile from which the + // AudioEncoderConfiguration shall be removed. + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` +} + +type RemoveAudioEncoderConfigurationResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl RemoveAudioEncoderConfigurationResponse" json:"-"` +} + +type AddAudioSourceConfiguration struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl AddAudioSourceConfiguration" json:"-"` + + // Reference to the profile where the configuration should be added + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` + + // Contains a reference to the AudioSourceConfiguration to add + ConfigurationToken *tt.ReferenceToken `xml:"ConfigurationToken,omitempty" json:"ConfigurationToken,omitempty"` +} + +type AddAudioSourceConfigurationResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl AddAudioSourceConfigurationResponse" json:"-"` +} + +type RemoveAudioSourceConfiguration struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl RemoveAudioSourceConfiguration" json:"-"` + + // Contains a reference to the media profile from which the + // AudioSourceConfiguration shall be removed. + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` +} + +type RemoveAudioSourceConfigurationResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl RemoveAudioSourceConfigurationResponse" json:"-"` +} + +type AddPTZConfiguration struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl AddPTZConfiguration" json:"-"` + + // Reference to the profile where the configuration should be added + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` + + // Contains a reference to the PTZConfiguration to add + ConfigurationToken *tt.ReferenceToken `xml:"ConfigurationToken,omitempty" json:"ConfigurationToken,omitempty"` +} + +type AddPTZConfigurationResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl AddPTZConfigurationResponse" json:"-"` +} + +type RemovePTZConfiguration struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl RemovePTZConfiguration" json:"-"` + + // Contains a reference to the media profile from which the + // PTZConfiguration shall be removed. + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` +} + +type RemovePTZConfigurationResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl RemovePTZConfigurationResponse" json:"-"` +} + +type AddVideoAnalyticsConfiguration struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl AddVideoAnalyticsConfiguration" json:"-"` + + // Reference to the profile where the configuration should be added + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` + + // Contains a reference to the VideoAnalyticsConfiguration to add + ConfigurationToken *tt.ReferenceToken `xml:"ConfigurationToken,omitempty" json:"ConfigurationToken,omitempty"` +} + +type AddVideoAnalyticsConfigurationResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl AddVideoAnalyticsConfigurationResponse" json:"-"` +} + +type RemoveVideoAnalyticsConfiguration struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl RemoveVideoAnalyticsConfiguration" json:"-"` + + // Contains a reference to the media profile from which the + // VideoAnalyticsConfiguration shall be removed. + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` +} + +type RemoveVideoAnalyticsConfigurationResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl RemoveVideoAnalyticsConfigurationResponse" json:"-"` +} + +type AddMetadataConfiguration struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl AddMetadataConfiguration" json:"-"` + + // Reference to the profile where the configuration should be added + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` + + // Contains a reference to the MetadataConfiguration to add + ConfigurationToken *tt.ReferenceToken `xml:"ConfigurationToken,omitempty" json:"ConfigurationToken,omitempty"` +} + +type AddMetadataConfigurationResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl AddMetadataConfigurationResponse" json:"-"` +} + +type RemoveMetadataConfiguration struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl RemoveMetadataConfiguration" json:"-"` + + // Contains a reference to the media profile from which the + // MetadataConfiguration shall be removed. + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` +} + +type RemoveMetadataConfigurationResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl RemoveMetadataConfigurationResponse" json:"-"` +} + +type AddAudioOutputConfiguration struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl AddAudioOutputConfiguration" json:"-"` + + // Reference to the profile where the configuration should be added + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` + + // Contains a reference to the AudioOutputConfiguration to add + ConfigurationToken *tt.ReferenceToken `xml:"ConfigurationToken,omitempty" json:"ConfigurationToken,omitempty"` +} + +type AddAudioOutputConfigurationResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl AddAudioOutputConfigurationResponse" json:"-"` +} + +type RemoveAudioOutputConfiguration struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl RemoveAudioOutputConfiguration" json:"-"` + + // Contains a reference to the media profile from which the + // AudioOutputConfiguration shall be removed. + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` +} + +type RemoveAudioOutputConfigurationResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl RemoveAudioOutputConfigurationResponse" json:"-"` +} + +type AddAudioDecoderConfiguration struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl AddAudioDecoderConfiguration" json:"-"` + + // This element contains a reference to the profile where the configuration should be added. + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` + + // This element contains a reference to the AudioDecoderConfiguration to add. + ConfigurationToken *tt.ReferenceToken `xml:"ConfigurationToken,omitempty" json:"ConfigurationToken,omitempty"` +} + +type AddAudioDecoderConfigurationResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl AddAudioDecoderConfigurationResponse" json:"-"` +} + +type RemoveAudioDecoderConfiguration struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl RemoveAudioDecoderConfiguration" json:"-"` + + // This element contains a reference to the media profile from which the AudioDecoderConfiguration shall be removed. + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` +} + +type RemoveAudioDecoderConfigurationResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl RemoveAudioDecoderConfigurationResponse" json:"-"` +} + +type DeleteProfile struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl DeleteProfile" json:"-"` + + // This element contains a reference to the profile that should be deleted. + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` +} + +type DeleteProfileResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl DeleteProfileResponse" json:"-"` +} + +type GetVideoEncoderConfigurations struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetVideoEncoderConfigurations" json:"-"` +} + +type GetVideoEncoderConfigurationsResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetVideoEncoderConfigurationsResponse" json:"-"` + + // This element contains a list of video encoder configurations. + Configurations []*tt.VideoEncoderConfiguration `xml:"Configurations,omitempty" json:"Configurations,omitempty"` +} + +type GetVideoSourceConfigurations struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetVideoSourceConfigurations" json:"-"` +} + +type GetVideoSourceConfigurationsResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetVideoSourceConfigurationsResponse" json:"-"` + + // This element contains a list of video source configurations. + Configurations []*tt.VideoSourceConfiguration `xml:"Configurations,omitempty" json:"Configurations,omitempty"` +} + +type GetAudioEncoderConfigurations struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetAudioEncoderConfigurations" json:"-"` +} + +type GetAudioEncoderConfigurationsResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetAudioEncoderConfigurationsResponse" json:"-"` + + // This element contains a list of audio encoder configurations. + Configurations []*tt.AudioEncoderConfiguration `xml:"Configurations,omitempty" json:"Configurations,omitempty"` +} + +type GetAudioSourceConfigurations struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetAudioSourceConfigurations" json:"-"` +} + +type GetAudioSourceConfigurationsResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetAudioSourceConfigurationsResponse" json:"-"` + + // This element contains a list of audio source configurations. + Configurations []*tt.AudioSourceConfiguration `xml:"Configurations,omitempty" json:"Configurations,omitempty"` +} + +type GetVideoAnalyticsConfigurations struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetVideoAnalyticsConfigurations" json:"-"` +} + +type GetVideoAnalyticsConfigurationsResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetVideoAnalyticsConfigurationsResponse" json:"-"` + + // This element contains a list of VideoAnalytics configurations. + Configurations []*tt.VideoAnalyticsConfiguration `xml:"Configurations,omitempty" json:"Configurations,omitempty"` +} + +type GetMetadataConfigurations struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetMetadataConfigurations" json:"-"` +} + +type GetMetadataConfigurationsResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetMetadataConfigurationsResponse" json:"-"` + + // This element contains a list of metadata configurations + Configurations []*tt.MetadataConfiguration `xml:"Configurations,omitempty" json:"Configurations,omitempty"` +} + +type GetAudioOutputConfigurations struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetAudioOutputConfigurations" json:"-"` +} + +type GetAudioOutputConfigurationsResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetAudioOutputConfigurationsResponse" json:"-"` + + // This element contains a list of audio output configurations + Configurations []*tt.AudioOutputConfiguration `xml:"Configurations,omitempty" json:"Configurations,omitempty"` +} + +type GetAudioDecoderConfigurations struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetAudioDecoderConfigurations" json:"-"` +} + +type GetAudioDecoderConfigurationsResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetAudioDecoderConfigurationsResponse" json:"-"` + + // This element contains a list of audio decoder configurations + Configurations []*tt.AudioDecoderConfiguration `xml:"Configurations,omitempty" json:"Configurations,omitempty"` +} + +type GetVideoSourceConfiguration struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetVideoSourceConfiguration" json:"-"` + + // Token of the requested video source configuration. + ConfigurationToken *tt.ReferenceToken `xml:"ConfigurationToken,omitempty" json:"ConfigurationToken,omitempty"` +} + +type GetVideoSourceConfigurationResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetVideoSourceConfigurationResponse" json:"-"` + + // The requested video source configuration. + Configuration *tt.VideoSourceConfiguration `xml:"Configuration,omitempty" json:"Configuration,omitempty"` +} + +type GetVideoEncoderConfiguration struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetVideoEncoderConfiguration" json:"-"` + + // Token of the requested video encoder configuration. + ConfigurationToken *tt.ReferenceToken `xml:"ConfigurationToken,omitempty" json:"ConfigurationToken,omitempty"` +} + +type GetVideoEncoderConfigurationResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetVideoEncoderConfigurationResponse" json:"-"` + + // The requested video encoder configuration. + Configuration *tt.VideoEncoderConfiguration `xml:"Configuration,omitempty" json:"Configuration,omitempty"` +} + +type GetAudioSourceConfiguration struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetAudioSourceConfiguration" json:"-"` + + // Token of the requested audio source configuration. + ConfigurationToken *tt.ReferenceToken `xml:"ConfigurationToken,omitempty" json:"ConfigurationToken,omitempty"` +} + +type GetAudioSourceConfigurationResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetAudioSourceConfigurationResponse" json:"-"` + + // The requested audio source configuration. + Configuration *tt.AudioSourceConfiguration `xml:"Configuration,omitempty" json:"Configuration,omitempty"` +} + +type GetAudioEncoderConfiguration struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetAudioEncoderConfiguration" json:"-"` + + // Token of the requested audio encoder configuration. + ConfigurationToken *tt.ReferenceToken `xml:"ConfigurationToken,omitempty" json:"ConfigurationToken,omitempty"` +} + +type GetAudioEncoderConfigurationResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetAudioEncoderConfigurationResponse" json:"-"` + + // The requested audio encoder configuration + Configuration *tt.AudioEncoderConfiguration `xml:"Configuration,omitempty" json:"Configuration,omitempty"` +} + +type GetVideoAnalyticsConfiguration struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetVideoAnalyticsConfiguration" json:"-"` + + // Token of the requested video analytics configuration. + ConfigurationToken *tt.ReferenceToken `xml:"ConfigurationToken,omitempty" json:"ConfigurationToken,omitempty"` +} + +type GetVideoAnalyticsConfigurationResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetVideoAnalyticsConfigurationResponse" json:"-"` + + // The requested video analytics configuration. + Configuration *tt.VideoAnalyticsConfiguration `xml:"Configuration,omitempty" json:"Configuration,omitempty"` +} + +type GetMetadataConfiguration struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetMetadataConfiguration" json:"-"` + + // Token of the requested metadata configuration. + ConfigurationToken *tt.ReferenceToken `xml:"ConfigurationToken,omitempty" json:"ConfigurationToken,omitempty"` +} + +type GetMetadataConfigurationResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetMetadataConfigurationResponse" json:"-"` + + // The requested metadata configuration. + Configuration *tt.MetadataConfiguration `xml:"Configuration,omitempty" json:"Configuration,omitempty"` +} + +type GetAudioOutputConfiguration struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetAudioOutputConfiguration" json:"-"` + + // Token of the requested audio output configuration. + ConfigurationToken *tt.ReferenceToken `xml:"ConfigurationToken,omitempty" json:"ConfigurationToken,omitempty"` +} + +type GetAudioOutputConfigurationResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetAudioOutputConfigurationResponse" json:"-"` + + // The requested audio output configuration. + Configuration *tt.AudioOutputConfiguration `xml:"Configuration,omitempty" json:"Configuration,omitempty"` +} + +type GetAudioDecoderConfiguration struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetAudioDecoderConfiguration" json:"-"` + + // Token of the requested audio decoder configuration. + ConfigurationToken *tt.ReferenceToken `xml:"ConfigurationToken,omitempty" json:"ConfigurationToken,omitempty"` +} + +type GetAudioDecoderConfigurationResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetAudioDecoderConfigurationResponse" json:"-"` + + // The requested audio decoder configuration + Configuration *tt.AudioDecoderConfiguration `xml:"Configuration,omitempty" json:"Configuration,omitempty"` +} + +type GetCompatibleVideoEncoderConfigurations struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetCompatibleVideoEncoderConfigurations" json:"-"` + + // Contains the token of an existing media profile the configurations shall be compatible with. + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` +} + +type GetCompatibleVideoEncoderConfigurationsResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetCompatibleVideoEncoderConfigurationsResponse" json:"-"` + + // Contains a list of video encoder configurations that are compatible with the specified media profile. + Configurations []*tt.VideoEncoderConfiguration `xml:"Configurations,omitempty" json:"Configurations,omitempty"` +} + +type GetCompatibleVideoSourceConfigurations struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetCompatibleVideoSourceConfigurations" json:"-"` + + // Contains the token of an existing media profile the configurations shall be compatible with. + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` +} + +type GetCompatibleVideoSourceConfigurationsResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetCompatibleVideoSourceConfigurationsResponse" json:"-"` + + // Contains a list of video source configurations that are compatible with the specified media profile. + Configurations []*tt.VideoSourceConfiguration `xml:"Configurations,omitempty" json:"Configurations,omitempty"` +} + +type GetCompatibleAudioEncoderConfigurations struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetCompatibleAudioEncoderConfigurations" json:"-"` + + // Contains the token of an existing media profile the configurations shall be compatible with. + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` +} + +type GetCompatibleAudioEncoderConfigurationsResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetCompatibleAudioEncoderConfigurationsResponse" json:"-"` + + // Contains a list of audio encoder configurations that are compatible with the specified media profile. + Configurations []*tt.AudioEncoderConfiguration `xml:"Configurations,omitempty" json:"Configurations,omitempty"` +} + +type GetCompatibleAudioSourceConfigurations struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetCompatibleAudioSourceConfigurations" json:"-"` + + // Contains the token of an existing media profile the configurations shall be compatible with. + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` +} + +type GetCompatibleAudioSourceConfigurationsResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetCompatibleAudioSourceConfigurationsResponse" json:"-"` + + // Contains a list of audio source configurations that are compatible with the specified media profile. + Configurations []*tt.AudioSourceConfiguration `xml:"Configurations,omitempty" json:"Configurations,omitempty"` +} + +type GetCompatibleVideoAnalyticsConfigurations struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetCompatibleVideoAnalyticsConfigurations" json:"-"` + + // Contains the token of an existing media profile the configurations shall be compatible with. + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` +} + +type GetCompatibleVideoAnalyticsConfigurationsResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetCompatibleVideoAnalyticsConfigurationsResponse" json:"-"` + + // Contains a list of video analytics configurations that are compatible with the specified media profile. + Configurations []*tt.VideoAnalyticsConfiguration `xml:"Configurations,omitempty" json:"Configurations,omitempty"` +} + +type GetCompatibleMetadataConfigurations struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetCompatibleMetadataConfigurations" json:"-"` + + // Contains the token of an existing media profile the configurations shall be compatible with. + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` +} + +type GetCompatibleMetadataConfigurationsResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetCompatibleMetadataConfigurationsResponse" json:"-"` + + // Contains a list of metadata configurations that are compatible with the specified media profile. + Configurations []*tt.MetadataConfiguration `xml:"Configurations,omitempty" json:"Configurations,omitempty"` +} + +type GetCompatibleAudioOutputConfigurations struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetCompatibleAudioOutputConfigurations" json:"-"` + + // Contains the token of an existing media profile the configurations shall be compatible with. + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` +} + +type GetCompatibleAudioOutputConfigurationsResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetCompatibleAudioOutputConfigurationsResponse" json:"-"` + + // Contains a list of audio output configurations that are compatible with the specified media profile. + Configurations []*tt.AudioOutputConfiguration `xml:"Configurations,omitempty" json:"Configurations,omitempty"` +} + +type GetCompatibleAudioDecoderConfigurations struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetCompatibleAudioDecoderConfigurations" json:"-"` + + // Contains the token of an existing media profile the configurations shall be compatible with. + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` +} + +type GetCompatibleAudioDecoderConfigurationsResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetCompatibleAudioDecoderConfigurationsResponse" json:"-"` + + // Contains a list of audio decoder configurations that are compatible with the specified media profile. + Configurations []*tt.AudioDecoderConfiguration `xml:"Configurations,omitempty" json:"Configurations,omitempty"` +} + +type SetVideoEncoderConfiguration struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl SetVideoEncoderConfiguration" json:"-"` + + // Contains the modified video encoder configuration. The configuration shall exist in the device. + Configuration *tt.VideoEncoderConfiguration `xml:"Configuration,omitempty" json:"Configuration,omitempty"` + + // The ForcePersistence element is obsolete and should always be assumed to be true. + ForcePersistence bool `xml:"ForcePersistence,omitempty" json:"ForcePersistence,omitempty"` +} + +type SetVideoEncoderConfigurationResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl SetVideoEncoderConfigurationResponse" json:"-"` +} + +type SetVideoSourceConfiguration struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl SetVideoSourceConfiguration" json:"-"` + + // Contains the modified video source configuration. The configuration shall exist in the device. + Configuration *tt.VideoSourceConfiguration `xml:"Configuration,omitempty" json:"Configuration,omitempty"` + + // The ForcePersistence element is obsolete and should always be assumed to be true. + ForcePersistence bool `xml:"ForcePersistence,omitempty" json:"ForcePersistence,omitempty"` +} + +type SetVideoSourceConfigurationResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl SetVideoSourceConfigurationResponse" json:"-"` +} + +type SetAudioEncoderConfiguration struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl SetAudioEncoderConfiguration" json:"-"` + + // Contains the modified audio encoder configuration. The configuration shall exist in the device. + Configuration *tt.AudioEncoderConfiguration `xml:"Configuration,omitempty" json:"Configuration,omitempty"` + + // The ForcePersistence element is obsolete and should always be assumed to be true. + ForcePersistence bool `xml:"ForcePersistence,omitempty" json:"ForcePersistence,omitempty"` +} + +type SetAudioEncoderConfigurationResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl SetAudioEncoderConfigurationResponse" json:"-"` +} + +type SetAudioSourceConfiguration struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl SetAudioSourceConfiguration" json:"-"` + + // Contains the modified audio source configuration. The configuration shall exist in the device. + Configuration *tt.AudioSourceConfiguration `xml:"Configuration,omitempty" json:"Configuration,omitempty"` + + // The ForcePersistence element is obsolete and should always be assumed to be true. + ForcePersistence bool `xml:"ForcePersistence,omitempty" json:"ForcePersistence,omitempty"` +} + +type SetAudioSourceConfigurationResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl SetAudioSourceConfigurationResponse" json:"-"` +} + +type SetVideoAnalyticsConfiguration struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl SetVideoAnalyticsConfiguration" json:"-"` + + // Contains the modified video analytics configuration. The configuration shall exist in the device. + Configuration *tt.VideoAnalyticsConfiguration `xml:"Configuration,omitempty" json:"Configuration,omitempty"` + + // The ForcePersistence element is obsolete and should always be assumed to be true. + ForcePersistence bool `xml:"ForcePersistence,omitempty" json:"ForcePersistence,omitempty"` +} + +type SetVideoAnalyticsConfigurationResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl SetVideoAnalyticsConfigurationResponse" json:"-"` +} + +type SetMetadataConfiguration struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl SetMetadataConfiguration" json:"-"` + + // Contains the modified metadata configuration. The configuration shall exist in the device. + Configuration *tt.MetadataConfiguration `xml:"Configuration,omitempty" json:"Configuration,omitempty"` + + // The ForcePersistence element is obsolete and should always be assumed to be true. + ForcePersistence bool `xml:"ForcePersistence,omitempty" json:"ForcePersistence,omitempty"` +} + +type SetMetadataConfigurationResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl SetMetadataConfigurationResponse" json:"-"` +} + +type SetAudioOutputConfiguration struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl SetAudioOutputConfiguration" json:"-"` + + // Contains the modified audio output configuration. The configuration shall exist in the device. + Configuration *tt.AudioOutputConfiguration `xml:"Configuration,omitempty" json:"Configuration,omitempty"` + + // The ForcePersistence element is obsolete and should always be assumed to be true. + ForcePersistence bool `xml:"ForcePersistence,omitempty" json:"ForcePersistence,omitempty"` +} + +type SetAudioOutputConfigurationResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl SetAudioOutputConfigurationResponse" json:"-"` +} + +type SetAudioDecoderConfiguration struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl SetAudioDecoderConfiguration" json:"-"` + + // Contains the modified audio decoder configuration. The configuration shall exist in the device. + Configuration *tt.AudioDecoderConfiguration `xml:"Configuration,omitempty" json:"Configuration,omitempty"` + + // The ForcePersistence element is obsolete and should always be assumed to be true. + ForcePersistence bool `xml:"ForcePersistence,omitempty" json:"ForcePersistence,omitempty"` +} + +type SetAudioDecoderConfigurationResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl SetAudioDecoderConfigurationResponse" json:"-"` +} + +type GetVideoSourceConfigurationOptions struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetVideoSourceConfigurationOptions" json:"-"` + + // Optional video source configurationToken that specifies an existing configuration that the options are intended for. + ConfigurationToken *tt.ReferenceToken `xml:"ConfigurationToken,omitempty" json:"ConfigurationToken,omitempty"` + + // Optional ProfileToken that specifies an existing media profile that the options shall be compatible with. + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` +} + +type GetVideoSourceConfigurationOptionsResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetVideoSourceConfigurationOptionsResponse" json:"-"` + + // This message contains the video source configuration options. If a video source configuration is specified, the options shall concern that particular configuration. If a media profile is specified, the options shall be compatible with that media profile. If no tokens are specified, the options shall be considered generic for the device. + Options *tt.VideoSourceConfigurationOptions `xml:"Options,omitempty" json:"Options,omitempty"` +} + +type GetVideoEncoderConfigurationOptions struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetVideoEncoderConfigurationOptions" json:"-"` + + // Optional video encoder configuration token that specifies an existing configuration that the options are intended for. + ConfigurationToken *tt.ReferenceToken `xml:"ConfigurationToken,omitempty" json:"ConfigurationToken,omitempty"` + + // Optional ProfileToken that specifies an existing media profile that the options shall be compatible with. + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` +} + +type GetVideoEncoderConfigurationOptionsResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetVideoEncoderConfigurationOptionsResponse" json:"-"` + + Options *tt.VideoEncoderConfigurationOptions `xml:"Options,omitempty" json:"Options,omitempty"` +} + +type GetAudioSourceConfigurationOptions struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetAudioSourceConfigurationOptions" json:"-"` + + // Optional audio source configuration token that specifies an existing configuration that the options are intended for. + ConfigurationToken *tt.ReferenceToken `xml:"ConfigurationToken,omitempty" json:"ConfigurationToken,omitempty"` + + // Optional ProfileToken that specifies an existing media profile that the options shall be compatible with. + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` +} + +type GetAudioSourceConfigurationOptionsResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetAudioSourceConfigurationOptionsResponse" json:"-"` + + // This message contains the audio source configuration options. If a audio source configuration is specified, the options shall concern that particular configuration. If a media profile is specified, the options shall be compatible with that media profile. If no tokens are specified, the options shall be considered generic for the device. + Options *tt.AudioSourceConfigurationOptions `xml:"Options,omitempty" json:"Options,omitempty"` +} + +type GetAudioEncoderConfigurationOptions struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetAudioEncoderConfigurationOptions" json:"-"` + + // Optional audio encoder configuration token that specifies an existing configuration that the options are intended for. + ConfigurationToken *tt.ReferenceToken `xml:"ConfigurationToken,omitempty" json:"ConfigurationToken,omitempty"` + + // Optional ProfileToken that specifies an existing media profile that the options shall be compatible with. + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` +} + +type GetAudioEncoderConfigurationOptionsResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetAudioEncoderConfigurationOptionsResponse" json:"-"` + + // This message contains the audio encoder configuration options. If a audio encoder configuration is specified, the options shall concern that particular configuration. If a media profile is specified, the options shall be compatible with that media profile. If no tokens are specified, the options shall be considered generic for the device. + Options *tt.AudioEncoderConfigurationOptions `xml:"Options,omitempty" json:"Options,omitempty"` +} + +type GetMetadataConfigurationOptions struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetMetadataConfigurationOptions" json:"-"` + + // Optional metadata configuration token that specifies an existing configuration that the options are intended for. + ConfigurationToken *tt.ReferenceToken `xml:"ConfigurationToken,omitempty" json:"ConfigurationToken,omitempty"` + + // Optional ProfileToken that specifies an existing media profile that the options shall be compatible with. + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` +} + +type GetMetadataConfigurationOptionsResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetMetadataConfigurationOptionsResponse" json:"-"` + + // This message contains the metadata configuration options. If a metadata configuration is specified, the options shall concern that particular configuration. If a media profile is specified, the options shall be compatible with that media profile. If no tokens are specified, the options shall be considered generic for the device. + Options *tt.MetadataConfigurationOptions `xml:"Options,omitempty" json:"Options,omitempty"` +} + +type GetAudioOutputConfigurationOptions struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetAudioOutputConfigurationOptions" json:"-"` + + // Optional audio output configuration token that specifies an existing configuration that the options are intended for. + ConfigurationToken *tt.ReferenceToken `xml:"ConfigurationToken,omitempty" json:"ConfigurationToken,omitempty"` + + // Optional ProfileToken that specifies an existing media profile that the options shall be compatible with. + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` +} + +type GetAudioOutputConfigurationOptionsResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetAudioOutputConfigurationOptionsResponse" json:"-"` + + // This message contains the audio output configuration options. If a audio output configuration is specified, the options shall concern that particular configuration. If a media profile is specified, the options shall be compatible with that media profile. If no tokens are specified, the options shall be considered generic for the device. + Options *tt.AudioOutputConfigurationOptions `xml:"Options,omitempty" json:"Options,omitempty"` +} + +type GetAudioDecoderConfigurationOptions struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetAudioDecoderConfigurationOptions" json:"-"` + + // Optional audio decoder configuration token that specifies an existing configuration that the options are intended for. + ConfigurationToken *tt.ReferenceToken `xml:"ConfigurationToken,omitempty" json:"ConfigurationToken,omitempty"` + + // Optional ProfileToken that specifies an existing media profile that the options shall be compatible with. + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` +} + +type GetAudioDecoderConfigurationOptionsResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetAudioDecoderConfigurationOptionsResponse" json:"-"` + + // This message contains the audio decoder configuration options. If a audio decoder configuration is specified, the options shall concern that particular configuration. If a media profile is specified, the options shall be compatible with that media profile. If no tokens are specified, the options shall be considered generic for the device. + Options *tt.AudioDecoderConfigurationOptions `xml:"Options,omitempty" json:"Options,omitempty"` +} + +type GetGuaranteedNumberOfVideoEncoderInstances struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetGuaranteedNumberOfVideoEncoderInstances" json:"-"` + + // Token of the video source configuration + ConfigurationToken *tt.ReferenceToken `xml:"ConfigurationToken,omitempty" json:"ConfigurationToken,omitempty"` +} + +type GetGuaranteedNumberOfVideoEncoderInstancesResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetGuaranteedNumberOfVideoEncoderInstancesResponse" json:"-"` + + // The minimum guaranteed total number of encoder instances (applications) per VideoSourceConfiguration. The device is able to deliver the TotalNumber of streams + TotalNumber int32 `xml:"TotalNumber,omitempty" json:"TotalNumber,omitempty"` + + // If a device limits the number of instances for respective Video Codecs the response contains the information how many Jpeg streams can be set up at the same time per VideoSource. + JPEG int32 `xml:"JPEG,omitempty" json:"JPEG,omitempty"` + + // If a device limits the number of instances for respective Video Codecs the response contains the information how many H264 streams can be set up at the same time per VideoSource. + H264 int32 `xml:"H264,omitempty" json:"H264,omitempty"` + + // If a device limits the number of instances for respective Video Codecs the response contains the information how many Mpeg4 streams can be set up at the same time per VideoSource. + MPEG4 int32 `xml:"MPEG4,omitempty" json:"MPEG4,omitempty"` +} + +type GetStreamUri struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetStreamUri" json:"-"` + + // Stream Setup that should be used with the uri + StreamSetup *tt.StreamSetup `xml:"StreamSetup,omitempty" json:"StreamSetup,omitempty"` + + // The ProfileToken element indicates the media profile to use and will define the configuration of the content of the stream. + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` +} + +type GetStreamUriResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetStreamUriResponse" json:"-"` + + MediaUri *tt.MediaUri `xml:"MediaUri,omitempty" json:"MediaUri,omitempty"` +} + +type StartMulticastStreaming struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl StartMulticastStreaming" json:"-"` + + // Contains the token of the Profile that is used to define the multicast stream. + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` +} + +type StartMulticastStreamingResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl StartMulticastStreamingResponse" json:"-"` +} + +type StopMulticastStreaming struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl StopMulticastStreaming" json:"-"` + + // Contains the token of the Profile that is used to define the multicast stream. + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` +} + +type StopMulticastStreamingResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl StopMulticastStreamingResponse" json:"-"` +} + +type SetSynchronizationPoint struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl SetSynchronizationPoint" json:"-"` + + // Contains a Profile reference for which a Synchronization Point is requested. + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` +} + +type SetSynchronizationPointResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl SetSynchronizationPointResponse" json:"-"` +} + +type GetSnapshotUri struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetSnapshotUri" json:"-"` + + // The ProfileToken element indicates the media profile to use and will define the source and dimensions of the snapshot. + ProfileToken *tt.ReferenceToken `xml:"ProfileToken,omitempty" json:"ProfileToken,omitempty"` +} + +type GetSnapshotUriResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetSnapshotUriResponse" json:"-"` + + MediaUri *tt.MediaUri `xml:"MediaUri,omitempty" json:"MediaUri,omitempty"` +} + +type GetVideoSourceModes struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetVideoSourceModes" json:"-"` + + // Contains a video source reference for which a video source mode is requested. + VideoSourceToken *tt.ReferenceToken `xml:"VideoSourceToken,omitempty" json:"VideoSourceToken,omitempty"` +} + +type GetVideoSourceModesResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetVideoSourceModesResponse" json:"-"` + + // Return the information for specified video source mode. + VideoSourceModes []*VideoSourceMode `xml:"VideoSourceModes,omitempty" json:"VideoSourceModes,omitempty"` +} + +type SetVideoSourceMode struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl SetVideoSourceMode" json:"-"` + + // Contains a video source reference for which a video source mode is requested. + VideoSourceToken *tt.ReferenceToken `xml:"VideoSourceToken,omitempty" json:"VideoSourceToken,omitempty"` + + // Indicate video source mode. + VideoSourceModeToken *tt.ReferenceToken `xml:"VideoSourceModeToken,omitempty" json:"VideoSourceModeToken,omitempty"` +} + +type SetVideoSourceModeResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl SetVideoSourceModeResponse" json:"-"` + + // The response contains information about rebooting after returning response. When Reboot is set true, a device will reboot automatically after setting mode. + Reboot bool `xml:"Reboot,omitempty" json:"Reboot,omitempty"` +} + +type GetOSDs struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetOSDs" json:"-"` + + // Token of the Video Source Configuration, which has OSDs associated with are requested. If token not exist, request all available OSDs. + ConfigurationToken *tt.ReferenceToken `xml:"ConfigurationToken,omitempty" json:"ConfigurationToken,omitempty"` +} + +type GetOSDsResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetOSDsResponse" json:"-"` + + // This element contains a list of requested OSDs. + OSDs []*tt.OSDConfiguration `xml:"OSDs,omitempty" json:"OSDs,omitempty"` +} + +type GetOSD struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetOSD" json:"-"` + + // The GetOSD command fetches the OSD configuration if the OSD token is known. + OSDToken *tt.ReferenceToken `xml:"OSDToken,omitempty" json:"OSDToken,omitempty"` + + Items []string `xml:",any" json:"items,omitempty"` +} + +type GetOSDResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetOSDResponse" json:"-"` + + // The requested OSD configuration. + OSD *tt.OSDConfiguration `xml:"OSD,omitempty" json:"OSD,omitempty"` + + Items []string `xml:",any" json:"items,omitempty"` +} + +type SetOSD struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl SetOSD" json:"-"` + + // Contains the modified OSD configuration. + OSD *tt.OSDConfiguration `xml:"OSD,omitempty" json:"OSD,omitempty"` + + Items []string `xml:",any" json:"items,omitempty"` +} + +type SetOSDResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl SetOSDResponse" json:"-"` + + Items []string `xml:",any" json:"items,omitempty"` +} + +type GetOSDOptions struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetOSDOptions" json:"-"` + + // Video Source Configuration Token that specifies an existing video source configuration that the options shall be compatible with. + ConfigurationToken *tt.ReferenceToken `xml:"ConfigurationToken,omitempty" json:"ConfigurationToken,omitempty"` + + Items []string `xml:",any" json:"items,omitempty"` +} + +type GetOSDOptionsResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl GetOSDOptionsResponse" json:"-"` + + OSDOptions *tt.OSDConfigurationOptions `xml:"OSDOptions,omitempty" json:"OSDOptions,omitempty"` + + Items []string `xml:",any" json:"items,omitempty"` +} + +type CreateOSD struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl CreateOSD" json:"-"` + + // Contain the initial OSD configuration for create. + OSD *tt.OSDConfiguration `xml:"OSD,omitempty" json:"OSD,omitempty"` + + Items []string `xml:",any" json:"items,omitempty"` +} + +type CreateOSDResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl CreateOSDResponse" json:"-"` + + // Returns Token of the newly created OSD + OSDToken *tt.ReferenceToken `xml:"OSDToken,omitempty" json:"OSDToken,omitempty"` + + Items []string `xml:",any" json:"items,omitempty"` +} + +type DeleteOSD struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl DeleteOSD" json:"-"` + + // This element contains a reference to the OSD configuration that should be deleted. + OSDToken *tt.ReferenceToken `xml:"OSDToken,omitempty" json:"OSDToken,omitempty"` + + Items []string `xml:",any" json:"items,omitempty"` +} + +type DeleteOSDResponse struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl DeleteOSDResponse" json:"-"` + + Items []string `xml:",any" json:"items,omitempty"` +} + +type Capabilities struct { + + // Media profile capabilities. + ProfileCapabilities *ProfileCapabilities `xml:"ProfileCapabilities,omitempty" json:"ProfileCapabilities,omitempty"` + + // Streaming capabilities. + StreamingCapabilities *StreamingCapabilities `xml:"StreamingCapabilities,omitempty" json:"StreamingCapabilities,omitempty"` + + Items []string `xml:",any" json:"items,omitempty"` + + // Indicates if GetSnapshotUri is supported. + + SnapshotUri bool `xml:"http://www.onvif.org/ver10/media/wsdl SnapshotUri,attr,omitempty" json:"SnapshotUri,omitempty"` + + // Indicates whether or not Rotation feature is supported. + + Rotation bool `xml:"http://www.onvif.org/ver10/media/wsdl Rotation,attr,omitempty" json:"Rotation,omitempty"` + + // Indicates the support for changing video source mode. + + VideoSourceMode bool `xml:"http://www.onvif.org/ver10/media/wsdl VideoSourceMode,attr,omitempty" json:"VideoSourceMode,omitempty"` + + // Indicates if OSD is supported. + + OSD bool `xml:"http://www.onvif.org/ver10/media/wsdl OSD,attr,omitempty" json:"OSD,omitempty"` + + // Indicates the support for temporary osd text configuration. + + TemporaryOSDText bool `xml:"http://www.onvif.org/ver10/media/wsdl TemporaryOSDText,attr,omitempty" json:"TemporaryOSDText,omitempty"` + + // Indicates the support for the Efficient XML Interchange (EXI) binary XML format. + + EXICompression bool `xml:"http://www.onvif.org/ver10/media/wsdl EXICompression,attr,omitempty" json:"EXICompression,omitempty"` +} + +type ProfileCapabilities struct { + Items []string `xml:",any" json:"items,omitempty"` + + // Maximum number of profiles supported. + + MaximumNumberOfProfiles int32 `xml:"http://www.onvif.org/ver10/media/wsdl MaximumNumberOfProfiles,attr,omitempty" json:"MaximumNumberOfProfiles,omitempty"` +} + +type StreamingCapabilities struct { + Items []string `xml:",any" json:"items,omitempty"` + + // Indicates support for RTP multicast. + + RTPMulticast bool `xml:"http://www.onvif.org/ver10/media/wsdl RTPMulticast,attr,omitempty" json:"RTPMulticast,omitempty"` + + // Indicates support for RTP over TCP. + + RTP_TCP bool `xml:"http://www.onvif.org/ver10/media/wsdl RTP_TCP,attr,omitempty" json:"RTP_TCP,omitempty"` + + // Indicates support for RTP/RTSP/TCP. + + RTP_RTSP_TCP bool `xml:"http://www.onvif.org/ver10/media/wsdl RTP_RTSP_TCP,attr,omitempty" json:"RTP_RTSP_TCP,omitempty"` + + // Indicates support for non aggregate RTSP control. + + NonAggregateControl bool `xml:"http://www.onvif.org/ver10/media/wsdl NonAggregateControl,attr,omitempty" json:"NonAggregateControl,omitempty"` + + // Indicates the device does not support live media streaming via RTSP. + + NoRTSPStreaming bool `xml:"http://www.onvif.org/ver10/media/wsdl NoRTSPStreaming,attr,omitempty" json:"NoRTSPStreaming,omitempty"` +} + +type VideoSourceMode struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl VideoSourceModes" json:"-"` + + // Max frame rate in frames per second for this video source mode. + MaxFramerate float32 `xml:"MaxFramerate,omitempty" json:"MaxFramerate,omitempty"` + + // Max horizontal and vertical resolution for this video source mode. + MaxResolution *tt.VideoResolution `xml:"MaxResolution,omitempty" json:"MaxResolution,omitempty"` + + // Indication which encodings are supported for this video source. The list may contain one or more enumeration values of tt:VideoEncoding. + Encodings *tt.StringList `xml:"Encodings,omitempty" json:"Encodings,omitempty"` + + // After setting the mode if a device starts to reboot this value is true. If a device change the mode without rebooting this value is false. If true, configured parameters may not be guaranteed by the device after rebooting. + Reboot bool `xml:"Reboot,omitempty" json:"Reboot,omitempty"` + + // Informative description of this video source mode. This field should be described in English. + Description *tt.Description `xml:"Description,omitempty" json:"Description,omitempty"` + + Extension *VideoSourceModeExtension `xml:"Extension,omitempty" json:"Extension,omitempty"` + + // Indicate token for video source mode. + + Token *tt.ReferenceToken `xml:"http://www.onvif.org/ver10/media/wsdl token,attr,omitempty" json:"token,omitempty"` + + // Indication of whether this mode is active. If active this value is true. In case of non-indication, it means as false. The value of true shall be had by only one video source mode. + + Enabled bool `xml:"http://www.onvif.org/ver10/media/wsdl Enabled,attr,omitempty" json:"Enabled,omitempty"` +} + +type VideoSourceModeExtension struct { + XMLName xml.Name `xml:"http://www.onvif.org/ver10/media/wsdl Extension" json:"-"` + + Items []string `xml:",any" json:"items,omitempty"` +} + +type Media interface { + + /* Returns the capabilities of the media service. The result is returned in a typed answer. */ + GetServiceCapabilities(request *GetServiceCapabilities) (*GetServiceCapabilitiesResponse, error) + + GetServiceCapabilitiesContext(ctx context.Context, request *GetServiceCapabilities) (*GetServiceCapabilitiesResponse, error) + + /* This command lists all available physical video inputs of the device. */ + GetVideoSources(request *GetVideoSources) (*GetVideoSourcesResponse, error) + + GetVideoSourcesContext(ctx context.Context, request *GetVideoSources) (*GetVideoSourcesResponse, error) + + /* This command lists all available physical audio inputs of the device. */ + GetAudioSources(request *GetAudioSources) (*GetAudioSourcesResponse, error) + + GetAudioSourcesContext(ctx context.Context, request *GetAudioSources) (*GetAudioSourcesResponse, error) + + /* This command lists all available physical audio outputs of the device. */ + GetAudioOutputs(request *GetAudioOutputs) (*GetAudioOutputsResponse, error) + + GetAudioOutputsContext(ctx context.Context, request *GetAudioOutputs) (*GetAudioOutputsResponse, error) + + /* This operation creates a new empty media profile. The media profile shall be created in the + device and shall be persistent (remain after reboot). A created profile shall be deletable and a device shall set the “fixed” attribute to false in the + returned Profile. */ + CreateProfile(request *CreateProfile) (*CreateProfileResponse, error) + + CreateProfileContext(ctx context.Context, request *CreateProfile) (*CreateProfileResponse, error) + + /* If the profile token is already known, a profile can be fetched through the GetProfile command. */ + GetProfile(request *GetProfile) (*GetProfileResponse, error) + + GetProfileContext(ctx context.Context, request *GetProfile) (*GetProfileResponse, error) + + /* Any endpoint can ask for the existing media profiles of a device using the GetProfiles + command. Pre-configured or dynamically configured profiles can be retrieved using this + command. This command lists all configured profiles in a device. The client does not need to + know the media profile in order to use the command. */ + GetProfiles(request *GetProfiles) (*GetProfilesResponse, error) + + GetProfilesContext(ctx context.Context, request *GetProfiles) (*GetProfilesResponse, error) + + /* This operation adds a VideoEncoderConfiguration to an existing media profile. If a + configuration exists in the media profile, it will be replaced. The change shall be persistent. A device shall + support adding a compatible VideoEncoderConfiguration to a Profile containing a VideoSourceConfiguration and shall + support streaming video data of such a profile. + */ + AddVideoEncoderConfiguration(request *AddVideoEncoderConfiguration) (*AddVideoEncoderConfigurationResponse, error) + + AddVideoEncoderConfigurationContext(ctx context.Context, request *AddVideoEncoderConfiguration) (*AddVideoEncoderConfigurationResponse, error) + + /* This operation removes a VideoEncoderConfiguration from an existing media profile. If the + media profile does not contain a VideoEncoderConfiguration, the operation has no effect. The removal shall be persistent. */ + RemoveVideoEncoderConfiguration(request *RemoveVideoEncoderConfiguration) (*RemoveVideoEncoderConfigurationResponse, error) + + RemoveVideoEncoderConfigurationContext(ctx context.Context, request *RemoveVideoEncoderConfiguration) (*RemoveVideoEncoderConfigurationResponse, error) + + /* This operation adds a VideoSourceConfiguration to an existing media profile. If such a + configuration exists in the media profile, it will be replaced. The change shall be persistent. */ + AddVideoSourceConfiguration(request *AddVideoSourceConfiguration) (*AddVideoSourceConfigurationResponse, error) + + AddVideoSourceConfigurationContext(ctx context.Context, request *AddVideoSourceConfiguration) (*AddVideoSourceConfigurationResponse, error) + + /* This operation removes a VideoSourceConfiguration from an existing media profile. If the + media profile does not contain a VideoSourceConfiguration, the operation has no effect. The removal shall be persistent. Video source configurations should only be removed after removing a + VideoEncoderConfiguration from the media profile. */ + RemoveVideoSourceConfiguration(request *RemoveVideoSourceConfiguration) (*RemoveVideoSourceConfigurationResponse, error) + + RemoveVideoSourceConfigurationContext(ctx context.Context, request *RemoveVideoSourceConfiguration) (*RemoveVideoSourceConfigurationResponse, error) + + /* This operation adds an AudioEncoderConfiguration to an existing media profile. If a + configuration exists in the media profile, it will be replaced. The change shall be persistent. A device shall + support adding a compatible AudioEncoderConfiguration to a profile containing an AudioSourceConfiguration and shall + support streaming audio data of such a profile. + */ + AddAudioEncoderConfiguration(request *AddAudioEncoderConfiguration) (*AddAudioEncoderConfigurationResponse, error) + + AddAudioEncoderConfigurationContext(ctx context.Context, request *AddAudioEncoderConfiguration) (*AddAudioEncoderConfigurationResponse, error) + + /* This operation removes an AudioEncoderConfiguration from an existing media profile. If the + media profile does not contain an AudioEncoderConfiguration, the operation has no effect. + The removal shall be persistent. */ + RemoveAudioEncoderConfiguration(request *RemoveAudioEncoderConfiguration) (*RemoveAudioEncoderConfigurationResponse, error) + + RemoveAudioEncoderConfigurationContext(ctx context.Context, request *RemoveAudioEncoderConfiguration) (*RemoveAudioEncoderConfigurationResponse, error) + + /* This operation adds an AudioSourceConfiguration to an existing media profile. If a + configuration exists in the media profile, it will be replaced. The change shall be persistent. */ + AddAudioSourceConfiguration(request *AddAudioSourceConfiguration) (*AddAudioSourceConfigurationResponse, error) + + AddAudioSourceConfigurationContext(ctx context.Context, request *AddAudioSourceConfiguration) (*AddAudioSourceConfigurationResponse, error) + + /* This operation removes an AudioSourceConfiguration from an existing media profile. If the + media profile does not contain an AudioSourceConfiguration, the operation has no effect. The + removal shall be persistent. Audio source configurations should only be removed after removing an + AudioEncoderConfiguration from the media profile. */ + RemoveAudioSourceConfiguration(request *RemoveAudioSourceConfiguration) (*RemoveAudioSourceConfigurationResponse, error) + + RemoveAudioSourceConfigurationContext(ctx context.Context, request *RemoveAudioSourceConfiguration) (*RemoveAudioSourceConfigurationResponse, error) + + /* This operation adds a PTZConfiguration to an existing media profile. If a configuration exists + in the media profile, it will be replaced. The change shall be persistent. Adding a PTZConfiguration to a media profile means that streams using that media profile can + contain PTZ status (in the metadata), and that the media profile can be used for controlling + PTZ movement. */ + AddPTZConfiguration(request *AddPTZConfiguration) (*AddPTZConfigurationResponse, error) + + AddPTZConfigurationContext(ctx context.Context, request *AddPTZConfiguration) (*AddPTZConfigurationResponse, error) + + /* This operation removes a PTZConfiguration from an existing media profile. If the media profile + does not contain a PTZConfiguration, the operation has no effect. The removal shall be persistent. */ + RemovePTZConfiguration(request *RemovePTZConfiguration) (*RemovePTZConfigurationResponse, error) + + RemovePTZConfigurationContext(ctx context.Context, request *RemovePTZConfiguration) (*RemovePTZConfigurationResponse, error) + + /* This operation adds a VideoAnalytics configuration to an existing media profile. If a + configuration exists in the media profile, it will be replaced. The change shall be persistent. Adding a VideoAnalyticsConfiguration to a media profile means that streams using that media + profile can contain video analytics data (in the metadata) as defined by the submitted configuration reference. A profile containing only a video analytics configuration but no video source configuration is incomplete. Therefore, a client should first add a video source configuration to a profile before adding a video analytics configuration. The device can deny adding of a video analytics + configuration before a video source configuration. */ + AddVideoAnalyticsConfiguration(request *AddVideoAnalyticsConfiguration) (*AddVideoAnalyticsConfigurationResponse, error) + + AddVideoAnalyticsConfigurationContext(ctx context.Context, request *AddVideoAnalyticsConfiguration) (*AddVideoAnalyticsConfigurationResponse, error) + + /* This operation removes a VideoAnalyticsConfiguration from an existing media profile. If the media profile does not contain a VideoAnalyticsConfiguration, the operation has no effect. + The removal shall be persistent. */ + RemoveVideoAnalyticsConfiguration(request *RemoveVideoAnalyticsConfiguration) (*RemoveVideoAnalyticsConfigurationResponse, error) + + RemoveVideoAnalyticsConfigurationContext(ctx context.Context, request *RemoveVideoAnalyticsConfiguration) (*RemoveVideoAnalyticsConfigurationResponse, error) + + /* This operation adds a Metadata configuration to an existing media profile. If a configuration exists in the media profile, it will be replaced. The change shall be persistent. Adding a MetadataConfiguration to a Profile means that streams using that profile contain metadata. Metadata can consist of events, PTZ status, and/or video analytics data. */ + AddMetadataConfiguration(request *AddMetadataConfiguration) (*AddMetadataConfigurationResponse, error) + + AddMetadataConfigurationContext(ctx context.Context, request *AddMetadataConfiguration) (*AddMetadataConfigurationResponse, error) + + /* This operation removes a MetadataConfiguration from an existing media profile. If the media profile does not contain a MetadataConfiguration, the operation has no effect. The removal shall be persistent. */ + RemoveMetadataConfiguration(request *RemoveMetadataConfiguration) (*RemoveMetadataConfigurationResponse, error) + + RemoveMetadataConfigurationContext(ctx context.Context, request *RemoveMetadataConfiguration) (*RemoveMetadataConfigurationResponse, error) + + /* This operation adds an AudioOutputConfiguration to an existing media profile. If a configuration exists in the media profile, it will be replaced. The change shall be persistent. */ + AddAudioOutputConfiguration(request *AddAudioOutputConfiguration) (*AddAudioOutputConfigurationResponse, error) + + AddAudioOutputConfigurationContext(ctx context.Context, request *AddAudioOutputConfiguration) (*AddAudioOutputConfigurationResponse, error) + + /* This operation removes an AudioOutputConfiguration from an existing media profile. If the media profile does not contain an AudioOutputConfiguration, the operation has no effect. The removal shall be persistent. */ + RemoveAudioOutputConfiguration(request *RemoveAudioOutputConfiguration) (*RemoveAudioOutputConfigurationResponse, error) + + RemoveAudioOutputConfigurationContext(ctx context.Context, request *RemoveAudioOutputConfiguration) (*RemoveAudioOutputConfigurationResponse, error) + + /* This operation adds an AudioDecoderConfiguration to an existing media profile. If a configuration exists in the media profile, it shall be replaced. The change shall be persistent. */ + AddAudioDecoderConfiguration(request *AddAudioDecoderConfiguration) (*AddAudioDecoderConfigurationResponse, error) + + AddAudioDecoderConfigurationContext(ctx context.Context, request *AddAudioDecoderConfiguration) (*AddAudioDecoderConfigurationResponse, error) + + /* This operation removes an AudioDecoderConfiguration from an existing media profile. If the media profile does not contain an AudioDecoderConfiguration, the operation has no effect. The removal shall be persistent. */ + RemoveAudioDecoderConfiguration(request *RemoveAudioDecoderConfiguration) (*RemoveAudioDecoderConfigurationResponse, error) + + RemoveAudioDecoderConfigurationContext(ctx context.Context, request *RemoveAudioDecoderConfiguration) (*RemoveAudioDecoderConfigurationResponse, error) + + /* This operation deletes a profile. This change shall always be persistent. Deletion of a profile is only possible for non-fixed profiles */ + DeleteProfile(request *DeleteProfile) (*DeleteProfileResponse, error) + + DeleteProfileContext(ctx context.Context, request *DeleteProfile) (*DeleteProfileResponse, error) + + /* This operation lists all existing video source configurations for a device. The client need not know anything about the video source configurations in order to use the command. */ + GetVideoSourceConfigurations(request *GetVideoSourceConfigurations) (*GetVideoSourceConfigurationsResponse, error) + + GetVideoSourceConfigurationsContext(ctx context.Context, request *GetVideoSourceConfigurations) (*GetVideoSourceConfigurationsResponse, error) + + /* This operation lists all existing video encoder configurations of a device. This command lists all configured video encoder configurations in a device. The client need not know anything apriori about the video encoder configurations in order to use the command. */ + GetVideoEncoderConfigurations(request *GetVideoEncoderConfigurations) (*GetVideoEncoderConfigurationsResponse, error) + + GetVideoEncoderConfigurationsContext(ctx context.Context, request *GetVideoEncoderConfigurations) (*GetVideoEncoderConfigurationsResponse, error) + + /* This operation lists all existing audio source configurations of a device. This command lists all audio source configurations in a device. The client need not know anything apriori about the audio source configurations in order to use the command. */ + GetAudioSourceConfigurations(request *GetAudioSourceConfigurations) (*GetAudioSourceConfigurationsResponse, error) + + GetAudioSourceConfigurationsContext(ctx context.Context, request *GetAudioSourceConfigurations) (*GetAudioSourceConfigurationsResponse, error) + + /* This operation lists all existing device audio encoder configurations. The client need not know anything apriori about the audio encoder configurations in order to use the command. */ + GetAudioEncoderConfigurations(request *GetAudioEncoderConfigurations) (*GetAudioEncoderConfigurationsResponse, error) + + GetAudioEncoderConfigurationsContext(ctx context.Context, request *GetAudioEncoderConfigurations) (*GetAudioEncoderConfigurationsResponse, error) + + /* This operation lists all video analytics configurations of a device. This command lists all configured video analytics in a device. The client need not know anything apriori about the video analytics in order to use the command. */ + GetVideoAnalyticsConfigurations(request *GetVideoAnalyticsConfigurations) (*GetVideoAnalyticsConfigurationsResponse, error) + + GetVideoAnalyticsConfigurationsContext(ctx context.Context, request *GetVideoAnalyticsConfigurations) (*GetVideoAnalyticsConfigurationsResponse, error) + + /* This operation lists all existing metadata configurations. The client need not know anything apriori about the metadata in order to use the command. */ + GetMetadataConfigurations(request *GetMetadataConfigurations) (*GetMetadataConfigurationsResponse, error) + + GetMetadataConfigurationsContext(ctx context.Context, request *GetMetadataConfigurations) (*GetMetadataConfigurationsResponse, error) + + /* This command lists all existing AudioOutputConfigurations of a device. The NVC need not know anything apriori about the audio configurations to use this command. */ + GetAudioOutputConfigurations(request *GetAudioOutputConfigurations) (*GetAudioOutputConfigurationsResponse, error) + + GetAudioOutputConfigurationsContext(ctx context.Context, request *GetAudioOutputConfigurations) (*GetAudioOutputConfigurationsResponse, error) + + /* This command lists all existing AudioDecoderConfigurations of a device. The NVC need not know anything apriori about the audio decoder configurations in order to + use this command. */ + GetAudioDecoderConfigurations(request *GetAudioDecoderConfigurations) (*GetAudioDecoderConfigurationsResponse, error) + + GetAudioDecoderConfigurationsContext(ctx context.Context, request *GetAudioDecoderConfigurations) (*GetAudioDecoderConfigurationsResponse, error) + + /* If the video source configuration token is already known, the video source configuration can be fetched through the GetVideoSourceConfiguration command. */ + GetVideoSourceConfiguration(request *GetVideoSourceConfiguration) (*GetVideoSourceConfigurationResponse, error) + + GetVideoSourceConfigurationContext(ctx context.Context, request *GetVideoSourceConfiguration) (*GetVideoSourceConfigurationResponse, error) + + /* If the video encoder configuration token is already known, the encoder configuration can be fetched through the GetVideoEncoderConfiguration command. */ + GetVideoEncoderConfiguration(request *GetVideoEncoderConfiguration) (*GetVideoEncoderConfigurationResponse, error) + + GetVideoEncoderConfigurationContext(ctx context.Context, request *GetVideoEncoderConfiguration) (*GetVideoEncoderConfigurationResponse, error) + + /* The GetAudioSourceConfiguration command fetches the audio source configurations if the audio source configuration token is already known. An */ + GetAudioSourceConfiguration(request *GetAudioSourceConfiguration) (*GetAudioSourceConfigurationResponse, error) + + GetAudioSourceConfigurationContext(ctx context.Context, request *GetAudioSourceConfiguration) (*GetAudioSourceConfigurationResponse, error) + + /* The GetAudioEncoderConfiguration command fetches the encoder configuration if the audio encoder configuration token is known. */ + GetAudioEncoderConfiguration(request *GetAudioEncoderConfiguration) (*GetAudioEncoderConfigurationResponse, error) + + GetAudioEncoderConfigurationContext(ctx context.Context, request *GetAudioEncoderConfiguration) (*GetAudioEncoderConfigurationResponse, error) + + /* The GetVideoAnalyticsConfiguration command fetches the video analytics configuration if the video analytics token is known. */ + GetVideoAnalyticsConfiguration(request *GetVideoAnalyticsConfiguration) (*GetVideoAnalyticsConfigurationResponse, error) + + GetVideoAnalyticsConfigurationContext(ctx context.Context, request *GetVideoAnalyticsConfiguration) (*GetVideoAnalyticsConfigurationResponse, error) + + /* The GetMetadataConfiguration command fetches the metadata configuration if the metadata token is known. */ + GetMetadataConfiguration(request *GetMetadataConfiguration) (*GetMetadataConfigurationResponse, error) + + GetMetadataConfigurationContext(ctx context.Context, request *GetMetadataConfiguration) (*GetMetadataConfigurationResponse, error) + + /* If the audio output configuration token is already known, the output configuration can be fetched through the GetAudioOutputConfiguration command. */ + GetAudioOutputConfiguration(request *GetAudioOutputConfiguration) (*GetAudioOutputConfigurationResponse, error) + + GetAudioOutputConfigurationContext(ctx context.Context, request *GetAudioOutputConfiguration) (*GetAudioOutputConfigurationResponse, error) + + /* If the audio decoder configuration token is already known, the decoder configuration can be fetched through the GetAudioDecoderConfiguration command. */ + GetAudioDecoderConfiguration(request *GetAudioDecoderConfiguration) (*GetAudioDecoderConfigurationResponse, error) + + GetAudioDecoderConfigurationContext(ctx context.Context, request *GetAudioDecoderConfiguration) (*GetAudioDecoderConfigurationResponse, error) + + /* This operation lists all the video encoder configurations of the device that are compatible with a certain media profile. Each of the returned configurations shall be a valid input parameter for the AddVideoEncoderConfiguration command on the media profile. The result will vary depending on the capabilities, configurations and settings in the device. */ + GetCompatibleVideoEncoderConfigurations(request *GetCompatibleVideoEncoderConfigurations) (*GetCompatibleVideoEncoderConfigurationsResponse, error) + + GetCompatibleVideoEncoderConfigurationsContext(ctx context.Context, request *GetCompatibleVideoEncoderConfigurations) (*GetCompatibleVideoEncoderConfigurationsResponse, error) + + /* This operation requests all the video source configurations of the device that are compatible + with a certain media profile. Each of the returned configurations shall be a valid input + parameter for the AddVideoSourceConfiguration command on the media profile. The result + will vary depending on the capabilities, configurations and settings in the device. */ + GetCompatibleVideoSourceConfigurations(request *GetCompatibleVideoSourceConfigurations) (*GetCompatibleVideoSourceConfigurationsResponse, error) + + GetCompatibleVideoSourceConfigurationsContext(ctx context.Context, request *GetCompatibleVideoSourceConfigurations) (*GetCompatibleVideoSourceConfigurationsResponse, error) + + /* This operation requests all audio encoder configurations of a device that are compatible with a certain media profile. Each of the returned configurations shall be a valid input parameter for the AddAudioSourceConfiguration command on the media profile. The result varies depending on the capabilities, configurations and settings in the device. */ + GetCompatibleAudioEncoderConfigurations(request *GetCompatibleAudioEncoderConfigurations) (*GetCompatibleAudioEncoderConfigurationsResponse, error) + + GetCompatibleAudioEncoderConfigurationsContext(ctx context.Context, request *GetCompatibleAudioEncoderConfigurations) (*GetCompatibleAudioEncoderConfigurationsResponse, error) + + /* This operation requests all audio source configurations of the device that are compatible with a certain media profile. Each of the returned configurations shall be a valid input parameter for the AddAudioEncoderConfiguration command on the media profile. The result varies depending on the capabilities, configurations and settings in the device. */ + GetCompatibleAudioSourceConfigurations(request *GetCompatibleAudioSourceConfigurations) (*GetCompatibleAudioSourceConfigurationsResponse, error) + + GetCompatibleAudioSourceConfigurationsContext(ctx context.Context, request *GetCompatibleAudioSourceConfigurations) (*GetCompatibleAudioSourceConfigurationsResponse, error) + + /* This operation requests all video analytic configurations of the device that are compatible with a certain media profile. Each of the returned configurations shall be a valid input parameter for the AddVideoAnalyticsConfiguration command on the media profile. The result varies depending on the capabilities, configurations and settings in the device. */ + GetCompatibleVideoAnalyticsConfigurations(request *GetCompatibleVideoAnalyticsConfigurations) (*GetCompatibleVideoAnalyticsConfigurationsResponse, error) + + GetCompatibleVideoAnalyticsConfigurationsContext(ctx context.Context, request *GetCompatibleVideoAnalyticsConfigurations) (*GetCompatibleVideoAnalyticsConfigurationsResponse, error) + + /* This operation requests all the metadata configurations of the device that are compatible with a certain media profile. Each of the returned configurations shall be a valid input parameter for the AddMetadataConfiguration command on the media profile. The result varies depending on the capabilities, configurations and settings in the device. */ + GetCompatibleMetadataConfigurations(request *GetCompatibleMetadataConfigurations) (*GetCompatibleMetadataConfigurationsResponse, error) + + GetCompatibleMetadataConfigurationsContext(ctx context.Context, request *GetCompatibleMetadataConfigurations) (*GetCompatibleMetadataConfigurationsResponse, error) + + /* This command lists all audio output configurations of a device that are compatible with a certain media profile. Each returned configuration shall be a valid input for the + AddAudioOutputConfiguration command. */ + GetCompatibleAudioOutputConfigurations(request *GetCompatibleAudioOutputConfigurations) (*GetCompatibleAudioOutputConfigurationsResponse, error) + + GetCompatibleAudioOutputConfigurationsContext(ctx context.Context, request *GetCompatibleAudioOutputConfigurations) (*GetCompatibleAudioOutputConfigurationsResponse, error) + + /* This operation lists all the audio decoder configurations of the device that are compatible with a certain media profile. Each of the returned configurations shall be a valid input parameter for the AddAudioDecoderConfiguration command on the media profile. */ + GetCompatibleAudioDecoderConfigurations(request *GetCompatibleAudioDecoderConfigurations) (*GetCompatibleAudioDecoderConfigurationsResponse, error) + + GetCompatibleAudioDecoderConfigurationsContext(ctx context.Context, request *GetCompatibleAudioDecoderConfigurations) (*GetCompatibleAudioDecoderConfigurationsResponse, error) + + /* This operation modifies a video source configuration. The ForcePersistence flag indicates if the changes shall remain after reboot of the device. Running streams using this configuration may be immediately updated according to the new settings. The changes are not guaranteed to take effect unless the client requests a new stream URI and restarts any affected stream. NVC methods for changing a running stream are out of scope for this specification. */ + SetVideoSourceConfiguration(request *SetVideoSourceConfiguration) (*SetVideoSourceConfigurationResponse, error) + + SetVideoSourceConfigurationContext(ctx context.Context, request *SetVideoSourceConfiguration) (*SetVideoSourceConfigurationResponse, error) + + /* This operation modifies a video encoder configuration. The ForcePersistence flag indicates if the changes shall remain after reboot of the device. Changes in the Multicast settings shall always be persistent. Running streams using this configuration may be immediately updated according to the new settings. The changes are not guaranteed to take effect unless the client requests a new stream URI and restarts any affected stream. NVC methods for changing a running stream are out of scope for this specification. SessionTimeout is provided as a hint for keeping rtsp session by a device. If necessary the device may adapt parameter values for SessionTimeout elements without returning an error. For the time between keep alive calls the client shall adhere to the timeout value signaled via RTSP. */ + SetVideoEncoderConfiguration(request *SetVideoEncoderConfiguration) (*SetVideoEncoderConfigurationResponse, error) + + SetVideoEncoderConfigurationContext(ctx context.Context, request *SetVideoEncoderConfiguration) (*SetVideoEncoderConfigurationResponse, error) + + /* This operation modifies an audio source configuration. The ForcePersistence flag indicates if + the changes shall remain after reboot of the device. Running streams using this configuration + may be immediately updated according to the new settings. The changes are not guaranteed + to take effect unless the client requests a new stream URI and restarts any affected stream + NVC methods for changing a running stream are out of scope for this specification. */ + SetAudioSourceConfiguration(request *SetAudioSourceConfiguration) (*SetAudioSourceConfigurationResponse, error) + + SetAudioSourceConfigurationContext(ctx context.Context, request *SetAudioSourceConfiguration) (*SetAudioSourceConfigurationResponse, error) + + /* This operation modifies an audio encoder configuration. The ForcePersistence flag indicates if + the changes shall remain after reboot of the device. Running streams using this configuration may be immediately updated + according to the new settings. The changes are not guaranteed to take effect unless the client + requests a new stream URI and restarts any affected streams. NVC methods for changing a + running stream are out of scope for this specification. */ + SetAudioEncoderConfiguration(request *SetAudioEncoderConfiguration) (*SetAudioEncoderConfigurationResponse, error) + + SetAudioEncoderConfigurationContext(ctx context.Context, request *SetAudioEncoderConfiguration) (*SetAudioEncoderConfigurationResponse, error) + + /* A video analytics configuration is modified using this command. The ForcePersistence flag + indicates if the changes shall remain after reboot of the device or not. Running streams using + this configuration shall be immediately updated according to the new settings. Otherwise + inconsistencies can occur between the scene description processed by the rule engine and + the notifications produced by analytics engine and rule engine which reference the very same + video analytics configuration token. */ + SetVideoAnalyticsConfiguration(request *SetVideoAnalyticsConfiguration) (*SetVideoAnalyticsConfigurationResponse, error) + + SetVideoAnalyticsConfigurationContext(ctx context.Context, request *SetVideoAnalyticsConfiguration) (*SetVideoAnalyticsConfigurationResponse, error) + + /* This operation modifies a metadata configuration. The ForcePersistence flag indicates if the + changes shall remain after reboot of the device. Changes in the Multicast settings shall + always be persistent. Running streams using this configuration may be updated immediately + according to the new settings. The changes are not guaranteed to take effect unless the client + requests a new stream URI and restarts any affected streams. NVC methods for changing a + running stream are out of scope for this specification. */ + SetMetadataConfiguration(request *SetMetadataConfiguration) (*SetMetadataConfigurationResponse, error) + + SetMetadataConfigurationContext(ctx context.Context, request *SetMetadataConfiguration) (*SetMetadataConfigurationResponse, error) + + /* This operation modifies an audio output configuration. The ForcePersistence flag indicates if + the changes shall remain after reboot of the device. */ + SetAudioOutputConfiguration(request *SetAudioOutputConfiguration) (*SetAudioOutputConfigurationResponse, error) + + SetAudioOutputConfigurationContext(ctx context.Context, request *SetAudioOutputConfiguration) (*SetAudioOutputConfigurationResponse, error) + + /* This operation modifies an audio decoder configuration. The ForcePersistence flag indicates if + the changes shall remain after reboot of the device. */ + SetAudioDecoderConfiguration(request *SetAudioDecoderConfiguration) (*SetAudioDecoderConfigurationResponse, error) + + SetAudioDecoderConfigurationContext(ctx context.Context, request *SetAudioDecoderConfiguration) (*SetAudioDecoderConfigurationResponse, error) + + /* This operation returns the available options (supported values and ranges for video source configuration parameters) when the video source parameters are + reconfigured If a video source configuration is specified, the options shall concern that + particular configuration. If a media profile is specified, the options shall be compatible with + that media profile. */ + GetVideoSourceConfigurationOptions(request *GetVideoSourceConfigurationOptions) (*GetVideoSourceConfigurationOptionsResponse, error) + + GetVideoSourceConfigurationOptionsContext(ctx context.Context, request *GetVideoSourceConfigurationOptions) (*GetVideoSourceConfigurationOptionsResponse, error) + + /* This operation returns the available options (supported values and ranges for video encoder + configuration parameters) when the video encoder parameters are reconfigured. + For JPEG, MPEG4 and H264 extension elements have been defined that provide additional information. A device must provide the + XxxOption information for all encodings supported and should additionally provide the corresponding XxxOption2 information. + This response contains the available video encoder configuration options. If a video encoder configuration is specified, + the options shall concern that particular configuration. If a media profile is specified, the options shall be + compatible with that media profile. If no tokens are specified, the options shall be considered generic for the device. + */ + GetVideoEncoderConfigurationOptions(request *GetVideoEncoderConfigurationOptions) (*GetVideoEncoderConfigurationOptionsResponse, error) + + GetVideoEncoderConfigurationOptionsContext(ctx context.Context, request *GetVideoEncoderConfigurationOptions) (*GetVideoEncoderConfigurationOptionsResponse, error) + + /* This operation returns the available options (supported values and ranges for audio source configuration parameters) when the audio source parameters are + reconfigured. If an audio source configuration is specified, the options shall concern that + particular configuration. If a media profile is specified, the options shall be compatible with + that media profile. */ + GetAudioSourceConfigurationOptions(request *GetAudioSourceConfigurationOptions) (*GetAudioSourceConfigurationOptionsResponse, error) + + GetAudioSourceConfigurationOptionsContext(ctx context.Context, request *GetAudioSourceConfigurationOptions) (*GetAudioSourceConfigurationOptionsResponse, error) + + /* This operation returns the available options (supported values and ranges for audio encoder configuration parameters) when the audio encoder parameters are + reconfigured. */ + GetAudioEncoderConfigurationOptions(request *GetAudioEncoderConfigurationOptions) (*GetAudioEncoderConfigurationOptionsResponse, error) + + GetAudioEncoderConfigurationOptionsContext(ctx context.Context, request *GetAudioEncoderConfigurationOptions) (*GetAudioEncoderConfigurationOptionsResponse, error) + + /* This operation returns the available options (supported values and ranges for metadata configuration parameters) for changing the metadata configuration. */ + GetMetadataConfigurationOptions(request *GetMetadataConfigurationOptions) (*GetMetadataConfigurationOptionsResponse, error) + + GetMetadataConfigurationOptionsContext(ctx context.Context, request *GetMetadataConfigurationOptions) (*GetMetadataConfigurationOptionsResponse, error) + + /* This operation returns the available options (supported values and ranges for audio output configuration parameters) for configuring an audio output. */ + GetAudioOutputConfigurationOptions(request *GetAudioOutputConfigurationOptions) (*GetAudioOutputConfigurationOptionsResponse, error) + + GetAudioOutputConfigurationOptionsContext(ctx context.Context, request *GetAudioOutputConfigurationOptions) (*GetAudioOutputConfigurationOptionsResponse, error) + + /* This command list the audio decoding capabilities for a given profile and configuration of a + device. */ + GetAudioDecoderConfigurationOptions(request *GetAudioDecoderConfigurationOptions) (*GetAudioDecoderConfigurationOptionsResponse, error) + + GetAudioDecoderConfigurationOptionsContext(ctx context.Context, request *GetAudioDecoderConfigurationOptions) (*GetAudioDecoderConfigurationOptionsResponse, error) + + /* The GetGuaranteedNumberOfVideoEncoderInstances command can be used to request the + minimum number of guaranteed video encoder instances (applications) per Video Source + Configuration. */ + GetGuaranteedNumberOfVideoEncoderInstances(request *GetGuaranteedNumberOfVideoEncoderInstances) (*GetGuaranteedNumberOfVideoEncoderInstancesResponse, error) + + GetGuaranteedNumberOfVideoEncoderInstancesContext(ctx context.Context, request *GetGuaranteedNumberOfVideoEncoderInstances) (*GetGuaranteedNumberOfVideoEncoderInstancesResponse, error) + + /* This operation requests a URI that can be used to initiate a live media stream using RTSP as + the control protocol. The returned URI shall remain valid indefinitely even if the profile is + changed. The ValidUntilConnect, ValidUntilReboot and Timeout Parameter shall be set + accordingly (ValidUntilConnect=false, ValidUntilReboot=false, timeout=PT0S). + The correct syntax for the StreamSetup element for these media stream setups defined in 5.1.1 of the streaming specification are as follows: + + + If a multicast stream is requested at least one of VideoEncoderConfiguration, AudioEncoderConfiguration and MetadataConfiguration shall have a valid multicast setting. + For full compatibility with other ONVIF services a device should not generate Uris longer than + 128 octets. */ + GetStreamUri(request *GetStreamUri) (*GetStreamUriResponse, error) + + GetStreamUriContext(ctx context.Context, request *GetStreamUri) (*GetStreamUriResponse, error) + + /* This command starts multicast streaming using a specified media profile of a device. + Streaming continues until StopMulticastStreaming is called for the same Profile. The + streaming shall continue after a reboot of the device until a StopMulticastStreaming request is + received. The multicast address, port and TTL are configured in the + VideoEncoderConfiguration, AudioEncoderConfiguration and MetadataConfiguration + respectively. */ + StartMulticastStreaming(request *StartMulticastStreaming) (*StartMulticastStreamingResponse, error) + + StartMulticastStreamingContext(ctx context.Context, request *StartMulticastStreaming) (*StartMulticastStreamingResponse, error) + + /* This command stop multicast streaming using a specified media profile of a device */ + StopMulticastStreaming(request *StopMulticastStreaming) (*StopMulticastStreamingResponse, error) + + StopMulticastStreamingContext(ctx context.Context, request *StopMulticastStreaming) (*StopMulticastStreamingResponse, error) + + /* Synchronization points allow clients to decode and correctly use all data after the + synchronization point. + For example, if a video stream is configured with a large I-frame distance and a client loses a + single packet, the client does not display video until the next I-frame is transmitted. In such + cases, the client can request a Synchronization Point which enforces the device to add an I-Frame as soon as possible. Clients can request Synchronization Points for profiles. The device + shall add synchronization points for all streams associated with this profile. + Similarly, a synchronization point is used to get an update on full PTZ or event status through + the metadata stream. + If a video stream is associated with the profile, an I-frame shall be added to this video stream. + If a PTZ metadata stream is associated to the profile, + the PTZ position shall be repeated within the metadata stream. */ + SetSynchronizationPoint(request *SetSynchronizationPoint) (*SetSynchronizationPointResponse, error) + + SetSynchronizationPointContext(ctx context.Context, request *SetSynchronizationPoint) (*SetSynchronizationPointResponse, error) + + /* A client uses the GetSnapshotUri command to obtain a JPEG snapshot from the + device. The returned URI shall remain valid indefinitely even if the profile is changed. The + ValidUntilConnect, ValidUntilReboot and Timeout Parameter shall be set accordingly + (ValidUntilConnect=false, ValidUntilReboot=false, timeout=PT0S). The URI can be used for + acquiring a JPEG image through a HTTP GET operation. The image encoding will always be + JPEG regardless of the encoding setting in the media profile. The Jpeg settings + (like resolution or quality) may be taken from the profile if suitable. The provided + image will be updated automatically and independent from calls to GetSnapshotUri. */ + GetSnapshotUri(request *GetSnapshotUri) (*GetSnapshotUriResponse, error) + + GetSnapshotUriContext(ctx context.Context, request *GetSnapshotUri) (*GetSnapshotUriResponse, error) + + /* A device returns the information for current video source mode and settable video source modes of specified video source. A device that indicates a capability of VideoSourceModes shall support this command. */ + GetVideoSourceModes(request *GetVideoSourceModes) (*GetVideoSourceModesResponse, error) + + GetVideoSourceModesContext(ctx context.Context, request *GetVideoSourceModes) (*GetVideoSourceModesResponse, error) + + /* SetVideoSourceMode changes the media profile structure relating to video source for the specified video source mode. A device that indicates a capability of VideoSourceModes shall support this command. The behavior after changing the mode is not defined in this specification. */ + SetVideoSourceMode(request *SetVideoSourceMode) (*SetVideoSourceModeResponse, error) + + SetVideoSourceModeContext(ctx context.Context, request *SetVideoSourceMode) (*SetVideoSourceModeResponse, error) + + /* Get the OSDs. */ + GetOSDs(request *GetOSDs) (*GetOSDsResponse, error) + + GetOSDsContext(ctx context.Context, request *GetOSDs) (*GetOSDsResponse, error) + + /* Get the OSD. */ + GetOSD(request *GetOSD) (*GetOSDResponse, error) + + GetOSDContext(ctx context.Context, request *GetOSD) (*GetOSDResponse, error) + + /* Get the OSD Options. */ + GetOSDOptions(request *GetOSDOptions) (*GetOSDOptionsResponse, error) + + GetOSDOptionsContext(ctx context.Context, request *GetOSDOptions) (*GetOSDOptionsResponse, error) + + /* Set the OSD */ + SetOSD(request *SetOSD) (*SetOSDResponse, error) + + SetOSDContext(ctx context.Context, request *SetOSD) (*SetOSDResponse, error) + + /* Create the OSD. */ + CreateOSD(request *CreateOSD) (*CreateOSDResponse, error) + + CreateOSDContext(ctx context.Context, request *CreateOSD) (*CreateOSDResponse, error) + + /* Delete the OSD. */ + DeleteOSD(request *DeleteOSD) (*DeleteOSDResponse, error) + + DeleteOSDContext(ctx context.Context, request *DeleteOSD) (*DeleteOSDResponse, error) +} + +type media struct { + client *soap.Client +} + +func NewMedia(client *soap.Client) Media { + return &media{ + client: client, + } +} + +func (service *media) GetServiceCapabilitiesContext(ctx context.Context, request *GetServiceCapabilities) (*GetServiceCapabilitiesResponse, error) { + response := new(GetServiceCapabilitiesResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetServiceCapabilities(request *GetServiceCapabilities) (*GetServiceCapabilitiesResponse, error) { + return service.GetServiceCapabilitiesContext( + context.Background(), + request, + ) +} + +func (service *media) GetVideoSourcesContext(ctx context.Context, request *GetVideoSources) (*GetVideoSourcesResponse, error) { + response := new(GetVideoSourcesResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetVideoSources(request *GetVideoSources) (*GetVideoSourcesResponse, error) { + return service.GetVideoSourcesContext( + context.Background(), + request, + ) +} + +func (service *media) GetAudioSourcesContext(ctx context.Context, request *GetAudioSources) (*GetAudioSourcesResponse, error) { + response := new(GetAudioSourcesResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetAudioSources(request *GetAudioSources) (*GetAudioSourcesResponse, error) { + return service.GetAudioSourcesContext( + context.Background(), + request, + ) +} + +func (service *media) GetAudioOutputsContext(ctx context.Context, request *GetAudioOutputs) (*GetAudioOutputsResponse, error) { + response := new(GetAudioOutputsResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetAudioOutputs(request *GetAudioOutputs) (*GetAudioOutputsResponse, error) { + return service.GetAudioOutputsContext( + context.Background(), + request, + ) +} + +func (service *media) CreateProfileContext(ctx context.Context, request *CreateProfile) (*CreateProfileResponse, error) { + response := new(CreateProfileResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) CreateProfile(request *CreateProfile) (*CreateProfileResponse, error) { + return service.CreateProfileContext( + context.Background(), + request, + ) +} + +func (service *media) GetProfileContext(ctx context.Context, request *GetProfile) (*GetProfileResponse, error) { + response := new(GetProfileResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetProfile(request *GetProfile) (*GetProfileResponse, error) { + return service.GetProfileContext( + context.Background(), + request, + ) +} + +func (service *media) GetProfilesContext(ctx context.Context, request *GetProfiles) (*GetProfilesResponse, error) { + response := new(GetProfilesResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetProfiles(request *GetProfiles) (*GetProfilesResponse, error) { + return service.GetProfilesContext( + context.Background(), + request, + ) +} + +func (service *media) AddVideoEncoderConfigurationContext(ctx context.Context, request *AddVideoEncoderConfiguration) (*AddVideoEncoderConfigurationResponse, error) { + response := new(AddVideoEncoderConfigurationResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) AddVideoEncoderConfiguration(request *AddVideoEncoderConfiguration) (*AddVideoEncoderConfigurationResponse, error) { + return service.AddVideoEncoderConfigurationContext( + context.Background(), + request, + ) +} + +func (service *media) RemoveVideoEncoderConfigurationContext(ctx context.Context, request *RemoveVideoEncoderConfiguration) (*RemoveVideoEncoderConfigurationResponse, error) { + response := new(RemoveVideoEncoderConfigurationResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) RemoveVideoEncoderConfiguration(request *RemoveVideoEncoderConfiguration) (*RemoveVideoEncoderConfigurationResponse, error) { + return service.RemoveVideoEncoderConfigurationContext( + context.Background(), + request, + ) +} + +func (service *media) AddVideoSourceConfigurationContext(ctx context.Context, request *AddVideoSourceConfiguration) (*AddVideoSourceConfigurationResponse, error) { + response := new(AddVideoSourceConfigurationResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) AddVideoSourceConfiguration(request *AddVideoSourceConfiguration) (*AddVideoSourceConfigurationResponse, error) { + return service.AddVideoSourceConfigurationContext( + context.Background(), + request, + ) +} + +func (service *media) RemoveVideoSourceConfigurationContext(ctx context.Context, request *RemoveVideoSourceConfiguration) (*RemoveVideoSourceConfigurationResponse, error) { + response := new(RemoveVideoSourceConfigurationResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) RemoveVideoSourceConfiguration(request *RemoveVideoSourceConfiguration) (*RemoveVideoSourceConfigurationResponse, error) { + return service.RemoveVideoSourceConfigurationContext( + context.Background(), + request, + ) +} + +func (service *media) AddAudioEncoderConfigurationContext(ctx context.Context, request *AddAudioEncoderConfiguration) (*AddAudioEncoderConfigurationResponse, error) { + response := new(AddAudioEncoderConfigurationResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) AddAudioEncoderConfiguration(request *AddAudioEncoderConfiguration) (*AddAudioEncoderConfigurationResponse, error) { + return service.AddAudioEncoderConfigurationContext( + context.Background(), + request, + ) +} + +func (service *media) RemoveAudioEncoderConfigurationContext(ctx context.Context, request *RemoveAudioEncoderConfiguration) (*RemoveAudioEncoderConfigurationResponse, error) { + response := new(RemoveAudioEncoderConfigurationResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) RemoveAudioEncoderConfiguration(request *RemoveAudioEncoderConfiguration) (*RemoveAudioEncoderConfigurationResponse, error) { + return service.RemoveAudioEncoderConfigurationContext( + context.Background(), + request, + ) +} + +func (service *media) AddAudioSourceConfigurationContext(ctx context.Context, request *AddAudioSourceConfiguration) (*AddAudioSourceConfigurationResponse, error) { + response := new(AddAudioSourceConfigurationResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) AddAudioSourceConfiguration(request *AddAudioSourceConfiguration) (*AddAudioSourceConfigurationResponse, error) { + return service.AddAudioSourceConfigurationContext( + context.Background(), + request, + ) +} + +func (service *media) RemoveAudioSourceConfigurationContext(ctx context.Context, request *RemoveAudioSourceConfiguration) (*RemoveAudioSourceConfigurationResponse, error) { + response := new(RemoveAudioSourceConfigurationResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) RemoveAudioSourceConfiguration(request *RemoveAudioSourceConfiguration) (*RemoveAudioSourceConfigurationResponse, error) { + return service.RemoveAudioSourceConfigurationContext( + context.Background(), + request, + ) +} + +func (service *media) AddPTZConfigurationContext(ctx context.Context, request *AddPTZConfiguration) (*AddPTZConfigurationResponse, error) { + response := new(AddPTZConfigurationResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) AddPTZConfiguration(request *AddPTZConfiguration) (*AddPTZConfigurationResponse, error) { + return service.AddPTZConfigurationContext( + context.Background(), + request, + ) +} + +func (service *media) RemovePTZConfigurationContext(ctx context.Context, request *RemovePTZConfiguration) (*RemovePTZConfigurationResponse, error) { + response := new(RemovePTZConfigurationResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) RemovePTZConfiguration(request *RemovePTZConfiguration) (*RemovePTZConfigurationResponse, error) { + return service.RemovePTZConfigurationContext( + context.Background(), + request, + ) +} + +func (service *media) AddVideoAnalyticsConfigurationContext(ctx context.Context, request *AddVideoAnalyticsConfiguration) (*AddVideoAnalyticsConfigurationResponse, error) { + response := new(AddVideoAnalyticsConfigurationResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) AddVideoAnalyticsConfiguration(request *AddVideoAnalyticsConfiguration) (*AddVideoAnalyticsConfigurationResponse, error) { + return service.AddVideoAnalyticsConfigurationContext( + context.Background(), + request, + ) +} + +func (service *media) RemoveVideoAnalyticsConfigurationContext(ctx context.Context, request *RemoveVideoAnalyticsConfiguration) (*RemoveVideoAnalyticsConfigurationResponse, error) { + response := new(RemoveVideoAnalyticsConfigurationResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) RemoveVideoAnalyticsConfiguration(request *RemoveVideoAnalyticsConfiguration) (*RemoveVideoAnalyticsConfigurationResponse, error) { + return service.RemoveVideoAnalyticsConfigurationContext( + context.Background(), + request, + ) +} + +func (service *media) AddMetadataConfigurationContext(ctx context.Context, request *AddMetadataConfiguration) (*AddMetadataConfigurationResponse, error) { + response := new(AddMetadataConfigurationResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) AddMetadataConfiguration(request *AddMetadataConfiguration) (*AddMetadataConfigurationResponse, error) { + return service.AddMetadataConfigurationContext( + context.Background(), + request, + ) +} + +func (service *media) RemoveMetadataConfigurationContext(ctx context.Context, request *RemoveMetadataConfiguration) (*RemoveMetadataConfigurationResponse, error) { + response := new(RemoveMetadataConfigurationResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) RemoveMetadataConfiguration(request *RemoveMetadataConfiguration) (*RemoveMetadataConfigurationResponse, error) { + return service.RemoveMetadataConfigurationContext( + context.Background(), + request, + ) +} + +func (service *media) AddAudioOutputConfigurationContext(ctx context.Context, request *AddAudioOutputConfiguration) (*AddAudioOutputConfigurationResponse, error) { + response := new(AddAudioOutputConfigurationResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) AddAudioOutputConfiguration(request *AddAudioOutputConfiguration) (*AddAudioOutputConfigurationResponse, error) { + return service.AddAudioOutputConfigurationContext( + context.Background(), + request, + ) +} + +func (service *media) RemoveAudioOutputConfigurationContext(ctx context.Context, request *RemoveAudioOutputConfiguration) (*RemoveAudioOutputConfigurationResponse, error) { + response := new(RemoveAudioOutputConfigurationResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) RemoveAudioOutputConfiguration(request *RemoveAudioOutputConfiguration) (*RemoveAudioOutputConfigurationResponse, error) { + return service.RemoveAudioOutputConfigurationContext( + context.Background(), + request, + ) +} + +func (service *media) AddAudioDecoderConfigurationContext(ctx context.Context, request *AddAudioDecoderConfiguration) (*AddAudioDecoderConfigurationResponse, error) { + response := new(AddAudioDecoderConfigurationResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) AddAudioDecoderConfiguration(request *AddAudioDecoderConfiguration) (*AddAudioDecoderConfigurationResponse, error) { + return service.AddAudioDecoderConfigurationContext( + context.Background(), + request, + ) +} + +func (service *media) RemoveAudioDecoderConfigurationContext(ctx context.Context, request *RemoveAudioDecoderConfiguration) (*RemoveAudioDecoderConfigurationResponse, error) { + response := new(RemoveAudioDecoderConfigurationResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) RemoveAudioDecoderConfiguration(request *RemoveAudioDecoderConfiguration) (*RemoveAudioDecoderConfigurationResponse, error) { + return service.RemoveAudioDecoderConfigurationContext( + context.Background(), + request, + ) +} + +func (service *media) DeleteProfileContext(ctx context.Context, request *DeleteProfile) (*DeleteProfileResponse, error) { + response := new(DeleteProfileResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) DeleteProfile(request *DeleteProfile) (*DeleteProfileResponse, error) { + return service.DeleteProfileContext( + context.Background(), + request, + ) +} + +func (service *media) GetVideoSourceConfigurationsContext(ctx context.Context, request *GetVideoSourceConfigurations) (*GetVideoSourceConfigurationsResponse, error) { + response := new(GetVideoSourceConfigurationsResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetVideoSourceConfigurations(request *GetVideoSourceConfigurations) (*GetVideoSourceConfigurationsResponse, error) { + return service.GetVideoSourceConfigurationsContext( + context.Background(), + request, + ) +} + +func (service *media) GetVideoEncoderConfigurationsContext(ctx context.Context, request *GetVideoEncoderConfigurations) (*GetVideoEncoderConfigurationsResponse, error) { + response := new(GetVideoEncoderConfigurationsResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetVideoEncoderConfigurations(request *GetVideoEncoderConfigurations) (*GetVideoEncoderConfigurationsResponse, error) { + return service.GetVideoEncoderConfigurationsContext( + context.Background(), + request, + ) +} + +func (service *media) GetAudioSourceConfigurationsContext(ctx context.Context, request *GetAudioSourceConfigurations) (*GetAudioSourceConfigurationsResponse, error) { + response := new(GetAudioSourceConfigurationsResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetAudioSourceConfigurations(request *GetAudioSourceConfigurations) (*GetAudioSourceConfigurationsResponse, error) { + return service.GetAudioSourceConfigurationsContext( + context.Background(), + request, + ) +} + +func (service *media) GetAudioEncoderConfigurationsContext(ctx context.Context, request *GetAudioEncoderConfigurations) (*GetAudioEncoderConfigurationsResponse, error) { + response := new(GetAudioEncoderConfigurationsResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetAudioEncoderConfigurations(request *GetAudioEncoderConfigurations) (*GetAudioEncoderConfigurationsResponse, error) { + return service.GetAudioEncoderConfigurationsContext( + context.Background(), + request, + ) +} + +func (service *media) GetVideoAnalyticsConfigurationsContext(ctx context.Context, request *GetVideoAnalyticsConfigurations) (*GetVideoAnalyticsConfigurationsResponse, error) { + response := new(GetVideoAnalyticsConfigurationsResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetVideoAnalyticsConfigurations(request *GetVideoAnalyticsConfigurations) (*GetVideoAnalyticsConfigurationsResponse, error) { + return service.GetVideoAnalyticsConfigurationsContext( + context.Background(), + request, + ) +} + +func (service *media) GetMetadataConfigurationsContext(ctx context.Context, request *GetMetadataConfigurations) (*GetMetadataConfigurationsResponse, error) { + response := new(GetMetadataConfigurationsResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetMetadataConfigurations(request *GetMetadataConfigurations) (*GetMetadataConfigurationsResponse, error) { + return service.GetMetadataConfigurationsContext( + context.Background(), + request, + ) +} + +func (service *media) GetAudioOutputConfigurationsContext(ctx context.Context, request *GetAudioOutputConfigurations) (*GetAudioOutputConfigurationsResponse, error) { + response := new(GetAudioOutputConfigurationsResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetAudioOutputConfigurations(request *GetAudioOutputConfigurations) (*GetAudioOutputConfigurationsResponse, error) { + return service.GetAudioOutputConfigurationsContext( + context.Background(), + request, + ) +} + +func (service *media) GetAudioDecoderConfigurationsContext(ctx context.Context, request *GetAudioDecoderConfigurations) (*GetAudioDecoderConfigurationsResponse, error) { + response := new(GetAudioDecoderConfigurationsResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetAudioDecoderConfigurations(request *GetAudioDecoderConfigurations) (*GetAudioDecoderConfigurationsResponse, error) { + return service.GetAudioDecoderConfigurationsContext( + context.Background(), + request, + ) +} + +func (service *media) GetVideoSourceConfigurationContext(ctx context.Context, request *GetVideoSourceConfiguration) (*GetVideoSourceConfigurationResponse, error) { + response := new(GetVideoSourceConfigurationResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetVideoSourceConfiguration(request *GetVideoSourceConfiguration) (*GetVideoSourceConfigurationResponse, error) { + return service.GetVideoSourceConfigurationContext( + context.Background(), + request, + ) +} + +func (service *media) GetVideoEncoderConfigurationContext(ctx context.Context, request *GetVideoEncoderConfiguration) (*GetVideoEncoderConfigurationResponse, error) { + response := new(GetVideoEncoderConfigurationResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetVideoEncoderConfiguration(request *GetVideoEncoderConfiguration) (*GetVideoEncoderConfigurationResponse, error) { + return service.GetVideoEncoderConfigurationContext( + context.Background(), + request, + ) +} + +func (service *media) GetAudioSourceConfigurationContext(ctx context.Context, request *GetAudioSourceConfiguration) (*GetAudioSourceConfigurationResponse, error) { + response := new(GetAudioSourceConfigurationResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetAudioSourceConfiguration(request *GetAudioSourceConfiguration) (*GetAudioSourceConfigurationResponse, error) { + return service.GetAudioSourceConfigurationContext( + context.Background(), + request, + ) +} + +func (service *media) GetAudioEncoderConfigurationContext(ctx context.Context, request *GetAudioEncoderConfiguration) (*GetAudioEncoderConfigurationResponse, error) { + response := new(GetAudioEncoderConfigurationResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetAudioEncoderConfiguration(request *GetAudioEncoderConfiguration) (*GetAudioEncoderConfigurationResponse, error) { + return service.GetAudioEncoderConfigurationContext( + context.Background(), + request, + ) +} + +func (service *media) GetVideoAnalyticsConfigurationContext(ctx context.Context, request *GetVideoAnalyticsConfiguration) (*GetVideoAnalyticsConfigurationResponse, error) { + response := new(GetVideoAnalyticsConfigurationResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetVideoAnalyticsConfiguration(request *GetVideoAnalyticsConfiguration) (*GetVideoAnalyticsConfigurationResponse, error) { + return service.GetVideoAnalyticsConfigurationContext( + context.Background(), + request, + ) +} + +func (service *media) GetMetadataConfigurationContext(ctx context.Context, request *GetMetadataConfiguration) (*GetMetadataConfigurationResponse, error) { + response := new(GetMetadataConfigurationResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetMetadataConfiguration(request *GetMetadataConfiguration) (*GetMetadataConfigurationResponse, error) { + return service.GetMetadataConfigurationContext( + context.Background(), + request, + ) +} + +func (service *media) GetAudioOutputConfigurationContext(ctx context.Context, request *GetAudioOutputConfiguration) (*GetAudioOutputConfigurationResponse, error) { + response := new(GetAudioOutputConfigurationResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetAudioOutputConfiguration(request *GetAudioOutputConfiguration) (*GetAudioOutputConfigurationResponse, error) { + return service.GetAudioOutputConfigurationContext( + context.Background(), + request, + ) +} + +func (service *media) GetAudioDecoderConfigurationContext(ctx context.Context, request *GetAudioDecoderConfiguration) (*GetAudioDecoderConfigurationResponse, error) { + response := new(GetAudioDecoderConfigurationResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetAudioDecoderConfiguration(request *GetAudioDecoderConfiguration) (*GetAudioDecoderConfigurationResponse, error) { + return service.GetAudioDecoderConfigurationContext( + context.Background(), + request, + ) +} + +func (service *media) GetCompatibleVideoEncoderConfigurationsContext(ctx context.Context, request *GetCompatibleVideoEncoderConfigurations) (*GetCompatibleVideoEncoderConfigurationsResponse, error) { + response := new(GetCompatibleVideoEncoderConfigurationsResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetCompatibleVideoEncoderConfigurations(request *GetCompatibleVideoEncoderConfigurations) (*GetCompatibleVideoEncoderConfigurationsResponse, error) { + return service.GetCompatibleVideoEncoderConfigurationsContext( + context.Background(), + request, + ) +} + +func (service *media) GetCompatibleVideoSourceConfigurationsContext(ctx context.Context, request *GetCompatibleVideoSourceConfigurations) (*GetCompatibleVideoSourceConfigurationsResponse, error) { + response := new(GetCompatibleVideoSourceConfigurationsResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetCompatibleVideoSourceConfigurations(request *GetCompatibleVideoSourceConfigurations) (*GetCompatibleVideoSourceConfigurationsResponse, error) { + return service.GetCompatibleVideoSourceConfigurationsContext( + context.Background(), + request, + ) +} + +func (service *media) GetCompatibleAudioEncoderConfigurationsContext(ctx context.Context, request *GetCompatibleAudioEncoderConfigurations) (*GetCompatibleAudioEncoderConfigurationsResponse, error) { + response := new(GetCompatibleAudioEncoderConfigurationsResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetCompatibleAudioEncoderConfigurations(request *GetCompatibleAudioEncoderConfigurations) (*GetCompatibleAudioEncoderConfigurationsResponse, error) { + return service.GetCompatibleAudioEncoderConfigurationsContext( + context.Background(), + request, + ) +} + +func (service *media) GetCompatibleAudioSourceConfigurationsContext(ctx context.Context, request *GetCompatibleAudioSourceConfigurations) (*GetCompatibleAudioSourceConfigurationsResponse, error) { + response := new(GetCompatibleAudioSourceConfigurationsResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetCompatibleAudioSourceConfigurations(request *GetCompatibleAudioSourceConfigurations) (*GetCompatibleAudioSourceConfigurationsResponse, error) { + return service.GetCompatibleAudioSourceConfigurationsContext( + context.Background(), + request, + ) +} + +func (service *media) GetCompatibleVideoAnalyticsConfigurationsContext(ctx context.Context, request *GetCompatibleVideoAnalyticsConfigurations) (*GetCompatibleVideoAnalyticsConfigurationsResponse, error) { + response := new(GetCompatibleVideoAnalyticsConfigurationsResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetCompatibleVideoAnalyticsConfigurations(request *GetCompatibleVideoAnalyticsConfigurations) (*GetCompatibleVideoAnalyticsConfigurationsResponse, error) { + return service.GetCompatibleVideoAnalyticsConfigurationsContext( + context.Background(), + request, + ) +} + +func (service *media) GetCompatibleMetadataConfigurationsContext(ctx context.Context, request *GetCompatibleMetadataConfigurations) (*GetCompatibleMetadataConfigurationsResponse, error) { + response := new(GetCompatibleMetadataConfigurationsResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetCompatibleMetadataConfigurations(request *GetCompatibleMetadataConfigurations) (*GetCompatibleMetadataConfigurationsResponse, error) { + return service.GetCompatibleMetadataConfigurationsContext( + context.Background(), + request, + ) +} + +func (service *media) GetCompatibleAudioOutputConfigurationsContext(ctx context.Context, request *GetCompatibleAudioOutputConfigurations) (*GetCompatibleAudioOutputConfigurationsResponse, error) { + response := new(GetCompatibleAudioOutputConfigurationsResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetCompatibleAudioOutputConfigurations(request *GetCompatibleAudioOutputConfigurations) (*GetCompatibleAudioOutputConfigurationsResponse, error) { + return service.GetCompatibleAudioOutputConfigurationsContext( + context.Background(), + request, + ) +} + +func (service *media) GetCompatibleAudioDecoderConfigurationsContext(ctx context.Context, request *GetCompatibleAudioDecoderConfigurations) (*GetCompatibleAudioDecoderConfigurationsResponse, error) { + response := new(GetCompatibleAudioDecoderConfigurationsResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetCompatibleAudioDecoderConfigurations(request *GetCompatibleAudioDecoderConfigurations) (*GetCompatibleAudioDecoderConfigurationsResponse, error) { + return service.GetCompatibleAudioDecoderConfigurationsContext( + context.Background(), + request, + ) +} + +func (service *media) SetVideoSourceConfigurationContext(ctx context.Context, request *SetVideoSourceConfiguration) (*SetVideoSourceConfigurationResponse, error) { + response := new(SetVideoSourceConfigurationResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) SetVideoSourceConfiguration(request *SetVideoSourceConfiguration) (*SetVideoSourceConfigurationResponse, error) { + return service.SetVideoSourceConfigurationContext( + context.Background(), + request, + ) +} + +func (service *media) SetVideoEncoderConfigurationContext(ctx context.Context, request *SetVideoEncoderConfiguration) (*SetVideoEncoderConfigurationResponse, error) { + response := new(SetVideoEncoderConfigurationResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) SetVideoEncoderConfiguration(request *SetVideoEncoderConfiguration) (*SetVideoEncoderConfigurationResponse, error) { + return service.SetVideoEncoderConfigurationContext( + context.Background(), + request, + ) +} + +func (service *media) SetAudioSourceConfigurationContext(ctx context.Context, request *SetAudioSourceConfiguration) (*SetAudioSourceConfigurationResponse, error) { + response := new(SetAudioSourceConfigurationResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) SetAudioSourceConfiguration(request *SetAudioSourceConfiguration) (*SetAudioSourceConfigurationResponse, error) { + return service.SetAudioSourceConfigurationContext( + context.Background(), + request, + ) +} + +func (service *media) SetAudioEncoderConfigurationContext(ctx context.Context, request *SetAudioEncoderConfiguration) (*SetAudioEncoderConfigurationResponse, error) { + response := new(SetAudioEncoderConfigurationResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) SetAudioEncoderConfiguration(request *SetAudioEncoderConfiguration) (*SetAudioEncoderConfigurationResponse, error) { + return service.SetAudioEncoderConfigurationContext( + context.Background(), + request, + ) +} + +func (service *media) SetVideoAnalyticsConfigurationContext(ctx context.Context, request *SetVideoAnalyticsConfiguration) (*SetVideoAnalyticsConfigurationResponse, error) { + response := new(SetVideoAnalyticsConfigurationResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) SetVideoAnalyticsConfiguration(request *SetVideoAnalyticsConfiguration) (*SetVideoAnalyticsConfigurationResponse, error) { + return service.SetVideoAnalyticsConfigurationContext( + context.Background(), + request, + ) +} + +func (service *media) SetMetadataConfigurationContext(ctx context.Context, request *SetMetadataConfiguration) (*SetMetadataConfigurationResponse, error) { + response := new(SetMetadataConfigurationResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) SetMetadataConfiguration(request *SetMetadataConfiguration) (*SetMetadataConfigurationResponse, error) { + return service.SetMetadataConfigurationContext( + context.Background(), + request, + ) +} + +func (service *media) SetAudioOutputConfigurationContext(ctx context.Context, request *SetAudioOutputConfiguration) (*SetAudioOutputConfigurationResponse, error) { + response := new(SetAudioOutputConfigurationResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) SetAudioOutputConfiguration(request *SetAudioOutputConfiguration) (*SetAudioOutputConfigurationResponse, error) { + return service.SetAudioOutputConfigurationContext( + context.Background(), + request, + ) +} + +func (service *media) SetAudioDecoderConfigurationContext(ctx context.Context, request *SetAudioDecoderConfiguration) (*SetAudioDecoderConfigurationResponse, error) { + response := new(SetAudioDecoderConfigurationResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) SetAudioDecoderConfiguration(request *SetAudioDecoderConfiguration) (*SetAudioDecoderConfigurationResponse, error) { + return service.SetAudioDecoderConfigurationContext( + context.Background(), + request, + ) +} + +func (service *media) GetVideoSourceConfigurationOptionsContext(ctx context.Context, request *GetVideoSourceConfigurationOptions) (*GetVideoSourceConfigurationOptionsResponse, error) { + response := new(GetVideoSourceConfigurationOptionsResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetVideoSourceConfigurationOptions(request *GetVideoSourceConfigurationOptions) (*GetVideoSourceConfigurationOptionsResponse, error) { + return service.GetVideoSourceConfigurationOptionsContext( + context.Background(), + request, + ) +} + +func (service *media) GetVideoEncoderConfigurationOptionsContext(ctx context.Context, request *GetVideoEncoderConfigurationOptions) (*GetVideoEncoderConfigurationOptionsResponse, error) { + response := new(GetVideoEncoderConfigurationOptionsResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetVideoEncoderConfigurationOptions(request *GetVideoEncoderConfigurationOptions) (*GetVideoEncoderConfigurationOptionsResponse, error) { + return service.GetVideoEncoderConfigurationOptionsContext( + context.Background(), + request, + ) +} + +func (service *media) GetAudioSourceConfigurationOptionsContext(ctx context.Context, request *GetAudioSourceConfigurationOptions) (*GetAudioSourceConfigurationOptionsResponse, error) { + response := new(GetAudioSourceConfigurationOptionsResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetAudioSourceConfigurationOptions(request *GetAudioSourceConfigurationOptions) (*GetAudioSourceConfigurationOptionsResponse, error) { + return service.GetAudioSourceConfigurationOptionsContext( + context.Background(), + request, + ) +} + +func (service *media) GetAudioEncoderConfigurationOptionsContext(ctx context.Context, request *GetAudioEncoderConfigurationOptions) (*GetAudioEncoderConfigurationOptionsResponse, error) { + response := new(GetAudioEncoderConfigurationOptionsResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetAudioEncoderConfigurationOptions(request *GetAudioEncoderConfigurationOptions) (*GetAudioEncoderConfigurationOptionsResponse, error) { + return service.GetAudioEncoderConfigurationOptionsContext( + context.Background(), + request, + ) +} + +func (service *media) GetMetadataConfigurationOptionsContext(ctx context.Context, request *GetMetadataConfigurationOptions) (*GetMetadataConfigurationOptionsResponse, error) { + response := new(GetMetadataConfigurationOptionsResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetMetadataConfigurationOptions(request *GetMetadataConfigurationOptions) (*GetMetadataConfigurationOptionsResponse, error) { + return service.GetMetadataConfigurationOptionsContext( + context.Background(), + request, + ) +} + +func (service *media) GetAudioOutputConfigurationOptionsContext(ctx context.Context, request *GetAudioOutputConfigurationOptions) (*GetAudioOutputConfigurationOptionsResponse, error) { + response := new(GetAudioOutputConfigurationOptionsResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetAudioOutputConfigurationOptions(request *GetAudioOutputConfigurationOptions) (*GetAudioOutputConfigurationOptionsResponse, error) { + return service.GetAudioOutputConfigurationOptionsContext( + context.Background(), + request, + ) +} + +func (service *media) GetAudioDecoderConfigurationOptionsContext(ctx context.Context, request *GetAudioDecoderConfigurationOptions) (*GetAudioDecoderConfigurationOptionsResponse, error) { + response := new(GetAudioDecoderConfigurationOptionsResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetAudioDecoderConfigurationOptions(request *GetAudioDecoderConfigurationOptions) (*GetAudioDecoderConfigurationOptionsResponse, error) { + return service.GetAudioDecoderConfigurationOptionsContext( + context.Background(), + request, + ) +} + +func (service *media) GetGuaranteedNumberOfVideoEncoderInstancesContext(ctx context.Context, request *GetGuaranteedNumberOfVideoEncoderInstances) (*GetGuaranteedNumberOfVideoEncoderInstancesResponse, error) { + response := new(GetGuaranteedNumberOfVideoEncoderInstancesResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetGuaranteedNumberOfVideoEncoderInstances(request *GetGuaranteedNumberOfVideoEncoderInstances) (*GetGuaranteedNumberOfVideoEncoderInstancesResponse, error) { + return service.GetGuaranteedNumberOfVideoEncoderInstancesContext( + context.Background(), + request, + ) +} + +func (service *media) GetStreamUriContext(ctx context.Context, request *GetStreamUri) (*GetStreamUriResponse, error) { + response := new(GetStreamUriResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetStreamUri(request *GetStreamUri) (*GetStreamUriResponse, error) { + return service.GetStreamUriContext( + context.Background(), + request, + ) +} + +func (service *media) StartMulticastStreamingContext(ctx context.Context, request *StartMulticastStreaming) (*StartMulticastStreamingResponse, error) { + response := new(StartMulticastStreamingResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) StartMulticastStreaming(request *StartMulticastStreaming) (*StartMulticastStreamingResponse, error) { + return service.StartMulticastStreamingContext( + context.Background(), + request, + ) +} + +func (service *media) StopMulticastStreamingContext(ctx context.Context, request *StopMulticastStreaming) (*StopMulticastStreamingResponse, error) { + response := new(StopMulticastStreamingResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) StopMulticastStreaming(request *StopMulticastStreaming) (*StopMulticastStreamingResponse, error) { + return service.StopMulticastStreamingContext( + context.Background(), + request, + ) +} + +func (service *media) SetSynchronizationPointContext(ctx context.Context, request *SetSynchronizationPoint) (*SetSynchronizationPointResponse, error) { + response := new(SetSynchronizationPointResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) SetSynchronizationPoint(request *SetSynchronizationPoint) (*SetSynchronizationPointResponse, error) { + return service.SetSynchronizationPointContext( + context.Background(), + request, + ) +} + +func (service *media) GetSnapshotUriContext(ctx context.Context, request *GetSnapshotUri) (*GetSnapshotUriResponse, error) { + response := new(GetSnapshotUriResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetSnapshotUri(request *GetSnapshotUri) (*GetSnapshotUriResponse, error) { + return service.GetSnapshotUriContext( + context.Background(), + request, + ) +} + +func (service *media) GetVideoSourceModesContext(ctx context.Context, request *GetVideoSourceModes) (*GetVideoSourceModesResponse, error) { + response := new(GetVideoSourceModesResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetVideoSourceModes(request *GetVideoSourceModes) (*GetVideoSourceModesResponse, error) { + return service.GetVideoSourceModesContext( + context.Background(), + request, + ) +} + +func (service *media) SetVideoSourceModeContext(ctx context.Context, request *SetVideoSourceMode) (*SetVideoSourceModeResponse, error) { + response := new(SetVideoSourceModeResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) SetVideoSourceMode(request *SetVideoSourceMode) (*SetVideoSourceModeResponse, error) { + return service.SetVideoSourceModeContext( + context.Background(), + request, + ) +} + +func (service *media) GetOSDsContext(ctx context.Context, request *GetOSDs) (*GetOSDsResponse, error) { + response := new(GetOSDsResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetOSDs(request *GetOSDs) (*GetOSDsResponse, error) { + return service.GetOSDsContext( + context.Background(), + request, + ) +} + +func (service *media) GetOSDContext(ctx context.Context, request *GetOSD) (*GetOSDResponse, error) { + response := new(GetOSDResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetOSD(request *GetOSD) (*GetOSDResponse, error) { + return service.GetOSDContext( + context.Background(), + request, + ) +} + +func (service *media) GetOSDOptionsContext(ctx context.Context, request *GetOSDOptions) (*GetOSDOptionsResponse, error) { + response := new(GetOSDOptionsResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) GetOSDOptions(request *GetOSDOptions) (*GetOSDOptionsResponse, error) { + return service.GetOSDOptionsContext( + context.Background(), + request, + ) +} + +func (service *media) SetOSDContext(ctx context.Context, request *SetOSD) (*SetOSDResponse, error) { + response := new(SetOSDResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) SetOSD(request *SetOSD) (*SetOSDResponse, error) { + return service.SetOSDContext( + context.Background(), + request, + ) +} + +func (service *media) CreateOSDContext(ctx context.Context, request *CreateOSD) (*CreateOSDResponse, error) { + response := new(CreateOSDResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) CreateOSD(request *CreateOSD) (*CreateOSDResponse, error) { + return service.CreateOSDContext( + context.Background(), + request, + ) +} + +func (service *media) DeleteOSDContext(ctx context.Context, request *DeleteOSD) (*DeleteOSDResponse, error) { + response := new(DeleteOSDResponse) + err := service.client.CallContext(ctx, "''", request, response) + if err != nil { + return nil, err + } + + return response, nil +} + +func (service *media) DeleteOSD(request *DeleteOSD) (*DeleteOSDResponse, error) { + return service.DeleteOSDContext( + context.Background(), + request, + ) +} diff --git a/pkg/generated/onvif/www_onvif_org/ver10/schema/1.go b/pkg/generated/onvif/www_onvif_org/ver10/schema/1.go index 4899df3..d7021e1 100644 --- a/pkg/generated/onvif/www_onvif_org/ver10/schema/1.go +++ b/pkg/generated/onvif/www_onvif_org/ver10/schema/1.go @@ -1977,17 +1977,15 @@ type MulticastConfiguration struct { } type StreamSetup struct { - // Defines if a multicast or unicast stream is requested - Stream *StreamType `xml:"Stream,omitempty" json:"Stream,omitempty"` + Stream *StreamType `xml:"http://www.onvif.org/ver10/schema Stream,omitempty" json:"Stream,omitempty"` - Transport *Transport `xml:"Transport,omitempty" json:"Transport,omitempty"` + Transport *Transport `xml:"http://www.onvif.org/ver10/schema Transport,omitempty" json:"Transport,omitempty"` Items []string `xml:",any" json:"items,omitempty"` } type Transport struct { - // Defines the network protocol for streaming, either UDP=RTP/UDP, RTSP=RTP/RTSP/TCP or HTTP=RTP/RTSP/HTTP/TCP Protocol *TransportProtocol `xml:"Protocol,omitempty" json:"Protocol,omitempty"` diff --git a/pkg/gonvif/client.go b/pkg/gonvif/client.go index edd60b5..2aa3b20 100644 --- a/pkg/gonvif/client.go +++ b/pkg/gonvif/client.go @@ -13,6 +13,7 @@ import ( "github.com/motemen/go-loghttp" device "github.com/eyetowers/gonvif/pkg/generated/onvif/www_onvif_org/ver10/device/wsdl" + media "github.com/eyetowers/gonvif/pkg/generated/onvif/www_onvif_org/ver10/media/wsdl" analytics "github.com/eyetowers/gonvif/pkg/generated/onvif/www_onvif_org/ver20/analytics/wsdl" imaging "github.com/eyetowers/gonvif/pkg/generated/onvif/www_onvif_org/ver20/imaging/wsdl" media2 "github.com/eyetowers/gonvif/pkg/generated/onvif/www_onvif_org/ver20/media/wsdl" @@ -34,6 +35,7 @@ type Client interface { Analytics() (analytics.AnalyticsEnginePort, error) Device() (device.Device, error) Imaging() (imaging.ImagingPort, error) + Media() (media.Media, error) Media2() (media2.Media2, error) PTZ() (ptz.PTZ, error) } @@ -42,6 +44,7 @@ type impl struct { analytics analytics.AnalyticsEnginePort device device.Device imaging imaging.ImagingPort + media media.Media media2 media2.Media2 ptz ptz.PTZ } @@ -72,6 +75,9 @@ func New(baseURL, username, password string, verbose bool) (Client, error) { if svc.Namespace == "http://www.onvif.org/ver20/imaging/wsdl" { result.imaging = imaging.NewImagingPort(svcClient) } + if svc.Namespace == "http://www.onvif.org/ver10/media/wsdl" { + result.media = media.NewMedia(svcClient) + } if svc.Namespace == "http://www.onvif.org/ver20/media/wsdl" { result.media2 = media2.NewMedia2(svcClient) } @@ -104,6 +110,13 @@ func (c *impl) Imaging() (imaging.ImagingPort, error) { return c.imaging, nil } +func (c *impl) Media() (media.Media, error) { + if c.media == nil { + return nil, ErrServiceNotSupported + } + return c.media, nil +} + func (c *impl) Media2() (media2.Media2, error) { if c.media2 == nil { return nil, ErrServiceNotSupported