Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CXBMCApp Class Reference

#include <XBMCApp.h>

Inheritance diagram for CXBMCApp:
IActivityHandler jni::CJNIMainActivity ANNOUNCEMENT::IAnnouncer

Public Member Functions

 CXBMCApp ()=delete
 
 ~CXBMCApp () override
 
void Announce (ANNOUNCEMENT::AnnouncementFlag flag, const std::string &sender, const std::string &message, const CVariant &data) override
 
void onReceive (CJNIIntent intent) override
 
void onNewIntent (CJNIIntent intent) override
 
void onActivityResult (int requestCode, int resultCode, CJNIIntent resultData) override
 
void onVolumeChanged (int volume) override
 
virtual void onAudioFocusChange (int focusChange)
 
void doFrame (int64_t frameTimeNanos) override
 
void onVisibleBehindCanceled () override
 
void onInputDeviceAdded (int deviceId) override
 
void onInputDeviceChanged (int deviceId) override
 
void onInputDeviceRemoved (int deviceId) override
 
void onDisplayAdded (int displayId) override
 
void onDisplayChanged (int displayId) override
 
void onDisplayRemoved (int displayId) override
 
jni::jhobject getDisplayListener ()
 
bool isValid ()
 
void onStart () override
 
void onResume () override
 
void onPause () override
 
void onStop () override
 
void onDestroy () override
 
void onSaveState (void **data, size_t *size) override
 
void onConfigurationChanged () override
 
void onLowMemory () override
 
void onCreateWindow (ANativeWindow *window) override
 
void onResizeWindow () override
 
void onDestroyWindow () override
 
void onGainFocus () override
 
void onLostFocus () override
 
void Initialize ()
 
void Deinitialize ()
 
bool Stop (int exitCode)
 
void Quit ()
 
std::shared_ptr< CNativeWindowGetNativeWindow (int timeout) const
 
bool SetBuffersGeometry (int width, int height, int format)
 
int GetBatteryLevel () const
 
void KeepScreenOn (bool on)
 
bool HasFocus () const
 
std::vector< androidPackageGetApplications () const
 
void SetDisplayMode (int mode, float rate)
 
int GetDPI () const
 
void SetVideoLayoutBackgroundColor (const int color)
 
CRect MapRenderToDroid (const CRect &srcRect)
 
void OnPlayBackStarted ()
 
void OnPlayBackPaused ()
 
void OnPlayBackStopped ()
 
void UpdateSessionMetadata ()
 
void UpdateSessionState ()
 
void RegisterInputDeviceCallbacks (IInputDeviceCallbacks *handler)
 
void UnregisterInputDeviceCallbacks ()
 
void RegisterInputDeviceEventHandler (IInputDeviceEventHandler *handler)
 
void UnregisterInputDeviceEventHandler ()
 
bool onInputDeviceEvent (const AInputEvent *event)
 
void InitFrameCallback (CVideoSyncAndroid *syncImpl)
 
void DeinitFrameCallback ()
 
void ProcessSlow ()
 
bool WaitVSync (unsigned int milliSeconds)
 
int64_t GetNextFrameTime () const
 
float GetFrameLatencyMs () const
 
bool getVideosurfaceInUse ()
 
void setVideosurfaceInUse (bool videosurfaceInUse)
 
void surfaceChanged (CJNISurfaceHolder holder, int format, int width, int height) override
 
void surfaceCreated (CJNISurfaceHolder holder) override
 
void surfaceDestroyed (CJNISurfaceHolder holder) override
 
- Public Member Functions inherited from IActivityHandler
virtual ~IActivityHandler ()=default
 
- Public Member Functions inherited from jni::CJNIMainActivity
 CJNIMainActivity (const ANativeActivity *nativeActivity)
 
 ~CJNIMainActivity () override
 
CJNIRect getDisplayRect ()
 
- Public Member Functions inherited from ANNOUNCEMENT::IAnnouncer
 IAnnouncer ()=default
 
virtual ~IAnnouncer ()=default
 

Static Public Member Functions

static CXBMCAppCreate (ANativeActivity *nativeActivity, IInputHandler &inputhandler)
 
static CXBMCAppGet ()
 
static void Destroy ()
 
static int android_printf (const char *format,...)
 
static bool StartActivity (const std::string &package, const std::string &intent=std::string(), const std::string &dataType=std::string(), const std::string &dataURI=std::string(), const std::string &flags=std::string(), const std::string &extras=std::string(), const std::string &action=std::string(), const std::string &category=std::string(), const std::string &className=std::string())
 
static int GetMaxSystemVolume ()
 
static float GetSystemVolume ()
 
static void SetSystemVolume (float percent)
 
static const CJNIViewInputDevice GetInputDevice (int deviceId)
 
static std::vector< intGetInputDeviceIds ()
 
- Static Public Member Functions inherited from jni::CJNIMainActivity
static CJNIMainActivityGetAppInstance ()
 
static void RegisterNatives (JNIEnv *env)
 
static void _onNewIntent (JNIEnv *env, jobject context, jobject intent)
 
static void _onActivityResult (JNIEnv *env, jobject context, jint requestCode, jint resultCode, jobject resultData)
 
static void _onVolumeChanged (JNIEnv *env, jobject context, jint volume)
 
static void _doFrame (JNIEnv *env, jobject context, jlong frameTimeNanos)
 
static void _onInputDeviceAdded (JNIEnv *env, jobject context, jint deviceId)
 
static void _onInputDeviceChanged (JNIEnv *env, jobject context, jint deviceId)
 
static void _onInputDeviceRemoved (JNIEnv *env, jobject context, jint deviceId)
 
static void _onVisibleBehindCanceled (JNIEnv *env, jobject context)
 
static void _callNative (JNIEnv *env, jobject context, jlong funcAddr, jlong variantAddr)
 
static void runNativeOnUiThread (void(*callback)(void *), void *variant)
 
static void registerMediaButtonEventReceiver ()
 
static void unregisterMediaButtonEventReceiver ()
 

Protected Member Functions

bool AcquireAudioFocus ()
 
bool ReleaseAudioFocus ()
 
void RequestVisibleBehind (bool requested)
 
- Protected Member Functions inherited from jni::CJNIMainActivity

Static Protected Member Functions

static int GetMaxSystemVolume (JNIEnv *env)
 

Friends

class CAESinkAUDIOTRACK
 

Constructor & Destructor Documentation

◆ CXBMCApp()

CXBMCApp::CXBMCApp ( )
delete

◆ ~CXBMCApp()

CXBMCApp::~CXBMCApp ( )
override

Member Function Documentation

◆ AcquireAudioFocus()

bool CXBMCApp::AcquireAudioFocus ( )
protected

◆ android_printf()

int CXBMCApp::android_printf ( const char * format,
... )
static

◆ Announce()

void CXBMCApp::Announce ( ANNOUNCEMENT::AnnouncementFlag flag,
const std::string & sender,
const std::string & message,
const CVariant & data )
overridevirtual

◆ Create()

static CXBMCApp & CXBMCApp::Create ( ANativeActivity * nativeActivity,
IInputHandler & inputhandler )
inlinestatic

◆ DeinitFrameCallback()

void CXBMCApp::DeinitFrameCallback ( )

◆ Deinitialize()

void CXBMCApp::Deinitialize ( )

◆ Destroy()

static void CXBMCApp::Destroy ( )
inlinestatic

◆ doFrame()

void CXBMCApp::doFrame ( int64_t frameTimeNanos)
overridevirtual

Implements jni::CJNIMainActivity.

◆ Get()

static CXBMCApp & CXBMCApp::Get ( )
inlinestatic

◆ GetApplications()

std::vector< androidPackage > CXBMCApp::GetApplications ( ) const

◆ GetBatteryLevel()

int CXBMCApp::GetBatteryLevel ( ) const

◆ getDisplayListener()

jni::jhobject CXBMCApp::getDisplayListener ( )
inline

◆ GetDPI()

int CXBMCApp::GetDPI ( ) const

◆ GetFrameLatencyMs()

float CXBMCApp::GetFrameLatencyMs ( ) const

