Commit 4996f994 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

Merge branch 'frameworks'

CCMAIL: release-team@kde.org
parents 80ddfe73 57664887
find_package(KDE4 REQUIRED)
include(KDE4Defaults)
include(MacroLibrary)
project(ffmpegthumbs)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
set(QT_MIN_VERSION "5.2.0")
find_package(ECM 1.0.0 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
include(FeatureSummary)
include(WriteBasicConfigVersionFile)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings)
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Gui)
find_package(KF5 REQUIRED COMPONENTS KIO)
find_package(FFmpeg COMPONENTS AVCODEC AVFORMAT SWSCALE)
include_directories(
${KDE4_INCLUDES}
${CMAKE_CURRENT_BINARY_DIR}
${PC_AVCODEC_INCLUDEDIR}
${PC_AVFORMAT_INCLUDEDIR}
......@@ -25,9 +34,9 @@ set( ffmpegthumbs_PART_SRCS
ffmpegthumbnailer/videothumbnailer.cpp
)
kde4_add_plugin(ffmpegthumbs ${ffmpegthumbs_PART_SRCS})
add_library(ffmpegthumbs MODULE ${ffmpegthumbs_PART_SRCS})
target_link_libraries(ffmpegthumbs ${KDE4_KIO_LIBS} ${AVUTIL_LIBRARIES} ${AVFORMAT_LIBRARIES} ${AVCODEC_LIBRARIES} ${SWSCALE_LIBRARIES} )
target_link_libraries(ffmpegthumbs Qt5::Gui KF5::KIOWidgets ${AVUTIL_LIBRARIES} ${AVFORMAT_LIBRARIES} ${AVCODEC_LIBRARIES} ${SWSCALE_LIBRARIES} )
install(TARGETS ffmpegthumbs DESTINATION ${PLUGIN_INSTALL_DIR})
......@@ -35,6 +44,6 @@ install(TARGETS ffmpegthumbs DESTINATION ${PLUGIN_INSTALL_DIR})
install(FILES ffmpegthumbs.desktop DESTINATION ${SERVICES_INSTALL_DIR})
if (KDE4_BUILD_TESTS)
add_subdirectory(tests)
endif (KDE4_BUILD_TESTS)
if(BUILD_TESTING)
add_subdirectory(tests)
endif()
......@@ -15,12 +15,11 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "ffmpegthumbnailer.h"
#include <kdebug.h>
#include <QImage>
extern "C"
{
KDE_EXPORT ThumbCreator* new_creator()
Q_DECL_EXPORT ThumbCreator *new_creator()
{
return new FFMpegThumbnailer();
}
......
......@@ -15,7 +15,6 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "imagewriter.h"
#include <kdebug.h>
#include <iostream>
......
......@@ -16,7 +16,7 @@
#include "moviedecoder.h"
#include <kdebug.h>
#include <QDebug>
#include <QFileInfo>
extern "C" {
......@@ -57,12 +57,12 @@ void MovieDecoder::initialize(const QString& filename)
QFileInfo fileInfo(filename);
if ((!m_FormatContextWasGiven) && avformat_open_input(&m_pFormatContext, fileInfo.absoluteFilePath().toLocal8Bit().data(), NULL, NULL) != 0) {
kDebug() << "Could not open input file: " << fileInfo.absoluteFilePath();
qDebug() << "Could not open input file: " << fileInfo.absoluteFilePath();
return;
}
if (avformat_find_stream_info(m_pFormatContext, 0) < 0) {
kDebug() << "Could not find stream information";
qDebug() << "Could not find stream information";
return;
}
......@@ -129,7 +129,7 @@ void MovieDecoder::initializeVideo()
}
if (m_VideoStream == -1) {
kDebug() << "Could not find video stream";
qDebug() << "Could not find video stream";
return;
}
......@@ -139,14 +139,14 @@ void MovieDecoder::initializeVideo()
if (m_pVideoCodec == NULL) {
// set to NULL, otherwise avcodec_close(m_pVideoCodecContext) crashes
m_pVideoCodecContext = NULL;
kDebug() << "Video Codec not found";
qDebug() << "Video Codec not found";
return;
}
m_pVideoCodecContext->workaround_bugs = 1;
if (avcodec_open2(m_pVideoCodecContext, m_pVideoCodec, 0) < 0) {
kDebug() << "Could not open video codec";
qDebug() << "Could not open video codec";
}
}
......@@ -193,7 +193,7 @@ void MovieDecoder::seek(int timeInSeconds)
if (ret >= 0) {
avcodec_flush_buffers(m_pFormatContext->streams[m_VideoStream]->codec);
} else {
kDebug() << "Seeking in video failed";
qDebug() << "Seeking in video failed";
return;
}
......@@ -214,7 +214,7 @@ void MovieDecoder::seek(int timeInSeconds)
} while ((!gotFrame || !m_pFrame->key_frame) && keyFrameAttempts < 200);
if (gotFrame == 0) {
kDebug() << "Seeking in video failed";
qDebug() << "Seeking in video failed";
}
}
......@@ -228,7 +228,7 @@ void MovieDecoder::decodeVideoFrame()
}
if (!frameFinished) {
kDebug() << "decodeVideoFrame() failed: frame not finished";
qDebug() << "decodeVideoFrame() failed: frame not finished";
return;
}
}
......@@ -250,7 +250,7 @@ bool MovieDecoder::decodeVideoPacket()
#endif
if (bytesDecoded < 0) {
kDebug() << "Failed to decode video frame: bytesDecoded < 0";
qDebug() << "Failed to decode video frame: bytesDecoded < 0";
}
return (frameFinished > 0);
......@@ -310,7 +310,7 @@ void MovieDecoder::convertAndScaleFrame(PixelFormat format, int scaledSize, bool
format, SWS_BICUBIC, NULL, NULL, NULL);
if (NULL == scaleContext) {
kDebug() << "Failed to create resize context";
qDebug() << "Failed to create resize context";
return;
}
......
......@@ -17,9 +17,9 @@ set(ffmpegthumbtest_SRCS ffmpegthumbtest.cpp
)
kde4_add_executable(ffmpegthumbtest ${ffmpegthumbtest_SRCS} )
add_executable(ffmpegthumbtest ${ffmpegthumbtest_SRCS} )
target_link_libraries(ffmpegthumbtest ${KDE4_KDECORE_LIBS} ${KDE4_KIO_LIBS} ${AVUTIL_LIBRARIES} ${AVFORMAT_LIBRARIES} ${AVCODEC_LIBRARIES} ${SWSCALE_LIBRARIES})
target_link_libraries(ffmpegthumbtest Qt5::Gui KF5::KIOWidgets ${AVUTIL_LIBRARIES} ${AVFORMAT_LIBRARIES} ${AVCODEC_LIBRARIES} ${SWSCALE_LIBRARIES})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment