add: add 3 functions. Provide the way to get current audio and video params.
This commit is contained in:
+39
-39
@@ -14,43 +14,43 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
common/cancelableobject.h
|
||||
common/channellayout.h
|
||||
common/commandlineparser.cpp
|
||||
common/commandlineparser.h
|
||||
common/crashpadinterface.cpp
|
||||
common/crashpadinterface.h
|
||||
common/crashpadutils.h
|
||||
common/debug.cpp
|
||||
common/debug.h
|
||||
common/decibel.h
|
||||
common/define.h
|
||||
common/ffmpegutils.cpp
|
||||
common/ffmpegutils.h
|
||||
common/filefunctions.cpp
|
||||
common/filefunctions.h
|
||||
common/html.cpp
|
||||
common/html.h
|
||||
common/jobtime.cpp
|
||||
common/jobtime.h
|
||||
common/lerp.h
|
||||
common/memorypool.h
|
||||
common/ocioutils.cpp
|
||||
common/ocioutils.h
|
||||
common/oiioutils.cpp
|
||||
common/oiioutils.h
|
||||
common/otioutils.h
|
||||
common/qtutils.cpp
|
||||
common/qtutils.h
|
||||
common/range.h
|
||||
common/ratiodialog.cpp
|
||||
common/ratiodialog.h
|
||||
common/threadsafemap.h
|
||||
common/tohex.h
|
||||
common/util.h
|
||||
common/xmlutils.cpp
|
||||
common/xmlutils.h
|
||||
PARENT_SCOPE
|
||||
target_sources(libolive-editor PRIVATE
|
||||
cancelableobject.h
|
||||
channellayout.h
|
||||
commandlineparser.cpp
|
||||
commandlineparser.h
|
||||
crashpadinterface.cpp
|
||||
crashpadinterface.h
|
||||
crashpadutils.h
|
||||
Current.cpp
|
||||
Current.h
|
||||
debug.cpp
|
||||
debug.h
|
||||
decibel.h
|
||||
define.h
|
||||
ffmpegutils.cpp
|
||||
ffmpegutils.h
|
||||
filefunctions.cpp
|
||||
filefunctions.h
|
||||
html.cpp
|
||||
html.h
|
||||
jobtime.cpp
|
||||
jobtime.h
|
||||
lerp.h
|
||||
memorypool.h
|
||||
ocioutils.cpp
|
||||
ocioutils.h
|
||||
oiioutils.cpp
|
||||
oiioutils.h
|
||||
otioutils.h
|
||||
qtutils.cpp
|
||||
qtutils.h
|
||||
range.h
|
||||
ratiodialog.cpp
|
||||
ratiodialog.h
|
||||
threadsafemap.h
|
||||
tohex.h
|
||||
util.h
|
||||
xmlutils.cpp
|
||||
xmlutils.h
|
||||
)
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Olive Community Edition - Non-Linear Video Editor
|
||||
* Copyright (C) 2025 Olive CE Team
|
||||
*
|
||||
* 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 3 of the License, 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.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "Current.h"
|
||||
|
||||
Current Current::current;
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Olive Community Edition - Non-Linear Video Editor
|
||||
* Copyright (C) 2025 Olive CE Team
|
||||
*
|
||||
* 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 3 of the License, 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.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CURRENT_H
|
||||
#define CURRENT_H
|
||||
#include "render/videoparams.h"
|
||||
|
||||
class Current {
|
||||
public:
|
||||
static Current& getInstance()
|
||||
{
|
||||
return current;
|
||||
}
|
||||
olive::VideoParams& currentVideoParams()
|
||||
{
|
||||
return currentVideoParams_;
|
||||
}
|
||||
olive::AudioParams& currentAudioParams()
|
||||
{
|
||||
return currentAudioParams_;
|
||||
}
|
||||
void setCurrentVideoParams(olive::VideoParams& params)
|
||||
{
|
||||
currentVideoParams_ = params;
|
||||
}
|
||||
void setCurrentAudioParams(olive::AudioParams& params)
|
||||
{
|
||||
currentAudioParams_ = params;
|
||||
}
|
||||
void setCurrentVideoParams(olive::VideoParams&& params)
|
||||
{
|
||||
currentVideoParams_ = params;
|
||||
}
|
||||
void setCurrentAudioParams(olive::AudioParams&& params)
|
||||
{
|
||||
currentAudioParams_ = params;
|
||||
}
|
||||
private:
|
||||
static Current current;
|
||||
olive::VideoParams currentVideoParams_;
|
||||
olive::AudioParams currentAudioParams_;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif //CURRENT_H
|
||||
Reference in New Issue
Block a user