13#ifndef DYNAMIC_CAMERA_SERVER
32class SendableCameraWrapper;
35constexpr const char*
kProtocol =
"camera_server://";
37 std::string_view cameraName);
48 struct private_init {};
67 std::span<const std::string> cameraUrls,
82 std::span<const std::string> cameraUrls);
91#ifndef DYNAMIC_CAMERA_SERVER
94 : m_uri(
detail::kProtocol) {
100 std::string_view cameraName, std::span<const std::string> cameraUrls,
105 fmt::format(
"/CameraPublisher/{}/streams", cameraName))
107 m_streams.
Set(cameraUrls);
120 wrapper = std::make_shared<SendableCameraWrapper>(name, private_init{});
126 std::string_view cameraName, std::span<const std::string> cameraUrls) {
129 wrapper = std::make_shared<SendableCameraWrapper>(cameraName, cameraUrls,
and restrictions which apply to each piece of software is included later in this file and or inside of the individual applicable source files The disclaimer of warranty in the WPILib license above applies to all code in and nothing in any of the other licenses gives permission to use the names of FIRST nor the names of the WPILib contributors to endorse or promote products derived from this software The following pieces of software have additional or alternate and or and nanopb were all modified for use in Google Inc All rights reserved Redistribution and use in source and binary with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer *Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution *Neither the name of Google Inc nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY EXPRESS OR IMPLIED BUT NOT LIMITED THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY OR CONSEQUENTIAL WHETHER IN STRICT OR EVEN IF ADVISED OF THE POSSIBILITY OF SUCH January AND DISTRIBUTION Definitions License shall mean the terms and conditions for and distribution as defined by Sections through of this document Licensor shall mean the copyright owner or entity authorized by the copyright owner that is granting the License Legal Entity shall mean the union of the acting entity and all other entities that control are controlled by or are under common control with that entity For the purposes of this definition control direct or to cause the direction or management of such whether by contract or including but not limited to software source documentation source
Definition ThirdPartyNotices.txt:124
A source for video that provides a sequence of frames.
Definition cscore_oo.h:253
A wrapper to make video sources sendable and usable from Shuffleboard.
Definition SendableCameraWrapper.h:46
void InitSendable(wpi::SendableBuilder &builder) override
Initializes this Sendable object.
static SendableCameraWrapper & Wrap(const cs::VideoSource &source)
Gets a sendable wrapper object for the given video source, creating the wrapper if one does not alrea...
Definition SendableCameraWrapper.h:110
SendableCameraWrapper(std::string_view cameraName, const private_init &)
Creates a new sendable wrapper.
Definition SendableCameraWrapper.h:92
StringArrayTopic GetStringArrayTopic(std::string_view name) const
Gets a string array topic.
static NetworkTableInstance GetDefault()
Get global default instance.
Definition NetworkTableInstance.h:131
NetworkTables StringArray publisher.
Definition StringArrayTopic.h:127
void Set(ParamType value, int64_t time=0)
Publish a new value.
Definition StringArrayTopic.h:151
PublisherType Publish(const PubSubOptions &options=kDefaultPubSubOptions)
Create a new publisher to the topic.
Definition StringArrayTopic.h:327
Helper class for building Sendable dashboard representations.
Definition SendableBuilder.h:21
A helper class for use with objects that add themselves to SendableRegistry.
Definition SendableHelper.h:21
Interface for Sendable objects.
Definition Sendable.h:16
std::string GetSourceName(CS_Source source, CS_Status *status)
CS_Handle CS_Source
Definition cscore_c.h:54
int CS_Status
Definition cscore_c.h:47
int CS_Handle
Definition cscore_c.h:49
CameraServer (cscore) namespace.
Definition ShuffleboardContainer.h:25
detail namespace with internal helper functions
Definition input_adapters.h:32
constexpr const char * kProtocol
Definition SendableCameraWrapper.h:35
std::shared_ptr< SendableCameraWrapper > & GetSendableCameraWrapper(std::string_view cameraName)
void AddToSendableRegistry(wpi::Sendable *sendable, std::string_view name)