Commit Graph

52 Commits (00997fa7327293db6075d47d18bd36516537ba44)

Author SHA1 Message Date
psi29a 5a27d6eed7 Merge branch 'fix-ffmpeg-api-const' into 'master'
Fix future FFMpeg API changes

See merge request OpenMW/openmw!922

(cherry picked from commit 3794e6d4b20b6c9f47aeaf3f937118c49de700e5)

70a02290 Fix future FFMpeg API changes
4 years ago
Evil Eye 54d32817d5 Use av_free and maybe get Coverity to understand 4 years ago
Bret Curtis 66a527c3de
Merge pull request #3075 from akortunov/warnfix
Fix MSVC's C4244 and C4267 warnings
4 years ago
Evil Eye 69aaf6ab04 don't touch frame->data 4 years ago
Evil Eye ed118537a8 use unique_ptr instead 4 years ago
Evil Eye 3b7cef9e88 add PacketGuard and move try/catch up 4 years ago
Evil Eye 1b61ec979d switch to lock_guards 4 years ago
Andrei Kortunov 963e1b8b3f Fix MSVC's C4244 warnings 4 years ago
Andrei Kortunov f9d42ed396 Fix MSVC's C4267 warnings 4 years ago
Evil Eye de37ca8e2c Catch exceptions in VideoThread 4 years ago
Andrei Kortunov 124a33d8a3 Fix uninitialized variables 4 years ago
Andrei Kortunov 93954a961c Unlock mutex on return to avoid hang 4 years ago
Gleb Mazovetskiy 1db7d2ec4e Restore compatibility with FFMpeg < 57.80.100
This should fix macOS Travis build broken by 58d33aa95b
4 years ago
Gleb Mazovetskiy 36bac353df AV: Handle varying video frame dimensions 4 years ago
Gleb Mazovetskiy 58d33aa95b AV: Fix all memory leaks
The most substantial memory leak came from `PacketQueue::get`
not unreferencing its argument packet.

Other leaks came from using `av_free` instead of type-specific free
functions.

Also modifies `PacketQueue::put` for readability.
4 years ago
Gleb Mazovetskiy eb93fdfbea Use unique_ptr with custom deleter for VideoPicture::rgbaFrame 4 years ago
Gleb Mazovetskiy b7076549a3 osg-ffmpeg-videoplayer: Fix crash on ARM
osg-ffmpeg-videoplayer handled frame allocation incorrectly.

It used a `vector<uint8_t>` as its buffer, meaning the addresses could
did not respect alignment.

Instead, changes it to use `AVFrame` as buffers, allocated via `av_image_alloc`.

We also now only allocate the buffer once, instead of on every frame,
which should improve the framerate of videos.

Fixes the following crash on startup on ARM:

> Invalid address alignment (signal 7)

Fixes #5807
4 years ago
Gleb Mazovetskiy 99ba45a308 Optional static builds of OSG, MyGUI, Bullet 4 years ago
Andrei Kortunov 8084a336b5 Replace zeroes and nulls by nullptrs 4 years ago
elsid 40ad87bc4d
Replace OpenThreads by std types 5 years ago
Andrei Kortunov 454bae2c43 Make PacketQueue fields atomic to avoid data races (e.g. with ParseThread) 6 years ago
Ilya Zhuravlev 07e9ce84b3 Replace volatile bools with std::atomic<bool> 6 years ago
Stanislaw Halik 59d96d808e fix missing include 6 years ago
Andrei Kortunov f88d5e808c Rewrite media decoder to use FFMpeg 3.2+ API (task #4686) 6 years ago
Ilya Zhuravlev b4ec8aaf5e VideoState::queue_picture: ffmpeg expects a buffer of 4 pointers in sws_scale 7 years ago
scrawl 4c174ecd12 Merge changes to coverity scan script 7 years ago
Bret Curtis 11c4aed4e5 algo needed for std::min/max in msvc2013 8 years ago
Bret Curtis 39185e6f8c purge the rest of boost::shared and any other boost related things that no longer are required
put boost system back in, clean others up

revert Qt

add back boost fstream
8 years ago
Bret Curtis d785344fad purge all instances of <boost/shared_ptr.hpp>, clean up unused headers 8 years ago
Bret Curtis 07f75e1104 replace boost::shared_ptr in extern and components 8 years ago
Ewan Higgs 38a2de3c51 convert std::autor_ptr to std::unique_ptr, originally by Ewan Higgs and updated by Bret Curtis 8 years ago
scrawl 530fb61ad0 Use OpenThreads instead of boost thread
This should allow OpenMW to work better with git versions of openscenegraph. OSG dev version 3.5.5 added the setting of thread affinity for the main thread. The problem is that in the boost/standard threading libraries, the affinity of a thread is inherited by any further threads launched from that thread, leading to these threads always running on the same core as the main thread unless you tell them not to.

With OpenThreads, the default affinity of a thread is none, no matter what parent thread it was launched from.

So, when using custom threading with OSG 3.6+, we have these options:
1. explicitely tell OSG to *not* set the thread affinity
or 2. explicitely set the thread affinity of additional threads created (possible with boost, but not possible with std::thread)
or 3. use OpenThreads
or 4. accept the suboptimal performance of non-OSG threads (in OpenMW's case the sound streaming & video threads) running on the same core as the main thread

This patch opts for 3.)

Reference: http://forum.openscenegraph.org/viewtopic.php?t=16158
8 years ago
Roman Proskuryakov da59ef0f67 Rewrites FindFFmpeg using LibFindMacros handling components properly 9 years ago
Bret Curtis 2c90b0b78d fix a few spelling mistakes 9 years ago
Bret Curtis 3ea3d07d44 really purge libav 9 years ago
Bret Curtis 39f89f967b from kcat: We can't simply get rid of this, otherwise it may break for certain kinds of packets. 9 years ago
Bret Curtis 8d2990cc03 add support for ffmpeg29 thanks to Andreas Cadhalpun; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=803848 9 years ago
scrawl cd2e6d4436 Move the __STDC_CONSTANT_MACROS define to cmakelists 10 years ago
scrawl 3663511cdb Merge branch 'master' of https://github.com/OpenMW/openmw into osg
Conflicts:
	apps/opencs/CMakeLists.txt
	extern/ogre-ffmpeg-videoplayer/CMakeLists.txt
10 years ago
scrawl f70250a296 Merge branch 'master' of https://github.com/OpenMW/openmw into osg
Conflicts:
	apps/launcher/CMakeLists.txt
	apps/opencs/CMakeLists.txt
	apps/opencs/view/render/worldspacewidget.cpp
	apps/openmw/CMakeLists.txt
	components/CMakeLists.txt
	extern/osg-ffmpeg-videoplayer/CMakeLists.txt
10 years ago
scrawl e6ecb39d94 Potential include fix 10 years ago
scrawl 7ac4b2bb66 Fix for travis build issue 10 years ago
scrawl 60ad568004 Another missing include 10 years ago
scrawl 7991ea25c0 Potentially missing includes 10 years ago
scrawl 974fda5bde Merge branch 'master' of https://github.com/OpenMW/openmw into osg
Conflicts:
	extern/sdl4ogre/sdlwindowhelper.cpp
10 years ago
scrawl 4d5c446a44 Minor cleanup 10 years ago
scrawl 22f01b1232 Merge branch 'master' of https://github.com/OpenMW/openmw into osg
Conflicts:
	apps/launcher/graphicspage.cpp
	apps/opencs/editor.cpp
	apps/opencs/model/doc/document.cpp
	apps/opencs/view/render/cell.cpp
	apps/opencs/view/render/mousestate.cpp
	apps/opencs/view/render/textoverlay.cpp
	apps/opencs/view/render/worldspacewidget.cpp
	apps/openmw/mwclass/creature.cpp
	apps/openmw/mwclass/npc.cpp
	apps/openmw/mwgui/inventorywindow.cpp
	apps/openmw/mwgui/loadingscreen.cpp
	apps/openmw/mwgui/mapwindow.cpp
	apps/openmw/mwgui/pickpocketitemmodel.cpp
	apps/openmw/mwgui/waitdialog.cpp
	apps/openmw/mwmechanics/combat.cpp
	apps/openmw/mwmechanics/mechanicsmanagerimp.cpp
	apps/openmw/mwrender/globalmap.cpp
	apps/openmw/mwworld/physicssystem.cpp
	apps/openmw/mwworld/refdata.cpp
	apps/openmw/mwworld/scene.cpp
	apps/openmw/mwworld/worldimp.cpp
	components/sdlutil/sdlinputwrapper.cpp
	extern/shiny/Main/Factory.cpp
	extern/shiny/Main/MaterialInstance.cpp
	extern/shiny/Main/Platform.cpp
	extern/shiny/Main/ShaderSet.cpp
10 years ago
scrawl 7a2a7633d5 Fix videoplayer destruction issue that valgrind complained about 10 years ago
scrawl 00f4f78717 Give a name to video streams for logging purposes 10 years ago
scrawl b0804734e5 Port VideoWidget 10 years ago