class DecodedVideoPacketEx : private boost::noncopyable {
public:
using Ptr = std::unique_ptr<DecodedVideoPacketEx>;
-
+ /**
+ * @brief Create a new DecodedVideoPacketEx object.
+ * @param [in] pts : timestamp of decoded packet.
+ * @param [in] duration : duration of decoded packet.
+ * @param [in] surface_data : surface data address which store the decoded data.
+ * @param [in] scaler_index : the scaler index.
+ * @exception None
+ * @return DecodedVideoPacketEx object.
+ */
static Ptr Create(const uint64_t pts = 0, const uint64_t duration = 0,
tbm_surface_h surface_data = nullptr,
const void* scaler_index = nullptr);
-
+ /**
+ * @brief Constructor of DecodedVideoPacketEx without params.
+ * @pre None
+ * @post None
+ * @exception None
+ * @return None
+ * @see DecodedVideoPacketEx::Create()
+ */
DecodedVideoPacketEx() = delete;
-
+ /**
+ * @brief Destructor of DecodedVideoPacketEx object
+ * @pre None
+ * @post None
+ * @exception None
+ * @return None
+ * @see DecodedVideoPacketEx::Create()
+ */
virtual ~DecodedVideoPacketEx();
-
+ /**
+ * @brief Get pts of decoded packet.
+ */
uint64_t GetPts() const { return pts_; }
+ /**
+ * @brief Get duration of decoded packet.
+ */
uint64_t GetDuration() const { return duration_; }
+ /**
+ * @brief Get tbm surface data of decoded packet.
+ */
const tbm_surface_h GetTbmSurface() const { return surface_data_; }
+ /**
+ * @brief Get scaler index of decoded packet.
+ */
const void* GetScalerIndex() const { return scaler_index_; }
protected:
+ /**
+ * @brief Constructor of structure DecodedVideoPacketEx.
+ * @param [in] pts : timestamp of decoded packet.
+ * @param [in] duration : duration of decoded packet.
+ * @param [in] surface_data : surface data address which store the decoded data.
+ * @param [in] scaler_index : the scaler index.
+ */
explicit DecodedVideoPacketEx(const uint64_t pts, const uint64_t duration,
tbm_surface_h surface_data,
const void* scaler_index)
* @return audio stream object (unique_ptr<AudioStream>)
*/
static Ptr Create() { return Ptr(new AudioStream); }
-
+ /**
+ * @brief Constructor of AudioStream without params.
+ * @pre None
+ * @post None
+ * @exception None
+ * @return None
+ * @see AudioStream::Create()
+ */
AudioStream() noexcept;
-
+ /**
+ * @brief Deonstructor of AudioStream.
+ * @pre None
+ * @post None
+ * @exception None
+ * @return None
+ * @see AudioStream::Create()
+ */
~AudioStream() {}
/**
* @brief Set mime type for the associated audio stream
*/
static Ptr Create() { return Ptr(new VideoStream); }
+ /**
+ * @brief Constructor of VideoStream without params
+ * @pre None
+ * @post None
+ * @exception None
+ * @return None
+ * @see VideoStream::Create()
+ */
VideoStream() noexcept;
-
+ /**
+ * @brief Destructor of VideoStream
+ * @pre None
+ * @post None
+ * @exception None
+ * @return None
+ * @see VideoStream::Create()
+ */
~VideoStream() {}
/**
*/
class EsEventListener {
public:
+ /**
+ * @brief Constructor of EsEventListener object
+ * @pre None
+ * @post None
+ * @exception None
+ * @return None
+ */
EsEventListener() noexcept {}
using UserData = void*;
+ /**
+ * @brief Destructor of EsEventListener object
+ * @pre None
+ * @post None
+ * @exception None
+ * @return None
+ */
virtual ~EsEventListener() {}
// LCOV_EXCL_START
/**
* @see EsPlusPlayer::Flush()
*/
virtual void OnFlushDone(UserData userdata) {}
-
+ /**
+ * @brief It will be invoked when player gets closed caption data from
+ * decoder.
+ * @param [in] event_type : the type of event.
+ * @param [in] msg_data : the event message data.
+ */
virtual void OnEvent(const EventType& event_type, const EventMsg& msg_data,
UserData userdata) {}
-
+ /**
+ * @brief It will be invoked when the first frame decode out.
+ */
virtual void OnFirstDecodingDone(UserData userdata) {}
/**
*/
static Ptr CreateEos(const StreamType type = StreamType::kMax);
EsPacket() = delete;
-
+ /**
+ * @brief Destructor of EsPacket object
+ * @pre None
+ * @post None
+ * @exception None
+ * @return None
+ * @see EsPacket::Create()
+ */
~EsPacket() {}
/**
* @brief Get the stream type for the associated packet
bool IsEosPacket() const { return buffer_size_ == 0 && buffer_ == nullptr; }
private:
+ /**
+ * @brief Constructor of EsPacket object.
+ * @pre None
+ * @post None
+ * @param [in] type : stream type of packet.
+ * @param [in] buffer_size : buffer size of packet.
+ * @param [in] pts : timestamp of this packet.
+ * @param [in] duration : duration of this packet.
+ * @return None
+ * @see EsPacket::Create()
+ */
explicit EsPacket(const StreamType type, std::shared_ptr<char> buffer,
const uint32_t buffer_size, const uint64_t pts,
const uint64_t duration, const uint32_t hdr10p_size,
static Ptr Create();
public:
+ /**
+ * @brief Destructor of EsPlusPlayer object
+ * @pre None
+ * @post None
+ * @exception None
+ * @return None
+ * @see EsPlusPlayer::Create()
+ */
virtual ~EsPlusPlayer() {}
/**
* @brief Make player get ready to set playback mode
*/
virtual bool PrepareAsync() { return false; }
/**
- * @brief Start playback
+ * @brief Start a media content playback.
* @pre The player state should be #EsState::kReady
* @post The player state will be #EsState::kPlaying
* @return @c True on success, otherwise @c False
*/
virtual bool Pause() { return false; }
/**
- * @brief Resume a media content
+ * @brief Resume a media content after pause.
* @pre The player state must be one of #EsState::kPlaying or
* #EsState::kPaused
* @post The player state will be #EsState::kPlaying
*/
virtual bool Resume() { return false; }
/**
- * @brief SetAppInfo
+ * @brief Set the app info of player.
* @remarks Set app_id to resource manager. Resource manager check the
* priority to control resource.
* @param [in] app_info : application id, version, type
*/
virtual void SetAppInfo(const PlayerAppInfo& app_info) { return; }
/**
- * @brief SetAppInfoEx
+ * @brief Set more app info of player.
* @remarks Set app_id to resource manager. Resource manager check the
* priority to control resource.
* @param [in] app_info : application id, version, type, runtitle
*/
virtual void SetAppInfoEx(const PlayerAppInfoEx& app_info) { return; }
/**
- * @brief SetPlaybackRate.
+ * @brief Set the playback rate of player.
* @remarks Set playback rate from 0.0 to 2.0.
* @param [in] rate : The playback rate from 0.0 to 2.0. EsPlayer isn't
* support trick play.
*/
virtual bool Seek(const uint64_t time) { return false; }
/**
- * @brief Set the video display
+ * @brief Set the video display with obj.
* @remarks We are not supporting changing display.
* @remarks This API have to be called before calling the
* EsPlusPlayer::PrepareAsync() to reflect the display type.
virtual bool SetDisplay(const DisplayType& type, void* obj) { return false; }
#ifdef USE_MIXER
/**
- * @brief Set the video display
+ * @brief Set the video display of mixer player.
* @remarks We are not supporting changing display.
* @remarks This API have to be called before calling the
* PlusPlayer::Prepare()
}
#endif
/**
- * @brief Set the video display
+ * @brief Set the video display with ecore window.
* @remarks We are not supporting changing display.
* @remarks This API have to be called before calling the
* EsPlusPlayer::PrepareAsync() to reflect the display type.
return false;
}
/**
- * @brief Set the video display
+ * @brief Set the video display with surface id.
* @remarks We are not supporting changing display.
* @remarks This API have to be called before calling the
* EsPlusPlayer::PrepareAsync() to reflect the display type.
return;
}
/**
- * @brief Set volume to player
+ * @brief Set volume value of player
* @param [in] volume : volume level
* @pre The player state can be all of #EsState except #EsState::kNone
* @return @c True on success, otherwise @c False
*/
virtual bool SetVolume(const int& volume) { return false; }
/**
- * @brief Get volume to player
+ * @brief Get volume value of player
* @param [out] volume : volume ptr
* @pre The player state can be all of #EsState except #EsState::kNone
* @return @c True on success, otherwise @c False
*/
virtual bool Flush(const StreamType& type) { return false; }
/**
- * @brief Set the buffer size
+ * @brief Set the type of buffer size.
* @param [in] option : A type of Buffer Option
* @pre The player state must be set to #EsState::kIdle
* @return @c True on success, otherwise @c False
virtual bool StopAudioEasing() { return false; }
/**
- * @brief Get virtual resource id
+ * @brief Get virtual render resource id.
* @param [in] type : The resource type of virtual id.
* @param [out] virtual_id : Stored virtual resource id value.
* @pre The player state should be #EsState::kReady, #EsState::kPlaying
// LCOV_EXCL_STOP
protected:
+ /**
+ * @brief Constructor of EsPlusPlayer object
+ * @pre None
+ * @post None
+ * @exception None
+ * @return None
+ * @see EsPlusPlayer::Create()
+ */
EsPlusPlayer() noexcept {};
}; // class EsPlusPlayer
* @brief Structure of subsample information for drm
*/
struct DrmbEsSubSampleInfo {
+ /**
+ * @brief Constructor of structure DrmbEsSubSampleInfo.
+ */
explicit DrmbEsSubSampleInfo(const uint32_t _bytes_of_clear_data,
const uint32_t _bytes_of_encrypted_data)
: bytes_of_clear_data(_bytes_of_clear_data),
bool use_swdecoder = false;
std::string language_code;
std::string subtitle_format;
+ /**
+ * @brief Constructor of Track
+ * @pre None
+ * @post None
+ * @exception None
+ * @return None
+ */
Track() {};
+ /**
+ * @brief Constructor of Track with params
+ * @pre None
+ * @post None
+ * @param [in] _index : track index
+ * @param [in] _mimetype : codec type of video/audio
+ * @param [in] _streamtype : audio/video/subtile
+ * @exception None
+ * @return None
+ */
Track(int _index, int _id, std::string _mimetype, std::string _streamtype, std::string _container_type,
TrackType _type, std::shared_ptr<char> _codec_data, unsigned int _codec_tag, int _codec_data_len,
int _width, int _height, int _maxwidth, int _maxheight, int _framerate_num, int _framerate_den,
};
struct SubtitleAttr {
+ /**
+ * @brief Constructor of SubtitleAttr with params
+ * @pre None
+ * @post None
+ * @param [in] _type : see SubtitleAttrType, set attribute such as pos, width,height, size and so on.
+ * @param [in] _start_time : start time of the attr value.
+ * @param [in] _stop_time : stop time of the attr value.
+ * @param [in] _value : value of the attr value.
+ * @exception None
+ * @return None
+ */
explicit SubtitleAttr(const SubtitleAttrType _type,
const uint32_t _start_time, const uint32_t _stop_time,
const boost::any _value, const int _extsub_index)
int esplusplayer_close(esplusplayer_handle handle);
/**
- * @brief Release player handle.
+ * @brief Release a player handle after finish playing.
* @param [in] handle : esplusplayer handle.
* @return @c ESPLUSPLAYER_ERROR_TYPE_NONE on success,otherwise @c one of
* esplusplayer_error_type
int esplusplayer_prepare_async(esplusplayer_handle handle);
/**
- * @brief Start playback.
+ * @brief Start playback after prepare done.
* @param [in] handle : esplusplayer handle.
* @return @c ESPLUSPLAYER_ERROR_TYPE_NONE on success,otherwise @c one of
* esplusplayer_error_type
int esplusplayer_resume(esplusplayer_handle handle);
/**
- * @brief Set playback rate.
+ * @brief Set the video playback rate.
* @param [in] handle : esplusplayer handle.
* @param [in] playback_rate : the playback rate from 0.0 to 2.0.
* @param [in] audio_mute : the audio is mute on/off, true: mute on, false:
const esplusplayer_app_info* app_info);
/**
- * @brief Set the video display.
+ * @brief Set the video display with window object.
* @param [in] handle : esplusplayer handle.
* @param [in] type : display type.
* @param [in] window : the handle to display window.
int esplusplayer_set_display(esplusplayer_handle handle,
esplusplayer_display_type type, void* window);
/**
- * @brief Set the video display.
+ * @brief Set the video display with subsurface.
* @param [in] handle : esplusplayer handle.
* @param [in] type : display type.
* @param [in] subsurface : the ecore wayland subsurface handle.
void* subsurface, int x, int y,
int width, int height);
/**
- * @brief Set the video display.
+ * @brief Set the video display with window position.
* @param [in] handle : esplusplayer handle.
* @param [in] type : display type.
* @param [in] window : the ecore wayland2 window handle.
esplusplayer_adaptive_info_type adaptive_type);
/**
- * @brief Set volume to player
+ * @brief Set volume value to player.
* @param [in] handle : esplusplayer handle.
* @param [in] volume : volume level(0 ~ 100).
* @return @c ESPLUSPLAYER_ERROR_TYPE_NONE on success,otherwise @c one of
int esplusplayer_set_volume(esplusplayer_handle handle, const int volume);
/**
- * @brief Get volume from player
+ * @brief Get volume value from player.
* @param [in] handle : esplusplayer handle.
* @param [out] volume : volume ptr.
* @return @c ESPLUSPLAYER_ERROR_TYPE_NONE on success,otherwise @c one of
int esplusplayer_start_audio_easing(esplusplayer_handle handle);
/**
- * @brief Stop audio easing
+ * @brief Stop an audio easing handle which have been started.
* @param [in] handle : esplusplayer handle.
* @return @c ESPLUSPLAYER_ERROR_TYPE_NONE on success,otherwise @c one of
* esplusplayer_error_type
int esplusplayer_stop_audio_easing(esplusplayer_handle handle);
/**
- * @brief Get virtual resource id
+ * @brief Get virtual render resource id of player.
* @param [in] handle : esplusplayer handle.
* @param [in] type : The resource type of virtual id.
* @param [out] virtual_id : Stored virtual resource id value.
esplusplayer_video_frame_dropped_cb video_frame_dropped_cb, void* userdata);
/**
- * @brief Set video scan type.
+ * @brief Set video scan type(progressive/interlaced).
* @param [in] handle : esplusplayer handle.
* @param [in] type : The video scan type.
* @pre The player state must be set to #ESPLUSPLAYER_STATE_IDLE.
typedef void (*esplusplayer_first_video_decoding_done_cb)(void*);
/**
- * @brief Set the video display.
+ * @brief Set the video display by surface id.
* @param [in] handle : esplusplayer handle.
* @param [in] type : display type.
* @param [in] surface_id : resource id of window.
esplusplayer_display_type type,
unsigned int surface_id, int x, int y,
int width, int height);
-
+/**
+ * @brief Set a callback function to be invoked when the first buffer is
+ * output from a video decoder.
+ * @param [in] handle : esplusplayer handle.
+ * @param [in] callback : the callback function to register.
+ * @param [in] userdata : userdata of esplusplayer_decoder_underrun_cb()
+ * @return @c one of esplusplayer_error_type values will be returned.
+ * @pre The player state must be set to #ESPLUSPLAYER_STATE_NONE or
+ * #ESPLUSPLAYER_STATE_IDLE.
+ * @post esplusplayer_first_video_decoding_done_cb() will be invoked.
+ * @exception None
+ */
int esplusplayer_set_first_video_decoding_done_cb(
esplusplayer_handle handle,
esplusplayer_first_video_decoding_done_cb first_video_decoding_done_cb,
public:
using Ptr = std::unique_ptr<Mixer>;
/**
- * @brief Create a mixer object
+ * @brief Create a new mixer object
* @remarks You must use this to get mixer object
* @pre None
* @post None
public:
/**
- * @brief Destructor of Mixer
+ * @brief Destructor of Mixer object
* @pre None
* @post None
* @exception None
*/
virtual ~Mixer(){};
/**
- * @brief Starts Mixer
+ * @brief Starts Mixer when all players are ready.
* @pre None
* @post Black frame or mixed frame will be displayed on the screen
* @exception None
// LCOV_EXCL_START
virtual bool Start() { return false; }
/**
- * @brief Stops Mixer
+ * @brief Stops Mixer when playing finished.
* @pre Mixer::Start() was called
* @post None
* @exception None
*/
virtual int GetMaximumAllowedNumberOfPlayer() { return 0; }
/**
- * @brief Sets the video display
+ * @brief Sets the video display with params
* @remarks We are not supporting changing display.
* @remarks This API have to be called before calling the
* Mixer::Start() to reflect the display type.
*/
virtual bool SetDisplay(const DisplayType type, void* obj) { return false; }
/**
- * @brief Sets the video display
+ * @brief Sets the video display with params
* @remarks We are not supporting changing display.
* @remarks This API have to be called before calling the
* Mixer::Start() to reflect the display type.
protected:
/**
- * @brief Constructor of Mixer
+ * @brief Constructor of Mixer object
* @pre None
* @post None
* @exception None
} mixer_rsc_alloc_mode;
/**
- * @brief Create a mixer handle
+ * @brief Create a new mixer handle.
* @param None
* @return return mixer handle pointer
* @code
mixer_handle mixer_create();
/**
- * @brief Release mixer handle
+ * @brief Release the handle of mixer player.
* @param [in] handle : mixer handle
* @return @c one of mixer_error_type values will be returned
* @pre None
int mixer_destroy(mixer_handle handle);
/**
- * @brief Starts Mixer.
+ * @brief Starts a Mixer video playing.
* @param [in] handle : mixer handle
* @return @c one of mixer_error_type values will be returned
* @pre None
int mixer_start(mixer_handle handle);
/**
- * @brief Stops Mixer
+ * @brief Stops a Mixer video playing.
* @param [in] handle : Mixer handle
* @return @c one of mixer_error_type values will be returned
* @pre mixer_start() should be called
int mixer_get_max_allowed_number_of_player(mixer_handle handle);
/**
- * @brief Sets the video display
+ * @brief Sets the video display of mixer.
* @param [in] handle : Mixer handle
- * @param [in] type : display type
+ * @param [in] type : mixer display type
* @param [in] window : The handle to display window
* @return @c one of mixer_error_type values will be returned
* @pre This API have to be called before calling the