producerpreviewwidget.cpp (shotcut-22.10.22) | : | producerpreviewwidget.cpp (shotcut-22.11.25) | ||
---|---|---|---|---|
skipping to change at line 184 | skipping to change at line 184 | |||
while ( m_queue.count() > 1 ) { | while ( m_queue.count() > 1 ) { | |||
m_queue.pop(); | m_queue.pop(); | |||
} | } | |||
} | } | |||
// Get the image | // Get the image | |||
int position = m_producer.position(); | int position = m_producer.position(); | |||
int length = m_producer.get_length(); | int length = m_producer.get_length(); | |||
int width = m_previewSize.width(); | int width = m_previewSize.width(); | |||
int height = m_previewSize.height(); | int height = m_previewSize.height(); | |||
mlt_image_format format = mlt_image_rgb; | mlt_image_format format = mlt_image_rgb; | |||
Mlt::Frame frame(*m_producer.get_frame()); | std::unique_ptr<Mlt::Frame> frame(m_producer.get_frame()); | |||
frame.set( "rescale.interp", "bilinear" ); | frame->set( "rescale.interp", "bilinear" ); | |||
uint8_t *mltImage = frame.get_image( format, width, height, 0 ); | uint8_t *mltImage = frame->get_image( format, width, height, 0 ); | |||
QImage image( mltImage, width, height, QImage::Format_RGB888 ); | QImage image( mltImage, width, height, QImage::Format_RGB888 ); | |||
// Send the image and status in the queue | // Send the image and status in the queue | |||
QueueItem item; | QueueItem item; | |||
item.pixmap.convertFromImage(image); | item.pixmap.convertFromImage(image); | |||
item.position = position; | item.position = position; | |||
item.positionText = QString::fromLatin1(m_producer.frame_time()) + QString(" / ") + | item.positionText = QString::fromLatin1(m_producer.frame_time()) + QString(" / ") + | |||
QString::fromLatin1(m_producer.get_length_time()); | QString::fromLatin1(m_producer.get_length_time()); | |||
m_queue.push(item); | m_queue.push(item); | |||
End of changes. 1 change blocks. | ||||
3 lines changed or deleted | 3 lines changed or added |