JUCE  v5.4.1-191-g0ab5e696f
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
VideoComponent::Pimpl::MediaSession Class Reference
Inheritance diagram for VideoComponent::Pimpl::MediaSession:
Collaboration diagram for VideoComponent::Pimpl::MediaSession:

Classes

class  Controller
 
struct  PlaybackState
 
class  Player
 
class  Player
 

Public Member Functions

 MediaSession (Pimpl &ownerToUse)
 
 ~MediaSession ()
 
void closeVideo ()
 
double getDuration () const
 
Rectangle< intgetNativeSize () const
 
double getPosition () const
 
double getSpeed () const
 
float getVolume () const
 
bool isPlaying () const
 
bool isVideoOpen () const
 
void load (const URL &url)
 
void play ()
 
void restoreState ()
 
void setDisplay (const LocalRef< jobject > &surfaceHolder)
 
void setPosition (double newPosition)
 
void setSpeed (double newSpeed)
 
void setVolume (float newVolume)
 
void stop ()
 
void storeState ()
 

Private Member Functions

void abandonAudioFocus ()
 
LocalRef< jobject > createCallbackObject ()
 
void errorOccurred (const String &errorMessage)
 
LocalRef< jobject > getCurrentPlaybackState ()
 
bool isSeekInProgress () const noexcept
 
void onAudioFocusChange (int changeType) override
 
void playbackStarted ()
 
void playbackStopped ()
 
void playerBufferingEnded ()
 
void playerBufferingStarted ()
 
void playerBufferingUpdated (int progress)
 
void playerPlaybackCompleted ()
 
void playerPrepared ()
 
void playerSeekCompleted ()
 
void requestAudioFocus ()
 
void resetState ()
 
void updateMetadata ()
 
void updatePlaybackState ()
 

Static Private Member Functions

static LocalRef< jobject > createAudioFocusRequestIfNecessary (int sdkVersion, const GlobalRef &audioAttributes, const GlobalRef &nativeAudioFocusChangeListener)
 
static LocalRef< jobject > getAudioAttributes ()
 
static void pauseCallback (JNIEnv *, jobject, jlong host)
 
static void playCallback (JNIEnv *, jobject, jlong host)
 
static void playFromMediaIdCallback (JNIEnv *env, jobject, jlong host, jstring mediaId, jobject extras)
 
static void seekToCallback (JNIEnv *, jobject, jlong host, jlong pos)
 
static void stopCallback (JNIEnv *env, jobject, jlong host)
 

Private Attributes

GlobalRef audioAttributes
 
AudioManagerOnAudioFocusChangeListener audioFocusChangeListener
 
GlobalRef audioFocusRequest
 
GlobalRef audioManager
 
SparseSet< intbufferedRegions
 
Controller controller
 
bool hasAudioFocus = false
 
GlobalRef mediaSessionCallback
 
GlobalRef nativeAudioFocusChangeListener
 
GlobalRef nativeMediaSession
 
Pimplowner
 
bool pendingSeekRequest = false
 
GlobalRef playbackStateBuilder
 
Player player
 
bool playerBufferingInProgress = false
 
double playSpeedMult = 1.0
 
int sdkVersion
 
GlobalRef storedPlaybackState
 
bool usesBuffering = false
 

Constructor & Destructor Documentation

◆ MediaSession()

VideoComponent::Pimpl::MediaSession::MediaSession ( Pimpl ownerToUse)
inline

References juce::getEnv().

◆ ~MediaSession()

VideoComponent::Pimpl::MediaSession::~MediaSession ( )
inline

References juce::getEnv().

Member Function Documentation

◆ abandonAudioFocus()

void VideoComponent::Pimpl::MediaSession::abandonAudioFocus ( )
inlineprivate

References juce::getEnv().

◆ closeVideo()

void VideoComponent::Pimpl::MediaSession::closeVideo ( )
inline

Referenced by getAudioAttributes().

◆ createAudioFocusRequestIfNecessary()

static LocalRef<jobject> VideoComponent::Pimpl::MediaSession::createAudioFocusRequestIfNecessary ( int  sdkVersion,
const GlobalRef &  audioAttributes,
const GlobalRef &  nativeAudioFocusChangeListener 
)
inlinestaticprivate

References juce::getEnv().

◆ createCallbackObject()

LocalRef<jobject> VideoComponent::Pimpl::MediaSession::createCallbackObject ( )
inlineprivate

References juce::getEnv().

◆ errorOccurred()

void VideoComponent::Pimpl::MediaSession::errorOccurred ( const String &  errorMessage)
inlineprivate

◆ getAudioAttributes()

◆ getCurrentPlaybackState()

◆ getDuration()

double VideoComponent::Pimpl::MediaSession::getDuration ( ) const
inline

◆ getNativeSize()

Rectangle<int> VideoComponent::Pimpl::MediaSession::getNativeSize ( ) const
inline

◆ getPosition()

double VideoComponent::Pimpl::MediaSession::getPosition ( ) const
inline

◆ getSpeed()

double VideoComponent::Pimpl::MediaSession::getSpeed ( ) const
inline

◆ getVolume()

float VideoComponent::Pimpl::MediaSession::getVolume ( ) const
inline

◆ isPlaying()

bool VideoComponent::Pimpl::MediaSession::isPlaying ( ) const
inline

◆ isSeekInProgress()

bool VideoComponent::Pimpl::MediaSession::isSeekInProgress ( ) const
inlineprivatenoexcept

◆ isVideoOpen()

bool VideoComponent::Pimpl::MediaSession::isVideoOpen ( ) const
inline

◆ load()

void VideoComponent::Pimpl::MediaSession::load ( const URL &  url)
inline

◆ onAudioFocusChange()

void VideoComponent::Pimpl::MediaSession::onAudioFocusChange ( int  changeType)
inlineoverrideprivatevirtual

◆ pauseCallback()

static void VideoComponent::Pimpl::MediaSession::pauseCallback ( JNIEnv *  ,
jobject  ,
jlong  host 
)
inlinestaticprivate

References JUCE_VIDEO_LOG.

◆ play()

void VideoComponent::Pimpl::MediaSession::play ( )
inline

◆ playbackStarted()

void VideoComponent::Pimpl::MediaSession::playbackStarted ( )
inlineprivate

◆ playbackStopped()

void VideoComponent::Pimpl::MediaSession::playbackStopped ( )
inlineprivate

◆ playCallback()

static void VideoComponent::Pimpl::MediaSession::playCallback ( JNIEnv *  ,
jobject  ,
jlong  host 
)
inlinestaticprivate

References juce::getEnv(), and JUCE_VIDEO_LOG.

◆ playerBufferingEnded()

void VideoComponent::Pimpl::MediaSession::playerBufferingEnded ( )
inlineprivate

◆ playerBufferingStarted()

void VideoComponent::Pimpl::MediaSession::playerBufferingStarted ( )
inlineprivate

◆ playerBufferingUpdated()

◆ playerPlaybackCompleted()

void VideoComponent::Pimpl::MediaSession::playerPlaybackCompleted ( )
inlineprivate

◆ playerPrepared()

void VideoComponent::Pimpl::MediaSession::playerPrepared ( )
inlineprivate

◆ playerSeekCompleted()

void VideoComponent::Pimpl::MediaSession::playerSeekCompleted ( )
inlineprivate

◆ playFromMediaIdCallback()

static void VideoComponent::Pimpl::MediaSession::playFromMediaIdCallback ( JNIEnv *  env,
jobject  ,
jlong  host,
jstring  mediaId,
jobject  extras 
)
inlinestaticprivate

References JUCE_VIDEO_LOG.

◆ requestAudioFocus()

void VideoComponent::Pimpl::MediaSession::requestAudioFocus ( )
inlineprivate

References juce::getEnv().

◆ resetState()

void VideoComponent::Pimpl::MediaSession::resetState ( )
inlineprivate

