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::DirectShowContext Struct Reference
Inheritance diagram for VideoComponent::Pimpl::DirectShowContext:
Collaboration diagram for VideoComponent::Pimpl::DirectShowContext:

Classes

struct  NativeWindow
 
struct  NativeWindowClass
 

Public Types

enum  State {
  uninitializedState,
  runningState,
  pausedState,
  stoppedState
}
 

Public Member Functions

 DirectShowContext (Pimpl &c)
 
 ~DirectShowContext () override
 
void displayResolutionChanged ()
 
double getDuration () const
 
double getPosition () const
 
double getSpeed () const
 
Rectangle< intgetVideoSize () const noexcept
 
float getVolume () const
 
void graphEventProc ()
 
void handleAsyncUpdate () override
 
Result loadFile (const String &fileOrURLPath)
 
void pause ()
 
void peerChanged ()
 
void play ()
 
void recreateNativeWindowAsync ()
 
void release ()
 
void repaint ()
 
void setPosition (double seconds)
 
void setSpeed (double newSpeed)
 
void setVolume (float newVolume)
 
void showWindow (bool shouldBeVisible)
 
void stop ()
 
void updateContextPosition ()
 
void updateVideoPosition ()
 
void updateWindowPosition (const Rectangle< int > &newBounds)
 

Static Public Member Functions

static long convertToDShowVolume (float vol) noexcept
 
static Result getErrorMessageFromResult (HRESULT hr)
 

Public Attributes

State state = uninitializedState
 

Private Types

enum  { graphEventID = WM_APP + 0x43f0 }
 

Private Member Functions

bool createNativeWindow ()
 
void deleteNativeWindow ()
 
bool isRendererConnected ()
 

Private Attributes

ComSmartPtr< ComTypes::IBaseFilter > baseFilter
 
ComSmartPtr< ComTypes::IBasicAudio > basicAudio
 
Pimplcomponent
 
ComSmartPtr< ComTypes::IGraphBuilder > graphBuilder
 
bool hasVideo = false
 
HDC hdc = {}
 
HWND hwnd = {}
 
ComSmartPtr< ComTypes::IMediaControl > mediaControl
 
ComSmartPtr< ComTypes::IMediaEventEx > mediaEvent
 
ComSmartPtr< ComTypes::IMediaPosition > mediaPosition
 
std::unique_ptr< NativeWindownativeWindow
 
bool needToRecreateNativeWindow = false
 
bool needToUpdateViewport = true
 
std::unique_ptr< VideoRenderers::BasevideoRenderer
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
graphEventID 

◆ State

Enumerator
uninitializedState 
runningState 
pausedState 
stoppedState 

Constructor & Destructor Documentation

◆ DirectShowContext()

VideoComponent::Pimpl::DirectShowContext::DirectShowContext ( Pimpl c)
inline

References juce::ignoreUnused().

◆ ~DirectShowContext()

VideoComponent::Pimpl::DirectShowContext::~DirectShowContext ( )
inlineoverride

References release().

Member Function Documentation

◆ convertToDShowVolume()

static long VideoComponent::Pimpl::DirectShowContext::convertToDShowVolume ( float  vol)
inlinestaticnoexcept

References juce::gl::f, and juce::roundToInt().

Referenced by setVolume().

◆ createNativeWindow()

bool VideoComponent::Pimpl::DirectShowContext::createNativeWindow ( )
inlineprivate

◆ deleteNativeWindow()

void VideoComponent::Pimpl::DirectShowContext::deleteNativeWindow ( )
inlineprivate

References hdc, hwnd, jassert, and nativeWindow.

Referenced by peerChanged(), and release().

◆ displayResolutionChanged()

void VideoComponent::Pimpl::DirectShowContext::displayResolutionChanged ( )
inline

References hasVideo, and videoRenderer.

◆ getDuration()

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

References mediaPosition.

◆ getErrorMessageFromResult()

◆ getPosition()

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

References mediaPosition.

◆ getSpeed()

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

References mediaPosition.

◆ getVideoSize()

Rectangle<int> VideoComponent::Pimpl::DirectShowContext::getVideoSize ( ) const
inlinenoexcept

◆ getVolume()

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

References basicAudio, and juce::gl::f.

