pub struct KinesisVideoMediaClient { /* private fields */ }
Expand description
A client for the Kinesis Video Media API.
Implementations
sourceimpl KinesisVideoMediaClient
impl KinesisVideoMediaClient
sourcepub fn new(region: Region) -> KinesisVideoMediaClient
pub fn new(region: Region) -> KinesisVideoMediaClient
Creates a client backed by the default tokio event loop.
The client will use the default credentials provider and tls client.
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: Region
) -> KinesisVideoMediaClient where
P: ProvideAwsCredentials + Send + Sync + 'static,
D: DispatchSignedRequest + Send + Sync + 'static,
pub fn new_with_client(
client: Client,
region: Region
) -> KinesisVideoMediaClient
Trait Implementations
sourceimpl Clone for KinesisVideoMediaClient
impl Clone for KinesisVideoMediaClient
sourcefn clone(&self) -> KinesisVideoMediaClient
fn clone(&self) -> KinesisVideoMediaClient
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl KinesisVideoMedia for KinesisVideoMediaClient
impl KinesisVideoMedia for KinesisVideoMediaClient
sourcefn get_media<'life0, 'async_trait>(
&'life0 self,
input: GetMediaInput
) -> Pin<Box<dyn Future<Output = Result<GetMediaOutput, RusotoError<GetMediaError>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn get_media<'life0, 'async_trait>(
&'life0 self,
input: GetMediaInput
) -> Pin<Box<dyn Future<Output = Result<GetMediaOutput, RusotoError<GetMediaError>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Use this API to retrieve media content from a Kinesis video stream. In the request, you identify the stream name or stream Amazon Resource Name (ARN), and the starting chunk. Kinesis Video Streams then returns a stream of chunks in order by fragment number.
You must first call the GetDataEndpoint
API to get an endpoint. Then send the GetMedia
requests to this endpoint using the --endpoint-url parameter.
When you put media data (fragments) on a stream, Kinesis Video Streams stores each incoming fragment and related metadata in what is called a "chunk." For more information, see PutMedia. The GetMedia
API returns a stream of these chunks starting from the chunk that you specify in the request.
The following limits apply when using the GetMedia
API:
-
A client can call
GetMedia
up to five times per second per stream. -
Kinesis Video Streams sends media data at a rate of up to 25 megabytes per second (or 200 megabits per second) during a
GetMedia
session.
If an error is thrown after invoking a Kinesis Video Streams media API, in addition to the HTTP status code and the response body, it includes the following pieces of information:
-
x-amz-ErrorType
HTTP header – contains a more specific error type in addition to what the HTTP status code provides. -
x-amz-RequestId
HTTP header – if you want to report an issue to AWS, the support team can better diagnose the problem if given the Request Id.
Both the HTTP status code and the ErrorType header can be utilized to make programmatic decisions about whether errors are retry-able and under what conditions, as well as provide information on what actions the client programmer might need to take in order to successfully try again.
For more information, see the Errors section at the bottom of this topic, as well as Common Errors.
Auto Trait Implementations
impl !RefUnwindSafe for KinesisVideoMediaClient
impl Send for KinesisVideoMediaClient
impl Sync for KinesisVideoMediaClient
impl Unpin for KinesisVideoMediaClient
impl !UnwindSafe for KinesisVideoMediaClient
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more