Skip to content

Cant get RTSP URL from profile #6

@Xantios

Description

@Xantios

Given the following code:

func main() {
	bg := context.Background()
	ctx, cancel := context.WithTimeout(bg, 15*time.Second)
	defer cancel()

	c := &http.Client{Timeout: 15 * time.Second}

	cam, err := sdk.NewDevice(ctx, networking.ClientInfo{Xaddr: "10.0.0.97"}, networking.ClientAuth{
		Username: "usernameGoesHere",
		Password: "NoPassword4u",
	}, c)

	if err != nil {
		panic(err)
	}

	profiles := cam.FetchProfiles(ctx)
	for _, profile := range profiles.Profiles {
		fmt.Printf("%#v\n", profile.Uris)
	}

}

I of course tried the built in function but that just returns an empty string. to debug this i wrote above snippet to validate if it is unmarshalled from the profile. which seems to not happen correctly.

The ouput being the sdk.ProfileUris with a MediaUri with an empty Uri field.

How can i debug this further and fix it ?:-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions