JUCE  v6.1.6 (6.0.8-1114)
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 () override
 
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

◆ ~MediaSession()

VideoComponent::Pimpl::MediaSession::~MediaSession ( )
inlineoverride

Member Function Documentation

◆ abandonAudioFocus()

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

◆ closeVideo()

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

◆ createAudioFocusRequestIfNecessary()

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

◆ createCallbackObject()

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

References juce::getEnv().

◆ errorOccurred()

◆ getAudioAttributes()

static LocalRef<jobject> VideoComponent::Pimpl::MediaSession::getAudioAttributes ( )
inlinestaticprivate

◆ 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()

◆ isPlaying()

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

◆ isSeekInProgress()

◆ 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()

◆ 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

◆ resetState()

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

◆ restoreState()

◆ 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

◆ 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

◆ updateMetadata()

◆ updatePlaybackState()

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

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

Referenced by MediaSession().

◆ 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

◆ playerBufferingInProgress

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

◆ playSpeedMult

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

Referenced by resetState(), restoreState(), and setSpeed().

◆ sdkVersion

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

◆ storedPlaybackState

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

Referenced by restoreState(), and storeState().

◆ usesBuffering

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

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