Skip to content

Commit

Permalink
Code format for plusplayer header file
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaowei-guan committed Sep 25, 2023
1 parent d55af27 commit b50f90b
Show file tree
Hide file tree
Showing 15 changed files with 554 additions and 523 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="org.tizen.video_player_avplayer_example" version="1.0.0" api-version="7.0" xmlns="http://tizen.org/ns/packages">
<manifest package="org.tizen.video_player_avplayer_example" version="1.0.0" api-version="6.0" xmlns="http://tizen.org/ns/packages">
<profile name="tv"/>
<ui-application appid="org.tizen.video_player_avplayer_example" exec="Runner.dll" type="dotnet" multiple="false" taskmanage="true" nodisplay="false">
<label>video_player_avplayer_example</label>
Expand Down
4 changes: 2 additions & 2 deletions packages/video_player_avplayer/tizen/inc/plusplayer/appinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
namespace plusplayer {

/**
* @brief Player app information.
*/
* @brief Player app information.
*/
struct PlayerAppInfo {
std::string id; /**< App id */
std::string version; /**< App version */
Expand Down
56 changes: 29 additions & 27 deletions packages/video_player_avplayer/tizen/inc/plusplayer/drm.h
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
/**
* @file drm.h
* @interfacetype module
* @privlevel None-privilege
* @privilege None
* @product TV, AV, B2B
* @version 1.0
* @SDK_Support N
*
* Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved
* PROPRIETARY/CONFIDENTIAL
* This software is the confidential and proprietary
* information of SAMSUNG ELECTRONICS ("Confidential Information"). You shall
* not disclose such Confidential Information and shall use it only in
* accordance with the terms of the license agreement you entered into with
* SAMSUNG ELECTRONICS. SAMSUNG make no representations or warranties about the
* suitability of the software, either express or implied, including but not
* limited to the implied warranties of merchantability, fitness for a
* particular purpose, or non-infringement. SAMSUNG shall not be liable for any
* damages suffered by licensee as a result of using, modifying or distributing
* this software or its derivatives.
*/
* @file drm.h
* @interfacetype module
* @privlevel None-privilege
* @privilege None
* @product TV, AV, B2B
* @version 1.0
* @SDK_Support N
*
* Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved
* PROPRIETARY/CONFIDENTIAL
* This software is the confidential and proprietary
* information of SAMSUNG ELECTRONICS ("Confidential Information"). You shall
* not disclose such Confidential Information and shall use it only in
* accordance with the terms of the license agreement you entered into with
* SAMSUNG ELECTRONICS. SAMSUNG make no representations or warranties about the
* suitability of the software, either express or implied, including but not
* limited to the implied warranties of merchantability, fitness for a
* particular purpose, or non-infringement. SAMSUNG shall not be liable for any
* damages suffered by licensee as a result of using, modifying or distributing
* this software or its derivatives.
*/

#ifndef __PLUSPLAYER_DRM_H__
#define __PLUSPLAYER_DRM_H__
Expand Down Expand Up @@ -51,13 +51,15 @@ enum class Type {
// post from hlsdemux for getright

struct Property {
Type type = Type::kNone; // Drm type
DrmHandle handle = 0; // Drm handle
bool external_decryption = false; // External Decryption Mode
LicenseAcquiredCb license_acquired_cb = nullptr; // The cb will be invoked when license was acquired.
UserData license_acquired_userdata = nullptr; // The userdata will be sent by license_acquired_cb
Type type = Type::kNone; // Drm type
DrmHandle handle = 0; // Drm handle
bool external_decryption = false; // External Decryption Mode
LicenseAcquiredCb license_acquired_cb =
nullptr; // The cb will be invoked when license was acquired.
UserData license_acquired_userdata =
nullptr; // The userdata will be sent by license_acquired_cb
};

} // namespace drm

} // namespace plusplayer
Expand Down
170 changes: 86 additions & 84 deletions packages/video_player_avplayer/tizen/inc/plusplayer/eventlistener.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#define PLUS_PLAYER_AI_DATA_COLLECTION
#endif


namespace plusplayer {

/**
Expand Down Expand Up @@ -101,60 +100,62 @@ class EventListener {
const MessageParam& msg,
UserData userdata) {}
/**
* @brief It will be invoked when queue in hls event triggered for cue
* advetisment start
* @param [in] msgType : #event name
* @param [in] MessageParam : #MessageParam
*/
virtual void OnCueEvent(const char *CueData,
UserData userdata) {}
* @brief It will be invoked when queue in hls event triggered for cue
* advetisment start
* @param [in] msgType : #event name
* @param [in] MessageParam : #MessageParam
*/
virtual void OnCueEvent(const char* CueData, UserData userdata) {}
/**
* @brief It will be invoked when InteractiveAd event triggered
* @param [in] msgType : #event name
* @param [in] MessageParam : #MessageParam
*/
virtual void OnInteractiveAd(const char *InteractiveAdData,
UserData userdata) {}
/**
* @brief It will be invoked when InteractiveAd start
* @param [in] msgType : #event name
* @param [in] MessageParam : #MessageParam
*/
virtual void OnInteractiveAdStart(const char *InteractiveAdID,
UserData userdata) {}
* @brief It will be invoked when InteractiveAd event triggered
* @param [in] msgType : #event name
* @param [in] MessageParam : #MessageParam
*/
virtual void OnInteractiveAd(const char* InteractiveAdData,
UserData userdata) {}
/**
* @brief It will be invoked when InteractiveAd start
* @param [in] msgType : #event name
* @param [in] MessageParam : #MessageParam
*/
virtual void OnInteractiveAdStart(const char* InteractiveAdID,
UserData userdata) {}

/**
* @brief It will be invoked when InteractiveAd stop reaches
* @param [in] msgType : #event name
* @param [in] MessageParam : #MessageParam
*/
virtual void OnInteractiveAdStop(const char *InteractiveAdID,
UserData userdata) {}
/**
* @brief It will be invoked when InteractiveAd stop reaches
* @param [in] msgType : #event name
* @param [in] MessageParam : #MessageParam
*/
virtual void OnInteractiveAdStop(const char* InteractiveAdID,
UserData userdata) {}

virtual void OnDateRangeEvent(const char* DateRangeData, UserData userdata) {}
virtual void OnStopReachEvent(bool StopReach, UserData userdata) {}

virtual void OnCueOutContEvent(const char* CueOutContData,
UserData userdata) {}
virtual void OnSwitchDoneEvent(UserData userdata) {}
UserData userdata) {}

virtual void OnSwitchDoneEvent(UserData userdata) {}
/**
* @brief It will be invoked when dash scte:35 cue event is parsed
* @param [in] Ad : # Ad information c_str ends with '\0'
* @pre This callback will not be invoked before player prepare
* @pre This callback will not be invoked before player prepare
* @post None
* @exception None
*/
virtual void OnADEventFromDash(const char* ADData, UserData userdata) {}

/**
* @brief It will be invoked when HbbTV preselection case by using dashplusplayer with appid "org.tizen.hbbtv"
* @param [in] ps_data : string stored preselection info followed json format
* @pre This callback will not be invoked before player prepare
* @brief It will be invoked when HbbTV preselection case by using
* dashplusplayer with appid "org.tizen.hbbtv"
* @param [in] ps_data : string stored preselection info followed json
* format
* @pre This callback will not be invoked before player prepare
* @post None
* @exception None
*/
virtual void OnAudioPreselectionInfoFromDash(const char * PsData, UserData userdata) {}
virtual void OnAudioPreselectionInfoFromDash(const char* PsData,
UserData userdata) {}

/**
* @brief It will be invoked when player is prepared to be started
Expand Down Expand Up @@ -196,29 +197,30 @@ class EventListener {
SubtitleAttrListPtr attr_list,
UserData userdata) {}
/**
* @brief It will be invoked when player state was changed to playing
* @param [in] userdata : userdata of event
* @pre None
* @post The player state will be #State::kPlaying
* @return None
* @exception None
*/
* @brief It will be invoked when player state was changed to playing
* @param [in] userdata : userdata of event
* @pre None
* @post The player state will be #State::kPlaying
* @return None
* @exception None
*/
virtual void OnStateChangedToPlaying(UserData userdata) {}
#ifdef DRM_MAPI_AARCH_64
#ifdef DRM_MAPI_AARCH_64
virtual void OnDrmInitData(unsigned long* drmhandle, unsigned int len,
#else
virtual void OnDrmInitData(int* drmhandle, unsigned int len,
#endif
#endif
unsigned char* psshdata, TrackType type,
UserData userdata) {}
UserData userdata) {
}
/**
* @brief It will be invoked to post AI data collection
* @param [in] userdata : userdata of event
* @pre None
* @post The player state will be #State::kPlaying
* @return None
* @exception None
*/
* @brief It will be invoked to post AI data collection
* @param [in] userdata : userdata of event
* @pre None
* @post The player state will be #State::kPlaying
* @return None
* @exception None
*/
#ifdef PLUS_PLAYER_AI_DATA_COLLECTION
virtual void OnAIDataCollection(std::unique_ptr<char[]> ai_data,
UserData userdata) {}
Expand All @@ -230,44 +232,44 @@ class EventListener {
#endif

/**
* @brief It will be invoked when demux found drm caps
* @param [in] userdata : userdata of event
* @return None
* @exception None
*/
* @brief It will be invoked when demux found drm caps
* @param [in] userdata : userdata of event
* @return None
* @exception None
*/
virtual void OnDrmType(plusplayer::drm::Type drmtype, UserData userdata) {}

/**
* @brief It will be invoked when pes data received from demux
* @param [in] pid : pkt indetifier
* @param [in] data : pes data
* @param [in] size : size of pes data
* @param [in] userdata : userdata of event
* @return None
* @exception None
*/
virtual void OnPesData(int pid, std::unique_ptr<char[]> data,
const int size,UserData userdata) {}
virtual void OnPSSHData(const StreamingMessageType& type,
const MessageParam& msg, UserData userdata){}
* @brief It will be invoked when pes data received from demux
* @param [in] pid : pkt indetifier
* @param [in] data : pes data
* @param [in] size : size of pes data
* @param [in] userdata : userdata of event
* @return None
* @exception None
*/
virtual void OnPesData(int pid, std::unique_ptr<char[]> data, const int size,
UserData userdata) {}

virtual void OnPSSHData(const StreamingMessageType& type,
const MessageParam& msg, UserData userdata) {}

/**
* @brief It will be invoked when section data received from demux
* @param [in] pid : pkt indetifier
* @param [in] data : section data
* @param [in] size : size of section data
* @param [in] userdata : userdata of event
* @return None
* @exception None
*/
* @brief It will be invoked when section data received from demux
* @param [in] pid : pkt indetifier
* @param [in] data : section data
* @param [in] size : size of section data
* @param [in] userdata : userdata of event
* @return None
* @exception None
*/

virtual void OnSectionData(int pid, std::unique_ptr<char[]> data,
const int size,UserData userdata) {}
const int size, UserData userdata) {}
#ifdef PLUS_PLAYER_ENABLE_ERROR_FRAMEWORK
virtual void OnErrorFW(std::unique_ptr<char[]> error_data, UserData userdata){}
#endif

virtual void OnErrorFW(std::unique_ptr<char[]> error_data,
UserData userdata) {}
#endif
};

} // namespace plusplayer
Expand Down
Loading

0 comments on commit b50f90b

Please sign in to comment.