|
virtual void | init () |
|
virtual void | update (double deltaTime) |
| Update the module with respect to the time. More...
|
|
void | loadVideo (const QString &filename, const QString &id, const float x, const float y, const bool show, const float alpha) |
| load a video from filename, assign an id for it for later reference. More...
|
|
void | playVideo (const QString &id, const bool keepVisibleAtEnd=false) |
| play video from current position. If keepLastFrame is true, video pauses at last frame.
|
|
void | playVideoPopout (const QString &id, float fromX, float fromY, float atCenterX, float atCenterY, float finalSizeX, float finalSizeY, float popupDuration, bool frozenInTransition) |
| Play a video which has previously been loaded with loadVideo() with a complex effect. More...
|
|
void | pauseVideo (const QString &id) |
| Pause video, keep it visible on-screen. More...
|
|
void | stopVideo (const QString &id) |
| Stop playing, resets video and hides video output window.
|
|
void | dropVideo (const QString &id) |
| Unload video from memory.
|
|
void | seekVideo (const QString &id, const qint64 ms, bool pause=false) |
| Seek a position in video id. More...
|
|
void | setVideoXY (const QString &id, const float x, const float y, const bool relative=false) |
| move upper left corner of video id to x, y. More...
|
|
void | setVideoAlpha (const QString &id, const float alpha) |
| sets opacity More...
|
|
void | resizeVideo (const QString &id, float w=-1.0f, float h=-1.0f) |
| set video size to width w and height h. More...
|
|
void | showVideo (const QString &id, const bool show) |
| show or hide video player More...
|
|
qint64 | getVideoDuration (const QString &id) const |
| returns duration (in milliseconds) of loaded video. More...
|
|
qint64 | getVideoPosition (const QString &id) const |
| returns current position (in milliseconds) of loaded video. More...
|
|
QSize | getVideoResolution (const QString &id) const |
| returns resolution (in pixels) of loaded video. Returned value may be invalid before video has been fully loaded.
|
|
int | getVideoWidth (const QString &id) const |
| returns native width (in pixels) of loaded video, or -1 in case of trouble.
|
|
int | getVideoHeight (const QString &id) const |
| returns native height (in pixels) of loaded video, or -1 in case of trouble.
|
|
void | muteVideo (const QString &id, bool muteVideo=true) |
| set mute state of video player More...
|
|
void | setVideoVolume (const QString &id, int newVolume) |
| set volume for video. Valid values are 0..100, values outside this range will be clamped.
|
|
int | getVideoVolume (const QString &id) const |
| return currently set volume (0..100) of media player, or -1 in case of some error.
|
|
bool | isVideoPlaying (const QString &id) const |
| returns whether video is currently playing. More...
|
|
|
enum | StelModuleSelectAction { AddToSelection,
ReplaceSelection,
RemoveFromSelection
} |
| Enum used when selecting objects to define whether to add to, replace, or remove from the existing selection list. More...
|
|
enum | StelModuleActionName {
ActionDraw,
ActionUpdate,
ActionHandleMouseClicks,
ActionHandleMouseMoves,
ActionHandleKeys
} |
| Define the possible action for which an order is defined. More...
|
|
virtual void | init ()=0 |
| Initialize itself. More...
|
|
virtual void | deinit () |
| Called before the module will be delete, and before the openGL context is suppressed. More...
|
|
virtual void | draw (StelCore *core) |
| Execute all the drawing functions for this module. More...
|
|
virtual void | update (double deltaTime)=0 |
| Update the module with respect to the time. More...
|
|
virtual QString | getModuleVersion () const |
| Get the version of the module, default is stellarium main version.
|
|
virtual QString | getAuthorName () const |
| Get the name of the module author.
|
|
virtual QString | getAuthorEmail () const |
| Get the email adress of the module author.
|
|
virtual void | handleMouseClicks (class QMouseEvent *) |
| Handle mouse clicks. More...
|
|
virtual void | handleMouseWheel (class QWheelEvent *) |
| Handle mouse wheel. More...
|
|
virtual bool | handleMouseMoves (int x, int y, Qt::MouseButtons b) |
| Handle mouse moves. More...
|
|
virtual void | handleKeys (class QKeyEvent *e) |
| Handle key events. More...
|
|
virtual bool | handlePinch (qreal scale, bool started) |
| Handle pinch gesture events. More...
|
|
virtual double | getCallOrder (StelModuleActionName actionName) const |
| Return the value defining the order of call for the given action For example if stars.callOrder[ActionDraw] == 10 and constellation.callOrder[ActionDraw] == 11, the stars module will be drawn before the constellations. More...
|
|
virtual bool | configureGui (bool show=true) |
| Detect or show the configuration GUI elements for the module. More...
|
|
class StelAction * | addAction (const QString &id, const QString &groupId, const QString &text, QObject *target, const char *slot, const QString &shortcut="", const QString &altShortcut="") |
| convenience methods to add an action (call to slot) to the StelActionMgr object. More...
|
|
class StelAction * | addAction (const QString &id, const QString &groupId, const QString &text, const char *slot, const QString &shortcut="", const QString &altShortcut="") |
| convenience methods to add an action (call to own slot) to the StelActionMgr object. More...
|
|
After experimental support with Qt4/Phonon library, this feature is back. Videos can be scaled, paused, placed and relocated (shifted) on screen. Setting opacity seems not to do much unless setting it to zero, the video is then simply invisible. Therefore smooth fading in/out or setting a semitransparent overlay does not work, but there is now an intro/end animation available: zooming out from a pixel position to a player frame position, and returning to that spot close to end of video playback.
However, support for multimedia content depends on the operating system, installed codecs, and completeness of the QtMultimedia system support, so some features or video formats may not work for you (test video and re-code it if necessary).
Linux notes
The listed functions have been tested and work on Ubuntu 15.04 with Qt5.4 with NVidia 9800M and Intel Core-i3/HD5500. You need to install GStreamer plugins. Most critical seems to be gstreamer0.10-ffmpeg from https://launchpad.net/~mc3man/+archive/ubuntu/gstffmpeg-keep, then it plays
-
MP4 (h264)
-
Apple MOV(Sorenson)
-
WMV.
-
Some type of AVI failed
Windows notes
According to https://wiki.qt.io/Qt_Multimedia, MinGW is limited to the decaying DirectShow platform plugin. The WMF platform plugin requires Visual Studio, so building with MSVC should provide better result. Some signals are not triggered under Windows, so we cannot use them, globally. There is partial success with MP4 files on MinGW, but also these are rendered badly. Often just shows an error on Windows/MinGW: DirectShowPlayerService::doRender: Unresolved error code 80040154 (number may differ, also seen: 80040228. Where is a list?) The formats tested on Windows are:
-
MP4 (h264; OK)
-
WMV (OK, but jumping to different locations via seekVideo() seems not to work properly)
-
MOV (mp4v codec, very jerky, basically unusable)
-
AVI (DIVX MP4 codec, same bad issues as MOV)
-
OGV (invalid media)
-
WEBM (invalid media)
Mac OS X Notes
NOT TESTED ON A MAC! There is a critical difference (causing a crash!) between Win and Linux to either hide or not hide the player just after loading. Please somebody find out Mac behaviour.
QtMultimedia is a bit tricky to use: There seems to be no way to load a media file to analyze resolution or duration before starting its replay. This means, configuring player frames either require absolute frame coordinates, or triggering necessary configuration steps only after replay has started. We opted for the latter solution because it allows scaled but undistorted video frames which may also take current screen resolution into account.
Under unclear circumstances we also have a pair of messages:
Failed to start video surface due to main thread blocked.
Failed to start video surface
and non-appearing video frame, this seems to be https://bugreports.qt.io/browse/QTBUG-39567. This occurred on an Intel NUC5i3 with SSD, so loading the file should not be much of an issue.
To help in debugging scripts, this module can be quite verbose in the logfile if Stellarium is called with the command-line argument "--verbose".