#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConvertedSegment {
#[prost(string, tag = "1")]
pub object_key: ::prost::alloc::string::String,
#[prost(double, tag = "2")]
pub duration_seconds: f64,
#[prost(double, tag = "3")]
pub frame_rate: f64,
#[prost(int64, repeated, packed = "false", tag = "4")]
pub absolute_timestamps: ::prost::alloc::vec::Vec<i64>,
#[prost(double, repeated, packed = "false", tag = "5")]
pub media_timestamps: ::prost::alloc::vec::Vec<f64>,
#[prost(int64, tag = "6")]
pub size_bytes: i64,
#[prost(message, repeated, tag = "7")]
pub gop_fragments: ::prost::alloc::vec::Vec<GopFragment>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GopFragment {
#[prost(int64, tag = "1")]
pub start_nanos: i64,
#[prost(int64, tag = "2")]
pub byte_offset: i64,
#[prost(int64, tag = "3")]
pub byte_length: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReportConversionSegmentsRequest {
#[prost(string, tag = "1")]
pub conversion_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub segments: ::prost::alloc::vec::Vec<ConvertedSegment>,
#[prost(string, tag = "3")]
pub interval_id: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReportConversionSegmentsResponse {
#[prost(bool, tag = "1")]
pub conversion_evicted: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompleteConversionRequest {
#[prost(string, tag = "1")]
pub conversion_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub interval_id: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CompleteConversionResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FailConversionRequest {
#[prost(string, tag = "1")]
pub conversion_id: ::prost::alloc::string::String,
#[deprecated]
#[prost(string, tag = "2")]
pub failure_reason: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub interval_id: ::prost::alloc::string::String,
#[prost(enumeration = "ConversionFailureReason", tag = "4")]
pub reason: i32,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct FailConversionResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReportChannelKeyframesRequest {
#[prost(string, tag = "1")]
pub dataset_file_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub source_etag: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub channel_id: i32,
#[prost(int64, repeated, packed = "false", tag = "4")]
pub keyframe_times: ::prost::alloc::vec::Vec<i64>,
#[prost(int64, tag = "5")]
pub max_gap_nanos: i64,
#[prost(bool, tag = "6")]
pub unsuitable: bool,
#[prost(message, repeated, tag = "8")]
pub parameter_set_epochs: ::prost::alloc::vec::Vec<ChannelParameterSetEpoch>,
#[prost(int32, tag = "9")]
pub index_format: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelParameterSetEpoch {
#[prost(int64, tag = "1")]
pub epoch_time: i64,
#[prost(int64, tag = "2")]
pub chunk_byte_offset: i64,
#[prost(int64, tag = "3")]
pub chunk_byte_length: i64,
#[prost(bytes = "vec", tag = "4")]
pub parameter_sets: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReportChannelKeyframesResponse {}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ConversionFailureReason {
Unspecified = 0,
SourceChanged = 1,
InvalidSource = 2,
DidNotComplete = 3,
Internal = 4,
}
impl ConversionFailureReason {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "CONVERSION_FAILURE_REASON_UNSPECIFIED",
Self::SourceChanged => "CONVERSION_FAILURE_REASON_SOURCE_CHANGED",
Self::InvalidSource => "CONVERSION_FAILURE_REASON_INVALID_SOURCE",
Self::DidNotComplete => "CONVERSION_FAILURE_REASON_DID_NOT_COMPLETE",
Self::Internal => "CONVERSION_FAILURE_REASON_INTERNAL",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CONVERSION_FAILURE_REASON_UNSPECIFIED" => Some(Self::Unspecified),
"CONVERSION_FAILURE_REASON_SOURCE_CHANGED" => Some(Self::SourceChanged),
"CONVERSION_FAILURE_REASON_INVALID_SOURCE" => Some(Self::InvalidSource),
"CONVERSION_FAILURE_REASON_DID_NOT_COMPLETE" => Some(Self::DidNotComplete),
"CONVERSION_FAILURE_REASON_INTERNAL" => Some(Self::Internal),
_ => None,
}
}
}
pub mod internal_mcap_conversion_service_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct InternalMcapConversionServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl InternalMcapConversionServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> InternalMcapConversionServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> InternalMcapConversionServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::Body>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::Body>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
InternalMcapConversionServiceClient::new(
InterceptedService::new(inner, interceptor),
)
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn report_conversion_segments(
&mut self,
request: impl tonic::IntoRequest<super::ReportConversionSegmentsRequest>,
) -> std::result::Result<
tonic::Response<super::ReportConversionSegmentsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.internalmcapvideos.v1.InternalMcapConversionService/ReportConversionSegments",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.internalmcapvideos.v1.InternalMcapConversionService",
"ReportConversionSegments",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn complete_conversion(
&mut self,
request: impl tonic::IntoRequest<super::CompleteConversionRequest>,
) -> std::result::Result<
tonic::Response<super::CompleteConversionResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.internalmcapvideos.v1.InternalMcapConversionService/CompleteConversion",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.internalmcapvideos.v1.InternalMcapConversionService",
"CompleteConversion",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn fail_conversion(
&mut self,
request: impl tonic::IntoRequest<super::FailConversionRequest>,
) -> std::result::Result<
tonic::Response<super::FailConversionResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.internalmcapvideos.v1.InternalMcapConversionService/FailConversion",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.internalmcapvideos.v1.InternalMcapConversionService",
"FailConversion",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn report_channel_keyframes(
&mut self,
request: impl tonic::IntoRequest<super::ReportChannelKeyframesRequest>,
) -> std::result::Result<
tonic::Response<super::ReportChannelKeyframesResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.internalmcapvideos.v1.InternalMcapConversionService/ReportChannelKeyframes",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.internalmcapvideos.v1.InternalMcapConversionService",
"ReportChannelKeyframes",
),
);
self.inner.unary(req, path, codec).await
}
}
}