Skip to content

Clean up duplicated ONVIF URL generation code #330

@dpw13

Description

@dpw13

While looking at #324, I noticed that there are several implementations for generating the ONVIF URL:

  • url_build_onvif_device_service_url in url_utils.c
  • build_ptz_url in api_handlers_ptz.c
  • extract_onvif_base_url in unified_detection_thread.c

The implementation in url_build_onvif_device_service_url looks a lot cleaner, passing off parsing of the URL to curl, but unfortunately it does not properly handle the rtsps -> https case.

And looking further, there's already onvif_ptz_get_service_url which replaces onvif/device_service with onvif/ptz_service. It might make sense just to refactor all the onvif URL generation to use common code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions