mediaplayer-app-0.20.5+16.04.20160323/ 0000755 0000156 0000165 00000000000 12674516373 017227 5 ustar pbuser pbgroup 0000000 0000000 mediaplayer-app-0.20.5+16.04.20160323/sdk/ 0000755 0000156 0000165 00000000000 12674516373 020010 5 ustar pbuser pbgroup 0000000 0000000 mediaplayer-app-0.20.5+16.04.20160323/sdk/sharefile.h 0000644 0000156 0000165 00000001721 12674516165 022123 0 ustar pbuser pbgroup 0000000 0000000 /*
* Copyright (C) 2012-2013 Canonical, Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
#ifndef SHAREFILE_H
#define SHAREFILE_H
#include
#include
class ShareFile : public QObject
{
Q_OBJECT
public:
explicit ShareFile(QObject *parent = 0);
public Q_SLOTS:
void writeShareFile(const QString& path);
private:
QString saveImageFromProvider(const QString &imageUri);
};
#endif // SHAREFILE_H
mediaplayer-app-0.20.5+16.04.20160323/sdk/sharefile.cpp 0000644 0000156 0000165 00000005471 12674516165 022464 0 ustar pbuser pbgroup 0000000 0000000 /*
* Copyright (C) 2012-2013 Canonical, Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
#include "sharefile.h"
#include
#include
#include
#include
#include
#include
#include
#include
#include
ShareFile::ShareFile(QObject *parent) :
QObject(parent)
{
}
QString ShareFile::saveImageFromProvider(const QString &imageUri)
{
// Get image provider
QQmlContext *ctx = QQmlEngine::contextForObject(this);
if (ctx == 0) {
qWarning() << "Share object does not have a QML context.";
return QString();
}
QQmlEngine *eng = ctx->engine();
if (eng == 0) {
qWarning() << "Share object does not have a QML engine.";
return QString();
}
// parse uri (image:///)
QString tempUri(imageUri.mid(8));
QStringList uriParts = tempUri.split("/");
if (uriParts.count() < 2) {
qWarning() << "Invalid image uri.";
return QString();
}
QString providerName = uriParts.takeFirst();
QQmlImageProviderBase *provider = eng->imageProvider(providerName);
if (provider == 0) {
qWarning() << "Image provider not found: " << provider;
return QString();
}
QQuickImageProvider *qprovider = (QQuickImageProvider*) provider;
QSize size;
QImage img = qprovider->requestImage(uriParts.join("/"), &size, QSize());
QTemporaryFile tempFile;
tempFile.setAutoRemove(false);
if (img.save(&tempFile, "png")) {
return tempFile.fileName();
} else {
qWarning() << "Fail to save image from provider.";
return QString();
}
}
void ShareFile::writeShareFile(const QString &path)
{
QString newPath = path;
if (path.startsWith("image://")) {
newPath = saveImageFromProvider(path);
}
QFileInfo imageFilePath(QDir::tempPath() + QDir::separator() + "sharelocation");
QFile imageFile(imageFilePath.absoluteFilePath());
if (imageFile.open(QIODevice::WriteOnly | QIODevice::Truncate)) {
QTextStream stream(&imageFile);
stream << newPath;
imageFile.close();
} else {
qWarning() << "Failed to open share file for writing";
}
}
mediaplayer-app-0.20.5+16.04.20160323/sdk/CMakeLists.txt 0000644 0000156 0000165 00000000265 12674516165 022552 0 ustar pbuser pbgroup 0000000 0000000 project(sdkhelper)
set(sdkhelper_HDRS
sharefile.h)
set(sdkhelper_SRCS
sharefile.cpp)
add_library(sdkhelper STATIC
${sdkhelper_SRCS})
qt5_use_modules(sdkhelper Core)
mediaplayer-app-0.20.5+16.04.20160323/run_on_device 0000755 0000156 0000165 00000005505 12674516165 022000 0 ustar pbuser pbgroup 0000000 0000000 #!/bin/sh
CODE_DIR=media-player
USER=phablet
USER_ID=32011
PASSWORD=phablet
PACKAGE=media-player
BINARY=media-player
RUN_OPTIONS="-qmljsdebugger=port:3768 ~/Videos/iron_man_3_1080p.mp4"
TARGET_IP=`adb shell ip -o -4 addr | grep -v "lo " | grep -o inet.*/ | egrep -o '([[:digit:]]{1,3}\.){3}[[:digit:]]{1,3}'`
SETUP=false
SUDO="echo $PASSWORD | sudo -S"
NUM_JOBS='1'
usage() {
echo "usage: run_on_device [OPTIONS]\n"
echo "Script to setup a build environment for the shell and sync build and run it on the phone.\n"
echo "OPTIONS:"
echo " -s, --setup Setup the build environment"
echo ""
echo "IMPORTANT:"
echo " * Make sure to have the networking and PPAs setup on the device beforehand (phablet-deploy-networking && phablet-ppa-fetch)."
echo " * Execute that script from a directory containing a branch the shell code."
exit 1
}
exec_with_ssh() {
ssh -t $USER@$TARGET_IP "bash -ic \"$@\""
}
exec_with_adb() {
adb shell chroot /data/ubuntu /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin "$@"
}
adb_root() {
adb root
adb wait-for-device
}
install_ssh_key() {
ssh-keygen -R $TARGET_IP
HOME_DIR=/data/ubuntu/home/phablet
adb push ~/.ssh/id_rsa.pub $HOME_DIR/.ssh/authorized_keys
adb shell chown $USER_ID:$USER_ID $HOME_DIR/.ssh
adb shell chown $USER_ID:$USER_ID $HOME_DIR/.ssh/authorized_keys
adb shell chmod 700 $HOME_DIR/.ssh
adb shell chmod 600 $HOME_DIR/.ssh/authorized_keys
}
install_dependencies() {
exec_with_adb apt-get -y install openssh-server
exec_with_ssh $SUDO apt-get -y install build-essential rsync bzr ccache
exec_with_ssh $SUDO apt-get -y build-dep $PACKAGE
}
push_code() {
bzr push bzr+ssh://$USER@$TARGET_IP/~/$CODE_DIR/
exec_with_ssh bzr checkout $CODE_DIR/
}
sync_code() {
bzr export --uncommitted --format=dir /tmp/$CODE_DIR
rsync -crlOzv -e ssh /tmp/$CODE_DIR/ $USER@$TARGET_IP:$CODE_DIR/
rm -rf /tmp/$CODE_DIR
}
build() {
exec_with_ssh "cd $CODE_DIR/ && PATH=/usr/lib/ccache:/opt/qt5/bin:$PATH PKG_CONFIG_PATH=/opt/qt5/lib/pkgconfig cmake -DCMAKE_BUILD_TYPE=Debug ."
exec_with_ssh PATH=/usr/lib/ccache:$PATH "make -j${NUM_JOBS}" --directory=$CODE_DIR/
}
run() {
adb shell pkill $BINARY
exec_with_ssh "cd $CODE_DIR/ && ./$BINARY $RUN_OPTIONS"
}
set -- `getopt -n$0 -u -a --longoptions="setup,help" "sh" "$@"`
# FIXME: giving incorrect arguments does not call usage and exit
while [ $# -gt 0 ]
do
case "$1" in
-s|--setup) SETUP=true;;
-h|--help) usage;;
--) shift;break;;
esac
shift
done
if $SETUP; then
echo "Setting up environment for building shell.."
adb_root
install_ssh_key
install_dependencies
push_code
else
echo "Transferring code.."
sync_code
echo "Building.."
build
echo "Running.."
adb_root
run
fi
mediaplayer-app-0.20.5+16.04.20160323/cmake/ 0000755 0000156 0000165 00000000000 12674516373 020307 5 ustar pbuser pbgroup 0000000 0000000 mediaplayer-app-0.20.5+16.04.20160323/cmake/EnableCoverageReport.cmake 0000644 0000156 0000165 00000015311 12674516165 025347 0 ustar pbuser pbgroup 0000000 0000000 # - Creates a special coverage build type and target on GCC.
#
# Defines a function ENABLE_COVERAGE_REPORT which generates the coverage target
# for selected targets. Optional arguments to this function are used to filter
# unwanted results using globbing expressions. Moreover targets with tests for
# the source code can be specified to trigger regenerating the report if the
# test has changed
#
# ENABLE_COVERAGE_REPORT(TARGETS target... [FILTER filter...] [TESTS test targets...])
#
# To generate a coverage report first build the project with
# CMAKE_BUILD_TYPE=coverage, then call make test and afterwards make coverage.
#
# The coverage report is based on gcov. Depending on the availability of lcov
# a HTML report will be generated and/or an XML report of gcovr is found.
# The generated coverage target executes all found solutions. Special targets
# exist to create e.g. only the xml report: coverage-xml.
#
# Copyright (C) 2010 by Johannes Wienke
#
# This program is free software; you can redistribute it
# and/or modify it under the terms of the GNU General
# Public License as published by the Free Software Foundation;
# either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
INCLUDE(ParseArguments)
FIND_PACKAGE(Lcov)
FIND_PACKAGE(gcovr)
FUNCTION(ENABLE_COVERAGE_REPORT)
# argument parsing
PARSE_ARGUMENTS(ARG "FILTER;TARGETS;TESTS" "" ${ARGN})
SET(COVERAGE_RAW_FILE "${CMAKE_BINARY_DIR}/coverage.raw.info")
SET(COVERAGE_FILTERED_FILE "${CMAKE_BINARY_DIR}/coverage.info")
SET(COVERAGE_REPORT_DIR "${CMAKE_BINARY_DIR}/coveragereport")
SET(COVERAGE_XML_FILE "${CMAKE_BINARY_DIR}/coverage.xml")
SET(COVERAGE_XML_COMMAND_FILE "${CMAKE_BINARY_DIR}/coverage-xml.cmake")
# decide if there is any tool to create coverage data
SET(TOOL_FOUND FALSE)
IF(LCOV_FOUND OR GCOVR_FOUND)
SET(TOOL_FOUND TRUE)
ENDIF()
IF(NOT TOOL_FOUND)
MESSAGE(STATUS "Cannot enable coverage targets because neither lcov nor gcovr are found.")
ENDIF()
STRING(TOLOWER "${CMAKE_BUILD_TYPE}" COVERAGE_BUILD_TYPE)
IF(CMAKE_COMPILER_IS_GNUCXX AND TOOL_FOUND AND "${COVERAGE_BUILD_TYPE}" MATCHES "coverage")
MESSAGE(STATUS "Coverage support enabled for targets: ${ARG_TARGETS}")
# create coverage build type
SET(CMAKE_CXX_FLAGS_COVERAGE ${CMAKE_CXX_FLAGS_DEBUG} PARENT_SCOPE)
SET(CMAKE_C_FLAGS_COVERAGE ${CMAKE_C_FLAGS_DEBUG} PARENT_SCOPE)
SET(CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} coverage PARENT_SCOPE)
# instrument targets
SET_TARGET_PROPERTIES(${ARG_TARGETS} PROPERTIES COMPILE_FLAGS --coverage
LINK_FLAGS --coverage)
# html report
IF (LCOV_FOUND)
MESSAGE(STATUS "Enabling HTML coverage report")
# set up coverage target
ADD_CUSTOM_COMMAND(OUTPUT ${COVERAGE_RAW_FILE}
COMMAND ${LCOV_EXECUTABLE} -c -d ${CMAKE_BINARY_DIR} -o ${COVERAGE_RAW_FILE}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMENT "Collecting coverage data"
DEPENDS ${ARG_TARGETS} ${ARG_TESTS}
VERBATIM)
# filter unwanted stuff
LIST(LENGTH ARG_FILTER FILTER_LENGTH)
IF(${FILTER_LENGTH} GREATER 0)
SET(FILTER COMMAND ${LCOV_EXECUTABLE})
FOREACH(F ${ARG_FILTER})
SET(FILTER ${FILTER} -r ${COVERAGE_FILTERED_FILE} ${F})
ENDFOREACH()
SET(FILTER ${FILTER} -o ${COVERAGE_FILTERED_FILE})
ELSE()
SET(FILTER "")
ENDIF()
ADD_CUSTOM_COMMAND(OUTPUT ${COVERAGE_FILTERED_FILE}
COMMAND ${LCOV_EXECUTABLE} -e ${COVERAGE_RAW_FILE} "${CMAKE_SOURCE_DIR}*" -o ${COVERAGE_FILTERED_FILE}
${FILTER}
DEPENDS ${COVERAGE_RAW_FILE}
COMMENT "Filtering recorded coverage data for project-relevant entries"
VERBATIM)
ADD_CUSTOM_COMMAND(OUTPUT ${COVERAGE_REPORT_DIR}
COMMAND ${CMAKE_COMMAND} -E make_directory ${COVERAGE_REPORT_DIR}
COMMAND ${GENHTML_EXECUTABLE} --legend --show-details -t "${PROJECT_NAME} test coverage" -o ${COVERAGE_REPORT_DIR} ${COVERAGE_FILTERED_FILE}
DEPENDS ${COVERAGE_FILTERED_FILE}
COMMENT "Generating HTML coverage report in ${COVERAGE_REPORT_DIR}"
VERBATIM)
ADD_CUSTOM_TARGET(coverage-html
DEPENDS ${COVERAGE_REPORT_DIR})
ENDIF()
# xml coverage report
IF(GCOVR_FOUND)
MESSAGE(STATUS "Enabling XML coverage report")
# gcovr cannot write directly to a file so the execution needs to
# be wrapped in a cmake file that generates the file output
FILE(WRITE ${COVERAGE_XML_COMMAND_FILE}
"SET(ENV{LANG} en)\n")
FILE(APPEND ${COVERAGE_XML_COMMAND_FILE}
"EXECUTE_PROCESS(COMMAND \"${GCOVR_EXECUTABLE}\" -x -r \"${CMAKE_SOURCE_DIR}\" OUTPUT_FILE \"${COVERAGE_XML_FILE}\" WORKING_DIRECTORY \"${CMAKE_BINARY_DIR}\")\n")
ADD_CUSTOM_COMMAND(OUTPUT ${COVERAGE_XML_FILE}
COMMAND ${CMAKE_COMMAND} ARGS -P ${COVERAGE_XML_COMMAND_FILE}
COMMENT "Generating coverage XML report"
VERBATIM)
ADD_CUSTOM_TARGET(coverage-xml
DEPENDS ${COVERAGE_XML_FILE})
ENDIF()
# provide a global coverage target executing both steps if available
SET(GLOBAL_DEPENDS "")
IF(LCOV_FOUND)
LIST(APPEND GLOBAL_DEPENDS ${COVERAGE_REPORT_DIR})
ENDIF()
IF(GCOVR_FOUND)
LIST(APPEND GLOBAL_DEPENDS ${COVERAGE_XML_FILE})
ENDIF()
IF(LCOV_FOUND OR GCOVR_FOUND)
ADD_CUSTOM_TARGET(coverage
DEPENDS ${GLOBAL_DEPENDS})
ENDIF()
ENDIF()
ENDFUNCTION()
mediaplayer-app-0.20.5+16.04.20160323/cmake/Findgcovr.cmake 0000644 0000156 0000165 00000001702 12674516165 023231 0 ustar pbuser pbgroup 0000000 0000000 # - Find gcovr scrip
# Will define:
#
# GCOVR_EXECUTABLE - the gcovr script
#
# Uses:
#
# GCOVR_ROOT - root to search for the script
#
# Copyright (C) 2011 by Johannes Wienke
#
# This program is free software; you can redistribute it
# and/or modify it under the terms of the GNU General
# Public License as published by the Free Software Foundation;
# either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
INCLUDE(FindPackageHandleStandardArgs)
FIND_PROGRAM(GCOVR_EXECUTABLE gcovr HINTS ${GCOVR_ROOT} "${GCOVR_ROOT}/bin")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(gcovr DEFAULT_MSG GCOVR_EXECUTABLE)
# only visible in advanced view
MARK_AS_ADVANCED(GCOVR_EXECUTABLE)
mediaplayer-app-0.20.5+16.04.20160323/cmake/autopilot.cmake 0000644 0000156 0000165 00000002530 12674516165 023330 0 ustar pbuser pbgroup 0000000 0000000 add_custom_target(autopilot)
option(ENABLE_AUTOPILOT "Enable or Disable autopilot tests" On)
option(AUTOPILOT_RECORD "Enable or Disable autopilot record tests" OFF)
option(AUTOPILOT_RECORD_PATH "Directory to put recorded tests" OFF)
if(ENABLE_AUTOPILOT)
find_program(AUTOPILOT_BIN autopilot)
if(AUTOPILOT_BIN)
message(STATUS "Autopilot tests enabled.")
else()
message(STATUS "Autopilot tests disabled: autopilot binary not found")
endif()
endif()
if(AUTOPILOT_RECORD OR AUTOPILOT_RECORD_PATH)
find_program(AUTOPILOT_REC_BIN recordmydesktop)
if(AUTOPILOT_REC_BIN)
message(STATUS "Record autopilot enabled")
if(AUTOPILOT_RECORD_PATH)
message(STATUS "Save autopilot tests video in: ${AUTOPILOT_RECORD_PATH}")
set(AUTOPILOT_TESTS_ARGS -r -rd ${AUTOPILOT_RECORD_PATH})
else()
set(AUTOPILOT_TESTS_ARGS -r)
endif()
else()
message(STATUS "recordmydesktop necessary for record autopilot tests not found.")
set(AUTOPILOT_TESTS_ARGS "")
endif()
endif()
function(declare_autopilot_test ENVIROMENT TEST_NAME WORKING_DIR)
if(AUTOPILOT_BIN)
add_custom_command(TARGET autopilot
COMMAND ${ENVIROMENT} autopilot run ${TEST_NAME} ${AUTOPILOT_TESTS_ARGS}
WORKING_DIRECTORY ${WORKING_DIR})
endif()
endfunction()
mediaplayer-app-0.20.5+16.04.20160323/cmake/ParseArguments.cmake 0000644 0000156 0000165 00000003406 12674516165 024253 0 ustar pbuser pbgroup 0000000 0000000 # Parse arguments passed to a function into several lists separated by
# upper-case identifiers and options that do not have an associated list e.g.:
#
# SET(arguments
# hello OPTION3 world
# LIST3 foo bar
# OPTION2
# LIST1 fuz baz
# )
# PARSE_ARGUMENTS(ARG "LIST1;LIST2;LIST3" "OPTION1;OPTION2;OPTION3" ${arguments})
#
# results in 7 distinct variables:
# * ARG_DEFAULT_ARGS: hello;world
# * ARG_LIST1: fuz;baz
# * ARG_LIST2:
# * ARG_LIST3: foo;bar
# * ARG_OPTION1: FALSE
# * ARG_OPTION2: TRUE
# * ARG_OPTION3: TRUE
#
# taken from http://www.cmake.org/Wiki/CMakeMacroParseArguments
MACRO(PARSE_ARGUMENTS prefix arg_names option_names)
SET(DEFAULT_ARGS)
FOREACH(arg_name ${arg_names})
SET(${prefix}_${arg_name})
ENDFOREACH(arg_name)
FOREACH(option ${option_names})
SET(${prefix}_${option} FALSE)
ENDFOREACH(option)
SET(current_arg_name DEFAULT_ARGS)
SET(current_arg_list)
FOREACH(arg ${ARGN})
SET(larg_names ${arg_names})
LIST(FIND larg_names "${arg}" is_arg_name)
IF (is_arg_name GREATER -1)
SET(${prefix}_${current_arg_name} ${current_arg_list})
SET(current_arg_name ${arg})
SET(current_arg_list)
ELSE (is_arg_name GREATER -1)
SET(loption_names ${option_names})
LIST(FIND loption_names "${arg}" is_option)
IF (is_option GREATER -1)
SET(${prefix}_${arg} TRUE)
ELSE (is_option GREATER -1)
SET(current_arg_list ${current_arg_list} ${arg})
ENDIF (is_option GREATER -1)
ENDIF (is_arg_name GREATER -1)
ENDFOREACH(arg)
SET(${prefix}_${current_arg_name} ${current_arg_list})
ENDMACRO(PARSE_ARGUMENTS)
mediaplayer-app-0.20.5+16.04.20160323/cmake/FindLcov.cmake 0000644 0000156 0000165 00000001720 12674516165 023014 0 ustar pbuser pbgroup 0000000 0000000 # - Find lcov
# Will define:
#
# LCOV_EXECUTABLE - the lcov binary
# GENHTML_EXECUTABLE - the genhtml executable
#
# Copyright (C) 2010 by Johannes Wienke
#
# This program is free software; you can redistribute it
# and/or modify it under the terms of the GNU General
# Public License as published by the Free Software Foundation;
# either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
INCLUDE(FindPackageHandleStandardArgs)
FIND_PROGRAM(LCOV_EXECUTABLE lcov)
FIND_PROGRAM(GENHTML_EXECUTABLE genhtml)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lcov DEFAULT_MSG LCOV_EXECUTABLE GENHTML_EXECUTABLE)
# only visible in advanced view
MARK_AS_ADVANCED(LCOV_EXECUTABLE GENHTML_EXECUTABLE)
mediaplayer-app-0.20.5+16.04.20160323/tests/ 0000755 0000156 0000165 00000000000 12674516373 020371 5 ustar pbuser pbgroup 0000000 0000000 mediaplayer-app-0.20.5+16.04.20160323/tests/unittest/ 0000755 0000156 0000165 00000000000 12674516373 022250 5 ustar pbuser pbgroup 0000000 0000000 mediaplayer-app-0.20.5+16.04.20160323/tests/unittest/test-config.h.in 0000644 0000156 0000165 00000000105 12674516165 025243 0 ustar pbuser pbgroup 0000000 0000000 static const char* SAMPLE_IMAGES_DIR = "@sample_images_SOURCE_DIR@";
mediaplayer-app-0.20.5+16.04.20160323/tests/unittest/CMakeLists.txt 0000644 0000156 0000165 00000002025 12674516165 025006 0 ustar pbuser pbgroup 0000000 0000000 add_definitions(-DTEST_SUITE)
if(NOT CTEST_TESTING_TIMEOUT)
set(CTEST_TESTING_TIMEOUT 60)
endif()
include_directories(${CMAKE_BINARY_DIR}
${mediaplayer_src_SOURCE_DIR}
${GSTLIB_INCLUDE_DIRS}
)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/test-config.h.in
${CMAKE_CURRENT_BINARY_DIR}/test-config.h)
# thumbnail-test ##############################################################
add_executable(thumbnailtest
thumbnailtest.cpp
${mediaplayer_src_SOURCE_DIR}/thumbnail-pipeline-gst.cpp
)
qt5_use_modules(thumbnailtest Gui Core Test)
add_test(thumbnailtest thumbnailtest -xunitxml -o test_thumbnailtest.xml)
set_tests_properties(thumbnailtest PROPERTIES
TIMEOUT ${CTEST_TESTING_TIMEOUT}
ENVIRONMENT "QT_QPA_PLATFORM=minimal")
target_link_libraries(thumbnailtest
${GSTLIB_LDFLAGS})
###############################################################################
mediaplayer-app-0.20.5+16.04.20160323/tests/unittest/thumbnailtest.cpp 0000644 0000156 0000165 00000003237 12674516165 025643 0 ustar pbuser pbgroup 0000000 0000000 /*
* Copyright (C) 2013 Canonical, Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
#include "thumbnail-pipeline-gst.h"
#include "test-config.h"
#include
#include
#include
class ThumbnailTest : public QObject
{
Q_OBJECT
private Q_SLOTS:
void testImageIsMeaningful_data()
{
QTest::addColumn("path");
QTest::addColumn("expectedResult");
QTest::newRow("black image") << QString(SAMPLE_IMAGES_DIR) + "/frame0.png" << false;
QTest::newRow("non black image") << QString(SAMPLE_IMAGES_DIR) + "/frame10.png" << true;
QTest::newRow("collored image") << QString(SAMPLE_IMAGES_DIR) + "/frame20.png" << true;
QTest::newRow("almost black image") << QString(SAMPLE_IMAGES_DIR) + "/frame100.png" << false;
}
void testImageIsMeaningful()
{
QFETCH(QString, path);
QFETCH(bool, expectedResult);
QImage img = QImage(path);
QVERIFY(!img.isNull());
bool result = ThumbnailPipeline::isMeaningful(img);
QCOMPARE(result, expectedResult);
}
};
QTEST_MAIN(ThumbnailTest)
#include "thumbnailtest.moc"
mediaplayer-app-0.20.5+16.04.20160323/tests/videos/ 0000755 0000156 0000165 00000000000 12674516373 021662 5 ustar pbuser pbgroup 0000000 0000000 mediaplayer-app-0.20.5+16.04.20160323/tests/videos/small.wmv 0000644 0000156 0000165 00015464157 12674516165 023553 0 ustar pbuser pbgroup 0000000 0000000 0&uf blK ܫG Seh oh6 >ޱZ r m _. Se ӫ Se n ů[wHgDLn A s p e c t R a t i o X A s p e c t R a t i o Y @ ^Pb ( W M / E n c o d i n g S e t t i n g s L a v f 5 6 . 4 . 1 0 1 ܷ Se M[ _\D+ W U[ _\D+ 7 @ , , @ WMV2 贀@Rц1 HB ARц1 H w m v 2 WMV26&uf bl2e6 Z ] # `ymPU@M2/Q~A0C@2PuR1j ˞z}?- Mhl
kh(%%1 Dzp@MOE>-h$Xٷ&
*mH+| غPv'Ţ
c;6cJtbȪI{${@h
(4{$= u 0u =Tf0@h.c47;U@e@(A&Q1@h6
l+k/i2d@!`l_u@7 P0_U)*2/Q~C2PmRŨ0gEd )?bh(Ih
A
ATPA'ʹx
, l@# e@ʠ}R
h*)v77Yx7X`m
mUTM
4 @l@uTPPA
PX41M-MTPM cE@(aX7TAP(
~h
A@~[UAUTPAԛ2.C2PmR-AUT[@3
́|~c4 F e`
Q`Of <m2XeP
n4ETPv
06ö
&h
GAPX6C d:
2'ʹ{!2ql 1ApsA0bUTE@(h$
&0
,XA}elBؿ4n``
"Ⱥp`AHZ3UTQoY
`z S46 P&u1
**OE>-h$XٴF a@6,PU@Tj 4@3nnڪ4h4A`2;|I**=8m fD@ٌ (,
&jh-D6uH4MXP
4lTPUAUTd]=N@!l`(6Cj- LoY
`fؾ`?1
Z@#n0AP}UTPI('ųm|[6`,2T"
v
A;Ah|
^
aUUa`4M#(,P!oi2UTG2'ʹ{!2ql 1ApsA0bUTE@(h$
&0
,XA}elBؿ4n``
"Ⱥp`AHZ3UTQoY
`z S46 P&u1
**OE>-h$XٴF a@6,PU@Tj 4@3nnڪ4h4A`2;|I**=8m fD@ٌ (,
&**-DƋA&Q1h6
obR
C/`47Tp
mUTPU@UOFEӀpX4
@Bš**z S[@36/a4 TUAUTx
, lA'͠40X4 fPNauuvUAX
A4
|LUAUQųmL[64"`A`\i6UTE@(h$
&0
,XA}elBؿ4n``
"Ⱥp`AHZ3UTQoY
`z S46 P&u1
**OE>-h$XٴF a@6,PU@Tj 4@3nnڪ4h4A`2;|I**=8m fD@ٌ (,
&jh-D6uH4MXP
4lTPUAUTd]=N@!l`(6Cj- LoY
`fؾ`?1
Z@#n0AP}UTPI('ųm|[6`,2T"
v
A;Ah|
^
aUUa`4M#(,P!oi2UTG2'ʹ{!2ql 1ApsA0bUTE@(h$
&0
,XA}elBؿ4n``
"Ⱥp`AHZ3UTQoY
`z S46 P&u1
**OE>-h$XٴF a@6,PU@Tj 4@3nnڪ4h4A`2;|I**=8m fD@ٌ (,
&**-DƋA&Q1h6
obR
C/`o7Tp
mUT<υj*6{S=8@!l_PuR ŎjDzsP dZt&,X%=ǀbXh6/
_Kq@@=oX{$~ryA((`Z\C,Iis4
,%,-ǵ@"w
TDzbc&(E3`,D,剠y K eXw&n!k
T>{'x4.
N(6i4zP4 Kap<ŀ$Rh`X@:S6ʬ1
ɴ
,0\
&{zUA,)`̰2X-49 K &eymUFqU8lf&UQLPKl_0 ] f #
UR!E4[7VQ|ꢪ)t0UIPR 3M|MU>G]/uIu!ai4Dpm0
/JFz, KKQ` E)w-23-I/?B&