summaryrefslogtreecommitdiff
path: root/avmedia
AgeCommit message (Collapse)AuthorFilesLines
2020-05-08compact namespace in avmedia..bridgesNoel Grandin22-69/+53
Change-Id: Iba1282caadab91a0c6e1c044dbab5e6e15f3707b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93705 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-01improve loplugin:makesharedNoel Grandin1-1/+1
to find places where we are converting stuff to unique_ptr instead of using std::make_shared. As a bonus, this tends to find places where we are using shared_ptr where we can instead be using unique_ptr avoiding the locking overhead. Change-Id: I1b57bbc4a6c766b48bba8e25a55161800e149f62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93207 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-27Make upcasting css::uno::Reference ctor require complete typesStephan Bergmann2-0/+2
The main reason for the "home-grown" UpCast introduced with 904b3d1fceee5827076758ed2a81f80cb73493ca "Up-cast conversion constructor for css::uno::Reference" in 2013 was probably that we could not yet rely on C++11 std::is_base_of back then. A (welcome) side effect was that the derived class could be incomplete. However, specializations of UpCast relying on whether or not T2 is incomplete are obviously an ODR violation if the type is incomplete in some TUs and complete (and derived from T1) in others. And even if UpCast had internal linkage, it would still be brittle that its behavior depends on the completeness of T2 at the point of the template's instantiation, and not necessarily at the point of use. That means we should better base that ctor on std::is_base_of (which we can do now since 39a1edd6fec902ef378acce8af42c4d7fba280d0 "Make css::uno::Reference upcast ctor LIBO_INTERNAL_ONLY"), which causes a compilation error at least on Clang and GCC if the completeness requirements are not met. This change fixes all the cases where types need to be complete now, plus any resulting loplugin:referencecasting warnings ("the source reference is already a subtype of the destination reference"). Change-Id: Ieb9e3552e90adbf2c5a5af933dcb872e20661a2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92950 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-04-26all ItemWindows are now weldedCaolán McNamara1-4/+1
where native widgetery is hostable in a vcl toolbar or a native one Change-Id: I942ada335bb4bd6ced0f3352f632e25787f68597 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88598 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-22move InterimItemWindow to svtoolsCaolán McNamara1-1/+1
Change-Id: I058b1d96a3ddfaa1aa96f66d0ebc6fa68900a48c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92697 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-21drop unneeded includeCaolán McNamara1-1/+0
Change-Id: I38a3ab4db7f74277074ed87410d14e2e9b3a5ea7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92621 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-18loplugin:flatten in avmediaNoel Grandin3-135/+136
Change-Id: Ie066ee15833a58db4a9a18006629c015d50a56b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92486 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-15add an IsEmpty method to tools::Size and use itNoel Grandin1-1/+1
Change-Id: I7f5201e2ea6c74329336e16bf219630e38ff92cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92264 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-23tdf#124176: Use pragma once instead of include guardsHarshit Jain4-16/+4
Change-Id: Ia4a6b35a9a734e9fa1dc9dea702fc1ec370021f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90901 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-03-22tdf#124176: Use pragma once instead of include guardsFurkan Ahmet Kara16-62/+17
Change-Id: I24df5daa3ded43f1fa031a9e2714453cb03b92f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90769 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-02-16tdf#124176: Use pragma once instead of include guardsMohamed Sameh4-16/+4
Change-Id: If4e891742a59eb975be8353510dad71cadc546e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88671 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-02-13tdf#124176: Use pragma once instead of include guardsMohamed Sameh1-4/+1
Change-Id: I33a9c770142a2fcc2d899b5071cc45d5a42c8664 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88473 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-02-13inherit MediaControl from InterimItemWindowCaolán McNamara4-46/+12
to de-dup some code Change-Id: I8bf20d4b57f3ec7bd2902f01e11278da8ded194b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88550 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-11tdf#124176: Use pragma once instead of include guardsFurkan Ahmet Kara9-36/+9
Change-Id: I4f0ff5864f343c016ae88477e064b0c643cd0d9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88268 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-02-08tdf#124176: Use pragma once instead of include guardsFurkan Ahmet Kara1-4/+1
Change-Id: Iacf9743c194705f6eaac0719d68dda04cdea65f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88265 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-02-03drop some unneeded includesCaolán McNamara1-1/+0
Change-Id: I62cfa43dc8ca3220f7175d9d426d1cdcc9d5f368 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87837 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-02weld ParaLRSpacingWindow & ParaULSpacingWindowCaolán McNamara1-0/+1
Change-Id: I9bd00ab28a84383cc484b5c58532f355da131999 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87818 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2020-02-02Fix typoAndrea Gelmini1-1/+1
Change-Id: I40b411b6bf23e2a7240a46fff99b420b3e6f6ae3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87813 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-02-01weld MediaPlaybackPanelCaolán McNamara7-409/+226
Change-Id: I84c9e6f37de3b22b896f8109e49a5a0391630ac2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87754 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-31new loplugin:namespaceindentationNoel Grandin7-7/+7
check indentation of braces in namespace decls, and the comments that often appear with them. This is my penance for messing up the indentation with clang-tidy-modernize-namespaces. As such I have limited it to new-style namespaces for now, and the check is off by default. Change-Id: I4db7f10a81c79bc0eece8f8e3ee564da8bc7f168 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87723 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-30tdf#42949 Fix IWYU warnings in avmedia/Gabor Kelemen14-47/+13
Except for MAC and WIN specific parts Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I1066aa31f45a8c81ddaa7d52d7c81aa09741c8d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87312 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-29gtk: make sidebar media panel "play video" workCaolán McNamara1-5/+4
blank impress, insert video, use sidebar media panel to play video, without this chage the video playes in a toplevel window because the size is 0x0 so the widget doesn't get created in the first place Change-Id: I7200423a693fb475dede357071ef10030c5bb790 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87694 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-29There should be no need for o3tl::make_unsigned hereStephan Bergmann1-2/+1
...to avoid hypothetical warnings when comparing an unsigned value to a signed constant Change-Id: Ife9f0be863443ea06fcd6dd49aba651f49659f02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87690 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-28New loplugin:unsignedcompareStephan Bergmann2-4/+4
"Find explicit casts from signed to unsigned integer in comparison against unsigned integer, where the cast is presumably used to avoid warnings about signed vs. unsigned comparisons, and could thus be replaced with o3tl::make_unsigned for clairty." (compilerplugins/clang/unsignedcompare.cxx) o3tl::make_unsigned requires its argument to be non-negative, and there is a chance that some original code like static_cast<sal_uInt32>(n) >= c used the explicit cast to actually force a (potentially negative) value of sal_Int32 to be interpreted as an unsigned sal_uInt32, rather than using the cast to avoid a false "signed vs. unsigned comparison" warning in a case where n is known to be non-negative. It appears that restricting this plugin to non- equality comparisons (<, >, <=, >=) and excluding equality comparisons (==, !=) is a useful heuristic to avoid such false positives. The only remainging false positive I found was 0288c8ffecff4956a52b9147d441979941e8b87f "Rephrase cast from sal_Int32 to sal_uInt32". But which of course does not mean that there were no further false positivies that I missed. So this commit may accidentally introduce some false hits of the assert in o3tl::make_unsigned. At least, it passed a full (Linux ASan+UBSan --enable-dbgutil) `make check && make screenshot`. It is by design that o3tl::make_unsigned only accepts signed integer parameter types (and is not defined as a nop for unsigned ones), to avoid unnecessary uses which would in general be suspicious. But the STATIC_ARRAY_SELECT macro in include/oox/helper/helper.hxx is used with both signed and unsigned types, so needs a little oox::detail::make_unsigned helper function for now. (The ultimate fix being to get rid of the macro in the first place.) Change-Id: Ia4adc9f44c70ad1dfd608784cac39ee922c32175 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87556 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-27Fix order of MACOSX vs. UNX checksStephan Bergmann1-9/+9
...where UNX is also defined on macOS, as spotted by Mike Kaganski at <https://gerrit.libreoffice.org/c/core/+/87372#message-d1cf7f65_776ae3cd>. The order appears to have been broken ever since fd47df122a37b4fa982f9fd0000907d9aee0c80a "Fix typos and make the VLC code in theory work as 64-bit on Windows and OS X". Change-Id: I83fa7937d560d88d66856660f143e883265fefd4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87547 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-25tdf#130137 Replace remaining uses of WNT define checks with _WIN32A_GAN3-6/+6
Change-Id: If95f1ea5a81de62eb4f725e5fcb30ccb8530062a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87372 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-01-14clang-tidy modernize-concat-nested-namespace in avmediaNoel Grandin16-66/+16
Change-Id: I2ac6de9e56bf94b81602bd841383d937b3d7e908 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86756 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-18sal_Char->char in avmedia..basicNoel Grandin4-4/+4
Change-Id: Ied1331d979539ef1183da64c55351b57d24f4a4f Reviewed-on: https://gerrit.libreoffice.org/85371 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-16Fix USE_AVMEDIA_DUMMY build after 2431477337f4ac4384ba615f76bfb5904f1a3b47Tor Lillqvist1-1/+1
Change-Id: I6dd6b4c99fa9c5da3e0ed2e948549695ad1eb08e
2019-12-12use covariant return type for SfxPoolItem::CloneCaolán McNamara1-1/+1
and can then remove some casting Change-Id: Id821c32ca2cbcdb7f57ef7a5fa1960042e630ffc Reviewed-on: https://gerrit.libreoffice.org/85022 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-30loplugin:mergeclasses SoundHandlerNoel Grandin2-13/+5
replace ThreadHelpBase with MutexHelper Change-Id: If971a701261164ff4d3871eab5dfebd2c5d5b89f Reviewed-on: https://gerrit.libreoffice.org/84111 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-29Fix build with USE_AVMEDIA_DUMMY (iOS, at least)Tor Lillqvist1-4/+4
We need boost headers also for avmedia/source/avmediadummy.cxx now. Change-Id: Ib1fd2c19aaf62beb759bfee5ec51f167d0966df4 Reviewed-on: https://gerrit.libreoffice.org/84011 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com> (cherry picked from commit 8d8a3f66e57aefd7cf7d3bb6cb62059de5beded2)
2019-11-19loplugin:fakebool (clang-cl)Stephan Bergmann1-1/+1
...plus follow-up loplugin:implicitboolconversion and loplugin:redundantcast Change-Id: I9fc9c5cb46fbb50da87ff80af64cb0dfda3e5f90 Reviewed-on: https://gerrit.libreoffice.org/83207 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-15loplugin:fakebool and loplugin:consttobool (macOS)Stephan Bergmann1-1/+1
Change-Id: I42d6546a9a400d8edb9ecef82614c6c88d4e6e83 Reviewed-on: https://gerrit.libreoffice.org/82806 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-14New loplugin:consttoboolStephan Bergmann1-2/+2
...to: "Find implicit conversions from non-'bool' constants (e.g., 'sal_False') to 'bool'". Due to how FALSE is defined as just #define FALSE (0) (i.e., a literal of type 'int') but TRUE is defined as #define TRUE (!FALSE) (i.e., an implicit conversion from 'int' to 'bool') in GLib (see the comment in ConstToBool::VisitImplicitCastExpr), we get more warnings about uses of 'TRUE' than of 'FALSE'. For example, in libreofficekit/source/gtk/lokdocview.cxx there is a warning about the 'TRUE' in g_main_context_iteration(nullptr, TRUE); but not about the 'FALSE' in g_main_context_iteration(nullptr, FALSE); (where the parameter of 'g_main_context_iteration' is of type 'gboolean'). Lets live with that asymmetry for now... (Besides the issues addressed directly in this commit, it also found the two bogus asserts at 7e09d08807b5ba2fd8b9831557752a415bdad562 "Fix useless assert(true) (which would never fire)" and 122a0be8ae480473bd1d7f35e197a2529f4621e3 "Fix useless assert(true) (which would never fire)", plus 5f0d6df7f57ae281fe161e61c7f25d67453fddd2 "Use two-argument form of static_assert".) Change-Id: Id77322de9f94b85a7b65608a03e0e9865d14467b Reviewed-on: https://gerrit.libreoffice.org/82667 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-13Extend loplugin:salbool to loplugin:fakeboolStephan Bergmann1-1/+1
...checking for unnecessary uses of more "fake bool" types. In the past, some of the checks involving the types of variables or data members, or the return types of functions, issued warnings that required surrounding code to be changed too (e.g., when changing the signature of a function whose address was taken). These checks have been tightened now to not warn in such cases (which avoids warnings that require changes to additional code, or changes that might even be impossible to make, at the cost of being less aggressive about removing all unnecessary uses of those "fake bool" types). Change-Id: I70eb75039817cda34ed611387ee27dc5f36a3e2e Reviewed-on: https://gerrit.libreoffice.org/82554 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-08Fix Windows --eanble-vlc errors and (clang-cl) warningsStephan Bergmann1-3/+3
Fix "no matching constructor" for OUString( arCurrent, dwCurrentSize ) from wchar_t and loplugin:cstylecast, loplugin:nullptr, and loplugin:stringconstant warnings. Change-Id: Ibe0341afe14a8c0380a69e9cbf946e68f9c58391 Reviewed-on: https://gerrit.libreoffice.org/82264 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-06Avoid OUString::createFromAscii, use OUStringLiteral insteadStephan Bergmann1-2/+2
Change-Id: Ib337b9678f68d41319dda30f0ca7edba5dc7e7b0 Reviewed-on: https://gerrit.libreoffice.org/82155 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-18Simplify MediaWindow::getMediaFiltersStephan Bergmann1-40/+29
Change-Id: I6c2ed432d2d5472ec984ea6e48aa3435c464067f Reviewed-on: https://gerrit.libreoffice.org/81053 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-10tdf#128057: convert file URIs to system path for IGraphBuilder::RenderFileMike Kaganski1-1/+8
It seems to handle file URIs incorrectly, failing when the characters in the URI are URI-encoded like %23 for #. Change-Id: Ibc1e27ce38d65781cdb8278c4787aafa00092754 Reviewed-on: https://gerrit.libreoffice.org/80567 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-10-10Simplify iterationMike Kaganski1-8/+6
Change-Id: I0340c47a007e541455d8bf339eaa7d438f5cb10f Reviewed-on: https://gerrit.libreoffice.org/80570 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-10-06Replace SystemEnvData pToolkit/pPlatformName strings with enumsStephan Bergmann1-6/+3
(and streamline those data members' names) Change-Id: Ifdd596c7a54dd507045d412c30b463468c2f798b Reviewed-on: https://gerrit.libreoffice.org/80313 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-06improve SfxPoolItem operator== implementationsNoel Grandin1-2/+3
(*) make them all call the superclass operator== (*) make the base class check which and typeid to ensure we are only comparing the safe subclasses together (*) remove a couple of operator== that were not doing anything useful Change-Id: Ia6234aed42df04157a5d6a323dc951916a9cb316 Reviewed-on: https://gerrit.libreoffice.org/80308 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-01loplugin:stringconstant (clang-cl)Stephan Bergmann4-4/+4
Change-Id: Id1a82cea4444255fdb693e126b7571a406094624 Reviewed-on: https://gerrit.libreoffice.org/79916 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-01Minor comment/README update wrt "kde5" and "gtk" VCL pluginsMichael Weghorn1-1/+1
"kde5" was renamed to "kf5" and "gtk" (i.e. gtk2) VCL plugin was removed in commit 1ae450504cf57457f9702684b1517fda1dd3c481. Change-Id: I294d2463fa77d6a740fc0a43039b5e6a2653846c Reviewed-on: https://gerrit.libreoffice.org/79908 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2019-08-16use more TOOLS_WARN_EXCEPTIONNoel Grandin1-2/+1
Change-Id: Ic21ea11ff106e0732bb8fa600ef39a549d7bda86 Reviewed-on: https://gerrit.libreoffice.org/77569 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-10loplugin:stringconstant (macOS)Stephan Bergmann4-4/+4
Change-Id: Icb9d9e1cd21e2506e36fe40a3b93b6a2521a868c Reviewed-on: https://gerrit.libreoffice.org/77239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): avmediaStephan Bergmann5-5/+5
Change-Id: I3736d81f73658105b877cd9577c6023ca4ca0805 Reviewed-on: https://gerrit.libreoffice.org/76698 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-22avmedia: Drop 'wrap_*' functionsMichael Weghorn1-14/+2
Just call the corresponding GStreamer functions directly. The wrapper functions are pointless since commit 6b911ae9eb9484bebbdc1323210020486f5ef33f ("Drop support for gstreamer-0.10"). Change-Id: I2963bd25a83632f4e693a1691180790452edffda Reviewed-on: https://gerrit.libreoffice.org/76116 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2019-07-19loplugin:referencecasting in avmedia..basicNoel Grandin1-6/+2
Change-Id: I6790b2e3902d64fb6f714f031affa221dbaba014 Reviewed-on: https://gerrit.libreoffice.org/75934 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>