comment out video playback code

This commit is contained in:
Duzy Chan
2014-02-02 02:20:30 +08:00
parent ca180a5fcd
commit 1caf0cfbe7
2 changed files with 19 additions and 4 deletions

View File

@@ -31,6 +31,19 @@
namespace openshot
{
struct SafeTimeSliceThread : TimeSliceThread
{
SafeTimeSliceThread(const String & s) : TimeSliceThread(s) {}
void run()
{
try {
TimeSliceThread::run();
} catch (const TooManySeeks & e) {
// ...
}
}
};
AudioPlaybackThread::AudioPlaybackThread()
: Thread("audio-playback")
, audioDeviceManager()
@@ -72,15 +85,15 @@ namespace openshot
player.setSource(&mixer);
// Create TimeSliceThread for audio buffering
TimeSliceThread my_thread("Audio buffer thread");
SafeTimeSliceThread thread("audio-buffer");
// Start thread
my_thread.startThread();
thread.startThread();
transport.setSource(
source,
10000, // tells it to buffer this many samples ahead
&my_thread,
&thread,
sampleRate,
numChannels);
transport.setPosition(0);

View File

@@ -56,6 +56,7 @@ namespace openshot
audioPlayback->setReader(reader);
audioPlayback->startThread(1);
/*
videoPlayback->startThread(2);
//tr1::shared_ptr<Frame> frame = getFrame();
@@ -82,8 +83,9 @@ namespace openshot
std::cout << "frametime: " << ft << " - " << d << " = " << st << std::endl;
}
if (audioPlayback->isThreadRunning()) audioPlayback->stopThread(-1);
if (videoPlayback->isThreadRunning()) videoPlayback->stopThread(-1);
*/
if (audioPlayback->isThreadRunning()) audioPlayback->stopThread(-1);
}
tr1::shared_ptr<Frame> PlayerPrivate::getFrame()