Rialto 0.1
Rialto media pipeline API
Loading...
Searching...
No Matches
IMediaPipelineClient.h
Go to the documentation of this file.
1/*
2 * If not stated otherwise in this file or this component's LICENSE file the
3 * following copyright and licenses apply:
4 *
5 * Copyright 2022 Sky UK
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19
20#ifndef FIREBOLT_RIALTO_I_MEDIA_PIPELINE_CLIENT_H_
21#define FIREBOLT_RIALTO_I_MEDIA_PIPELINE_CLIENT_H_
22
23#include <MediaCommon.h>
24#include <memory>
25#include <stdint.h>
26#include <string>
27
38namespace firebolt::rialto
39{
40/* Values representing custom duration values, used by IMediaPipelineClient::notifyDuration() method*/
45constexpr int64_t kDurationUnknown{-1};
49constexpr int64_t kDurationUnending{-2};
50
59{
60public:
65
76 virtual void notifyDuration(int64_t duration) = 0;
77
90 virtual void notifyPosition(int64_t position) = 0;
91
104 virtual void notifyNativeSize(uint32_t width, uint32_t height, double aspect = 1.0) = 0;
105
119 virtual void notifyNetworkState(NetworkState state) = 0;
120
132 virtual void notifyPlaybackState(PlaybackState state) = 0;
133
139 virtual void notifyVideoData(bool hasData) = 0;
140
146 virtual void notifyAudioData(bool hasData) = 0;
147
167 virtual void notifyNeedMediaData(int32_t sourceId, size_t frameCount, uint32_t needDataRequestId,
168 const std::shared_ptr<MediaPlayerShmInfo> &shmInfo) = 0;
169
179 virtual void notifyCancelNeedMediaData(int32_t sourceId) = 0;
180
189 virtual void notifyQos(int32_t sourceId, const QosInfo &qosInfo) = 0;
190
198 virtual void notifyBufferUnderflow(int32_t sourceId) = 0;
199
208 virtual void notifyPlaybackError(int32_t sourceId, PlaybackError error) = 0;
209
217 virtual void notifySourceFlushed(int32_t sourceId) = 0;
218};
219
220}; // namespace firebolt::rialto
221
222#endif // FIREBOLT_RIALTO_I_MEDIA_PIPELINE_CLIENT_H_
constexpr int64_t kDurationUnending
Stream duration is unending or live.
Definition IMediaPipelineClient.h:49
constexpr int64_t kDurationUnknown
Stream duration is unknown or undefined.
Definition IMediaPipelineClient.h:45
NetworkState
The Network State.
Definition MediaCommon.h:137
PlaybackError
None fatal asynchronous errors reported by the player.
Definition MediaCommon.h:453
PlaybackState
The Playback State.
Definition MediaCommon.h:159
The Rialto media player client interface.
Definition IMediaPipelineClient.h:59
virtual void notifyPlaybackState(PlaybackState state)=0
Notifies the client of the playback state.
virtual void notifyVideoData(bool hasData)=0
Notifies the client that video data is available.
virtual ~IMediaPipelineClient()
Virtual destructor.
Definition IMediaPipelineClient.h:64
virtual void notifyNativeSize(uint32_t width, uint32_t height, double aspect=1.0)=0
Notifies the client of the native size of the video and the pixel aspect ratio.
virtual void notifySourceFlushed(int32_t sourceId)=0
Notifies the client that the source has been flushed.
virtual void notifyAudioData(bool hasData)=0
Notifies the client that audio data is available.
virtual void notifyPosition(int64_t position)=0
Notifies the client of the current playback position.
virtual void notifyNetworkState(NetworkState state)=0
Notifies the client of the network state.
virtual void notifyDuration(int64_t duration)=0
Notifies the client of the total duration of the media.
virtual void notifyNeedMediaData(int32_t sourceId, size_t frameCount, uint32_t needDataRequestId, const std::shared_ptr< MediaPlayerShmInfo > &shmInfo)=0
Notifies the client that we need media data.
virtual void notifyPlaybackError(int32_t sourceId, PlaybackError error)=0
Notifies the client that a non-fatal error has occurred in the player.
virtual void notifyCancelNeedMediaData(int32_t sourceId)=0
Notifies the client to cancel any outstand need request.
virtual void notifyQos(int32_t sourceId, const QosInfo &qosInfo)=0
Notifies the client of a Quality Of Service update from the Player.
virtual void notifyBufferUnderflow(int32_t sourceId)=0
Notifies the client that buffer underflow occurred.
The information provided in a QOS update.
Definition MediaCommon.h:279