func (s *MediaService) DeleteProfile(profileToken string) error {
	return s.Client.Call(trt.DeleteProfile{
		ProfileToken: tt.ReferenceToken(profileToken),
	}, &trt.DeleteProfileResponse{})
}
DeleteProfile deletes a profile. This change shall always be persistent.
Deletion of a profile is only possible for non-fixed profiles
package onvif4go
import (
	trt "github.com/faceterteam/onvif4go/media"
	tt "github.com/faceterteam/onvif4go/onvif"
)
type MediaService struct {
	Client onvifCaller
}
func NewMediaService(endpoint string, onvifDevice *OnvifDevice) *MediaService {
	return &MediaService{
		Client: NewOnvifClient(endpoint, &onvifDevice.auth),
	}
}
func (s *MediaService) WithoutAuth() *MediaService {
	return &MediaService{
		Client: s.Client.WithoutAuth(),
	}
}
func (s *MediaService) GetProfiles() (res trt.GetProfilesResponse, err error) {
	err = s.Client.Call(trt.GetProfiles{}, &res)
	return
}
func (s *MediaService) GetProfile(profileToken string) (res trt.GetProfileResponse, err error) {
	err = s.Client.Call(trt.GetProfile{
		ProfileToken: tt.ReferenceToken(profileToken),
	}, &res)
	return
}
func (s *MediaService) GetServiceCapabilities() (res trt.GetServiceCapabilitiesResponse, err error) {
	err = s.Client.Call(trt.GetServiceCapabilities{}, &res)
	return
}
func (s *MediaService) GetVideoSources() (res trt.GetVideoSourcesResponse, err error) {
	err = s.Client.Call(trt.GetVideoSources{}, &res)
	return
}
func (s *MediaService) GetAudioSources() (res trt.GetAudioSourcesResponse, err error) {
	err = s.Client.Call(trt.GetAudioSources{}, &res)
	return
}
func (s *MediaService) GetAudioOutputs() (res trt.GetAudioOutputsResponse, err error) {
	err = s.Client.Call(trt.GetAudioOutputs{}, &res)
	return
}
func (s *MediaService) CreateProfile(token, name string) (res trt.CreateProfileResponse, err error) {
	err = s.Client.Call(trt.CreateProfile{
		Token: tt.ReferenceToken(token),
		Name:  tt.Name(name),
	}, &res)
	return
}
func (s *MediaService) AddVideoEncoderConfiguration(profileToken, configurationToken string) error {
	return s.Client.Call(trt.AddVideoEncoderConfiguration{
		ProfileToken:       tt.ReferenceToken(profileToken),
		ConfigurationToken: tt.ReferenceToken(configurationToken),
	}, &trt.AddVideoEncoderConfigurationResponse{})
}
func (s *MediaService) RemoveVideoEncoderConfiguration(profileToken string) error {
	return s.Client.Call(trt.RemoveVideoEncoderConfiguration{
		ProfileToken: tt.ReferenceToken(profileToken),
	}, &trt.RemoveVideoEncoderConfigurationResponse{})
}
func (s *MediaService) AddVideoSourceConfiguration(profileToken, configurationToken string) error {
	return s.Client.Call(trt.AddVideoSourceConfiguration{
		ProfileToken:       tt.ReferenceToken(profileToken),
		ConfigurationToken: tt.ReferenceToken(configurationToken),
	}, &trt.AddVideoSourceConfigurationResponse{})
}
func (s *MediaService) RemoveVideoSourceConfiguration(profileToken string) error {
	return s.Client.Call(trt.RemoveVideoSourceConfiguration{
		ProfileToken: tt.ReferenceToken(profileToken),
	}, &trt.RemoveVideoSourceConfigurationResponse{})
}
func (s *MediaService) AddAudioEncoderConfiguration(profileToken, configurationToken string) error {
	return s.Client.Call(trt.AddAudioEncoderConfiguration{
		ProfileToken:       tt.ReferenceToken(profileToken),
		ConfigurationToken: tt.ReferenceToken(configurationToken),
	}, &trt.AddAudioEncoderConfigurationResponse{})
}
func (s *MediaService) RemoveAudioEncoderConfiguration(profileToken string) error {
	return s.Client.Call(trt.RemoveAudioEncoderConfiguration{
		ProfileToken: tt.ReferenceToken(profileToken),
	}, &trt.RemoveAudioEncoderConfigurationResponse{})
}
func (s *MediaService) AddAudioSourceConfiguration(profileToken, configurationToken string) error {
	return s.Client.Call(trt.AddAudioSourceConfiguration{
		ProfileToken:       tt.ReferenceToken(profileToken),
		ConfigurationToken: tt.ReferenceToken(configurationToken),
	}, &trt.AddAudioSourceConfigurationResponse{})
}
func (s *MediaService) RemoveAudioSourceConfiguration(profileToken string) error {
	return s.Client.Call(trt.RemoveAudioSourceConfiguration{
		ProfileToken: tt.ReferenceToken(profileToken),
	}, &trt.RemoveAudioSourceConfigurationResponse{})
}
func (s *MediaService) AddPTZConfiguration(profileToken, configurationToken string) error {
	return s.Client.Call(trt.AddPTZConfiguration{
		ProfileToken:       tt.ReferenceToken(profileToken),
		ConfigurationToken: tt.ReferenceToken(configurationToken),
	}, &trt.AddPTZConfigurationResponse{})
}
func (s *MediaService) RemovePTZConfiguration(profileToken string) error {
	return s.Client.Call(trt.RemovePTZConfiguration{
		ProfileToken: tt.ReferenceToken(profileToken),
	}, &trt.RemovePTZConfigurationResponse{})
}
func (s *MediaService) AddVideoAnalyticsConfiguration(profileToken, configurationToken string) error {
	return s.Client.Call(trt.AddVideoAnalyticsConfiguration{
		ProfileToken:       tt.ReferenceToken(profileToken),
		ConfigurationToken: tt.ReferenceToken(configurationToken),
	}, &trt.AddVideoAnalyticsConfigurationResponse{})
}
func (s *MediaService) RemoveVideoAnalyticsConfiguration(profileToken string) error {
	return s.Client.Call(trt.RemoveVideoAnalyticsConfiguration{
		ProfileToken: tt.ReferenceToken(profileToken),
	}, &trt.RemoveVideoAnalyticsConfigurationResponse{})
}
func (s *MediaService) AddMetadataConfiguration(profileToken, configurationToken string) error {
	return s.Client.Call(trt.AddMetadataConfiguration{
		ProfileToken:       tt.ReferenceToken(profileToken),
		ConfigurationToken: tt.ReferenceToken(configurationToken),
	}, &trt.AddMetadataConfigurationResponse{})
}
func (s *MediaService) RemoveMetadataConfiguration(profileToken string) error {
	return s.Client.Call(trt.RemoveMetadataConfiguration{
		ProfileToken: tt.ReferenceToken(profileToken),
	}, &trt.RemoveMetadataConfigurationResponse{})
}
func (s *MediaService) AddAudioOutputConfiguration(profileToken, configurationToken string) error {
	return s.Client.Call(trt.AddAudioOutputConfiguration{
		ProfileToken:       tt.ReferenceToken(profileToken),
		ConfigurationToken: tt.ReferenceToken(configurationToken),
	}, &trt.AddAudioOutputConfigurationResponse{})
}
func (s *MediaService) RemoveAudioOutputConfiguration(profileToken string) error {
	return s.Client.Call(trt.RemoveAudioOutputConfiguration{
		ProfileToken: tt.ReferenceToken(profileToken),
	}, &trt.RemoveAudioOutputConfigurationResponse{})
}
func (s *MediaService) AddAudioDecoderConfiguration(profileToken, configurationToken string) error {
	return s.Client.Call(trt.AddAudioDecoderConfiguration{
		ProfileToken:       tt.ReferenceToken(profileToken),
		ConfigurationToken: tt.ReferenceToken(configurationToken),
	}, &trt.AddAudioDecoderConfigurationResponse{})
}
func (s *MediaService) RemoveAudioDecoderConfiguration(profileToken string) error {
	return s.Client.Call(trt.RemoveAudioDecoderConfiguration{
		ProfileToken: tt.ReferenceToken(profileToken),
	}, &trt.RemoveAudioDecoderConfigurationResponse{})
}