visionai
Summary
Functions |
|
---|---|
CreateStream(const ServiceConnectionOptions & options, absl::string_view stream_id)
|
absl::Status
Creates a new stream resource with id
stream_id . |
DeleteStream(const ServiceConnectionOptions & options, absl::string_view stream_id)
|
absl::Status
Deletes the stream with id
stream_id . |
FromPacket(Packet p)
|
absl::StatusOr< T >
FromPacket attempts to unmarshal a
Packet into a desired C++ Type. |
IngestMp4(const ServiceConnectionOptions & options, absl::string_view stream_id, absl::string_view file_name)
|
absl::Status
Ingests an MP4 video file on the local file system named
file_name into a stream of id stream_id . |
IngestRtsp(const ServiceConnectionOptions & options, absl::string_view stream_id, absl::string_view rtsp_url)
|
absl::Status
Ingests an RTSP camera endpoint
rtsp_url into a stream of id stream_id . |
ToPacket(T && t)
|
absl::StatusOr< Packet >
ToPacket marshals an object of C++ type
T into a Packet . |
Classes |
|
---|---|
visionai:: |
|
visionai:: |
|
Structs |
|
---|---|
visionai:: |
ServiceConnectionOptions is a structure that contains options to connect to the Vertex AI Vision service. |
Functions
CreateStream
absl::Status CreateStream( const ServiceConnectionOptions & options, absl::string_view stream_id )
Creates a new stream resource with id stream_id
.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Returns |
OK on success. Otherwise the error indicating the cause.
|
DeleteStream
absl::Status DeleteStream( const ServiceConnectionOptions & options, absl::string_view stream_id )
Deletes the stream with id stream_id
.
FromPacket
absl::StatusOr< T > FromPacket( Packet p )
FromPacket attempts to unmarshal a Packet
into a desired C++ Type.
An error code will be returned if p
cannot be extracted as the requested C++ type.
IngestMp4
absl::Status IngestMp4( const ServiceConnectionOptions & options, absl::string_view stream_id, absl::string_view file_name )
Ingests an MP4 video file on the local file system named file_name
into a stream of id stream_id
.
This call blocks until the file is fully ingested.
The file is ingested at the rate of its playback. For example, if the playback duration of the video is 1 minute, then this function will take 1 minute to complete.
Returns OK on success; otherwise, an error message telling why the ingestion could not complete successfully.
IngestRtsp
absl::Status IngestRtsp( const ServiceConnectionOptions & options, absl::string_view stream_id, absl::string_view rtsp_url )
Ingests an RTSP camera endpoint rtsp_url
into a stream of id stream_id
.
This call blocks and ingests the RTSP feed indefinitely. It may complete if the RTSP feed reaches the end, or is otherwise terminated for any reason.
Returns OK on success; otherwise, an error message telling why the ingestion could not complete successfully.
ToPacket
absl::StatusOr< Packet > ToPacket( T && t )
ToPacket marshals an object of C++ type T
into a Packet
.
The set of possible C++ types that can be marshalled are listed in visionai/streams/packet/packet_codecs/codec_selector.h