Skip to content
Browse files

bmdplay: use a correct class name

  • Loading branch information...
1 parent f2df60f commit f321a9ebdd1f1ae8a5fb15836a10f92e69f5d653 @lu-zero committed
Showing with 13 additions and 13 deletions.
  1. +2 −2 Play.h
  2. +11 −11 bmdplay.cpp
View
4 Play.h
@@ -33,10 +33,10 @@ enum OutputSignal {
};
-class TestPattern : public IDeckLinkVideoOutputCallback, public IDeckLinkAudioOutputCallback
+class Player : public IDeckLinkVideoOutputCallback, public IDeckLinkAudioOutputCallback
{
public:
- TestPattern();
+ Player();
protected:
bool m_running;
View
22 bmdplay.cpp
@@ -324,7 +324,7 @@ int usage(int status)
int main(int argc, char *argv[])
{
- TestPattern generator;
+ Player generator;
int ch;
int videomode = 2;
int connection = 0;
@@ -387,7 +387,7 @@ int main(int argc, char *argv[])
return 0;
}
-TestPattern::TestPattern()
+Player::Player()
{
m_audioChannelCount = 2;
m_audioSampleRate = bmdAudioSampleRate48kHz;
@@ -396,7 +396,7 @@ TestPattern::TestPattern()
m_outputSignal = kOutputSignalDrop;
}
-bool TestPattern::Init(int videomode, int connection, int camera)
+bool Player::Init(int videomode, int connection, int camera)
{
// Initialize the DeckLink API
IDeckLinkIterator* deckLinkIterator = CreateDeckLinkIteratorInstance();
@@ -500,7 +500,7 @@ bool TestPattern::Init(int videomode, int connection, int camera)
return true;
}
-IDeckLinkDisplayMode* TestPattern::GetDisplayModeByIndex(int selectedIndex)
+IDeckLinkDisplayMode* Player::GetDisplayModeByIndex(int selectedIndex)
{
// Populate the display mode combo with a list of display modes supported by the installed DeckLink card
IDeckLinkDisplayModeIterator* displayModeIterator;
@@ -530,7 +530,7 @@ IDeckLinkDisplayMode* TestPattern::GetDisplayModeByIndex(int selectedIndex)
return selectedMode;
}
-void TestPattern::StartRunning (int videomode)
+void Player::StartRunning (int videomode)
{
IDeckLinkDisplayMode* videoDisplayMode = NULL;
unsigned long audioSamplesPerFrame;
@@ -616,7 +616,7 @@ void TestPattern::StartRunning (int videomode)
}
-void TestPattern::StopRunning ()
+void Player::StopRunning ()
{
// Stop the audio and video output streams immediately
m_deckLinkOutput->StopScheduledPlayback(0, NULL, 0);
@@ -640,7 +640,7 @@ void TestPattern::StopRunning ()
m_running = false;
}
-void TestPattern::ScheduleNextFrame (bool prerolling)
+void Player::ScheduleNextFrame (bool prerolling)
{
AVPacket pkt;
@@ -674,7 +674,7 @@ void TestPattern::ScheduleNextFrame (bool prerolling)
av_free_packet(&pkt);
}
-void TestPattern::WriteNextAudioSamples ()
+void Player::WriteNextAudioSamples ()
{
uint32_t samplesWritten = 0;
AVPacket pkt = {0};
@@ -706,19 +706,19 @@ void TestPattern::WriteNextAudioSamples ()
/************************* DeckLink API Delegate Methods *****************************/
-HRESULT TestPattern::ScheduledFrameCompleted (IDeckLinkVideoFrame* completedFrame, BMDOutputFrameCompletionResult result)
+HRESULT Player::ScheduledFrameCompleted (IDeckLinkVideoFrame* completedFrame, BMDOutputFrameCompletionResult result)
{
completedFrame->Release(); // We could recycle them probably
ScheduleNextFrame(false);
return S_OK;
}
-HRESULT TestPattern::ScheduledPlaybackHasStopped ()
+HRESULT Player::ScheduledPlaybackHasStopped ()
{
return S_OK;
}
-HRESULT TestPattern::RenderAudioSamples (bool preroll)
+HRESULT Player::RenderAudioSamples (bool preroll)
{
// Provide further audio samples to the DeckLink API until our preferred buffer waterlevel is reached
WriteNextAudioSamples();

0 comments on commit f321a9e

Please sign in to comment.
Something went wrong with that request. Please try again.