You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
comment out video playback code
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user