Twitch SDK (Internal)
Classes | Public Member Functions | Private Attributes | List of all members
ttv::broadcast::PassThroughVideoCapture Class Reference

#include <passthroughvideocapture.h>

Inheritance diagram for ttv::broadcast::PassThroughVideoCapture:
ttv::broadcast::IVideoCapture

Classes

struct  QueueEntry
 

Public Member Functions

 PassThroughVideoCapture ()
 
virtual ~PassThroughVideoCapture ()
 
TTV_ErrorCode EnqueueVideoPacket (std::vector< uint8_t > &&videoPacket, bool keyframe, uint64_t timestamp)
 
virtual std::string GetName () const override
 
virtual TTV_ErrorCode SetVideoEncoder (const std::shared_ptr< IVideoEncoder > &encoder) override
 
virtual TTV_ErrorCode SetFrameQueue (const std::shared_ptr< IVideoFrameQueue > &queue) override
 
virtual TTV_ErrorCode Initialize () override
 
virtual TTV_ErrorCode Start (const VideoParams &videoParams) override
 
virtual TTV_ErrorCode Stop () override
 
virtual TTV_ErrorCode Shutdown () override
 

Private Attributes

std::shared_ptr< IVideoEncodermVideoEncoder
 
std::shared_ptr< IVideoFrameQueuemFrameQueue
 
std::shared_ptr< IPreEncodedVideoFrameReceivermReceiver
 
std::shared_ptr< IThreadmThread
 
VideoParams mVideoParams
 
ConcurrentQueue< std::shared_ptr< QueueEntry > > mVideoPacketQueue
 
std::mutex mMutex
 
std::condition_variable mCondition
 
bool mInitialized
 
bool mStarted
 

Class Documentation

◆ ttv::broadcast::PassThroughVideoCapture::QueueEntry

struct ttv::broadcast::PassThroughVideoCapture::QueueEntry
Class Members
bool keyframe
vector< uint8_t > packet
uint64_t timestamp

Constructor & Destructor Documentation

◆ PassThroughVideoCapture()

ttv::broadcast::PassThroughVideoCapture::PassThroughVideoCapture ( )

◆ ~PassThroughVideoCapture()

virtual ttv::broadcast::PassThroughVideoCapture::~PassThroughVideoCapture ( )
virtual

Member Function Documentation

◆ EnqueueVideoPacket()

TTV_ErrorCode ttv::broadcast::PassThroughVideoCapture::EnqueueVideoPacket ( std::vector< uint8_t > &&  videoPacket,
bool  keyframe,
uint64_t  timestamp 
)

◆ GetName()

virtual std::string ttv::broadcast::PassThroughVideoCapture::GetName ( ) const
overridevirtual

Retrieves the name for logging purposes.

Implements ttv::broadcast::IVideoCapture.

◆ Initialize()

virtual TTV_ErrorCode ttv::broadcast::PassThroughVideoCapture::Initialize ( )
overridevirtual

Initializes the capturer.

Implements ttv::broadcast::IVideoCapture.

◆ SetFrameQueue()

virtual TTV_ErrorCode ttv::broadcast::PassThroughVideoCapture::SetFrameQueue ( const std::shared_ptr< IVideoFrameQueue > &  queue)
overridevirtual

Sets the IVideoFrameQueue instance to submit frames to once packaged by the IVideoEncoder.

Implements ttv::broadcast::IVideoCapture.

◆ SetVideoEncoder()

virtual TTV_ErrorCode ttv::broadcast::PassThroughVideoCapture::SetVideoEncoder ( const std::shared_ptr< IVideoEncoder > &  encoder)
overridevirtual

Sets the IVideoEncoder that will be used to encode captured frames.

Implements ttv::broadcast::IVideoCapture.

◆ Shutdown()

virtual TTV_ErrorCode ttv::broadcast::PassThroughVideoCapture::Shutdown ( )
overridevirtual

Synchronously stops frame submission and cleans up the internal pipeline. The IVideoCapture should be disposable after this returns.

Implements ttv::broadcast::IVideoCapture.

◆ Start()

virtual TTV_ErrorCode ttv::broadcast::PassThroughVideoCapture::Start ( const VideoParams videoParams)
overridevirtual

Indicates that frame submission should begin.

Implements ttv::broadcast::IVideoCapture.

◆ Stop()

virtual TTV_ErrorCode ttv::broadcast::PassThroughVideoCapture::Stop ( )
overridevirtual

Indicates that frame submission should stop. Any internal pipeline can be torn down.

Implements ttv::broadcast::IVideoCapture.

Member Data Documentation

◆ mCondition

std::condition_variable ttv::broadcast::PassThroughVideoCapture::mCondition
private

◆ mFrameQueue

std::shared_ptr<IVideoFrameQueue> ttv::broadcast::PassThroughVideoCapture::mFrameQueue
private

◆ mInitialized

bool ttv::broadcast::PassThroughVideoCapture::mInitialized
private

◆ mMutex

std::mutex ttv::broadcast::PassThroughVideoCapture::mMutex
private

◆ mReceiver

std::shared_ptr<IPreEncodedVideoFrameReceiver> ttv::broadcast::PassThroughVideoCapture::mReceiver
private

◆ mStarted

bool ttv::broadcast::PassThroughVideoCapture::mStarted
private

◆ mThread

std::shared_ptr<IThread> ttv::broadcast::PassThroughVideoCapture::mThread
private

◆ mVideoEncoder

std::shared_ptr<IVideoEncoder> ttv::broadcast::PassThroughVideoCapture::mVideoEncoder
private

◆ mVideoPacketQueue

ConcurrentQueue<std::shared_ptr<QueueEntry> > ttv::broadcast::PassThroughVideoCapture::mVideoPacketQueue
private

◆ mVideoParams

VideoParams ttv::broadcast::PassThroughVideoCapture::mVideoParams
private

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