◆ graphEventProc()

◆ handleAsyncUpdate()

void VideoComponent::Pimpl::DirectShowContext::handleAsyncUpdate ( )
inlineoverride

◆ isRendererConnected()

bool VideoComponent::Pimpl::DirectShowContext::isRendererConnected ( )
inlineprivate

◆ loadFile()

◆ pause()

void VideoComponent::Pimpl::DirectShowContext::pause ( )
inline

References mediaControl, pausedState, and state.

Referenced by loadFile().

◆ peerChanged()

void VideoComponent::Pimpl::DirectShowContext::peerChanged ( )
inline

◆ play()

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

References mediaControl, runningState, and state.

◆ recreateNativeWindowAsync()

void VideoComponent::Pimpl::DirectShowContext::recreateNativeWindowAsync ( )
inline

◆ release()

void VideoComponent::Pimpl::DirectShowContext::release ( )
inline

◆ repaint()

void VideoComponent::Pimpl::DirectShowContext::repaint ( )
inline

References hasVideo, nativeWindow, and videoRenderer.

Referenced by handleAsyncUpdate().

◆ setPosition()

void VideoComponent::Pimpl::DirectShowContext::setPosition ( double  seconds)
inline

References mediaPosition.

◆ setSpeed()

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

References mediaPosition.

◆ setVolume()

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

◆ showWindow()

void VideoComponent::Pimpl::DirectShowContext::showWindow ( bool  shouldBeVisible)
inline

References nativeWindow.

◆ stop()

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

References mediaControl, state, and stoppedState.

◆ updateContextPosition()

void VideoComponent::Pimpl::DirectShowContext::updateContextPosition ( )
inline

References needToUpdateViewport.

◆ updateVideoPosition()

void VideoComponent::Pimpl::DirectShowContext::updateVideoPosition ( )
inline

References hasVideo, nativeWindow, and videoRenderer.

Referenced by handleAsyncUpdate().

◆ updateWindowPosition()

void VideoComponent::Pimpl::DirectShowContext::updateWindowPosition ( const Rectangle< int > &  newBounds)
inline

References nativeWindow.

Member Data Documentation

◆ baseFilter

ComSmartPtr<ComTypes::IBaseFilter> VideoComponent::Pimpl::DirectShowContext::baseFilter
private

◆ basicAudio

ComSmartPtr<ComTypes::IBasicAudio> VideoComponent::Pimpl::DirectShowContext::basicAudio
private

◆ component

Pimpl& VideoComponent::Pimpl::DirectShowContext::component
private

◆ graphBuilder

ComSmartPtr<ComTypes::IGraphBuilder> VideoComponent::Pimpl::DirectShowContext::graphBuilder
private

Referenced by loadFile(), and release().

◆ hasVideo

bool VideoComponent::Pimpl::DirectShowContext::hasVideo = false
private

◆ hdc

HDC VideoComponent::Pimpl::DirectShowContext::hdc = {}
private

◆ hwnd

◆ mediaControl

ComSmartPtr<ComTypes::IMediaControl> VideoComponent::Pimpl::DirectShowContext::mediaControl
private

Referenced by loadFile(), pause(), play(), release(), and stop().

◆ mediaEvent

ComSmartPtr<ComTypes::IMediaEventEx> VideoComponent::Pimpl::DirectShowContext::mediaEvent
private

◆ mediaPosition

ComSmartPtr<ComTypes::IMediaPosition> VideoComponent::Pimpl::DirectShowContext::mediaPosition
private

◆ nativeWindow

std::unique_ptr<NativeWindow> VideoComponent::Pimpl::DirectShowContext::nativeWindow
private

◆ needToRecreateNativeWindow

bool VideoComponent::Pimpl::DirectShowContext::needToRecreateNativeWindow = false
private

◆ needToUpdateViewport

bool VideoComponent::Pimpl::DirectShowContext::needToUpdateViewport = true
private

◆ state

State VideoComponent::Pimpl::DirectShowContext::state = uninitializedState

Referenced by loadFile(), pause(), play(), release(), and stop().

◆ videoRenderer

std::unique_ptr<VideoRenderers::Base> VideoComponent::Pimpl::DirectShowContext::videoRenderer
private

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