◆ restoreState()

void VideoComponent::Pimpl::MediaSession::restoreState ( )
inline

References juce::getEnv().

Referenced by getAudioAttributes().

◆ seekToCallback()

static void VideoComponent::Pimpl::MediaSession::seekToCallback ( JNIEnv *  ,
jobject  ,
jlong  host,
jlong  pos 
)
inlinestaticprivate

References JUCE_VIDEO_LOG.

◆ setDisplay()

void VideoComponent::Pimpl::MediaSession::setDisplay ( const LocalRef< jobject > &  surfaceHolder)
inline

Referenced by getAudioAttributes().

◆ setPosition()

void VideoComponent::Pimpl::MediaSession::setPosition ( double  newPosition)
inline

◆ setSpeed()

void VideoComponent::Pimpl::MediaSession::setSpeed ( double  newSpeed)
inline

◆ setVolume()

void VideoComponent::Pimpl::MediaSession::setVolume ( float  newVolume)
inline

◆ stop()

void VideoComponent::Pimpl::MediaSession::stop ( )
inline

◆ stopCallback()

static void VideoComponent::Pimpl::MediaSession::stopCallback ( JNIEnv *  env,
jobject  ,
jlong  host 
)
inlinestaticprivate

References JUCE_VIDEO_LOG.

◆ storeState()

void VideoComponent::Pimpl::MediaSession::storeState ( )
inline

Referenced by getAudioAttributes().

◆ updateMetadata()

void VideoComponent::Pimpl::MediaSession::updateMetadata ( )
inlineprivate

◆ updatePlaybackState()

void VideoComponent::Pimpl::MediaSession::updatePlaybackState ( )
inlineprivate

References juce::getEnv().

Member Data Documentation

◆ audioAttributes

GlobalRef VideoComponent::Pimpl::MediaSession::audioAttributes
private

◆ audioFocusChangeListener

AudioManagerOnAudioFocusChangeListener VideoComponent::Pimpl::MediaSession::audioFocusChangeListener
private

◆ audioFocusRequest

GlobalRef VideoComponent::Pimpl::MediaSession::audioFocusRequest
private

◆ audioManager

GlobalRef VideoComponent::Pimpl::MediaSession::audioManager
private

◆ bufferedRegions

SparseSet<int> VideoComponent::Pimpl::MediaSession::bufferedRegions
private

◆ controller

Controller VideoComponent::Pimpl::MediaSession::controller
private

◆ hasAudioFocus

bool VideoComponent::Pimpl::MediaSession::hasAudioFocus = false
private

◆ mediaSessionCallback

GlobalRef VideoComponent::Pimpl::MediaSession::mediaSessionCallback
private

◆ nativeAudioFocusChangeListener

GlobalRef VideoComponent::Pimpl::MediaSession::nativeAudioFocusChangeListener
private

◆ nativeMediaSession

GlobalRef VideoComponent::Pimpl::MediaSession::nativeMediaSession
private

◆ owner

Pimpl& VideoComponent::Pimpl::MediaSession::owner
private

◆ pendingSeekRequest

bool VideoComponent::Pimpl::MediaSession::pendingSeekRequest = false
private

◆ playbackStateBuilder

GlobalRef VideoComponent::Pimpl::MediaSession::playbackStateBuilder
private

◆ player

Player VideoComponent::Pimpl::MediaSession::player
private

◆ playerBufferingInProgress

bool VideoComponent::Pimpl::MediaSession::playerBufferingInProgress = false
private

◆ playSpeedMult

double VideoComponent::Pimpl::MediaSession::playSpeedMult = 1.0
private

◆ sdkVersion

int VideoComponent::Pimpl::MediaSession::sdkVersion
private

◆ storedPlaybackState

GlobalRef VideoComponent::Pimpl::MediaSession::storedPlaybackState
private

◆ usesBuffering

bool VideoComponent::Pimpl::MediaSession::usesBuffering = false
private

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