"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/widgets/producerpreviewwidget.cpp" between
shotcut-20.09.01.tar.gz and shotcut-20.09.13.tar.gz

About: Shotcut is a cross-platform (Qt) advanced video editor.

producerpreviewwidget.cpp  (shotcut-20.09.01):producerpreviewwidget.cpp  (shotcut-20.09.13)
skipping to change at line 22 skipping to change at line 22
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "widgets/producerpreviewwidget.h" #include "widgets/producerpreviewwidget.h"
#include <Logger.h> #include <Logger.h>
#include "scrubbar.h" #include "scrubbar.h"
#include "mltcontroller.h"
#include <QtConcurrent/QtConcurrent> #include <QtConcurrent/QtConcurrent>
#include <QHBoxLayout> #include <QHBoxLayout>
#include <QImage> #include <QImage>
#include <QLabel> #include <QLabel>
#include <QProgressBar> #include <QProgressBar>
#include <QVBoxLayout> #include <QVBoxLayout>
#include <MltFrame.h>
#include <MltProducer.h>
#include <MltProfile.h>
ProducerPreviewWidget::ProducerPreviewWidget(double dar) ProducerPreviewWidget::ProducerPreviewWidget(double dar)
: QWidget() : QWidget()
, m_previewSize(320, 320) , m_previewSize(320, 320)
, m_seekTo(-1) , m_seekTo(-1)
, m_timerId(0) , m_timerId(0)
, m_producer(nullptr) , m_producer(nullptr)
, m_queue(10, DataQueue<QueueItem>::OverflowModeWait) , m_queue(10, DataQueue<QueueItem>::OverflowModeWait)
, m_generateFrames(false) , m_generateFrames(false)
{ {
LOG_DEBUG() << "begin"; LOG_DEBUG() << "begin";
skipping to change at line 85 skipping to change at line 82
stop(); stop();
} }
void ProducerPreviewWidget::start(Mlt::Producer* producer) void ProducerPreviewWidget::start(Mlt::Producer* producer)
{ {
m_producer = producer; m_producer = producer;
if( m_producer ) if( m_producer )
{ {
// Set up the preview display and timer // Set up the preview display and timer
m_scrubber->setFramerate(m_producer->profile()->fps()); m_scrubber->setFramerate(MLT.profile().fps());
m_scrubber->setScale(m_producer->get_length()); m_scrubber->setScale(m_producer->get_length());
// Display preview at half frame rate. // Display preview at half frame rate.
int miliseconds = 2* 1000.0 / m_producer->profile()->fps(); int miliseconds = 2* 1000.0 / MLT.profile().fps();
m_timerId = startTimer(miliseconds); m_timerId = startTimer(miliseconds);
// Set up the producer frame generator // Set up the producer frame generator
m_seekTo = 0; m_seekTo = 0;
m_generateFrames = true; m_generateFrames = true;
m_future = QtConcurrent::run(this, &ProducerPreviewWidget::frameGenerato rThread); m_future = QtConcurrent::run(this, &ProducerPreviewWidget::frameGenerato rThread);
} }
} }
void ProducerPreviewWidget::ProducerPreviewWidget::stop() void ProducerPreviewWidget::ProducerPreviewWidget::stop()
{ {
 End of changes. 4 change blocks. 
6 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)