◆ GetInputDevice()

const CJNIViewInputDevice CXBMCApp::GetInputDevice ( int deviceId)
static

◆ GetInputDeviceIds()

std::vector< int > CXBMCApp::GetInputDeviceIds ( )
static

◆ GetMaxSystemVolume() [1/2]

int CXBMCApp::GetMaxSystemVolume ( )
static

◆ GetMaxSystemVolume() [2/2]

int CXBMCApp::GetMaxSystemVolume ( JNIEnv * env)
staticprotected

◆ GetNativeWindow()

std::shared_ptr< CNativeWindow > CXBMCApp::GetNativeWindow ( int timeout) const

◆ GetNextFrameTime()

int64_t CXBMCApp::GetNextFrameTime ( ) const

◆ GetSystemVolume()

float CXBMCApp::GetSystemVolume ( )
static

◆ getVideosurfaceInUse()

bool CXBMCApp::getVideosurfaceInUse ( )

◆ HasFocus()

bool CXBMCApp::HasFocus ( ) const
inline

◆ InitFrameCallback()

void CXBMCApp::InitFrameCallback ( CVideoSyncAndroid * syncImpl)

◆ Initialize()

void CXBMCApp::Initialize ( )

◆ isValid()

bool CXBMCApp::isValid ( )
inline

◆ KeepScreenOn()

void CXBMCApp::KeepScreenOn ( bool on)

◆ MapRenderToDroid()

CRect CXBMCApp::MapRenderToDroid ( const CRect & srcRect)

◆ onActivityResult()

void CXBMCApp::onActivityResult ( int requestCode,
int resultCode,
CJNIIntent resultData )
overridevirtual

Implements jni::CJNIMainActivity.

◆ onAudioFocusChange()

void CXBMCApp::onAudioFocusChange ( int focusChange)
virtual

◆ onConfigurationChanged()

void CXBMCApp::onConfigurationChanged ( )
overridevirtual

Reimplemented from IActivityHandler.

◆ onCreateWindow()

void CXBMCApp::onCreateWindow ( ANativeWindow * window)
overridevirtual

Reimplemented from IActivityHandler.

◆ onDestroy()

void CXBMCApp::onDestroy ( )
overridevirtual

Reimplemented from IActivityHandler.

◆ onDestroyWindow()

void CXBMCApp::onDestroyWindow ( )
overridevirtual

Reimplemented from IActivityHandler.

◆ onDisplayAdded()

void CXBMCApp::onDisplayAdded ( int displayId)
overridevirtual

Implements jni::CJNIMainActivity.

◆ onDisplayChanged()

void CXBMCApp::onDisplayChanged ( int displayId)
overridevirtual

Implements jni::CJNIMainActivity.

◆ onDisplayRemoved()

void CXBMCApp::onDisplayRemoved ( int displayId)
overridevirtual

Implements jni::CJNIMainActivity.

◆ onGainFocus()

void CXBMCApp::onGainFocus ( )
overridevirtual

Reimplemented from IActivityHandler.

◆ onInputDeviceAdded()

void CXBMCApp::onInputDeviceAdded ( int deviceId)
override

◆ onInputDeviceChanged()

void CXBMCApp::onInputDeviceChanged ( int deviceId)
override

◆ onInputDeviceEvent()

bool CXBMCApp::onInputDeviceEvent ( const AInputEvent * event)

◆ onInputDeviceRemoved()

void CXBMCApp::onInputDeviceRemoved ( int deviceId)
override

◆ onLostFocus()

void CXBMCApp::onLostFocus ( )
overridevirtual

Reimplemented from IActivityHandler.

◆ onLowMemory()

void CXBMCApp::onLowMemory ( )
overridevirtual

Reimplemented from IActivityHandler.

◆ onNewIntent()

void CXBMCApp::onNewIntent ( CJNIIntent intent)
overridevirtual

Implements jni::CJNIMainActivity.

◆ onPause()

void CXBMCApp::onPause ( )
overridevirtual

Reimplemented from IActivityHandler.

◆ OnPlayBackPaused()

void CXBMCApp::OnPlayBackPaused ( )

◆ OnPlayBackStarted()

void CXBMCApp::OnPlayBackStarted ( )

◆ OnPlayBackStopped()

void CXBMCApp::OnPlayBackStopped ( )

◆ onReceive()

void CXBMCApp::onReceive ( CJNIIntent intent)
override

◆ onResizeWindow()

void CXBMCApp::onResizeWindow ( )
overridevirtual

Reimplemented from IActivityHandler.

◆ onResume()

void CXBMCApp::onResume ( )
overridevirtual

Reimplemented from IActivityHandler.

◆ onSaveState()

void CXBMCApp::onSaveState ( void ** data,
size_t * size )
overridevirtual

Reimplemented from IActivityHandler.

◆ onStart()

void CXBMCApp::onStart ( )
overridevirtual

Reimplemented from IActivityHandler.

◆ onStop()

void CXBMCApp::onStop ( )
overridevirtual

Reimplemented from IActivityHandler.

◆ onVisibleBehindCanceled()

void CXBMCApp::onVisibleBehindCanceled ( )
overridevirtual

Implements jni::CJNIMainActivity.

◆ onVolumeChanged()

void CXBMCApp::onVolumeChanged ( int volume)
overridevirtual

Implements jni::CJNIMainActivity.

◆ ProcessSlow()

void CXBMCApp::ProcessSlow ( )

◆ Quit()

void CXBMCApp::Quit ( )

◆ RegisterInputDeviceCallbacks()

void CXBMCApp::RegisterInputDeviceCallbacks ( IInputDeviceCallbacks * handler)

◆ RegisterInputDeviceEventHandler()

void CXBMCApp::RegisterInputDeviceEventHandler ( IInputDeviceEventHandler * handler)

◆ ReleaseAudioFocus()

bool CXBMCApp::ReleaseAudioFocus ( )
protected

◆ RequestVisibleBehind()

void CXBMCApp::RequestVisibleBehind ( bool requested)
protected

◆ SetBuffersGeometry()

bool CXBMCApp::SetBuffersGeometry ( int width,
int height,
int format )

◆ SetDisplayMode()

void CXBMCApp::SetDisplayMode ( int mode,
float rate )

◆ SetSystemVolume()

void CXBMCApp::SetSystemVolume ( float percent)
static

◆ SetVideoLayoutBackgroundColor()

void CXBMCApp::SetVideoLayoutBackgroundColor ( const int color)

◆ setVideosurfaceInUse()

void CXBMCApp::setVideosurfaceInUse ( bool videosurfaceInUse)

◆ StartActivity()

bool CXBMCApp::StartActivity ( const std::string & package,
const std::string & intent = std::string(),
const std::string & dataType = std::string(),
const std::string & dataURI = std::string(),
const std::string & flags = std::string(),
const std::string & extras = std::string(),
const std::string & action = std::string(),
const std::string & category = std::string(),
const std::string & className = std::string() )
static

◆ Stop()

bool CXBMCApp::Stop ( int exitCode)

◆ surfaceChanged()

void CXBMCApp::surfaceChanged ( CJNISurfaceHolder holder,
int format,
int width,
int height )
override

◆ surfaceCreated()

void CXBMCApp::surfaceCreated ( CJNISurfaceHolder holder)
override

◆ surfaceDestroyed()

void CXBMCApp::surfaceDestroyed ( CJNISurfaceHolder holder)
override

◆ UnregisterInputDeviceCallbacks()

void CXBMCApp::UnregisterInputDeviceCallbacks ( )

◆ UnregisterInputDeviceEventHandler()

void CXBMCApp::UnregisterInputDeviceEventHandler ( )

◆ UpdateSessionMetadata()

void CXBMCApp::UpdateSessionMetadata ( )

◆ UpdateSessionState()

void CXBMCApp::UpdateSessionState ( )

◆ WaitVSync()

bool CXBMCApp::WaitVSync ( unsigned int milliSeconds)

Friends And Related Symbol Documentation

◆ CAESinkAUDIOTRACK

friend class CAESinkAUDIOTRACK
friend

The documentation for this class was generated from the following files: