id
int64 0
877k
| file_name
stringlengths 3
109
| file_path
stringlengths 13
185
| content
stringlengths 31
9.38M
| size
int64 31
9.38M
| language
stringclasses 1
value | extension
stringclasses 11
values | total_lines
int64 1
340k
| avg_line_length
float64 2.18
149k
| max_line_length
int64 7
2.22M
| alphanum_fraction
float64 0
1
| repo_name
stringlengths 6
66
| repo_stars
int64 94
47.3k
| repo_forks
int64 0
12k
| repo_open_issues
int64 0
3.4k
| repo_license
stringclasses 11
values | repo_extraction_date
stringclasses 197
values | exact_duplicates_redpajama
bool 2
classes | near_duplicates_redpajama
bool 2
classes | exact_duplicates_githubcode
bool 2
classes | exact_duplicates_stackv2
bool 1
class | exact_duplicates_stackv1
bool 2
classes | near_duplicates_githubcode
bool 2
classes | near_duplicates_stackv1
bool 2
classes | near_duplicates_stackv2
bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
19,436
|
wavedistortnode.h
|
olive-editor_olive/app/node/distort/wave/wavedistortnode.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 WAVEDISTORTNODE_H
#define WAVEDISTORTNODE_H
#include "node/node.h"
namespace olive {
class WaveDistortNode : public Node
{
Q_OBJECT
public:
WaveDistortNode();
NODE_DEFAULT_FUNCTIONS(WaveDistortNode)
virtual QString Name() const override;
virtual QString id() const override;
virtual QVector<CategoryID> Category() const override;
virtual QString Description() const override;
virtual void Retranslate() override;
virtual ShaderCode GetShaderCode(const ShaderRequest &request) const override;
virtual void Value(const NodeValueRow& value, const NodeGlobals &globals, NodeValueTable *table) const override;
static const QString kTextureInput;
static const QString kFrequencyInput;
static const QString kIntensityInput;
static const QString kEvolutionInput;
static const QString kVerticalInput;
};
}
#endif // WAVEDISTORTNODE_H
| 1,586
|
C++
|
.h
| 39
| 37.846154
| 114
| 0.796078
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,437
|
mosaicfilternode.h
|
olive-editor_olive/app/node/filter/mosaic/mosaicfilternode.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 MOSAICFILTERNODE_H
#define MOSAICFILTERNODE_H
#include "node/node.h"
namespace olive {
class MosaicFilterNode : public Node
{
Q_OBJECT
public:
MosaicFilterNode();
NODE_DEFAULT_FUNCTIONS(MosaicFilterNode)
virtual QString Name() const override
{
return tr("Mosaic");
}
virtual QString id() const override
{
return QStringLiteral("org.olivevideoeditor.Olive.mosaicfilter");
}
virtual QVector<CategoryID> Category() const override
{
return {kCategoryFilter};
}
virtual QString Description() const override
{
return tr("Apply a pixelated mosaic filter to video.");
}
virtual void Retranslate() override;
virtual void Value(const NodeValueRow& value, const NodeGlobals &globals, NodeValueTable *table) const override;
virtual ShaderCode GetShaderCode(const ShaderRequest &request) const override;
static const QString kTextureInput;
static const QString kHorizInput;
static const QString kVertInput;
};
}
#endif // MOSAICFILTERNODE_H
| 1,720
|
C++
|
.h
| 49
| 32.020408
| 114
| 0.777105
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,438
|
blur.h
|
olive-editor_olive/app/node/filter/blur/blur.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 BLURFILTERNODE_H
#define BLURFILTERNODE_H
#include "node/gizmo/point.h"
#include "node/node.h"
namespace olive {
class BlurFilterNode : public Node
{
Q_OBJECT
public:
BlurFilterNode();
enum Method {
kBox,
kGaussian,
kDirectional,
kRadial
};
NODE_DEFAULT_FUNCTIONS(BlurFilterNode)
virtual QString Name() const override;
virtual QString id() const override;
virtual QVector<CategoryID> Category() const override;
virtual QString Description() const override;
virtual void Retranslate() override;
virtual ShaderCode GetShaderCode(const ShaderRequest &request) const override;
virtual void Value(const NodeValueRow& value, const NodeGlobals &globals, NodeValueTable *table) const override;
Method GetMethod() const
{
return static_cast<Method>(GetStandardValue(kMethodInput).toInt());
}
virtual void UpdateGizmoPositions(const NodeValueRow &row, const NodeGlobals &globals) override;
static const QString kTextureInput;
static const QString kMethodInput;
static const QString kRadiusInput;
static const QString kHorizInput;
static const QString kVertInput;
static const QString kRepeatEdgePixelsInput;
static const QString kDirectionalDegreesInput;
static const QString kRadialCenterInput;
protected slots:
virtual void GizmoDragMove(double x, double y, const Qt::KeyboardModifiers &modifiers) override;
protected:
virtual void InputValueChangedEvent(const QString& input, int element) override;
private:
void UpdateInputs(Method method);
PointGizmo *radial_center_gizmo_;
};
}
#endif // BLURFILTERNODE_H
| 2,317
|
C++
|
.h
| 61
| 34.918033
| 114
| 0.793274
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,439
|
dropshadowfilter.h
|
olive-editor_olive/app/node/filter/dropshadow/dropshadowfilter.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 DROPSHADOWFILTER_H
#define DROPSHADOWFILTER_H
#include "node/node.h"
namespace olive {
class DropShadowFilter : public Node
{
Q_OBJECT
public:
DropShadowFilter();
NODE_DEFAULT_FUNCTIONS(DropShadowFilter)
virtual QString Name() const override { return tr("Drop Shadow"); }
virtual QString id() const override { return QStringLiteral("org.olivevideoeditor.Olive.dropshadow"); }
virtual QVector<CategoryID> Category() const override { return {kCategoryFilter}; }
virtual QString Description() const override { return tr("Adds a drop shadow to an image."); }
virtual void Retranslate() override;
virtual ShaderCode GetShaderCode(const ShaderRequest &request) const override;
virtual void Value(const NodeValueRow& value, const NodeGlobals &globals, NodeValueTable *table) const override;
static const QString kTextureInput;
static const QString kColorInput;
static const QString kDistanceInput;
static const QString kAngleInput;
static const QString kSoftnessInput;
static const QString kOpacityInput;
static const QString kFastInput;
};
}
#endif // DROPSHADOWFILTER_H
| 1,830
|
C++
|
.h
| 41
| 41.804878
| 114
| 0.789503
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,440
|
stroke.h
|
olive-editor_olive/app/node/filter/stroke/stroke.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 STROKEFILTERNODE_H
#define STROKEFILTERNODE_H
#include "node/node.h"
namespace olive {
class StrokeFilterNode : public Node
{
Q_OBJECT
public:
StrokeFilterNode();
NODE_DEFAULT_FUNCTIONS(StrokeFilterNode)
virtual QString Name() const override;
virtual QString id() const override;
virtual QVector<CategoryID> Category() const override;
virtual QString Description() const override;
virtual void Retranslate() override;
virtual void Value(const NodeValueRow& value, const NodeGlobals &globals, NodeValueTable *table) const override;
virtual ShaderCode GetShaderCode(const ShaderRequest &request) const override;
static const QString kTextureInput;
static const QString kColorInput;
static const QString kRadiusInput;
static const QString kOpacityInput;
static const QString kInnerInput;
};
}
#endif // STROKEFILTERNODE_H
| 1,580
|
C++
|
.h
| 39
| 37.692308
| 114
| 0.795276
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,441
|
panelmanager.h
|
olive-editor_olive/app/panel/panelmanager.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 PANELFOCUSMANAGER_H
#define PANELFOCUSMANAGER_H
#include <QObject>
#include <QList>
#include "panel/panel.h"
namespace olive {
/**
* @brief The PanelFocusManager class
*
* This object keeps track of which panel is focused at any given time.
*
* Sometimes a function (specifically a keyboard-triggered one, e.g. Delete) may have different purposes depending on
* which panel is "focused" at any given time. Pressing Delete on the Timeline is not the same as pressing Delete in
* the Project panel, for example. This kind of "focus" is slightly different from standard QWidget focus, since it
* aims to be less specific than a single QPushButton or QLineEdit, and rather specific to the panel widgets like
* that belong to.
*
* PanelFocusManager's SLOT(FocusChanged()) connects to the QApplication instance's SIGNAL(focusChanged()) so that
* it always knows when focus has changed within the application.
*/
class PanelManager : public QObject
{
Q_OBJECT
public:
PanelManager(QObject* parent = nullptr);
/**
* @brief Destroy all panels
*
* Should only be used on application exit to cleanly free all panels.
*/
void DeleteAllPanels();
/**
* @brief Get a list of all existing panels
*
* Panels are ordered from most recently focused to least recently focused.
*/
const QList<PanelWidget*>& panels();
/**
* @brief Return the currently focused widget, or nullptr if nothing is focused
*
* This result == CurrentlyFocused() if HoverFocus is true and panel is hovered
*/
PanelWidget* CurrentlyFocused(bool enable_hover = true) const;
/**
* @brief Return the widget that the mouse is currently hovering over, or nullptr if nothing is hovered over
*/
PanelWidget* CurrentlyHovered() const;
PanelWidget *GetPanelWithName(const QString &name) const;
template<class T>
/**
* @brief Get most recently focused panel of a certain type
*
* @return
*
* The most recently focused panel of the specified type, or nullptr if none exists
*/
T* MostRecentlyFocused();
/**
* @brief Create PanelManager singleton instance
*/
static void CreateInstance();
/**
* @brief Destroy PanelManager singleton instance
*
* If no PanelManager was created, this is a no-op.
*/
static void DestroyInstance();
/**
* @brief Access to PanelManager singleton instance
*/
static PanelManager* instance();
template<class T>
/**
* @brief Get a list of panels of a certain type
*/
QList<T*> GetPanelsOfType();
/**
* @brief Panel should call this upon construction so it can be kept track of
*/
void RegisterPanel(PanelWidget *panel);
/**
* @brief Panel should call this upon destruction so no invalid pointers will be kept for it
*/
void UnregisterPanel(PanelWidget *panel);
void SetSuppressChangedSignal(bool e)
{
suppress_changed_signal_ = e;
}
public slots:
/**
* @brief Connect this to a QApplication's SIGNAL(focusChanged())
*
* Interprets focus information to determine the currently focused panel
*/
void FocusChanged(QWidget* old, QWidget* now);
signals:
/**
* @brief Signal emitted when the currently focused panel changes
*/
void FocusedPanelChanged(PanelWidget* panel);
private:
/**
* @brief History array for traversing through (see MostRecentlyFocused())
*/
QList<PanelWidget*> focus_history_;
/**
* @brief PanelManager singleton instance
*/
static PanelManager* instance_;
bool suppress_changed_signal_;
};
template<class T>
T* PanelManager::MostRecentlyFocused()
{
T* cast_test;
for (int i=0;i<focus_history_.size();i++) {
cast_test = dynamic_cast<T*>(focus_history_.at(i));
if (cast_test != nullptr) {
return cast_test;
}
}
return nullptr;
}
template<class T>
QList<T*> PanelManager::GetPanelsOfType()
{
QList<T*> panels;
T* cast_test;
foreach (PanelWidget* panel, focus_history_) {
cast_test = dynamic_cast<T*>(panel);
if (cast_test) {
panels.append(cast_test);
}
}
return panels;
}
}
#endif // PANELFOCUSMANAGER_H
| 4,821
|
C++
|
.h
| 152
| 28.447368
| 117
| 0.729963
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,442
|
panel.h
|
olive-editor_olive/app/panel/panel.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 PANEL_WIDGET_H
#define PANEL_WIDGET_H
#include <kddockwidgets/DockWidget.h>
#include <QEvent>
#include "common/define.h"
namespace olive {
/**
* @brief A widget that is always dockable within the MainWindow.
*/
class PanelWidget : public KDDockWidgets::DockWidget
{
Q_OBJECT
public:
/**
* @brief PanelWidget Constructor
*
* @param parent
*
* The PanelWidget's parent, enforced to help with memory handling. Most of the time this will be an instance of
* MainWindow.
*/
PanelWidget(const QString& object_name);
virtual ~PanelWidget() override;
/**
* @brief Set visibility of panel's highlighted border, mostly used for showing panel focus
*
* @param enabled
*/
void SetBorderVisible(bool enabled);
/**
* @brief If enabled, sends signal CloseRequested() when the user closes instead of closing
*
* Defaults to FALSE. Use this to override default panel closing functionality.
*/
void SetSignalInsteadOfClose(bool e);
using Info = std::map<QString, QString>;
virtual void LoadData(const Info &info){}
virtual Info SaveData() const {return Info();}
/**
* @brief Called whenever this panel is focused and user uses "Zoom In" (either in menus or as a keyboard shortcut)
*
* This function is up to the Panel's interpretation of what the user intends to zoom into. Default behavior is a
* no-op.
*/
virtual void ZoomIn(){}
/**
* @brief Called whenever this panel is focused and user uses "Zoom Out" (either in menus or as a keyboard shortcut)
*
* This function is up to the Panel's interpretation of what the user intends to zoom out of. Default behavior is a
* no-op.
*/
virtual void ZoomOut(){}
virtual void GoToStart(){}
virtual void PrevFrame(){}
/**
* @brief Called whenever this panel is focused and user uses "Play/Pause" (either in menus or as a keyboard shortcut)
*
* This function is up to the Panel's interpretation of what the user intends to zoom out of. Default behavior is a
* no-op.
*/
virtual void PlayPause(){}
virtual void PlayInToOut(){}
virtual void NextFrame(){}
virtual void GoToEnd(){}
virtual void SelectAll(){}
virtual void DeselectAll(){}
virtual void RippleToIn(){}
virtual void RippleToOut(){}
virtual void EditToIn(){}
virtual void EditToOut(){}
virtual void ShuttleLeft(){}
virtual void ShuttleStop(){}
virtual void ShuttleRight(){}
virtual void GoToPrevCut(){}
virtual void GoToNextCut(){}
virtual void RenameSelected(){}
virtual void DeleteSelected(){}
virtual void RippleDelete(){}
virtual void IncreaseTrackHeight(){}
virtual void DecreaseTrackHeight(){}
virtual void SetIn(){}
virtual void SetOut(){}
virtual void ResetIn(){}
virtual void ResetOut(){}
virtual void ClearInOut(){}
virtual void SetMarker(){}
virtual void ToggleLinks(){}
virtual void CutSelected(){}
virtual void CopySelected(){}
virtual void Paste(){}
virtual void PasteInsert(){}
virtual void ToggleShowAll(){}
virtual void GoToIn(){}
virtual void GoToOut(){}
virtual void DeleteInToOut(){}
virtual void RippleDeleteInToOut(){}
virtual void ToggleSelectedEnabled(){}
virtual void Duplicate(){}
virtual void SetColorLabel(int){}
virtual void NudgeLeft(){}
virtual void NudgeRight(){}
virtual void MoveInToPlayhead(){}
virtual void MoveOutToPlayhead(){}
signals:
void CloseRequested();
protected:
/**
* @brief paintEvent
* @param event
*/
void paintEvent(QPaintEvent *event) override;
virtual void changeEvent(QEvent* e) override;
virtual void closeEvent(QCloseEvent* event) override;
virtual void Retranslate();
void SetWidgetWithPadding(QWidget* widget);
protected slots:
/**
* @brief Set panel's title
*
* Use this function to set the title of the panel.
*
* A PanelWidget has the default format of "Title: Subtitle" (can differ depending on translation). If no Subtitle
* is set, the title will just be formatted "Title".
*
* @param t
*
* String to set the title to
*/
void SetTitle(const QString& t);
/**
* @brief Set panel's subtitle
*
* Use this function to set the subtitle of the panel.
*
* A PanelWidget has the default format of "Title: Subtitle" (can differ depending on translation). If no Subtitle
* is set, the title will just be formatted "Title".
*
* @param t
*
* String to set the subtitle to
*/
void SetSubtitle(const QString& t);
private:
/**
* @brief Internal function that sets the QDockWidget's window title whenever the title/subtitle change.
*
* Should be called any time a change is made to title_ or subtitle_
*/
void UpdateTitle();
QString title_;
QString subtitle_;
bool border_visible_;
bool signal_instead_of_close_;
};
}
#endif // PANEL_WIDGET_H
| 5,597
|
C++
|
.h
| 170
| 29.352941
| 120
| 0.726117
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,443
|
viewerbase.h
|
olive-editor_olive/app/panel/viewer/viewerbase.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 VIEWERPANELBASE_H
#define VIEWERPANELBASE_H
#include "panel/pixelsampler/pixelsamplerpanel.h"
#include "panel/timebased/timebased.h"
#include "widget/viewer/viewer.h"
namespace olive {
class ViewerPanelBase : public TimeBasedPanel
{
Q_OBJECT
public:
ViewerPanelBase(const QString& object_name);
ViewerWidget *GetViewerWidget() const
{
return static_cast<ViewerWidget*>(GetTimeBasedWidget());
}
virtual void PlayPause() override;
virtual void PlayInToOut() override;
virtual void ShuttleLeft() override;
virtual void ShuttleStop() override;
virtual void ShuttleRight() override;
void ConnectTimeBasedPanel(TimeBasedPanel* panel);
void DisconnectTimeBasedPanel(TimeBasedPanel* panel);
/**
* @brief Wrapper for ViewerWidget::SetFullScreen()
*/
void SetFullScreen(QScreen* screen = nullptr);
ColorManager *GetColorManager()
{
return GetViewerWidget()->color_manager();
}
void UpdateTextureFromNode()
{
GetViewerWidget()->UpdateTextureFromNode();
}
void AddPlaybackDevice(ViewerDisplayWidget *vw)
{
GetViewerWidget()->AddPlaybackDevice(vw);
}
void SetTimelineSelectedBlocks(const QVector<Block*> &b)
{
GetViewerWidget()->SetTimelineSelectedBlocks(b);
}
void SetNodeViewSelections(const QVector<Node*> &n)
{
GetViewerWidget()->SetNodeViewSelections(n);
}
void ConnectMulticamWidget(MulticamWidget *p)
{
GetViewerWidget()->ConnectMulticamWidget(p);
}
public slots:
void SetGizmos(Node* node);
void CacheEntireSequence();
void CacheSequenceInOut();
void RequestStartEditingText()
{
GetViewerWidget()->RequestStartEditingText();
}
signals:
/**
* @brief Signal emitted when a new frame is loaded
*/
void TextureChanged(TexturePtr t);
/**
* @brief Wrapper for ViewerGLWidget::ColorProcessorChanged()
*/
void ColorProcessorChanged(ColorProcessorPtr processor);
/**
* @brief Wrapper for ViewerGLWidget::ColorManagerChanged()
*/
void ColorManagerChanged(ColorManager* color_manager);
protected:
void SetViewerWidget(ViewerWidget *vw);
private slots:
void FocusedPanelChanged(PanelWidget *panel);
};
}
#endif // VIEWERPANELBASE_H
| 2,913
|
C++
|
.h
| 92
| 28.402174
| 71
| 0.769838
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,444
|
viewer.h
|
olive-editor_olive/app/panel/viewer/viewer.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 VIEWER_PANEL_H
#define VIEWER_PANEL_H
#include <QOpenGLFunctions>
#include "viewerbase.h"
namespace olive {
/**
* @brief Dockable wrapper around a ViewerWidget
*/
class ViewerPanel : public ViewerPanelBase {
Q_OBJECT
public:
ViewerPanel(const QString& object_name);
protected:
virtual void Retranslate() override;
};
}
#endif // VIEWER_PANEL_H
| 1,080
|
C++
|
.h
| 31
| 32.354839
| 71
| 0.775845
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,445
|
timeline.h
|
olive-editor_olive/app/panel/timeline/timeline.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 TIMELINE_PANEL_H
#define TIMELINE_PANEL_H
#include "panel/timebased/timebased.h"
#include "widget/timelinewidget/timelinewidget.h"
namespace olive {
/**
* @brief Panel container for a TimelineWidget
*/
class TimelinePanel : public TimeBasedPanel
{
Q_OBJECT
public:
TimelinePanel(const QString &name);
inline TimelineWidget *timeline_widget() const
{
return static_cast<TimelineWidget*>(GetTimeBasedWidget());
}
void SplitAtPlayhead();
virtual void LoadData(const Info &info) override;
virtual Info SaveData() const override;
virtual void SelectAll() override;
virtual void DeselectAll() override;
virtual void RippleToIn() override;
virtual void RippleToOut() override;
virtual void EditToIn() override;
virtual void EditToOut() override;
virtual void DeleteSelected() override;
virtual void RippleDelete() override;
virtual void IncreaseTrackHeight() override;
virtual void DecreaseTrackHeight() override;
virtual void ToggleLinks() override;
virtual void PasteInsert() override;
virtual void DeleteInToOut() override;
virtual void RippleDeleteInToOut() override;
virtual void ToggleSelectedEnabled() override;
virtual void SetColorLabel(int index) override;
virtual void NudgeLeft() override;
virtual void NudgeRight() override;
virtual void MoveInToPlayhead() override;
virtual void MoveOutToPlayhead() override;
virtual void RenameSelected() override;
void AddDefaultTransitionsToSelected()
{
timeline_widget()->AddDefaultTransitionsToSelected();
}
void ShowSpeedDurationDialogForSelectedClips()
{
timeline_widget()->ShowSpeedDurationDialogForSelectedClips();
}
void NestSelectedClips()
{
timeline_widget()->NestSelectedClips();
}
void InsertFootageAtPlayhead(const QVector<ViewerOutput *> &footage);
void OverwriteFootageAtPlayhead(const QVector<ViewerOutput *> &footage);
const QVector<Block*>& GetSelectedBlocks() const
{
return timeline_widget()->GetSelectedBlocks();
}
Sequence *GetSequence() const
{
return dynamic_cast<Sequence*>(GetConnectedViewer());
}
protected:
virtual void Retranslate() override;
signals:
void BlockSelectionChanged(const QVector<Block*>& selected_blocks);
void RequestCaptureStart(const TimeRange &time, const Track::Reference &track);
void RevealViewerInProject(ViewerOutput *r);
void RevealViewerInFootageViewer(ViewerOutput *r, const TimeRange &range);
};
}
#endif // TIMELINE_PANEL_H
| 3,212
|
C++
|
.h
| 87
| 33.632184
| 81
| 0.784925
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,446
|
historypanel.h
|
olive-editor_olive/app/panel/history/historypanel.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2023 Olive Studios LLC
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 HISTORYPANEL_H
#define HISTORYPANEL_H
#include "panel/panel.h"
namespace olive {
class HistoryPanel : public PanelWidget
{
Q_OBJECT
public:
HistoryPanel();
protected:
virtual void Retranslate() override;
};
}
#endif // HISTORYPANEL_H
| 974
|
C++
|
.h
| 28
| 32.25
| 71
| 0.778135
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,447
|
curve.h
|
olive-editor_olive/app/panel/curve/curve.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 CURVEPANEL_H
#define CURVEPANEL_H
#include "panel/timebased/timebased.h"
#include "widget/curvewidget/curvewidget.h"
namespace olive {
class CurvePanel : public TimeBasedPanel
{
Q_OBJECT
public:
CurvePanel();
virtual void DeleteSelected() override;
virtual void SelectAll() override;
virtual void DeselectAll() override;
public slots:
void SetNode(Node *node)
{
// Convert single pointer to either an empty vector or a vector of one
QVector<Node *> nodes;
if (node) {
nodes.append(node);
}
SetNodes(nodes);
}
void SetNodes(const QVector<Node *> &nodes);
virtual void IncreaseTrackHeight() override;
virtual void DecreaseTrackHeight() override;
protected:
virtual void Retranslate() override;
};
}
#endif // CURVEPANEL_H
| 1,506
|
C++
|
.h
| 45
| 30.333333
| 74
| 0.762335
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,448
|
taskmanager.h
|
olive-editor_olive/app/panel/taskmanager/taskmanager.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 TASKMANAGER_PANEL_H
#define TASKMANAGER_PANEL_H
#include "panel/panel.h"
#include "widget/taskview/taskview.h"
namespace olive {
/**
* @brief A PanelWidget wrapper around a TaskView widget
*/
class TaskManagerPanel : public PanelWidget
{
Q_OBJECT
public:
TaskManagerPanel();
private:
virtual void Retranslate() override;
TaskView* view_;
};
}
#endif // TASKMANAGER_H
| 1,104
|
C++
|
.h
| 33
| 31.030303
| 71
| 0.775047
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,449
|
tool.h
|
olive-editor_olive/app/panel/tool/tool.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 TOOL_PANEL_H
#define TOOL_PANEL_H
#include "panel/panel.h"
namespace olive {
/**
* @brief A PanelWidget wrapper around a Toolbar
*/
class ToolPanel : public PanelWidget
{
Q_OBJECT
public:
ToolPanel();
private:
virtual void Retranslate() override;
};
}
#endif // TOOL_PANEL_H
| 1,010
|
C++
|
.h
| 31
| 30.129032
| 71
| 0.767081
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,450
|
node.h
|
olive-editor_olive/app/panel/node/node.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 NODEPANEL_H
#define NODEPANEL_H
#include "panel/panel.h"
#include "widget/nodeview/nodewidget.h"
namespace olive {
/**
* @brief A PanelWidget wrapper around a NodeView
*/
class NodePanel : public PanelWidget
{
Q_OBJECT
public:
NodePanel();
NodeWidget *GetNodeWidget() const
{
return node_widget_;
}
const QVector<Node*> &GetContexts() const { return node_widget_->view()->GetContexts(); }
bool IsGroupOverlay() const { return node_widget_->view()->IsGroupOverlay(); }
void SetContexts(const QVector<Node*> &nodes)
{
node_widget_->SetContexts(nodes);
}
void CloseContextsBelongingToProject(Project *project)
{
node_widget_->view()->CloseContextsBelongingToProject(project);
}
virtual void SelectAll() override
{
node_widget_->view()->SelectAll();
}
virtual void DeselectAll() override
{
node_widget_->view()->DeselectAll();
}
virtual void DeleteSelected() override
{
node_widget_->view()->DeleteSelected();
}
virtual void CutSelected() override
{
node_widget_->view()->CopySelected(true);
}
virtual void CopySelected() override
{
node_widget_->view()->CopySelected(false);
}
virtual void Paste() override
{
node_widget_->view()->Paste();
}
virtual void Duplicate() override
{
node_widget_->view()->Duplicate();
}
virtual void SetColorLabel(int index) override
{
node_widget_->view()->SetColorLabel(index);
}
virtual void ZoomIn() override
{
node_widget_->view()->ZoomIn();
}
virtual void ZoomOut() override
{
node_widget_->view()->ZoomOut();
}
virtual void RenameSelected() override
{
node_widget_->view()->LabelSelectedNodes();
}
public slots:
void Select(const QVector<Node::ContextPair> &p)
{
node_widget_->view()->Select(p, true);
}
signals:
void NodesSelected(const QVector<Node*>& nodes);
void NodesDeselected(const QVector<Node*>& nodes);
void NodeSelectionChanged(const QVector<Node*>& nodes);
void NodeSelectionChangedWithContexts(const QVector<Node::ContextPair>& nodes);
void NodeGroupOpened(NodeGroup *group);
void NodeGroupClosed();
private:
virtual void Retranslate() override
{
SetTitle(tr("Node Editor"));
}
NodeWidget *node_widget_;
};
}
#endif // NODEPANEL_H
| 3,010
|
C++
|
.h
| 106
| 25.09434
| 91
| 0.724198
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,451
|
timebased.h
|
olive-editor_olive/app/panel/timebased/timebased.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 TIMEBASEDPANEL_H
#define TIMEBASEDPANEL_H
#include "panel/panel.h"
#include "widget/timebased/timebasedwidget.h"
namespace olive {
class TimeBasedPanel : public PanelWidget
{
Q_OBJECT
public:
TimeBasedPanel(const QString& object_name);
virtual ~TimeBasedPanel() override;
void ConnectViewerNode(ViewerOutput *node);
void DisconnectViewerNode()
{
ConnectViewerNode(nullptr);
}
// Get the timebase of this panels widget
const rational& timebase();
ViewerOutput *GetConnectedViewer() const
{
return widget_->GetConnectedNode();
}
TimeRuler* ruler() const
{
return widget_->ruler();
}
virtual void ZoomIn() override;
virtual void ZoomOut() override;
virtual void GoToStart() override;
virtual void PrevFrame() override;
virtual void NextFrame() override;
virtual void GoToEnd() override;
virtual void GoToPrevCut() override;
virtual void GoToNextCut() override;
virtual void PlayPause() override;
virtual void PlayInToOut() override;
virtual void ShuttleLeft() override;
virtual void ShuttleStop() override;
virtual void ShuttleRight() override;
virtual void SetIn() override;
virtual void SetOut() override;
virtual void ResetIn() override;
virtual void ResetOut() override;
virtual void ClearInOut() override;
virtual void SetMarker() override;
virtual void ToggleShowAll() override;
virtual void GoToIn() override;
virtual void GoToOut() override;
virtual void DeleteSelected() override;
virtual void CutSelected() override;
virtual void CopySelected() override;
virtual void Paste() override;
TimeBasedWidget* GetTimeBasedWidget() const { return widget_; }
public slots:
void SetTimebase(const rational& timebase);
signals:
void PlayPauseRequested();
void PlayInToOutRequested();
void ShuttleLeftRequested();
void ShuttleStopRequested();
void ShuttleRightRequested();
protected:
void SetTimeBasedWidget(TimeBasedWidget* widget);
virtual void Retranslate() override;
void SetShowAndRaiseOnConnect()
{
show_and_raise_on_connect_ = true;
}
private:
TimeBasedWidget* widget_;
bool show_and_raise_on_connect_;
private slots:
void ConnectedNodeChanged(ViewerOutput* old, ViewerOutput* now);
};
}
#endif // TIMEBASEDPANEL_H
| 3,016
|
C++
|
.h
| 90
| 30.188889
| 71
| 0.775183
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,452
|
multicampanel.h
|
olive-editor_olive/app/panel/multicam/multicampanel.h
|
#ifndef MULTICAMPANEL_H
#define MULTICAMPANEL_H
#include "panel/viewer/viewerbase.h"
#include "widget/multicam/multicamwidget.h"
namespace olive {
class MulticamPanel : public TimeBasedPanel
{
Q_OBJECT
public:
MulticamPanel();
MulticamWidget *GetMulticamWidget() const { return static_cast<MulticamWidget *>(GetTimeBasedWidget()); }
protected:
virtual void Retranslate() override;
};
}
#endif // MULTICAMPANEL_H
| 428
|
C++
|
.h
| 16
| 24.75
| 107
| 0.804455
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,453
|
audiomonitor.h
|
olive-editor_olive/app/panel/audiomonitor/audiomonitor.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 AUDIOMONITORPANEL_H
#define AUDIOMONITORPANEL_H
#include "panel/panel.h"
#include "widget/audiomonitor/audiomonitor.h"
namespace olive {
/**
* @brief PanelWidget wrapper around an AudioMonitor
*/
class AudioMonitorPanel : public PanelWidget
{
Q_OBJECT
public:
AudioMonitorPanel();
bool IsPlaying() const
{
return audio_monitor_->IsPlaying();
}
void SetParams(const AudioParams& params)
{
audio_monitor_->SetParams(params);
}
private:
virtual void Retranslate() override;
AudioMonitor* audio_monitor_;
};
}
#endif // AUDIOMONITORPANEL_H
| 1,296
|
C++
|
.h
| 41
| 28.902439
| 71
| 0.770783
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,454
|
table.h
|
olive-editor_olive/app/panel/table/table.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 NODETABLEPANEL_H
#define NODETABLEPANEL_H
#include "panel/timebased/timebased.h"
#include "widget/nodetableview/nodetablewidget.h"
namespace olive {
class NodeTablePanel : public TimeBasedPanel
{
Q_OBJECT
public:
NodeTablePanel();
public slots:
void SelectNodes(const QVector<Node*>& nodes)
{
static_cast<NodeTableWidget*>(GetTimeBasedWidget())->SelectNodes(nodes);
}
void DeselectNodes(const QVector<Node*>& nodes)
{
static_cast<NodeTableWidget*>(GetTimeBasedWidget())->DeselectNodes(nodes);
}
private:
virtual void Retranslate() override;
};
}
#endif // NODETABLEPANEL_H
| 1,328
|
C++
|
.h
| 38
| 32.236842
| 78
| 0.777255
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,455
|
pixelsamplerpanel.h
|
olive-editor_olive/app/panel/pixelsampler/pixelsamplerpanel.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 PIXELSAMPLERPANEL_H
#define PIXELSAMPLERPANEL_H
#include "panel/panel.h"
#include "widget/pixelsampler/pixelsampler.h"
namespace olive {
class PixelSamplerPanel : public PanelWidget
{
Q_OBJECT
public:
PixelSamplerPanel();
public slots:
void SetValues(const Color& reference, const Color& display);
private:
virtual void Retranslate() override;
ManagedPixelSamplerWidget* sampler_widget_;
};
}
#endif // PIXELSAMPLERPANEL_H
| 1,162
|
C++
|
.h
| 32
| 33.78125
| 71
| 0.788341
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,456
|
scope.h
|
olive-editor_olive/app/panel/scope/scope.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 SCOPE_PANEL_H
#define SCOPE_PANEL_H
#include <QComboBox>
#include <QStackedWidget>
#include "panel/panel.h"
#include "panel/viewer/viewerbase.h"
#include "widget/scope/histogram/histogram.h"
#include "widget/scope/waveform/waveform.h"
namespace olive {
class ScopePanel : public PanelWidget
{
Q_OBJECT
public:
enum Type {
kTypeWaveform,
kTypeHistogram,
kTypeCount
};
ScopePanel();
void SetType(Type t);
static QString TypeToName(Type t);
void SetViewerPanel(ViewerPanelBase *vp);
ViewerPanelBase *GetConnectedViewerPanel() const
{
return viewer_;
}
public slots:
void SetReferenceBuffer(TexturePtr frame);
void SetColorManager(ColorManager* manager);
protected:
virtual void Retranslate() override;
private:
Type type_;
QStackedWidget* stack_;
QComboBox* scope_type_combobox_;
WaveformScope* waveform_view_;
HistogramScope* histogram_;
ViewerPanelBase *viewer_;
};
}
#endif // SCOPE_PANEL_H
| 1,687
|
C++
|
.h
| 55
| 27.745455
| 71
| 0.774314
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,457
|
param.h
|
olive-editor_olive/app/panel/param/param.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 PARAM_H
#define PARAM_H
#include "panel/curve/curve.h"
#include "panel/timebased/timebased.h"
#include "widget/nodeparamview/nodeparamview.h"
namespace olive {
class ParamPanel : public TimeBasedPanel
{
Q_OBJECT
public:
ParamPanel();
NodeParamView *GetParamView() const
{
return static_cast<NodeParamView *>(GetTimeBasedWidget());
}
const QVector<Node*> &GetContexts() const
{
return GetParamView()->GetContexts();
}
void CloseContextsBelongingToProject(Project *p)
{
GetParamView()->CloseContextsBelongingToProject(p);
}
public slots:
void SetSelectedNodes(const QVector<Node::ContextPair> &nodes)
{
GetParamView()->SetSelectedNodes(nodes, false);
}
virtual void DeleteSelected() override;
virtual void SelectAll() override;
virtual void DeselectAll() override;
void SetContexts(const QVector<Node*> &contexts);
signals:
void FocusedNodeChanged(Node* n);
void SelectedNodesChanged(const QVector<Node::ContextPair> &nodes);
void RequestViewerToStartEditingText();
protected:
virtual void Retranslate() override;
};
}
#endif // PARAM_H
| 1,833
|
C++
|
.h
| 55
| 30.363636
| 71
| 0.77252
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,458
|
footagemanagementpanel.h
|
olive-editor_olive/app/panel/project/footagemanagementpanel.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 FOOTAGEMANAGEMENTPANEL_H
#define FOOTAGEMANAGEMENTPANEL_H
#include <QList>
#include "node/project/footage/footage.h"
namespace olive {
class FootageManagementPanel {
public:
virtual QVector<ViewerOutput *> GetSelectedFootage() const = 0;
};
}
#endif // FOOTAGEMANAGEMENTPANEL_H
| 1,006
|
C++
|
.h
| 25
| 37.72
| 71
| 0.786378
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,459
|
project.h
|
olive-editor_olive/app/panel/project/project.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 PROJECT_PANEL_H
#define PROJECT_PANEL_H
#include "footagemanagementpanel.h"
#include "node/project.h"
#include "panel/panel.h"
#include "widget/projectexplorer/projectexplorer.h"
namespace olive {
/**
* @brief A PanelWidget wrapper around a ProjectExplorer and a ProjectToolbar
*/
class ProjectPanel : public PanelWidget, public FootageManagementPanel
{
Q_OBJECT
public:
ProjectPanel(const QString &unique_name);
Project* project() const;
void set_project(Project* p);
Folder *get_root() const;
void set_root(Folder* item);
QVector<Node *> SelectedItems() const;
Folder* GetSelectedFolder() const;
virtual QVector<ViewerOutput *> GetSelectedFootage() const override;
ProjectViewModel* model() const;
bool SelectItem(Node *n, bool deselect_all_first = true)
{
return explorer_->SelectItem(n, deselect_all_first);
}
virtual void SelectAll() override;
virtual void DeselectAll() override;
virtual void DeleteSelected() override;
virtual void RenameSelected() override;
public slots:
void Edit(Node *item);
signals:
void ProjectNameChanged();
void SelectionChanged(const QVector<Node *> &selected);
private:
virtual void Retranslate() override;
ProjectExplorer* explorer_;
private slots:
void ItemDoubleClickSlot(Node *item);
void ShowNewMenu();
void UpdateSubtitle();
void SaveConnectedProject();
};
}
#endif // PROJECT_PANEL_H
| 2,129
|
C++
|
.h
| 61
| 32.032787
| 77
| 0.774067
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,460
|
sequenceviewer.h
|
olive-editor_olive/app/panel/sequenceviewer/sequenceviewer.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 SEQUENCEVIEWERPANEL_H
#define SEQUENCEVIEWERPANEL_H
#include "panel/viewer/viewer.h"
namespace olive {
class SequenceViewerPanel : public ViewerPanel
{
Q_OBJECT
public:
SequenceViewerPanel();
public slots:
void StartCapture(const TimeRange &time, const Track::Reference &track);
protected:
virtual void Retranslate() override;
};
}
#endif // SEQUENCEVIEWERPANEL_H
| 1,100
|
C++
|
.h
| 30
| 34.133333
| 74
| 0.786932
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,461
|
footageviewer.h
|
olive-editor_olive/app/panel/footageviewer/footageviewer.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 FOOTAGE_VIEWER_PANEL_H
#define FOOTAGE_VIEWER_PANEL_H
#include <QOpenGLFunctions>
#include "panel/viewer/viewerbase.h"
#include "panel/project/footagemanagementpanel.h"
#include "widget/viewer/footageviewer.h"
namespace olive {
/**
* @brief Dockable wrapper around a ViewerWidget
*/
class FootageViewerPanel : public ViewerPanelBase, public FootageManagementPanel {
Q_OBJECT
public:
FootageViewerPanel();
void OverrideWorkArea(const TimeRange &r);
FootageViewerWidget *GetFootageViewerWidget() const
{
return static_cast<FootageViewerWidget*>(GetTimeBasedWidget());
}
virtual QVector<ViewerOutput *> GetSelectedFootage() const override;
protected:
virtual void Retranslate() override;
};
}
#endif // FOOTAGE_VIEWER_PANEL_H
| 1,476
|
C++
|
.h
| 39
| 35.230769
| 82
| 0.789437
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,462
|
decibel.h
|
olive-editor_olive/app/common/decibel.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 DECIBEL_H
#define DECIBEL_H
#include <QtGlobal>
#include <cmath>
//#define ALLOW_RETURNING_INFINITY
namespace olive {
class Decibel
{
public:
// In basically all circumstances, this should calculate to 0.0 linear
static constexpr double MINIMUM = -200.0;
static double fromLinear(double linear)
{
double v = double(20.0) * std::log10(linear);
#ifndef ALLOW_RETURNING_INFINITY
if (std::isinf(v)) {
return MINIMUM;
}
#endif
return v;
}
static double toLinear(double decibel)
{
double to_linear = std::pow(double(10.0), decibel / double(20.0));
// Minimum threshold that we figure is close enough to 0 that we may as well just return 0
if (to_linear < 0.000001) {
return 0;
} else {
return to_linear;
}
}
static double fromLogarithmic(double logarithmic)
{
if (logarithmic < 0.001)
#ifdef ALLOW_RETURNING_INFINITY
return std::numeric_limits<double>::infinity();
#else
return MINIMUM;
#endif
else if (logarithmic > 0.99)
return 0;
else
return 20.0 * std::log10(-std::log(1 - logarithmic) / LOG100);
}
static double toLogarithmic(double decibel)
{
if (qFuzzyIsNull(decibel)) {
return 1;
} else {
return 1 - std::exp(-std::pow(10.0, decibel / 20.0) * LOG100);
}
}
static double LinearToLogarithmic(double linear)
{
return 1 - std::exp(-linear * LOG100);
}
static double LogarithmicToLinear(double logarithmic)
{
if (logarithmic > 0.99) {
return 1;
} else {
return -std::log(1 - logarithmic) / LOG100;
}
}
private:
static constexpr double LOG100 = 4.60517018599;
};
}
#endif // DECIBEL_H
| 2,400
|
C++
|
.h
| 83
| 25.156627
| 94
| 0.702526
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,463
|
html.h
|
olive-editor_olive/app/common/html.h
|
#ifndef HTML_H
#define HTML_H
#include <QTextDocument>
#include <QTextFragment>
#include <QXmlStreamReader>
#include <QXmlStreamWriter>
namespace olive {
/**
* @brief Functions for converting HTML to QTextDocument and vice versa
*
* Qt does contain its own functions for this, however they have some limitations. Some things that
* we want to support (e.g. kerning/spacing and font stretch) are not implemented in Qt's
* QTextHtmlExporter and QTextHtmlParser. Additionally, since these functions are not part of Qt's
* public API, and make many references to other parts of Qt that are not part of the public API,
* there is no way to subclass or extend their functionality without forking Qt as a whole.
*
* Therefore, it became necessary to write a custom class for the conversion so that we can
* ensure support for the features we need.
*
* If someone wishes to extend this class for more feature support, feel free to open a pull
* request. But this is NOT intended to be an exhaustive HTML implementation, and is primarily
* designed to store rich text in a standard format for the purpose of text formatting for video.
*/
class Html {
public:
static QString DocToHtml(const QTextDocument *doc);
static void HtmlToDoc(QTextDocument *doc, const QString &html);
private:
static void WriteBlock(QXmlStreamWriter *writer, const QTextBlock &block);
static void WriteFragment(QXmlStreamWriter *writer, const QTextFragment &fragment);
static void WriteCSSProperty(QString *style, const QString &key, const QStringList &value);
static void WriteCSSProperty(QString *style, const QString &key, const QString &value)
{
WriteCSSProperty(style, key, QStringList({value}));
}
static void WriteCharFormat(QString *style, const QTextCharFormat &fmt);
static QTextCharFormat ReadCharFormat(const QXmlStreamAttributes &attributes);
static QTextBlockFormat ReadBlockFormat(const QXmlStreamAttributes &attributes);
static void AppendStringAutoSpace(QString *s, const QString &append);
static QMap<QString, QStringList> GetCSSFromStyle(const QString &s);
static const QVector<QString> kBlockTags;
};
}
#endif // HTML_H
| 2,168
|
C++
|
.h
| 44
| 46.840909
| 99
| 0.794592
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,464
|
crashpadutils.h
|
olive-editor_olive/app/common/crashpadutils.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 CRASHPADUTILS_H
#define CRASHPADUTILS_H
#include <client/crashpad_client.h>
// Copied from base::FilePath to match its macro
#if BUILDFLAG(IS_POSIX)
// On most platforms, native pathnames are char arrays, and the encoding
// may or may not be specified. On Mac OS X, native pathnames are encoded
// in UTF-8.
#define QSTRING_TO_BASE_STRING(x) x.toStdString()
#define BASE_STRING_TO_QSTRING(x) QString::fromStdString(x)
#elif BUILDFLAG(IS_WIN)
// On Windows, for Unicode-aware applications, native pathnames are wchar_t
// arrays encoded in UTF-16.
#define QSTRING_TO_BASE_STRING(x) x.toStdWString()
#define BASE_STRING_TO_QSTRING(x) QString::fromStdWString(x)
#endif // BUILDFLAG(IS_WIN)
#endif // CRASHPADUTILS_H
| 1,439
|
C++
|
.h
| 31
| 44.354839
| 75
| 0.774124
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,465
|
util.h
|
olive-editor_olive/app/common/util.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 UTIL_H
#define UTIL_H
template <typename T>
inline T mid(T a, T b)
{
return (a + b) * 0.5;
}
#endif // UTIL_H
| 834
|
C++
|
.h
| 22
| 35.363636
| 71
| 0.754975
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,466
|
tohex.h
|
olive-editor_olive/app/common/tohex.h
|
#ifndef TOHEX_H
#define TOHEX_H
#include <QString>
#include <QtGlobal>
#include "common/define.h"
namespace olive {
inline QString ToHex(quint64 t) {
return QStringLiteral("%1").arg(t, 0, 16);
}
}
#endif // TOHEX_H
| 223
|
C++
|
.h
| 11
| 18.545455
| 44
| 0.737864
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,467
|
threadsafemap.h
|
olive-editor_olive/app/common/threadsafemap.h
|
#ifndef THREADSAFEMAP_H
#define THREADSAFEMAP_H
#include <QMap>
#include <QMutex>
template <typename K, typename V>
class ThreadSafeMap
{
public:
ThreadSafeMap() = default;
void insert(K key, V value)
{
mutex_.lock();
map_.insert(key, value);
mutex_.unlock();
}
private:
QMutex mutex_;
QMap<K, V> map_;
};
#endif // THREADSAFEMAP_H
| 363
|
C++
|
.h
| 20
| 15.6
| 33
| 0.705357
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,468
|
ratiodialog.h
|
olive-editor_olive/app/common/ratiodialog.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 RATIODIALOG_H
#define RATIODIALOG_H
#include <QInputDialog>
namespace olive {
double GetFloatRatioFromUser(QWidget* parent,
const QString& title,
bool* ok_in);
}
#endif // RATIODIALOG_H
| 969
|
C++
|
.h
| 23
| 37.086957
| 71
| 0.73262
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,469
|
ffmpegutils.h
|
olive-editor_olive/app/common/ffmpegutils.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 FFMPEGABSTRACTION_H
#define FFMPEGABSTRACTION_H
extern "C" {
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libswscale/swscale.h>
}
#include <olive/core/core.h>
#include "render/videoparams.h"
namespace olive {
using namespace core;
class FFmpegUtils {
public:
/**
* @brief Returns an AVPixelFormat that can be used to convert a frame to a data type Olive supports with minimal data loss
*/
static AVPixelFormat GetCompatiblePixelFormat(const AVPixelFormat& pix_fmt, PixelFormat maximum = PixelFormat::INVALID);
/**
* @brief Returns a native pixel format that can be used to convert from a native frame to an AVFrame with minimal data loss
*/
static PixelFormat GetCompatiblePixelFormat(const PixelFormat& pix_fmt);
/**
* @brief Returns an FFmpeg pixel format for a given native pixel format
*/
static AVPixelFormat GetFFmpegPixelFormat(const PixelFormat& pix_fmt, int channel_layout);
/**
* @brief Returns a native sample format type for a given AVSampleFormat
*/
static SampleFormat GetNativeSampleFormat(const AVSampleFormat& smp_fmt);
/**
* @brief Returns an FFmpeg sample format type for a given native type
*/
static AVSampleFormat GetFFmpegSampleFormat(const SampleFormat &smp_fmt);
/**
* @brief Returns an SWS_CS_* macro from an AVColorSpace enum member
*
* Why aren't these the same thing anyway? And for that matter, why doesn't FFmpeg provide a
* convenience function to do this conversion for us? Who knows, but here we are.
*/
static int GetSwsColorspaceFromAVColorSpace(AVColorSpace cs);
/**
* @brief Convert "JPEG"/full-range colorspace to its regular counterpart
*
* "JPEG "spaces are deprecated in favor of the regular space and setting `color_range`. For the
* time being, FFmpeg still uses these JPEG spaces, so for simplicity (since we *are* color_range
* aware), we use this function.
*/
static AVPixelFormat ConvertJPEGSpaceToRegularSpace(AVPixelFormat f);
};
using AVFramePtr = std::shared_ptr<AVFrame>;
inline AVFramePtr CreateAVFramePtr(AVFrame *f)
{
return std::shared_ptr<AVFrame>(f, [](AVFrame *g){ av_frame_free(&g); });
}
inline AVFramePtr CreateAVFramePtr()
{
return CreateAVFramePtr(av_frame_alloc());
}
}
#endif // FFMPEGABSTRACTION_H
| 3,027
|
C++
|
.h
| 74
| 38.013514
| 126
| 0.764325
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,470
|
define.h
|
olive-editor_olive/app/common/define.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 OLIVECOMMONDEFINE_H
#define OLIVECOMMONDEFINE_H
namespace olive {
/// The minimum size an icon in ProjectExplorer can be
const int kProjectIconSizeMinimum = 16;
/// The maximum size an icon in ProjectExplorer can be
const int kProjectIconSizeMaximum = 256;
/// The default size an icon in ProjectExplorer can be
const int kProjectIconSizeDefault = 64;
const int kBytesInGigabyte = 1073741824;
}
#define MACRO_NAME_AS_STR(s) #s
#define MACRO_VAL_AS_STR(s) MACRO_NAME_AS_STR(s)
#define OLIVE_NS_CONST_ARG(x, y) QArgument<const olive::x>("const " MACRO_VAL_AS_STR(olive) "::" #x, y)
#define OLIVE_NS_ARG(x, y) QArgument<olive::x>(MACRO_VAL_AS_STR(olive) "::" #x, y)
#define OLIVE_NS_RETURN_ARG(x, y) QReturnArgument<olive::x>(MACRO_VAL_AS_STR(olive) "::" #x, y)
/**
* Copy/move deleters. Similar to Q_DISABLE_COPY_MOVE, et al. but those functions are not present in Qt < 5.13 so we
* use our own functions for portability.
*/
#define DISABLE_COPY(Class) \
Class(const Class &) = delete;\
Class &operator=(const Class &) = delete;
#define DISABLE_MOVE(Class) \
Class(Class &&) = delete; \
Class &operator=(Class &&) = delete;
#define DISABLE_COPY_MOVE(Class) \
DISABLE_COPY(Class) \
DISABLE_MOVE(Class)
#endif // OLIVECOMMONDEFINE_H
| 1,977
|
C++
|
.h
| 44
| 42.613636
| 116
| 0.748171
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,471
|
range.h
|
olive-editor_olive/app/common/range.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 RANGE_H
#define RANGE_H
template <typename T>
bool InRange(T a, T b, T range)
{
return (a >= b - range && a <= b + range);
}
#endif // RANGE_H
| 867
|
C++
|
.h
| 22
| 36.863636
| 71
| 0.749104
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,472
|
commandlineparser.h
|
olive-editor_olive/app/common/commandlineparser.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 COMMANDLINEPARSER_H
#define COMMANDLINEPARSER_H
#include <QStringList>
#include <QVector>
#include "common/define.h"
/**
* @brief Command-line argument parser
*
* You may be wondering why we don't use QCommandLineParser instead of a custom implementation like
* this. The reason why is because QCommandLineParser requires a QApplication object of some kind
* to already have been created before it can parse anything, but we need to be able to control
* whether a QApplication (GUI-mode) or a QCoreApplication (CLI-mode) is created which is set by
* the user as a command line argument. Therefore we needed a custom implementation that could
* parse arguments without the need for a Q(Core)Application to be present already.
*/
class CommandLineParser
{
public:
~CommandLineParser();
DISABLE_COPY_MOVE(CommandLineParser)
class PositionalArgument
{
public:
PositionalArgument() = default;
const QString& GetSetting() const
{
return setting_;
}
void SetSetting(const QString& s)
{
setting_ = s;
}
private:
QString setting_;
};
class Option : public PositionalArgument {
public:
Option()
{
is_set_ = false;
}
bool IsSet() const
{
return is_set_;
}
void Set()
{
is_set_ = true;
}
private:
bool is_set_;
};
CommandLineParser() = default;
const Option* AddOption(const QStringList& strings, const QString& description, bool takes_arg = false, const QString& arg_placeholder = QString(), bool hidden = false);
const PositionalArgument* AddPositionalArgument(const QString& name, const QString& description, bool required = false);
void Process(const QVector<QString> &argv);
void PrintHelp(const char* filename);
private:
struct KnownOption {
QStringList args;
QString description;
Option* option;
bool takes_arg;
QString arg_placeholder;
bool hidden;
};
struct KnownPositionalArgument {
QString name;
QString description;
PositionalArgument* option;
bool required;
};
QVector<KnownOption> options_;
QVector<KnownPositionalArgument> positional_args_;
};
#endif // COMMANDLINEPARSER_H
| 2,917
|
C++
|
.h
| 90
| 28.633333
| 171
| 0.741416
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,473
|
crashpadinterface.h
|
olive-editor_olive/app/common/crashpadinterface.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 CRASHPAD_INTERFACE_H
#define CRASHPAD_INTERFACE_H
#ifdef USE_CRASHPAD
#include <client/crash_report_database.h>
#include <client/settings.h>
bool InitializeCrashpad();
#endif // USE_CRASHPAD
#endif // CRASHPAD_INTERFACE_H
| 947
|
C++
|
.h
| 22
| 40.454545
| 71
| 0.781182
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,474
|
autoscroll.h
|
olive-editor_olive/app/common/autoscroll.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 AUTOSCROLL_H
#define AUTOSCROLL_H
#include "common/define.h"
namespace olive {
class AutoScroll {
public:
enum Method {
kNone,
kPage,
kSmooth
};
};
}
#endif // AUTOSCROLL_H
| 914
|
C++
|
.h
| 28
| 29.821429
| 71
| 0.761143
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,475
|
cancelableobject.h
|
olive-editor_olive/app/common/cancelableobject.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 CANCELABLEOBJECT_H
#define CANCELABLEOBJECT_H
#include "common/define.h"
#include "render/cancelatom.h"
namespace olive {
class CancelableObject {
public:
CancelableObject()
{
}
void Cancel()
{
cancel_.Cancel();
CancelEvent();
}
CancelAtom *GetCancelAtom()
{
return &cancel_;
}
bool IsCancelled()
{
return cancel_.IsCancelled();
}
protected:
virtual void CancelEvent(){}
private:
CancelAtom cancel_;
};
}
#endif // CANCELABLEOBJECT_H
| 1,209
|
C++
|
.h
| 44
| 24.545455
| 71
| 0.751742
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,476
|
oiioutils.h
|
olive-editor_olive/app/common/oiioutils.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 OIIOUTILS_H
#define OIIOUTILS_H
#include <OpenImageIO/imagebuf.h>
#include <OpenImageIO/typedesc.h>
#include "codec/frame.h"
#include "render/videoparams.h"
namespace olive {
class OIIOUtils {
public:
static OIIO::TypeDesc::BASETYPE GetOIIOBaseTypeFromFormat(PixelFormat format)
{
switch (format) {
case PixelFormat::U8:
return OIIO::TypeDesc::UINT8;
case PixelFormat::U16:
return OIIO::TypeDesc::UINT16;
case PixelFormat::F16:
return OIIO::TypeDesc::HALF;
case PixelFormat::F32:
return OIIO::TypeDesc::FLOAT;
case PixelFormat::INVALID:
case PixelFormat::COUNT:
break;
}
return OIIO::TypeDesc::UNKNOWN;
}
static void FrameToBuffer(const Frame *frame, OIIO::ImageBuf* buf);
static void BufferToFrame(OIIO::ImageBuf* buf, Frame* frame);
static PixelFormat GetFormatFromOIIOBasetype(OIIO::TypeDesc::BASETYPE type);
static rational GetPixelAspectRatioFromOIIO(const OIIO::ImageSpec& spec);
};
}
#endif // OIIOUTILS_H
| 1,725
|
C++
|
.h
| 47
| 33.106383
| 79
| 0.757229
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,477
|
filefunctions.h
|
olive-editor_olive/app/common/filefunctions.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 FILEFUNCTIONS_H
#define FILEFUNCTIONS_H
#include <QDir>
#include <QString>
#include "common/define.h"
namespace olive {
/**
* @brief A collection of static file and directory functions
*/
class FileFunctions {
public:
/**
* @brief Returns true if the application is running in portable mode
*
* In portable mode, any persistent configuration files should be made in a path relative to the application rather
* than in the user's home folder.
*/
static bool IsPortable();
static QString GetUniqueFileIdentifier(const QString& filename);
static QString GetConfigurationLocation();
static QString GetApplicationPath();
static QString GetTempFilePath();
static bool CanCopyDirectoryWithoutOverwriting(const QString& source, const QString& dest);
static void CopyDirectory(const QString& source, const QString& dest, bool overwrite = false);
static bool DirectoryIsValid(const QDir& dir, bool try_to_create_if_not_exists = true);
/**
* @brief Ensures a given filename has a certain extension
*
* Checks if the filename has the extension provided and appends it if not. The extension is
* checked case-insensitive. The extension should be provided with no dot (e.g. "ove" rather than
* ".ove").
* @return The filename provided either untouched or with the extension appended to it.
*/
static QString EnsureFilenameExtension(QString fn, const QString& extension);
static QString ReadFileAsString(const QString& filename);
/**
* @brief Returns a temporary filename that can be used while writing rather than the original
*
* If overwriting a file, it's safest to write to a new file first and then only replace it at
* the end so that if the program crashes or the user cancels the save half way through, the
* original file is still intact.
*
* This function returns a slight variant of the filename provided that's guaranteed to not exist
* and therefore won't overwrite anything important.
*/
static QString GetSafeTemporaryFilename(const QString& original);
/**
* @brief Renames a file from `from` to `to`, deleting `to` if such a file already exists first
*/
static bool RenameFileAllowOverwrite(const QString& from, const QString& to);
inline static QString GetFormattedExecutableForPlatform(QString unformatted)
{
#ifdef Q_OS_WINDOWS
unformatted.append(QStringLiteral(".exe"));
#endif
return unformatted;
}
static QString GetAutoRecoveryRoot();
};
}
#endif // FILEFUNCTIONS_H
| 3,238
|
C++
|
.h
| 75
| 39.866667
| 117
| 0.765401
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,478
|
debug.h
|
olive-editor_olive/app/common/debug.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 DEBUG_H
#define DEBUG_H
#include <QDebug>
#include "common/define.h"
namespace olive {
void DebugHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg);
}
#endif // DEBUG_H
| 923
|
C++
|
.h
| 22
| 39.318182
| 89
| 0.776153
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,479
|
qtutils.h
|
olive-editor_olive/app/common/qtutils.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 QTVERSIONABSTRACTION_H
#define QTVERSIONABSTRACTION_H
#include <olive/core/core.h>
#include <QComboBox>
#include <QDateTime>
#include <QFileInfo>
#include <QFontMetrics>
#include <QFrame>
#include <QMessageBox>
namespace olive {
class QtUtils {
public:
/**
* @brief Retrieves the width of a string according to certain QFontMetrics
*
* QFontMetrics::width() has been deprecatd in favor of QFontMetrics::horizontalAdvance(), but the
* latter was only introduced in 5.11+. This function wraps the latter for 5.11+ and the former for
* earlier.
*/
static int QFontMetricsWidth(QFontMetrics fm, const QString& s);
static QFrame* CreateHorizontalLine();
static QFrame* CreateVerticalLine();
static int MsgBox(QWidget *parent, QMessageBox::Icon icon, const QString& title, const QString& message, QMessageBox::StandardButtons buttons = QMessageBox::Ok);
static QDateTime GetCreationDate(const QFileInfo &info);
static QString GetFormattedDateTime(const QDateTime &dt);
static QStringList WordWrapString(const QString &s, const QFontMetrics &fm, int bounding_width);
static Qt::KeyboardModifiers FlipControlAndShiftModifiers(Qt::KeyboardModifiers e);
static void SetComboBoxData(QComboBox *cb, int data);
static void SetComboBoxData(QComboBox *cb, const QString &data);
template <typename T>
static T *GetParentOfType(const QObject *child)
{
QObject *t = child->parent();
while (t) {
if (T *p = dynamic_cast<T*>(t)) {
return p;
}
t = t->parent();
}
return nullptr;
}
static QColor toQColor(const core::Color &c);
/**
* @brief Convert a pointer to a value that can be sent between NodeParams
*/
static QVariant PtrToValue(void* ptr)
{
return reinterpret_cast<quintptr>(ptr);
}
/**
* @brief Convert a NodeParam value to a pointer of any kind
*/
template<class T>
static T* ValueToPtr(const QVariant &ptr)
{
return reinterpret_cast<T*>(ptr.value<quintptr>());
}
};
namespace core {
uint qHash(const core::rational& r, uint seed = 0);
uint qHash(const core::TimeRange& r, uint seed = 0);
}
}
Q_DECLARE_METATYPE(olive::core::rational)
Q_DECLARE_METATYPE(olive::core::Color)
Q_DECLARE_METATYPE(olive::core::TimeRange)
Q_DECLARE_METATYPE(olive::core::Bezier)
Q_DECLARE_METATYPE(olive::core::AudioParams)
Q_DECLARE_METATYPE(olive::core::SampleBuffer)
#endif // QTVERSIONABSTRACTION_H
| 3,143
|
C++
|
.h
| 84
| 34.22619
| 163
| 0.750413
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,480
|
otioutils.h
|
olive-editor_olive/app/common/otioutils.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive 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 OTIOUTILS_H
#define OTIOUTILS_H
#ifdef USE_OTIO
#include <opentimelineio/version.h>
namespace OTIO = opentimelineio::OPENTIMELINEIO_VERSION;
#endif
#endif // OTIOUTILS
| 890
|
C++
|
.h
| 21
| 39.857143
| 71
| 0.782811
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,481
|
xmlutils.h
|
olive-editor_olive/app/common/xmlutils.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 XMLREADLOOP_H
#define XMLREADLOOP_H
#include <QXmlStreamReader>
#include "node/param.h"
#include "render/cancelatom.h"
#include "undo/undocommand.h"
namespace olive {
class Block;
class Node;
class NodeInput;
class NodeGroup;
#define XMLAttributeLoop(reader, item) \
foreach (const QXmlStreamAttribute& item, reader->attributes())
/**
* @brief Workaround for QXmlStreamReader::readNextStartElement not detecting the end of a document
*
* Since Qt's default function doesn't exit at the end of the document, it ends up consistently
* throwing a "premature end of document" error. We have our own function here that does essentially
* the same thing but fixes that issue.
*
* See also: https://stackoverflow.com/questions/46346450/qt-qxmlstreamreader-always-returns-premature-end-of-document-error
*/
bool XMLReadNextStartElement(QXmlStreamReader* reader, CancelAtom *cancel_atom = nullptr);
}
#endif // XMLREADLOOP_H
| 1,654
|
C++
|
.h
| 39
| 40.179487
| 124
| 0.788257
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,482
|
channellayout.h
|
olive-editor_olive/app/common/channellayout.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 CHANNELLAYOUT_H
#define CHANNELLAYOUT_H
/**
* Channel Layouts header
*
* We don't do much here at the moment, audio is a much simpler beast than video nowadays and FFmpeg seems to cover it
* fairly well.
*/
extern "C" {
#include <libavcodec/avcodec.h>
}
#endif // CHANNELLAYOUT_H
| 1,008
|
C++
|
.h
| 26
| 36.307692
| 118
| 0.766701
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,483
|
jobtime.h
|
olive-editor_olive/app/common/jobtime.h
|
#ifndef JOBTIME_H
#define JOBTIME_H
#include <QDebug>
#include <stdint.h>
namespace olive {
class JobTime
{
public:
JobTime();
void Acquire();
uint64_t value() const
{
return value_;
}
bool operator==(const JobTime &rhs) const
{
return value_ == rhs.value_;
}
bool operator!=(const JobTime &rhs) const
{
return value_ != rhs.value_;
}
bool operator<(const JobTime &rhs) const
{
return value_ < rhs.value_;
}
bool operator>(const JobTime &rhs) const
{
return value_ > rhs.value_;
}
bool operator<=(const JobTime &rhs) const
{
return value_ <= rhs.value_;
}
bool operator>=(const JobTime &rhs) const
{
return value_ >= rhs.value_;
}
private:
uint64_t value_;
};
}
QDebug operator<<(QDebug debug, const olive::JobTime& r);
Q_DECLARE_METATYPE(olive::JobTime)
#endif // JOBTIME_H
| 868
|
C++
|
.h
| 45
| 16.222222
| 57
| 0.672457
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,484
|
digit.h
|
olive-editor_olive/app/common/digit.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 DIGIT_H
#define DIGIT_H
#include <stdint.h>
namespace olive {
inline int64_t GetDigitCount(int64_t input)
{
input = std::abs(input);
int64_t lim = 10;
int64_t digit = 1;
while (input >= lim) {
lim *= 10;
digit++;
}
return digit;
}
}
#endif // DIGIT_H
| 999
|
C++
|
.h
| 31
| 29.354839
| 71
| 0.740042
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,485
|
memorypool.h
|
olive-editor_olive/app/common/memorypool.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 MEMORYPOOL_H
#define MEMORYPOOL_H
#include <memory>
#include <QApplication>
#include <QDateTime>
#include <QDebug>
#include <QMutex>
#include <QTimer>
#include <stdint.h>
#include "common/define.h"
namespace olive {
/**
* @brief MemoryPool base class
*
* A custom memory system that allocates can allocate several objects in a large chunk (as opposed to several small
* allocations). Improves performance and memory consumption.
*
* As a class, this base is usable by setting the template to an object of your choosing. The pool will then allocate
* `(element_count * sizeof(T))` per arena. Arenas are allocated and destroyed on the fly - when an arena fills up,
* another is allocated.
*
* `Get()` will return an ElementPtr. The original desired data can be accessed through ElementPtr::data(). This data
* will belong to the caller until ElementPtr goes out of scope and the memory is freed back into the pool.
*/
class MemoryPool : public QObject
{
Q_OBJECT
public:
/**
* @brief Constructor
* @param element_count
*
* Number of elements per arena
*/
MemoryPool(int element_count)
{
element_count_ = element_count;
clear_timer_ = new QTimer();
clear_timer_->setInterval(kMaxEmptyArenaLife);
clear_timer_->moveToThread(qApp->thread());
connect(clear_timer_, &QTimer::timeout, this, &MemoryPool::ClearEmptyArenas, Qt::DirectConnection);
QMetaObject::invokeMethod(clear_timer_, "start", Qt::QueuedConnection);
}
/**
* @brief Destructor
*
* Deletes all arenas.
*/
virtual ~MemoryPool()
{
Clear();
clear_timer_->deleteLater();
}
DISABLE_COPY_MOVE(MemoryPool)
/**
* @brief Clears all arenas, freeing all of their memory
*
* Note that this function is not safe, any elements that are still out there will be invalid
* and accessing them will cause a crash. You'll need to make sure all elements are already
* relinquished before then.
*/
void Clear()
{
qDeleteAll(arenas_);
arenas_.clear();
}
/**
* @brief Returns whether any arenas are successfully allocated
*/
inline bool IsAllocated() const
{
return !arenas_.empty();
}
/**
* @brief Returns current number of allocated arenas
*/
inline int GetArenaCount() const
{
return arenas_.size();
}
class Arena;
/**
* @brief A handle for a chunk of memory in an arena
*
* Calling Get() on the pool or arena will return a shared pointer to an element which will contain a pointer to
* the desired object/data in data(). When Element is destroyed (i.e. when ElementPtr goes out of scope), the memory
* is released back into the pool so it can be used by another class.
*/
class Element {
public:
/**
* @brief Element Constructor
*
* There is no need to use this outside of the memory pool's internal functions.
*/
Element(Arena* parent, uint8_t* data)
{
parent_ = parent;
data_ = data;
accessed_ = QDateTime::currentMSecsSinceEpoch();
}
/**
* @brief Element Destructor
*
* Automatically releases this element's memory back to the arena it was retrieved from.
*/
~Element()
{
release();
}
DISABLE_COPY_MOVE(Element)
/**
* @brief Access data represented in the pool
*/
inline uint8_t* data() const
{
return data_;
}
inline const int64_t& timestamp() const
{
return timestamp_;
}
inline void set_timestamp(const int64_t& timestamp)
{
timestamp_ = timestamp;
}
/**
* @brief Register that this element has been accessed
*
* \see last_accessed()
*/
inline void access()
{
accessed_ = QDateTime::currentMSecsSinceEpoch();
}
/**
* @brief Returns the last time `access()` was called on this function
*
* Useful for determining the relative age of an element (i.e. if it hasn't been accessed for a certain amount of
* time, it can probably be freed back into the pool). This requires all usages to call `access()`.
*/
inline const int64_t& last_accessed() const
{
return accessed_;
}
void release()
{
if (data_) {
parent_->Release(this);
data_ = nullptr;
}
}
private:
Arena* parent_;
uint8_t* data_;
int64_t timestamp_;
int64_t accessed_;
};
using ElementPtr = std::shared_ptr<Element>;
/**
* @brief A memory pool arena - a subsection of memory
*
* The pool itself does not store memory, it stores "arenas". This is so that the pool can handle the situation of
* an arena becoming full with no more memory to lend. A pool can automatically allocate another arena and continue
* providing memory (and freeing arenas when they're no longer in use).
*/
class Arena {
public:
Arena(MemoryPool* parent)
{
parent_ = parent;
data_ = nullptr;
allocated_sz_ = 0;
empty_time_ = QDateTime::currentMSecsSinceEpoch();
}
~Arena()
{
std::list<Element*> copy = lent_elements_;
foreach (Element* e, copy) {
e->release();
}
delete [] data_;
}
DISABLE_COPY_MOVE(Arena)
/**
* @brief Returns an element if there is free memory to do so
*/
ElementPtr Get()
{
QMutexLocker locker(&lock_);
for (int i=0;i<available_.size();i++) {
if (available_.at(i)) {
// This buffer is available
available_.replace(i, false);
ElementPtr e = std::make_shared<Element>(this,
reinterpret_cast<uint8_t*>(data_ + i * element_sz_));
lent_elements_.push_back(e.get());
return e;
}
}
return nullptr;
}
/**
* @brief Releases an element back into the pool for use elsewhere
*/
void Release(Element* e)
{
QMutexLocker locker(&lock_);
quintptr diff = reinterpret_cast<quintptr>(e->data()) - reinterpret_cast<quintptr>(data_);
int index = diff / element_sz_;
available_.replace(index, true);
lent_elements_.remove(e);
if (lent_elements_.empty()) {
empty_time_ = QDateTime::currentMSecsSinceEpoch();
}
}
int GetUsageCount()
{
QMutexLocker locker(&lock_);
return lent_elements_.size();
}
bool Allocate(size_t ele_sz, size_t nb_elements)
{
if (IsAllocated()) {
return true;
}
element_sz_ = ele_sz;
allocated_sz_ = element_sz_ * nb_elements;
if ((data_ = new uint8_t[allocated_sz_])) {
available_.resize(nb_elements);
available_.fill(true);
return true;
} else {
available_.clear();
return false;
}
}
inline int GetElementCount() const
{
return available_.size();
}
inline bool IsAllocated() const
{
return data_;
}
inline qint64 GetTimeArenaWasMadeEmpty()
{
QMutexLocker locker(&lock_);
return empty_time_;
}
private:
MemoryPool* parent_;
uint8_t* data_;
size_t allocated_sz_;
QVector<bool> available_;
QMutex lock_;
size_t element_sz_;
std::list<Element*> lent_elements_;
qint64 empty_time_;
};
/**
* @brief Retrieves an element from an available arena
*/
ElementPtr Get()
{
QMutexLocker locker(&lock_);
// Attempt to get an element from an arena
foreach (Arena* a, arenas_) {
ElementPtr e = a->Get();
if (e) {
return e;
}
}
// All arenas were empty, we'll need to create a new one
if (arenas_.empty()) {
qDebug() << "No arenas, creating new...";
} else {
qDebug() << "All arenas are full, creating new...";
}
size_t ele_sz = GetElementSize();
if (!ele_sz) {
qCritical() << "Failed to create arena, element size was 0";
return nullptr;
}
if (element_count_ <= 0) {
qCritical() << "Failed to create arena, element count was invalid:" << element_count_;
return nullptr;
}
Arena* a = new Arena(this);
if (!a->Allocate(ele_sz, element_count_)) {
qCritical() << "Failed to create arena, allocation failed. Out of memory?";
delete a;
return nullptr;
}
arenas_.push_back(a);
return a->Get();
}
protected:
/**
* @brief The size of each element
*
* Override this to use a custom size (e.g. a char array where T = char but the element size is > 1)
*/
virtual size_t GetElementSize()
{
return sizeof(uint8_t);
}
private:
int element_count_;
std::list<Arena*> arenas_;
QMutex lock_;
QTimer *clear_timer_;
static const qint64 kMaxEmptyArenaLife = 5000;
private slots:
void ClearEmptyArenas()
{
QMutexLocker locker(&lock_);
const qint64 min_time = QDateTime::currentMSecsSinceEpoch() - kMaxEmptyArenaLife;
for (auto it=arenas_.begin(); it!=arenas_.end(); ) {
Arena* arena = (*it);
if (arena->GetUsageCount() == 0 && arena->GetTimeArenaWasMadeEmpty() <= min_time) {
qDebug() << "Removing an empty arena";
delete arena;
it = arenas_.erase(it);
} else {
it++;
}
}
}
};
}
#endif // MEMORYPOOL_H
| 10,009
|
C++
|
.h
| 346
| 23.684971
| 118
| 0.6415
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,486
|
lerp.h
|
olive-editor_olive/app/common/lerp.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 LERP_H
#define LERP_H
template<typename T>
/**
* @brief Linearly interpolate a value between a and b using t
*
* t should be a number between 0.0 and 1.0. 0.0 will return a, 1.0 will return b, and between will return a value
* in between a and b at that point linearly.
*/
T lerp(T a, T b, double t) {
return (a * (1.0 - t)) + (b * t);
}
template<typename T>
T lerp(T a, T b, float t) {
return (a * (1.0f - t)) + (b * t);
}
#endif // LERP_H
| 1,173
|
C++
|
.h
| 31
| 35.483871
| 114
| 0.72286
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,487
|
power.h
|
olive-editor_olive/app/common/power.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 POWER_H
#define POWER_H
#include <stdint.h>
#include "common/define.h"
namespace olive {
uint32_t ceil_to_power_of_2(uint32_t v)
{
v--;
v |= v >> 1;
v |= v >> 2;
v |= v >> 4;
v |= v >> 8;
v |= v >> 16;
v++;
return v;
}
uint32_t floor_to_power_of_2(uint32_t x)
{
x = x | (x >> 1);
x = x | (x >> 2);
x = x | (x >> 4);
x = x | (x >> 8);
x = x | (x >> 16);
return x - (x >> 1);
}
}
#endif // POWER_H
| 1,153
|
C++
|
.h
| 41
| 25.487805
| 71
| 0.666363
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,488
|
ocioutils.h
|
olive-editor_olive/app/common/ocioutils.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 OCIOUTILS_H
#define OCIOUTILS_H
#include <OpenColorIO/OpenColorIO.h>
namespace OCIO = OCIO_NAMESPACE;
#include "render/videoparams.h"
namespace olive {
class OCIOUtils
{
public:
static OCIO::BitDepth GetOCIOBitDepthFromPixelFormat(PixelFormat format);
};
}
#endif // OCIOUTILS_H
| 1,007
|
C++
|
.h
| 27
| 34.888889
| 75
| 0.786157
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,489
|
audiovisualwaveform.h
|
olive-editor_olive/app/audio/audiovisualwaveform.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 SUMSAMPLES_H
#define SUMSAMPLES_H
#include <olive/core/core.h>
#include <QPainter>
#include <QVector>
namespace olive {
using namespace core;
/**
* @brief A buffer of data used to store a visual representation of audio
*
* This differs from a SampleBuffer as the data in an AudioVisualWaveform has been reduced
* significantly and optimized for visual display.
*/
class AudioVisualWaveform {
public:
AudioVisualWaveform();
struct SamplePerChannel {
float min;
float max;
};
using Sample = std::vector<SamplePerChannel>;
int channel_count() const
{
return channels_;
}
void set_channel_count(int channels)
{
channels_ = channels;
}
const rational& length() const
{
return length_;
}
/**
* @brief Writes samples into the visual waveform buffer
*
* Starting at `start`, writes samples over anything in the buffer, expanding it if necessary.
*/
void OverwriteSamples(const SampleBuffer &samples, int sample_rate, const rational& start = 0);
/**
* @brief Replaces sums at a certain range in this visual waveform
*
* @param sums
*
* The sums to write over our current ones with.
*
* @param dest
*
* Where in this visual waveform these sums should START being written to.
*
* @param offset
*
* Where in the `sums` parameter this should start reading from. Defaults to 0.
*
* @param length
*
* Maximum length of `sums` to overwrite with.
*/
void OverwriteSums(const AudioVisualWaveform& sums, const rational& dest, const rational& offset = 0, const rational &length = 0);
void OverwriteSilence(const rational &start, const rational &length);
void TrimIn(rational length);
AudioVisualWaveform Mid(const rational &offset) const;
AudioVisualWaveform Mid(const rational &offset, const rational &length) const;
void Resize(const rational &length);
void TrimRange(const rational &in, const rational &length);
Sample GetSummaryFromTime(const rational& start, const rational& length) const;
static Sample SumSamples(const SampleBuffer &samples, size_t start_index, size_t length);
static Sample ReSumSamples(const SamplePerChannel *samples, size_t nb_samples, int nb_channels);
static void DrawSample(QPainter* painter, const Sample &sample, int x, int y, int height, bool rectified);
static void DrawWaveform(QPainter* painter, const QRect &rect, const double &scale, const AudioVisualWaveform& samples, const rational &start_time);
// Must be a power of 2
static const rational kMinimumSampleRate;
static const rational kMaximumSampleRate;
private:
void OverwriteSamplesFromBuffer(const SampleBuffer &samples, int sample_rate, const rational& start, double target_rate, Sample &data, size_t &start_index, size_t &samples_length);
void OverwriteSamplesFromMipmap(const Sample& input, double input_sample_rate, size_t &input_start, size_t &input_length, const rational& start, double output_rate, Sample &output_data);
size_t time_to_samples(const rational& time, double sample_rate) const;
size_t time_to_samples(const double& time, double sample_rate) const;
std::map<rational, Sample>::const_iterator GetMipmapForScale(double scale) const;
void ValidateVirtualStart(const rational &new_start);
rational virtual_start_;
int channels_;
std::map<rational, Sample> mipmapped_data_;
rational length_;
};
}
Q_DECLARE_METATYPE(olive::AudioVisualWaveform)
#endif // SUMSAMPLES_H
| 4,186
|
C++
|
.h
| 102
| 37.705882
| 188
| 0.758842
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,490
|
audiomanager.h
|
olive-editor_olive/app/audio/audiomanager.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 AUDIOMANAGER_H
#define AUDIOMANAGER_H
#include <memory>
#include <QtConcurrent/QtConcurrent>
#include <QThread>
#include <portaudio.h>
#include "audiovisualwaveform.h"
#include "audio/audioprocessor.h"
#include "common/define.h"
#include "codec/ffmpeg/ffmpegencoder.h"
#include "render/audioplaybackcache.h"
#include "render/previewaudiodevice.h"
namespace olive {
/**
* @brief Audio input and output management class
*
* Wraps around a QAudioOutput and AudioHybridDevice, connecting them together and exposing audio functionality to
* the rest of the system.
*/
class AudioManager : public QObject
{
Q_OBJECT
public:
static void CreateInstance();
static void DestroyInstance();
static AudioManager* instance();
void SetOutputNotifyInterval(int n);
bool PushToOutput(const AudioParams ¶ms, const QByteArray& samples, QString *error = nullptr);
void ClearBufferedOutput();
void StopOutput();
PaDeviceIndex GetOutputDevice() const
{
return output_device_;
}
PaDeviceIndex GetInputDevice() const
{
return input_device_;
}
void SetOutputDevice(PaDeviceIndex device);
void SetInputDevice(PaDeviceIndex device);
void HardReset();
bool StartRecording(const EncodingParams ¶ms, QString *error_str = nullptr);
void StopRecording();
static PaDeviceIndex FindConfigDeviceByName(bool is_output_device);
static PaDeviceIndex FindDeviceByName(const QString &s, bool is_output_device);
static PaStreamParameters GetPortAudioParams(const AudioParams &p, PaDeviceIndex device);
signals:
void OutputNotify();
void OutputParamsChanged();
private:
AudioManager();
virtual ~AudioManager() override;
static PaSampleFormat GetPortAudioSampleFormat(SampleFormat fmt);
void CloseOutputStream();
static AudioManager* instance_;
PaDeviceIndex output_device_;
PaStream *output_stream_;
AudioParams output_params_;
PreviewAudioDevice *output_buffer_;
PaDeviceIndex input_device_;
PaStream *input_stream_;
FFmpegEncoder *input_encoder_;
};
}
#endif // AUDIOMANAGER_H
| 2,781
|
C++
|
.h
| 79
| 32.35443
| 114
| 0.789869
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,491
|
audioprocessor.h
|
olive-editor_olive/app/audio/audioprocessor.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 AUDIOPROCESSOR_H
#define AUDIOPROCESSOR_H
#include <inttypes.h>
#include <olive/core/core.h>
#include <QByteArray>
extern "C" {
#include <libavfilter/avfilter.h>
}
#include "common/define.h"
namespace olive {
using namespace core;
class AudioProcessor
{
public:
AudioProcessor();
~AudioProcessor();
DISABLE_COPY_MOVE(AudioProcessor)
bool Open(const AudioParams &from, const AudioParams &to, double tempo = 1.0);
void Close();
bool IsOpen() const { return filter_graph_; }
using Buffer = QVector<QByteArray>;
int Convert(float **in, int nb_in_samples, AudioProcessor::Buffer *output);
void Flush();
const AudioParams &from() const { return from_; }
const AudioParams &to() const { return to_; }
private:
static AVFilterContext* CreateTempoFilter(AVFilterGraph *graph, AVFilterContext *link, const double& tempo);
AVFilterGraph* filter_graph_;
AVFilterContext* buffersrc_ctx_;
AVFilterContext* buffersink_ctx_;
AudioParams from_;
AVSampleFormat from_fmt_;
AudioParams to_;
AVSampleFormat to_fmt_;
AVFrame *in_frame_;
AVFrame *out_frame_;
};
}
#endif // AUDIOPROCESSOR_H
| 1,855
|
C++
|
.h
| 53
| 32.169811
| 110
| 0.763411
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,492
|
cliexportmanager.h
|
olive-editor_olive/app/cli/cliexport/cliexportmanager.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 CLIEXPORTMANAGER_H
#define CLIEXPORTMANAGER_H
#include "task/export/export.h"
namespace olive {
class CLIExportManager : public QObject
{
public:
CLIExportManager();
};
}
#endif // CLIEXPORTMANAGER_H
| 927
|
C++
|
.h
| 25
| 34.6
| 71
| 0.781145
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,493
|
cliprogressdialog.h
|
olive-editor_olive/app/cli/cliprogress/cliprogressdialog.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 CLIPROGRESSDIALOG_H
#define CLIPROGRESSDIALOG_H
#include <QObject>
#include <QTimer>
#include "common/define.h"
namespace olive {
class CLIProgressDialog : public QObject
{
public:
CLIProgressDialog(const QString &title, QObject* parent = nullptr);
public slots:
void SetProgress(double p);
private:
void Update();
QString title_;
double progress_;
bool drawn_;
};
}
#endif // CLIPROGRESSDIALOG_H
| 1,141
|
C++
|
.h
| 34
| 30.970588
| 71
| 0.77686
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,494
|
clitaskdialog.h
|
olive-editor_olive/app/cli/clitask/clitaskdialog.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 CLITASKDIALOG_H
#define CLITASKDIALOG_H
#include "cli/cliprogress/cliprogressdialog.h"
#include "task/task.h"
namespace olive {
class CLITaskDialog : public CLIProgressDialog
{
Q_OBJECT
public:
CLITaskDialog(Task *task, QObject* parent = nullptr);
bool Run();
private:
Task* task_;
};
}
#endif // CLITASKDIALOG_H
| 1,049
|
C++
|
.h
| 30
| 32.433333
| 71
| 0.775124
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,495
|
config.h
|
olive-editor_olive/app/config/config.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 CONFIG_H
#define CONFIG_H
#include <QMap>
#include <QString>
#include <QVariant>
#include "node/value.h"
namespace olive {
#define OLIVE_CONFIG(x) Config::Current()[QStringLiteral(x)]
#define OLIVE_CONFIG_STR(x) Config::Current()[x]
class Config {
public:
static Config& Current();
void SetDefaults();
static void Load();
static void Save();
QVariant operator[](const QString&) const;
QVariant& operator[](const QString&);
NodeValue::Type GetConfigEntryType(const QString& key) const;
private:
Config();
struct ConfigEntry {
NodeValue::Type type;
QVariant data;
};
void SetEntryInternal(const QString& key, NodeValue::Type type, const QVariant& data);
QMap<QString, ConfigEntry> config_map_;
static Config current_config_;
static QString GetConfigFilePath();
};
}
#endif // CONFIG_H
| 1,558
|
C++
|
.h
| 45
| 31.733333
| 88
| 0.758737
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,496
|
progress.h
|
olive-editor_olive/app/dialog/progress/progress.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 PROGRESSDIALOG_H
#define PROGRESSDIALOG_H
#include <QDialog>
#include <QProgressBar>
#include "common/debug.h"
#include "widget/taskview/elapsedcounterwidget.h"
namespace olive {
class ProgressDialog : public QDialog
{
Q_OBJECT
public:
ProgressDialog(const QString &message, const QString &title, QWidget* parent = nullptr);
protected:
virtual void showEvent(QShowEvent* e) override;
virtual void closeEvent(QCloseEvent *) override;
public slots:
void SetProgress(double value);
signals:
void Cancelled();
protected:
void ShowErrorMessage(const QString& title, const QString& message);
private:
QProgressBar* bar_;
ElapsedCounterWidget* elapsed_timer_lbl_;
bool show_progress_;
bool first_show_;
private slots:
void DisableSenderWidget();
void DisableProgressWidgets();
};
}
#endif // PROGRESSDIALOG_H
| 1,566
|
C++
|
.h
| 46
| 31.434783
| 90
| 0.786096
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,497
|
task.h
|
olive-editor_olive/app/dialog/task/task.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 TASKDIALOG_H
#define TASKDIALOG_H
#include "dialog/progress/progress.h"
#include "task/task.h"
namespace olive {
class TaskDialog : public ProgressDialog
{
Q_OBJECT
public:
/**
* @brief TaskDialog Constructor
*
* Creates a TaskDialog. The TaskDialog takes ownership of the Task and will destroy it on close.
* Connect to the Task::Succeeded() if you want to retrieve information from the task before it
* gets destroyed.
*/
TaskDialog(Task *task, const QString &title, QWidget* parent = nullptr);
/**
* @brief Set whether TaskDialog should destroy itself (and the task) when it's closed
*
* This is TRUE by default.
*/
void SetDestroyOnClose(bool e)
{
destroy_on_close_ = e;
}
/**
* @brief Returns this dialog's task
*/
Task* GetTask() const
{
return task_;
}
protected:
virtual void showEvent(QShowEvent* e) override;
virtual void closeEvent(QCloseEvent* e) override;
signals:
void TaskSucceeded(Task* task);
void TaskFailed(Task* task);
private:
Task* task_;
bool destroy_on_close_;
bool already_shown_;
private slots:
void TaskFinished();
};
}
#endif // TASKDIALOG_H
| 1,888
|
C++
|
.h
| 62
| 27.387097
| 99
| 0.741131
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,498
|
configdialogbasetab.h
|
olive-editor_olive/app/dialog/configbase/configdialogbasetab.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 PREFERENCESTAB_H
#define PREFERENCESTAB_H
#include <QWidget>
#include "config/config.h"
#include "undo/undocommand.h"
namespace olive {
class ConfigDialogBaseTab : public QWidget
{
public:
ConfigDialogBaseTab() = default;
virtual bool Validate();
virtual void Accept(MultiUndoCommand *parent) = 0;
};
}
#endif // PREFERENCESTAB_H
| 1,064
|
C++
|
.h
| 29
| 34.172414
| 71
| 0.778648
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,499
|
configdialogbase.h
|
olive-editor_olive/app/dialog/configbase/configdialogbase.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 CONFIGBASE_H
#define CONFIGBASE_H
#include <QDialog>
#include <QListWidget>
#include <QStackedWidget>
#include "configdialogbasetab.h"
namespace olive {
class ConfigDialogBase : public QDialog
{
Q_OBJECT
public:
ConfigDialogBase(QWidget* parent = nullptr);
private slots:
/**
* @brief Override of accept to save preferences to Config.
*/
virtual void accept() override;
protected:
void AddTab(ConfigDialogBaseTab* tab, const QString& title);
virtual void AcceptEvent(){}
private:
QListWidget* list_widget_;
QStackedWidget* preference_pane_stack_;
QList<ConfigDialogBaseTab*> tabs_;
};
}
#endif // CONFIGBASE_H
| 1,367
|
C++
|
.h
| 41
| 30.707317
| 71
| 0.775057
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,500
|
speeddurationdialog.h
|
olive-editor_olive/app/dialog/speedduration/speeddurationdialog.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 SPEEDDURATIONDIALOG_H
#define SPEEDDURATIONDIALOG_H
#include <QCheckBox>
#include <QComboBox>
#include <QDialog>
#include "node/block/clip/clip.h"
#include "node/block/gap/gap.h"
#include "undo/undocommand.h"
#include "widget/slider/floatslider.h"
#include "widget/slider/rationalslider.h"
namespace olive {
class SpeedDurationDialog : public QDialog
{
Q_OBJECT
public:
explicit SpeedDurationDialog(const QVector<ClipBlock*> &clips, const rational &timebase, QWidget *parent = nullptr);
public slots:
virtual void accept() override;
signals:
private:
static rational GetLengthAdjustment(const rational &original_length, double original_speed, double new_speed, const rational &timebase);
static double GetSpeedAdjustment(double original_speed, const rational &original_length, const rational &new_length);
QVector<ClipBlock*> clips_;
FloatSlider *speed_slider_;
RationalSlider *dur_slider_;
QCheckBox *link_box_;
QCheckBox *reverse_box_;
QCheckBox *maintain_audio_pitch_box_;
QCheckBox *ripple_box_;
QComboBox *loop_combo_;
int start_reverse_;
int start_maintain_audio_pitch_;
double start_speed_;
rational start_duration_;
int start_loop_;
rational timebase_;
private slots:
void SpeedChanged(double s);
void DurationChanged(const rational &r);
};
}
#endif // SPEEDDURATIONDIALOG_H
| 2,072
|
C++
|
.h
| 56
| 34.232143
| 138
| 0.783661
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,501
|
text.h
|
olive-editor_olive/app/dialog/text/text.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 RICHTEXTDIALOG_H
#define RICHTEXTDIALOG_H
#include <QDialog>
#include <QFontComboBox>
#include <QPlainTextEdit>
#include "common/define.h"
#include "widget/slider/floatslider.h"
namespace olive {
class TextDialog : public QDialog
{
Q_OBJECT
public:
TextDialog(const QString &start, QWidget* parent = nullptr);
QString text() const
{
return text_edit_->toPlainText();
}
private:
QPlainTextEdit* text_edit_;
};
}
#endif // RICHTEXTDIALOG_H
| 1,183
|
C++
|
.h
| 36
| 30.333333
| 71
| 0.772085
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,502
|
scrollinglabel.h
|
olive-editor_olive/app/dialog/about/scrollinglabel.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 SCROLLINGLABEL_H
#define SCROLLINGLABEL_H
#include <QTimer>
#include <QWidget>
namespace olive {
class ScrollingLabel : public QWidget
{
Q_OBJECT
public:
ScrollingLabel(QWidget* parent = nullptr);
ScrollingLabel(const QStringList& text, QWidget* parent = nullptr);
void SetText(const QStringList& text);
void StartAnimating()
{
timer_.start();
}
void StopAnimating()
{
timer_.stop();
}
protected:
virtual void paintEvent(QPaintEvent* e) override;
private:
static void SetOpacityOfScanLine(uchar* scan_line, int width, int channels, double mul);
static const int kMinLineHeight;
QStringList text_;
int text_height_;
QTimer timer_;
int animate_;
private slots:
void AnimationUpdate();
};
}
#endif // SCROLLINGLABEL_H
| 1,496
|
C++
|
.h
| 48
| 28.270833
| 90
| 0.765614
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,503
|
about.h
|
olive-editor_olive/app/dialog/about/about.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 ABOUTDIALOG_H
#define ABOUTDIALOG_H
#include <QCheckBox>
#include <QDialog>
#include "common/define.h"
namespace olive {
/**
* @brief The AboutDialog class
*
* The About dialog (accessible through Help > About). Contains license and version information. This can be run from
* anywhere
*/
class AboutDialog : public QDialog
{
Q_OBJECT
public:
/**
* @brief AboutDialog Constructor
*
* Creates About dialog.
*
* @param parent
*
* QWidget parent object. Usually this will be MainWindow.
*/
explicit AboutDialog(bool welcome_dialog, QWidget *parent = nullptr);
public slots:
virtual void accept() override;
private:
QCheckBox *dont_show_again_checkbox_;
};
}
#endif // ABOUTDIALOG_H
| 1,447
|
C++
|
.h
| 47
| 28.12766
| 117
| 0.756679
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,504
|
patreon.h
|
olive-editor_olive/app/dialog/about/patreon.h
|
#ifndef PATREON_H
#define PATREON_H
#include <QStringList>
QStringList patrons;
#endif // PATREON_H
| 103
|
C++
|
.h
| 5
| 19
| 22
| 0.810526
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,505
|
diskcachedialog.h
|
olive-editor_olive/app/dialog/diskcache/diskcachedialog.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 DISKCACHEDIALOG_H
#define DISKCACHEDIALOG_H
#include <QCheckBox>
#include <QDialog>
#include <QPushButton>
#include "render/diskmanager.h"
#include "widget/slider/floatslider.h"
namespace olive {
class DiskCacheDialog : public QDialog
{
Q_OBJECT
public:
DiskCacheDialog(DiskCacheFolder* folder, QWidget* parent = nullptr);
static void ClearDiskCache(const QString &path, QWidget *parent, QPushButton *clear_btn = nullptr);
public slots:
virtual void accept() override;
private:
DiskCacheFolder* folder_;
FloatSlider* maximum_cache_slider_;
QCheckBox* clear_disk_cache_;
QPushButton* clear_cache_btn_;
private slots:
void ClearDiskCache();
};
}
#endif // DISKCACHEDIALOG_H
| 1,424
|
C++
|
.h
| 40
| 33.05
| 101
| 0.782991
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,506
|
projectproperties.h
|
olive-editor_olive/app/dialog/projectproperties/projectproperties.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2020 Olive 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 PROJECTPROPERTIESDIALOG_H
#define PROJECTPROPERTIESDIALOG_H
#include <QCheckBox>
#include <QComboBox>
#include <QDialog>
#include <QGridLayout>
#include <QLineEdit>
#include <QRadioButton>
#include "node/project.h"
#include "widget/path/pathwidget.h"
namespace olive {
class ProjectPropertiesDialog : public QDialog
{
Q_OBJECT
public:
ProjectPropertiesDialog(Project *p, QWidget* parent);
public slots:
virtual void accept() override;
private:
bool VerifyPathAndWarnIfBad(const QString &path);
Project* working_project_;
QLineEdit* ocio_filename_;
QComboBox* default_input_colorspace_;
QComboBox *reference_space_;
bool ocio_config_is_valid_;
QString ocio_config_error_;
PathWidget* custom_cache_path_;
static const int kDiskCacheRadioCount = 3;
QRadioButton *disk_cache_radios_[kDiskCacheRadioCount];
private slots:
void BrowseForOCIOConfig();
void OCIOFilenameUpdated();
void OpenDiskCacheSettings();
};
}
#endif // PROJECTPROPERTIESDIALOG_H
| 1,716
|
C++
|
.h
| 50
| 31.68
| 71
| 0.789634
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,507
|
presetmanager.h
|
olive-editor_olive/app/dialog/sequence/presetmanager.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 PRESETMANAGER_H
#define PRESETMANAGER_H
#include <memory>
#include <QCoreApplication>
#include <QDir>
#include <QFile>
#include <QInputDialog>
#include <QMessageBox>
#include <QObject>
#include <QXmlStreamReader>
#include <QXmlStreamWriter>
#include "common/define.h"
#include "common/filefunctions.h"
#include "common/xmlutils.h"
namespace olive {
class Preset
{
public:
Preset() = default;
virtual ~Preset(){}
const QString& GetName() const
{
return name_;
}
void SetName(const QString& s)
{
name_ = s;
}
virtual void Load(QXmlStreamReader* reader) = 0;
virtual void Save(QXmlStreamWriter* writer) const = 0;
private:
QString name_;
};
using PresetPtr = std::shared_ptr<Preset>;
template <typename T>
class PresetManager
{
public:
PresetManager(QWidget* parent, const QString& preset_name) :
preset_name_(preset_name),
parent_(parent)
{
// Load custom preset data from file
QFile preset_file(GetCustomPresetFilename());
if (preset_file.open(QFile::ReadOnly)) {
QXmlStreamReader reader(&preset_file);
while (XMLReadNextStartElement(&reader)) {
if (reader.name() == QStringLiteral("presets")) {
while (XMLReadNextStartElement(&reader)) {
if (reader.name() == QStringLiteral("preset")) {
PresetPtr p = std::make_unique<T>();
p->Load(&reader);
custom_preset_data_.append(p);
} else {
reader.skipCurrentElement();
}
}
} else {
reader.skipCurrentElement();
}
}
preset_file.close();
}
}
~PresetManager()
{
// Save custom presets to disk
QFile preset_file(GetCustomPresetFilename());
if (preset_file.open(QFile::WriteOnly)) {
QXmlStreamWriter writer(&preset_file);
writer.setAutoFormatting(true);
writer.writeStartDocument();
writer.writeStartElement(QStringLiteral("presets"));
foreach (PresetPtr p, custom_preset_data_) {
writer.writeStartElement(QStringLiteral("preset"));
p->Save(&writer);
writer.writeEndElement(); // preset
}
writer.writeEndElement(); // presets
writer.writeEndDocument();
preset_file.close();
}
}
QString GetPresetName(QString start) const
{
bool ok;
forever {
start = QInputDialog::getText(parent_,
QCoreApplication::translate("PresetManager", "Save Preset"),
QCoreApplication::translate("PresetManager", "Set preset name:"),
QLineEdit::Normal,
start,
&ok);
if (!ok) {
// Dialog cancelled - leave function entirely
return QString();
}
if (start.isEmpty()) {
// No preset name entered, start loop over
QMessageBox::critical(parent_,
QCoreApplication::translate("PresetManager", "Invalid preset name"),
QCoreApplication::translate("PresetManager", "You must enter a preset name"),
QMessageBox::Ok);
} else {
break;
}
}
return start;
}
enum SaveStatus {
kAppended,
kReplaced,
kNotSaved
};
SaveStatus SavePreset(PresetPtr preset)
{
QString preset_name;
int existing_preset;
forever {
preset_name = GetPresetName(preset_name);
if (preset_name.isEmpty()) {
// Dialog cancelled - leave function entirely
return kNotSaved;
}
existing_preset = -1;
for (int i=0; i<custom_preset_data_.size(); i++) {
if (custom_preset_data_.at(i)->GetName() == preset_name) {
existing_preset = i;
break;
}
}
if (existing_preset == -1
|| QMessageBox::question(parent_,
QCoreApplication::translate("PresetManager", "Preset exists"),
QCoreApplication::translate("PresetManager",
"A preset with this name already exists. "
"Would you like to replace it?")) == QMessageBox::Yes) {
break;
}
}
preset->SetName(preset_name);
if (existing_preset >= 0) {
custom_preset_data_.replace(existing_preset, preset);
return kReplaced;
} else {
custom_preset_data_.append(preset);
return kAppended;
}
}
QString GetCustomPresetFilename() const
{
return QDir(FileFunctions::GetConfigurationLocation()).filePath(preset_name_);
}
PresetPtr GetPreset(int index)
{
return custom_preset_data_.at(index);
}
void DeletePreset(int index)
{
custom_preset_data_.removeAt(index);
}
int GetNumberOfPresets() const
{
return custom_preset_data_.size();
}
const QVector<PresetPtr>& GetPresetData() const
{
return custom_preset_data_;
}
private:
QVector<PresetPtr> custom_preset_data_;
QString preset_name_;
QWidget* parent_;
};
}
#endif // PRESETMANAGER_H
| 5,928
|
C++
|
.h
| 190
| 23.747368
| 119
| 0.62038
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,508
|
sequencedialogparametertab.h
|
olive-editor_olive/app/dialog/sequence/sequencedialogparametertab.h
|
#ifndef SEQUENCEDIALOGPARAMETERTAB_H
#define SEQUENCEDIALOGPARAMETERTAB_H
#include <QCheckBox>
#include <QComboBox>
#include <QList>
#include <QSpinBox>
#include "node/project/sequence/sequence.h"
#include "sequencepreset.h"
#include "widget/slider/integerslider.h"
#include "widget/standardcombos/standardcombos.h"
namespace olive {
class SequenceDialogParameterTab : public QWidget
{
Q_OBJECT
public:
SequenceDialogParameterTab(Sequence* sequence, QWidget* parent = nullptr);
int GetSelectedVideoWidth() const
{
return width_slider_->GetValue();
}
int GetSelectedVideoHeight() const
{
return height_slider_->GetValue();
}
rational GetSelectedVideoFrameRate() const
{
return framerate_combo_->GetFrameRate();
}
rational GetSelectedVideoPixelAspect() const
{
return pixelaspect_combo_->GetPixelAspectRatio();
}
VideoParams::Interlacing GetSelectedVideoInterlacingMode() const
{
return interlacing_combo_->GetInterlaceMode();
}
int GetSelectedAudioSampleRate() const
{
return audio_sample_rate_field_->GetSampleRate();
}
uint64_t GetSelectedAudioChannelLayout() const
{
return audio_channels_field_->GetChannelLayout();
}
int GetSelectedPreviewResolution() const
{
return preview_resolution_field_->GetDivider();
}
PixelFormat GetSelectedPreviewFormat() const
{
return preview_format_field_->GetPixelFormat();
}
bool GetSelectedPreviewAutoCache() const
{
//return preview_autocache_field_->isChecked();
// TEMP: Disable sequence auto-cache, wanna see if clip cache supersedes it.
return false;
}
public slots:
void PresetChanged(const SequencePreset& preset);
signals:
void SaveParametersAsPreset(const SequencePreset& preset);
private:
IntegerSlider *width_slider_;
IntegerSlider *height_slider_;
FrameRateComboBox *framerate_combo_;
PixelAspectRatioComboBox *pixelaspect_combo_;
InterlacedComboBox *interlacing_combo_;
SampleRateComboBox* audio_sample_rate_field_;
ChannelLayoutComboBox* audio_channels_field_;
VideoDividerComboBox* preview_resolution_field_;
QLabel* preview_resolution_label_;
PixelFormatComboBox* preview_format_field_;
QCheckBox *preview_autocache_field_;
private slots:
void SavePresetClicked();
void UpdatePreviewResolutionLabel();
};
}
#endif // SEQUENCEDIALOGPARAMETERTAB_H
| 2,373
|
C++
|
.h
| 80
| 26.4875
| 80
| 0.786378
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,509
|
sequencedialogpresettab.h
|
olive-editor_olive/app/dialog/sequence/sequencedialogpresettab.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 SEQUENCEDIALOGPRESETTAB_H
#define SEQUENCEDIALOGPRESETTAB_H
#include <QLabel>
#include <QTreeWidget>
#include <QWidget>
#include "presetmanager.h"
#include "sequencepreset.h"
namespace olive {
class SequenceDialogPresetTab : public QWidget, public PresetManager<SequencePreset>
{
Q_OBJECT
public:
SequenceDialogPresetTab(QWidget* parent = nullptr);
public slots:
void SaveParametersAsPreset(SequencePreset preset);
signals:
void PresetChanged(const SequencePreset& preset);
void PresetAccepted();
private:
QTreeWidgetItem *CreateFolder(const QString& name);
QTreeWidgetItem *CreateHDPresetFolder(const QString& name, int width, int height, int divider);
QTreeWidgetItem *CreateSDPresetFolder(const QString& name, int width, int height, const rational &frame_rate, const rational& standard_par, const rational& wide_par, int divider);
QTreeWidgetItem* GetSelectedItem();
QTreeWidgetItem* GetSelectedCustomPreset();
void AddStandardItem(QTreeWidgetItem* folder, PresetPtr preset, const QString &description = QString());
void AddCustomItem(QTreeWidgetItem* folder, PresetPtr preset, int index, const QString& description = QString());
void AddItemInternal(QTreeWidgetItem* folder, PresetPtr preset, bool is_custom, int index, const QString& description = QString());
QTreeWidget* preset_tree_;
QTreeWidgetItem* my_presets_folder_;
QVector<PresetPtr> default_preset_data_;
private slots:
void SelectedItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);
void ItemDoubleClicked(QTreeWidgetItem *item, int column);
void ShowContextMenu();
void DeleteSelectedPreset();
};
}
#endif // SEQUENCEDIALOGPRESETTAB_H
| 2,401
|
C++
|
.h
| 52
| 43.365385
| 181
| 0.800345
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,510
|
sequencepreset.h
|
olive-editor_olive/app/dialog/sequence/sequencepreset.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 SEQUENCEPARAM_H
#define SEQUENCEPARAM_H
#include <olive/core/core.h>
#include <QXmlStreamWriter>
#include "common/xmlutils.h"
#include "dialog/sequence/presetmanager.h"
#include "render/videoparams.h"
namespace olive {
class SequencePreset : public Preset {
public:
SequencePreset() = default;
SequencePreset(const QString& name,
int width,
int height,
const rational& frame_rate,
const rational& pixel_aspect,
VideoParams::Interlacing interlacing,
int sample_rate,
uint64_t channel_layout,
int preview_divider,
PixelFormat preview_format,
bool preview_autocache) :
width_(width),
height_(height),
frame_rate_(frame_rate),
pixel_aspect_(pixel_aspect),
interlacing_(interlacing),
sample_rate_(sample_rate),
channel_layout_(channel_layout),
preview_divider_(preview_divider),
preview_format_(preview_format),
preview_autocache_(preview_autocache)
{
SetName(name);
}
virtual void Load(QXmlStreamReader* reader) override
{
while (XMLReadNextStartElement(reader)) {
if (reader->name() == QStringLiteral("name")) {
SetName(reader->readElementText());
} else if (reader->name() == QStringLiteral("width")) {
width_ = reader->readElementText().toInt();
} else if (reader->name() == QStringLiteral("height")) {
height_ = reader->readElementText().toInt();
} else if (reader->name() == QStringLiteral("framerate")) {
frame_rate_ = rational::fromString(reader->readElementText().toStdString());
} else if (reader->name() == QStringLiteral("pixelaspect")) {
pixel_aspect_ = rational::fromString(reader->readElementText().toStdString());
} else if (reader->name() == QStringLiteral("interlacing")) {
interlacing_ = static_cast<VideoParams::Interlacing>(reader->readElementText().toInt());
} else if (reader->name() == QStringLiteral("samplerate")) {
sample_rate_ = reader->readElementText().toInt();
} else if (reader->name() == QStringLiteral("chlayout")) {
channel_layout_ = reader->readElementText().toULongLong();
} else if (reader->name() == QStringLiteral("divider")) {
preview_divider_ = reader->readElementText().toInt();
} else if (reader->name() == QStringLiteral("format")) {
preview_format_ = static_cast<PixelFormat::Format>(reader->readElementText().toInt());
} else if (reader->name() == QStringLiteral("autocache")) {
preview_autocache_ = reader->readElementText().toInt();
} else {
reader->skipCurrentElement();
}
}
}
virtual void Save(QXmlStreamWriter* writer) const override
{
writer->writeTextElement(QStringLiteral("name"), GetName());
writer->writeTextElement(QStringLiteral("width"), QString::number(width_));
writer->writeTextElement(QStringLiteral("height"), QString::number(height_));
writer->writeTextElement(QStringLiteral("framerate"), QString::fromStdString(frame_rate_.toString()));
writer->writeTextElement(QStringLiteral("pixelaspect"), QString::fromStdString(pixel_aspect_.toString()));
writer->writeTextElement(QStringLiteral("interlacing_"), QString::number(interlacing_));
writer->writeTextElement(QStringLiteral("samplerate"), QString::number(sample_rate_));
writer->writeTextElement(QStringLiteral("chlayout"), QString::number(channel_layout_));
writer->writeTextElement(QStringLiteral("divider"), QString::number(preview_divider_));
writer->writeTextElement(QStringLiteral("format"), QString::number(preview_format_));
writer->writeTextElement(QStringLiteral("autocache"), QString::number(preview_autocache_));
}
int width() const
{
return width_;
}
int height() const
{
return height_;
}
const rational& frame_rate() const
{
return frame_rate_;
}
const rational& pixel_aspect() const
{
return pixel_aspect_;
}
VideoParams::Interlacing interlacing() const
{
return interlacing_;
}
int sample_rate() const
{
return sample_rate_;
}
uint64_t channel_layout() const
{
return channel_layout_;
}
int preview_divider() const
{
return preview_divider_;
}
PixelFormat preview_format() const
{
return preview_format_;
}
bool preview_autocache() const
{
return preview_autocache_;
}
private:
int width_;
int height_;
rational frame_rate_;
rational pixel_aspect_;
VideoParams::Interlacing interlacing_;
int sample_rate_;
uint64_t channel_layout_;
int preview_divider_;
PixelFormat preview_format_;
bool preview_autocache_;
};
}
#endif // SEQUENCEPARAM_H
| 5,490
|
C++
|
.h
| 147
| 32.054422
| 110
| 0.689992
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,511
|
sequence.h
|
olive-editor_olive/app/dialog/sequence/sequence.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 SEQUENCEDIALOG_H
#define SEQUENCEDIALOG_H
#include <QComboBox>
#include <QDialog>
#include <QSpinBox>
#include "node/project/sequence/sequence.h"
#include "sequencedialogparametertab.h"
#include "sequencedialogpresettab.h"
#include "undo/undocommand.h"
namespace olive {
/**
* @brief A dialog for editing Sequence parameters
*
* This dialog exposes all the parameters of a Sequence to users allowing them to set up a Sequence however they wish.
* A Sequence can be sent to this dialog through the constructor. All fields will be filled using that Sequence's
* parameters, allowing the user to view and edit them. Accepting the dialog will apply them back to that Sequence,
* either directly or using an UndoCommand (see SetUndoable()).
*
* If creating a new Sequence, the Sequence must still be constructed first before sending it to SequenceDialog.
* SequenceDialog does not create any new objects. In most cases when creating a new Sequence, editing its parameters
* with SequenceDialog will be paired with the action of adding the Sequence to a project. In this situation, since the
* latter will be the main undoable action, the parameter editing doesn't have to be undoable since to the user they'll
* be viewed as one single action (see SetUndoable()).
*/
class SequenceDialog : public QDialog
{
Q_OBJECT
public:
/**
* @brief Used to set the dialog mode of operation (see SequenceDialog())
*/
enum Type {
kNew,
kExisting
};
/**
* @brief SequenceDialog Constructor
*
* @param s
* Sequence to edit
*
* @param t
* Mode of operation (changes some UI like the window title to best represent the action being performed)
*
* @param parent
* QWidget parent
*/
SequenceDialog(Sequence* s, Type t = kExisting, QWidget* parent = nullptr);
/**
* @brief Set whether the parameter changes should be made into an undo command or not
*
* Defaults to true.
*/
void SetUndoable(bool u);
/**
* @brief Set whether the name of this Sequence can be edited with this dialog
*
* Defaults to true.
*/
void SetNameIsEditable(bool e);
public slots:
/**
* @brief Function called when the user presses OK
*/
virtual void accept() override;
private:
Sequence* sequence_;
SequenceDialogPresetTab* preset_tab_;
SequenceDialogParameterTab* parameter_tab_;
bool make_undoable_;
QLineEdit* name_field_;
/**
* @brief An UndoCommand for setting the parameters on a sequence
*/
class SequenceParamCommand : public UndoCommand {
public:
SequenceParamCommand(Sequence* s,
const VideoParams& video_params,
const AudioParams& audio_params,
const QString& name,
bool autocache);
virtual Project* GetRelevantProject() const override;
protected:
virtual void redo() override;
virtual void undo() override;
private:
Sequence* sequence_;
VideoParams new_video_params_;
AudioParams new_audio_params_;
QString new_name_;
bool new_autocache_;
VideoParams old_video_params_;
AudioParams old_audio_params_;
QString old_name_;
bool old_autocache_;
};
private slots:
void SetAsDefaultClicked();
};
}
#endif // SEQUENCEDIALOG_H
| 4,018
|
C++
|
.h
| 115
| 30.904348
| 119
| 0.731027
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,512
|
autorecoverydialog.h
|
olive-editor_olive/app/dialog/autorecovery/autorecoverydialog.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 AUTORECOVERYDIALOG_H
#define AUTORECOVERYDIALOG_H
#include <QDialog>
#include <QTreeWidget>
#include "common/define.h"
namespace olive {
class AutoRecoveryDialog : public QDialog
{
Q_OBJECT
public:
AutoRecoveryDialog(const QString& message, const QStringList& recoveries, bool autocheck_latest, QWidget* parent);
public slots:
virtual void accept() override;
private:
void Init(const QString &header_text);
void PopulateTree(const QStringList &recoveries, bool autocheck);
QTreeWidget* tree_widget_;
QVector<QTreeWidgetItem*> checkable_items_;
enum DataRole {
kFilenameRole = Qt::UserRole
};
};
}
#endif // AUTORECOVERYDIALOG_H
| 1,383
|
C++
|
.h
| 38
| 33.684211
| 116
| 0.782805
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,513
|
footagerelinkdialog.h
|
olive-editor_olive/app/dialog/footagerelink/footagerelinkdialog.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive 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 FOOTAGERELINKDIALOG_H
#define FOOTAGERELINKDIALOG_H
#include <QDialog>
#include <QTreeWidget>
#include "node/project/footage/footage.h"
namespace olive {
class FootageRelinkDialog : public QDialog
{
Q_OBJECT
public:
FootageRelinkDialog(const QVector<Footage*>& footage, QWidget* parent = nullptr);
private:
void UpdateFootageItem(int index);
QTreeWidget* table_;
QVector<Footage*> footage_;
private slots:
void BrowseForFootage();
};
}
#endif // FOOTAGERELINKDIALOG_H
| 1,212
|
C++
|
.h
| 34
| 33.088235
| 83
| 0.783807
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,514
|
markerpropertiesdialog.h
|
olive-editor_olive/app/dialog/markerproperties/markerpropertiesdialog.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 MARKERPROPERTIESDIALOG_H
#define MARKERPROPERTIESDIALOG_H
#include <QDialog>
#include <QLineEdit>
#include "timeline/timelinemarker.h"
#include "widget/colorlabelmenu/colorcodingcombobox.h"
#include "widget/slider/rationalslider.h"
namespace olive {
class LineEditWithFocusSignal : public QLineEdit
{
Q_OBJECT
public:
LineEditWithFocusSignal(QWidget *parent = nullptr) :
QLineEdit(parent)
{
}
protected:
virtual void focusInEvent(QFocusEvent *e) override
{
QLineEdit::focusInEvent(e);
emit Focused();
}
signals:
void Focused();
};
class MarkerPropertiesDialog : public QDialog
{
Q_OBJECT
public:
MarkerPropertiesDialog(const std::vector<TimelineMarker*> &markers, const rational &timebase, QWidget *parent = nullptr);
public slots:
virtual void accept() override;
private:
std::vector<TimelineMarker*> markers_;
LineEditWithFocusSignal *label_edit_;
ColorCodingComboBox *color_menu_;
RationalSlider *in_slider_;
RationalSlider *out_slider_;
};
}
#endif // MARKERPROPERTIESDIALOG_H
| 1,762
|
C++
|
.h
| 55
| 29.381818
| 123
| 0.784442
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,515
|
keyframeproperties.h
|
olive-editor_olive/app/dialog/keyframeproperties/keyframeproperties.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 KEYFRAMEPROPERTIESDIALOG_H
#define KEYFRAMEPROPERTIESDIALOG_H
#include <QComboBox>
#include <QDialog>
#include <QGroupBox>
#include "node/keyframe.h"
#include "widget/slider/floatslider.h"
#include "widget/slider/rationalslider.h"
namespace olive {
class KeyframePropertiesDialog : public QDialog
{
Q_OBJECT
public:
KeyframePropertiesDialog(const std::vector<NodeKeyframe*>& keys, const rational& timebase, QWidget* parent = nullptr);
public slots:
virtual void accept() override;
private:
void SetUpBezierSlider(FloatSlider *slider, bool all_same, double value);
const std::vector<NodeKeyframe*>& keys_;
rational timebase_;
RationalSlider* time_slider_;
QComboBox* type_select_;
QGroupBox* bezier_group_;
FloatSlider* bezier_in_x_slider_;
FloatSlider* bezier_in_y_slider_;
FloatSlider* bezier_out_x_slider_;
FloatSlider* bezier_out_y_slider_;
private slots:
void KeyTypeChanged(int index);
};
}
#endif // KEYFRAMEPROPERTIESDIALOG_H
| 1,700
|
C++
|
.h
| 46
| 34.282609
| 120
| 0.783917
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,516
|
otiopropertiesdialog.h
|
olive-editor_olive/app/dialog/otioproperties/otiopropertiesdialog.h
|
#ifndef OTIOPROPERTIESDIALOG_H
#define OTIOPROPERTIESDIALOG_H
#include <QDialog>
#include <QTreeWidget>
#include "common/define.h"
#include "opentimelineio/timeline.h"
#include "node/project/sequence/sequence.h"
#include "node/project.h"
namespace olive {
/**
* @brief Dialog to load setting for OTIO sequences.
*
* Takes a list of Sequences and allows the setting of options for each.
*/
class OTIOPropertiesDialog : public QDialog {
Q_OBJECT
public:
OTIOPropertiesDialog(const QList<Sequence*>& sequences, Project* active_project, QWidget* parent = nullptr);
private:
QTreeWidget* table_;
const QList<Sequence*> sequences_;
private slots:
/**
* @brief Brings up the Sequence settings dialog.
*/
void SetupSequence();
};
} //namespace olive
#endif // OTIOPROPERTIESDIALOG_H
| 847
|
C++
|
.h
| 29
| 25.758621
| 112
| 0.736386
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,517
|
colordialog.h
|
olive-editor_olive/app/dialog/color/colordialog.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 COLORDIALOG_H
#define COLORDIALOG_H
#include <QDialog>
#include "node/color/colormanager/colormanager.h"
#include "render/managedcolor.h"
#include "widget/colorwheel/colorgradientwidget.h"
#include "widget/colorwheel/colorspacechooser.h"
#include "widget/colorwheel/colorswatchchooser.h"
#include "widget/colorwheel/colorvalueswidget.h"
#include "widget/colorwheel/colorwheelwidget.h"
namespace olive {
class ColorDialog : public QDialog
{
Q_OBJECT
public:
/**
* @brief ColorDialog Constructor
*
* @param color_manager
*
* The ColorManager to use for color management. This must be valid.
*
* @param start
*
* The color to start with. This must be in the color_manager's reference space
*
* @param input_cs
*
* The input range that the user should see. The start color will be converted to this for UI object.
*
* @param parent
*
* QWidget parent.
*/
ColorDialog(ColorManager* color_manager, const ManagedColor &start = Color(1.0f, 1.0f, 1.0f), QWidget* parent = nullptr);
/**
* @brief Retrieves the color selected by the user
*
* The color is always returned in the ColorManager's reference space (usually scene linear).
*/
ManagedColor GetSelectedColor() const;
QString GetColorSpaceInput() const;
ColorTransform GetColorSpaceOutput() const;
public slots:
void SetColor(const ManagedColor &c);
private:
ColorManager* color_manager_;
ColorWheelWidget* color_wheel_;
ColorValuesWidget* color_values_widget_;
ColorGradientWidget* hsv_value_gradient_;
ColorProcessorPtr input_to_ref_processor_;
ColorSpaceChooser* chooser_;
ColorSwatchChooser *swatch_;
private slots:
void ColorSpaceChanged(const QString& input, const ColorTransform &output);
};
}
#endif // COLORDIALOG_H
| 2,508
|
C++
|
.h
| 72
| 31.791667
| 123
| 0.764828
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,518
|
actionsearch.h
|
olive-editor_olive/app/dialog/actionsearch/actionsearch.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive 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 ACTIONSEARCH_H
#define ACTIONSEARCH_H
#include <QDialog>
#include <QLineEdit>
#include <QListWidget>
#include <QMenu>
#include <QMenuBar>
#include "common/define.h"
namespace olive {
class ActionSearchList;
/**
* @brief The ActionSearch class
*
* A popup window (accessible through Help > Action Search) that allows users to search for a menu command by typing
* rather than browsing through the menu bar. This can be created from anywhere provided olive::MainWindow is valid.
*/
class ActionSearch : public QDialog
{
Q_OBJECT
public:
/**
* @brief ActionSearch Constructor
*
* Create ActionSearch popup.
*
* @param parent
*
* QWidget parent. Usually MainWindow.
*/
ActionSearch(QWidget* parent);
/**
* @brief Set the menu bar to use in this action search
*/
void SetMenuBar(QMenuBar* menu_bar);
private slots:
/**
* @brief Update the list of actions according to a search query
*
* This function adds/removes actions in the action list according to a given search query entered by the user.
*
* To loop over the menubar and all of its menus and submenus, this function will call itself recursively. As such
* some of its parameters do not need to be set externally, as these will be set by the function itself as it calls
* itself.
*
* @param s
*
* The search text. This is the only parameter that should be set externally.
*
* @param p
*
* The current parent hierarchy. In most cases, this should be left as nullptr when called externally.
* search_update() will fill this automatically as it needs while calling itself recursively.
*
* @param parent
*
* The current menu to loop over. In most cases, this should be left as nullptr when called externally.
* search_update() will fill this automatically as it needs while calling itself recursively.
*/
void search_update(const QString& s, const QString &p = nullptr, QMenu *parent = nullptr);
/**
* @brief Perform the currently selected action
*
* Usually triggered by pressing Enter on the ActionSearchEntry field, this will trigger whatever action is currently
* highlighted and then close this popup. If no entries are highlighted (i.e. the list is empty), no action is
* triggered and the popup closes anyway.
*/
void perform_action();
/**
* @brief Move selection up
*
* A slot for pressing up on the ActionSearchEntry field. Moves the selection in the list up once. If the
* selection is already at the top of the list, this is a no-op.
*/
void move_selection_up();
/**
* @brief Move selection down
*
* A slot for pressing down on the ActionSearchEntry field. Moves the selection in the list down once. If the
* selection is already at the bottom of the list, this is a no-op.
*/
void move_selection_down();
private:
/**
* @brief Main widget that shows the list of commands
*/
ActionSearchList* list_widget;
/**
* @brief Attached menu bar object
*/
QMenuBar* menu_bar_;
};
/**
* @brief The ActionSearchList class
*
* Simple wrapper around QListWidget that emits a signal when an item is double clicked that ActionSearch connects
* to a slot that triggers the currently selected action.
*/
class ActionSearchList : public QListWidget {
Q_OBJECT
public:
/**
* @brief ActionSearchList Constructor
* @param parent
*
* Usually ActionSearch.
*/
ActionSearchList(QWidget* parent);
protected:
/**
* @brief Override of QListWidget's double click event that emits a signal.
*/
void mouseDoubleClickEvent(QMouseEvent *);
signals:
/**
* @brief Signal emitted when a QListWidget item is double clicked.
*/
void dbl_click();
};
/**
* @brief The ActionSearchEntry class
*
* Simple wrapper around QLineEdit that emits signals when the up or down arrow keys are pressed so that ActionSearch
* can connect them to moving the current selection up or down.
*/
class ActionSearchEntry : public QLineEdit {
Q_OBJECT
public:
/**
* @brief ActionSearchEntry
* @param parent
*
* Usually ActionSearch.
*/
ActionSearchEntry(QWidget* parent);
protected:
/**
* @brief Override of QLineEdit's key press event that listens for up/down key presses.
* @param event
*/
virtual bool event(QEvent *e) override;
signals:
/**
* @brief Emitted when the user presses the up arrow key.
*/
void moveSelectionUp();
/**
* @brief Emitted when the user presses the down arrow key.
*/
void moveSelectionDown();
};
}
#endif // ACTIONSEARCH_H
| 5,286
|
C++
|
.h
| 166
| 28.759036
| 119
| 0.731856
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,519
|
footageproperties.h
|
olive-editor_olive/app/dialog/footageproperties/footageproperties.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2020 Olive 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 MEDIAPROPERTIESDIALOG_H
#define MEDIAPROPERTIESDIALOG_H
#include <QCheckBox>
#include <QComboBox>
#include <QDialog>
#include <QDoubleSpinBox>
#include <QLineEdit>
#include <QListWidget>
#include <QStackedWidget>
#include "node/project/footage/footage.h"
#include "undo/undocommand.h"
namespace olive {
/**
* @brief The MediaPropertiesDialog class
*
* A dialog for setting properties on Media. This can be loaded from any part of the application provided it's given
* a valid Media object.
*/
class FootagePropertiesDialog : public QDialog {
Q_OBJECT
public:
/**
* @brief MediaPropertiesDialog Constructor
*
* @param parent
*
* QWidget parent. Usually MainWindow or Project panel.
*
* @param i
*
* Media object to set properties for.
*/
FootagePropertiesDialog(QWidget *parent, Footage* footage);
private:
class StreamEnableChangeCommand : public UndoCommand {
public:
StreamEnableChangeCommand(Footage *footage,
Track::Type type,
int index_in_type,
bool enabled);
virtual Project* GetRelevantProject() const override;
protected:
virtual void redo() override;
virtual void undo() override;
private:
Footage *footage_;
Track::Type type_;
int index_;
bool old_enabled_;
bool new_enabled_;
};
/**
* @brief Stack of widgets that changes based on whether the stream is a video or audio stream
*/
QStackedWidget* stacked_widget_;
/**
* @brief Media name text field
*/
QLineEdit* footage_name_field_;
/**
* @brief Internal pointer to Media object (set in constructor)
*/
Footage* footage_;
/**
* @brief A list widget for listing the tracks in Media
*/
QListWidget* track_list;
/**
* @brief Frame rate to conform to
*/
QDoubleSpinBox* conform_fr;
private slots:
/**
* @brief Overridden accept function for saving the properties back to the Media class
*/
void accept();
};
}
#endif // MEDIAPROPERTIESDIALOG_H
| 2,775
|
C++
|
.h
| 93
| 25.784946
| 116
| 0.716059
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,520
|
videostreamproperties.h
|
olive-editor_olive/app/dialog/footageproperties/streamproperties/videostreamproperties.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2020 Olive 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 VIDEOSTREAMPROPERTIES_H
#define VIDEOSTREAMPROPERTIES_H
#include <QCheckBox>
#include <QComboBox>
#include "node/project/footage/footage.h"
#include "streamproperties.h"
#include "widget/slider/integerslider.h"
#include "widget/standardcombos/standardcombos.h"
namespace olive {
class VideoStreamProperties : public StreamProperties
{
Q_OBJECT
public:
VideoStreamProperties(Footage *footage, int video_index);
virtual void Accept(MultiUndoCommand *parent) override;
virtual bool SanityCheck() override;
private:
Footage *footage_;
int video_index_;
/**
* @brief Setting for associated/premultiplied alpha
*/
QCheckBox* video_premultiply_alpha_;
/**
* @brief Setting for this media's color space
*/
QComboBox* video_color_space_;
/**
* @brief Setting for this streams's color range
*/
QComboBox *color_range_combo_;
/**
* @brief Setting for video interlacing
*/
InterlacedComboBox* video_interlace_combo_;
/**
* @brief Sets the start index for image sequences
*/
IntegerSlider* imgseq_start_time_;
/**
* @brief Sets the end index for image sequences
*/
IntegerSlider* imgseq_end_time_;
/**
* @brief Sets the frame rate for image sequences
*/
FrameRateComboBox* imgseq_frame_rate_;
/**
* @brief Sets the pixel aspect ratio of the stream
*/
PixelAspectRatioComboBox* pixel_aspect_combo_;
class VideoStreamChangeCommand : public UndoCommand {
public:
VideoStreamChangeCommand(Footage *footage,
int video_index,
bool premultiplied,
QString colorspace,
VideoParams::Interlacing interlacing,
const rational& pixel_ar,
VideoParams::ColorRange range);
virtual Project* GetRelevantProject() const override;
protected:
virtual void redo() override;
virtual void undo() override;
private:
Footage *footage_;
int video_index_;
bool new_premultiplied_;
QString new_colorspace_;
VideoParams::Interlacing new_interlacing_;
rational new_pixel_ar_;
VideoParams::ColorRange new_range_;
bool old_premultiplied_;
QString old_colorspace_;
VideoParams::Interlacing old_interlacing_;
rational old_pixel_ar_;
VideoParams::ColorRange old_range_;
};
class ImageSequenceChangeCommand : public UndoCommand {
public:
ImageSequenceChangeCommand(Footage *footage,
int video_index,
int64_t start_index,
int64_t duration,
const rational& frame_rate);
virtual Project* GetRelevantProject() const override;
protected:
virtual void redo() override;
virtual void undo() override;
private:
Footage *footage_;
int video_index_;
int64_t new_start_index_;
int64_t old_start_index_;
int64_t new_duration_;
int64_t old_duration_;
rational new_frame_rate_;
rational old_frame_rate_;
};
};
}
#endif // VIDEOSTREAMPROPERTIES_H
| 3,856
|
C++
|
.h
| 116
| 27.189655
| 71
| 0.690811
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,521
|
streamproperties.h
|
olive-editor_olive/app/dialog/footageproperties/streamproperties/streamproperties.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2020 Olive 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 STREAMPROPERTIES_H
#define STREAMPROPERTIES_H
#include <QWidget>
#include "common/define.h"
#include "undo/undocommand.h"
namespace olive {
class StreamProperties : public QWidget
{
public:
StreamProperties(QWidget* parent = nullptr);
virtual void Accept(MultiUndoCommand*){}
virtual bool SanityCheck(){return true;}
};
}
#endif // STREAMPROPERTIES_H
| 1,086
|
C++
|
.h
| 29
| 34.896552
| 71
| 0.78119
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,522
|
audiostreamproperties.h
|
olive-editor_olive/app/dialog/footageproperties/streamproperties/audiostreamproperties.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2020 Olive 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 AUDIOSTREAMPROPERTIES_H
#define AUDIOSTREAMPROPERTIES_H
#include "node/project/footage/footage.h"
#include "streamproperties.h"
namespace olive {
class AudioStreamProperties : public StreamProperties
{
public:
AudioStreamProperties(Footage *footage, int audio_index);
virtual void Accept(MultiUndoCommand* parent) override;
private:
Footage *footage_;
int audio_index_;
};
}
#endif // AUDIOSTREAMPROPERTIES_H
| 1,146
|
C++
|
.h
| 30
| 35.633333
| 71
| 0.791099
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,523
|
rendercancel.h
|
olive-editor_olive/app/dialog/rendercancel/rendercancel.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 RENDERCANCELDIALOG_H
#define RENDERCANCELDIALOG_H
#include "dialog/progress/progress.h"
namespace olive {
class RenderCancelDialog : public ProgressDialog
{
Q_OBJECT
public:
RenderCancelDialog(QWidget* parent = nullptr);
void RunIfWorkersAreBusy();
void SetWorkerCount(int count);
void WorkerStarted();
public slots:
void WorkerDone();
protected:
virtual void showEvent(QShowEvent* event) override;
private:
void UpdateProgress();
int busy_workers_;
int total_workers_;
int waiting_workers_;
};
}
#endif // RENDERCANCELDIALOG_H
| 1,285
|
C++
|
.h
| 38
| 31.052632
| 71
| 0.783034
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,524
|
preferences.h
|
olive-editor_olive/app/dialog/preferences/preferences.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 PREFERENCESDIALOG_H
#define PREFERENCESDIALOG_H
#include <QCheckBox>
#include <QDialog>
#include <QListWidget>
#include <QMenuBar>
#include <QStackedWidget>
#include <QTabWidget>
#include "dialog/configbase/configdialogbase.h"
namespace olive {
class MainWindow;
/**
* @brief The PreferencesDialog class
*
* A dialog for the global application settings. Mostly an interface for Config.
*/
class PreferencesDialog : public ConfigDialogBase
{
Q_OBJECT
public:
PreferencesDialog(MainWindow *main_window);
protected:
virtual void AcceptEvent() override;
};
}
#endif // PREFERENCESDIALOG_H
| 1,325
|
C++
|
.h
| 40
| 30.875
| 80
| 0.789598
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,525
|
keysequenceeditor.h
|
olive-editor_olive/app/dialog/preferences/keysequenceeditor.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 KEYSEQUENCEEDITOR_H
#define KEYSEQUENCEEDITOR_H
#include <QKeySequenceEdit>
#include "common/debug.h"
namespace olive {
/**
* @brief The KeySequenceEditor class
*
* Simple derived class of QKeySequenceEdit that attaches to a QAction and provides functions for transferring
* keyboard shortcuts to and from it.
*/
class KeySequenceEditor : public QKeySequenceEdit {
Q_OBJECT
public:
/**
* @brief KeySequenceEditor Constructor
*
* @param parent
*
* QWidget parent.
*
* @param a
*
* The QAction to link to. This cannot be changed throughout the lifetime of a KeySequenceEditor.
*/
KeySequenceEditor(QWidget *parent, QAction* a);
/**
* @brief Sets the attached QAction's shortcut to the shortcut entered in this field.
*
* This is not done automatically in case the user cancels out of the Preferences dialog, in which case the
* expectation is that the changes made will not be saved. Therefore, this needs to be triggered manually when
* PreferencesDialog saves.
*/
void set_action_shortcut();
/**
* @brief Set this shortcut back to the QAction's default shortcut
*
* Each QAction contains the default shortcut in its `property("default")` and can be used to restore the default
* "hard-coded" shortcut with this function.
*
* This function does not save the default shortcut back into the QAction, it simply loads the default shortcut from
* the QAction into this edit field. To save it into the QAction, it's necessary to call set_action_shortcut() after
* calling this function.
*/
void reset_to_default();
/**
* @brief Return attached QAction's unique ID
*
* Each of Olive's menu actions has a unique string ID (that, unlike the text, is not translated) for matching with
* an external shortcut configuration file. The ID is stored in the QAction's `property("id")`. This function returns
* that ID.
*
* @return
*
* The QAction's unique ID.
*/
QString action_name();
/**
* @brief Serialize this shortcut entry into a string that can be saved to a file
*
* @return
*
* A string serialization of this shortcut. The format is "[ID]\t[SEQUENCE]" where [ID] is the attached QAction's
* unique identifier and [SEQUENCE] is the current keyboard shortcut in the field (NOT necessarily the shortcut in
* the QAction). If the entered shortcut is the same as the QAction's default shortcut, the return value is empty
* because a default shortcut does not need to be saved to a file.
*/
QString export_shortcut();
protected:
virtual void keyPressEvent(QKeyEvent *e) override;
virtual void keyReleaseEvent(QKeyEvent *e) override;
private:
/**
* @brief Internal reference to the linked QAction
*/
QAction* action;
};
}
#endif // KEYSEQUENCEEDITOR_H
| 3,543
|
C++
|
.h
| 93
| 34.774194
| 119
| 0.741475
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,526
|
preferencesaudiotab.h
|
olive-editor_olive/app/dialog/preferences/tabs/preferencesaudiotab.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 PREFERENCESAUDIOTAB_H
#define PREFERENCESAUDIOTAB_H
#include <QComboBox>
#include <QPushButton>
#include "dialog/configbase/configdialogbase.h"
#include "dialog/export/exportaudiotab.h"
#include "dialog/export/exportformatcombobox.h"
namespace olive {
class PreferencesAudioTab : public ConfigDialogBaseTab
{
Q_OBJECT
public:
PreferencesAudioTab();
virtual void Accept(MultiUndoCommand* command) override;
private:
QComboBox* audio_backend_combobox_;
/**
* @brief UI widget for selecting the output audio device
*/
QComboBox* audio_output_devices_;
/**
* @brief UI widget for selecting the input audio device
*/
QComboBox* audio_input_devices_;
/**
* @brief UI widget for editing the recording channels
*/
QComboBox* recording_combobox_;
/**
* @brief Button that triggers a refresh of the available audio devices
*/
QPushButton* refresh_devices_btn_;
SampleRateComboBox *output_rate_combo_;
ChannelLayoutComboBox *output_ch_layout_combo_;
SampleFormatComboBox *output_fmt_combo_;
ExportFormatComboBox *record_format_combo_;
ExportAudioTab *record_options_;
private slots:
void RefreshBackends();
void RefreshDevices();
void HardRefreshBackends();
void AttemptToSetDevicesFromConfig();
};
}
#endif // PREFERENCESAUDIOTAB_H
| 2,028
|
C++
|
.h
| 59
| 31.40678
| 73
| 0.777149
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,527
|
preferencesbehaviortab.h
|
olive-editor_olive/app/dialog/preferences/tabs/preferencesbehaviortab.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 PREFERENCESBEHAVIORTAB_H
#define PREFERENCESBEHAVIORTAB_H
#include <QTreeWidget>
#include "dialog/configbase/configdialogbase.h"
namespace olive {
class PreferencesBehaviorTab : public ConfigDialogBaseTab
{
Q_OBJECT
public:
PreferencesBehaviorTab();
virtual void Accept(MultiUndoCommand* command) override;
private:
QTreeWidgetItem *AddParent(const QString& text, const QString &tooltip, QTreeWidgetItem *parent = nullptr);
QTreeWidgetItem *AddParent(const QString& text, QTreeWidgetItem *parent = nullptr);
QTreeWidgetItem *AddItem(const QString& text, const QString& config_key, const QString &tooltip, QTreeWidgetItem *parent );
QTreeWidgetItem *AddItem(const QString& text, const QString& config_key, QTreeWidgetItem *parent);
QMap<QTreeWidgetItem*, QString> config_map_;
QTreeWidget* behavior_tree_;
};
}
#endif // PREFERENCESBEHAVIORTAB_H
| 1,595
|
C++
|
.h
| 35
| 42.857143
| 125
| 0.795071
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,528
|
preferencesdisktab.h
|
olive-editor_olive/app/dialog/preferences/tabs/preferencesdisktab.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 PREFERENCESDISKTAB_H
#define PREFERENCESDISKTAB_H
#include <QCheckBox>
#include <QLineEdit>
#include <QPushButton>
#include "dialog/configbase/configdialogbase.h"
#include "render/diskmanager.h"
#include "widget/slider/floatslider.h"
#include "widget/path/pathwidget.h"
namespace olive {
class PreferencesDiskTab : public ConfigDialogBaseTab
{
Q_OBJECT
public:
PreferencesDiskTab();
virtual bool Validate() override;
virtual void Accept(MultiUndoCommand* command) override;
private:
PathWidget* disk_cache_location_;
FloatSlider* cache_ahead_slider_;
FloatSlider* cache_behind_slider_;
DiskCacheFolder* default_disk_cache_folder_;
};
}
#endif // PREFERENCESDISKTAB_H
| 1,416
|
C++
|
.h
| 39
| 33.794872
| 71
| 0.792342
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,529
|
preferencesgeneraltab.h
|
olive-editor_olive/app/dialog/preferences/tabs/preferencesgeneraltab.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 PREFERENCESGENERALTAB_H
#define PREFERENCESGENERALTAB_H
#include <QCheckBox>
#include <QComboBox>
#include <QSpinBox>
#include "dialog/configbase/configdialogbase.h"
#include "node/project/sequence/sequence.h"
#include "widget/slider/rationalslider.h"
#include "widget/slider/integerslider.h"
namespace olive {
class PreferencesGeneralTab : public ConfigDialogBaseTab
{
Q_OBJECT
public:
PreferencesGeneralTab();
virtual void Accept(MultiUndoCommand* command) override;
private:
void AddLanguage(const QString& locale_name);
QComboBox* language_combobox_;
QComboBox* autoscroll_method_;
QCheckBox* rectified_waveforms_;
RationalSlider* default_still_length_;
QCheckBox* autorecovery_enabled_;
IntegerSlider* autorecovery_interval_;
IntegerSlider* autorecovery_maximum_;
};
}
#endif // PREFERENCESGENERALTAB_H
| 1,566
|
C++
|
.h
| 42
| 34.666667
| 71
| 0.798269
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,530
|
preferenceskeyboardtab.h
|
olive-editor_olive/app/dialog/preferences/tabs/preferenceskeyboardtab.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 PREFERENCESKEYBOARDTAB_H
#define PREFERENCESKEYBOARDTAB_H
#include <QMenuBar>
#include <QTreeWidget>
#include "dialog/configbase/configdialogbase.h"
#include "../keysequenceeditor.h"
namespace olive {
class MainWindow;
class PreferencesKeyboardTab : public ConfigDialogBaseTab
{
Q_OBJECT
public:
PreferencesKeyboardTab(MainWindow* main_window);
virtual void Accept(MultiUndoCommand* command) override;
private slots:
/**
* @brief Show a file dialog to load an external shortcut preset from file
*/
void load_shortcut_file();
/**
* @brief Show a file dialog to save an external shortcut preset from file
*/
void save_shortcut_file();
/**
* @brief Reset all selected shortcuts in keyboard_tree to their defaults
*/
void reset_default_shortcut();
/**
* @brief Reset all shortcuts indiscriminately to their defaults
*
* This is safe to call directly as it'll ask the user if they wish to do so before it resets.
*/
void reset_all_shortcuts();
/**
* @brief Shows/hides shortcut entries according to a shortcut query.
*
* This function can be directly connected to QLineEdit::textChanged() for simplicity.
*
* @param s
*
* The search query to compare shortcut names to.
*
* @param parent
*
* This is used as the function calls itself recursively to traverse the menu item hierarchy. This should be left as
* nullptr when called externally.
*
* @return
*
* Value used as function calls itself recursively to determine if a menu parent has any children that are not hidden.
* If so, TRUE is returned so the parent is shown too (even if it doesn't match the search query). If not, FALSE is
* returned so the parent is hidden.
*/
bool refine_shortcut_list(const QString &s, QTreeWidgetItem* parent = nullptr);
private:
/**
* @brief Populate keyboard shortcut panel with keyboard shortcuts from the menu bar
*
* @param menu
*
* A reference to the main application's menu bar. Usually MainWindow::menuBar().
*/
void setup_kbd_shortcuts(QMenuBar* menu);
/**
* @brief Internal function called by setup_kbd_shortcuts() to traverse down the menu bar's hierarchy and populate the
* shortcut panel.
*
* This function will call itself recursively as it finds submenus belong to the menu provided. It will also create
* QTreeWidgetItems as children of the parent item provided, either using them as parents themselves for submenus
* or attaching a KeySequenceEditor to them for shortcut editing.
*
* @param menu
*
* The current menu to traverse down.
*
* @param parent
*
* The parent item to add QTreeWidgetItems to.
*/
void setup_kbd_shortcut_worker(QMenu* menu, QTreeWidgetItem* parent);
/**
* @brief UI widget for editing keyboard shortcuts
*/
QTreeWidget* keyboard_tree_;
/**
* @brief List of keyboard shortcut actions that can be triggered (links with key_shortcut_items and
* key_shortcut_fields)
*/
QVector<QAction*> key_shortcut_actions_;
/**
* @brief List of keyboard shortcut items in keyboard_tree corresponding to existing actions (links with
* key_shortcut_actions and key_shortcut_fields)
*/
QVector<QTreeWidgetItem*> key_shortcut_items_;
/**
* @brief List of keyboard shortcut editing fields in keyboard_tree corresponding to existing actions (links with
* key_shortcut_actions and key_shortcut_fields)
*/
QVector<KeySequenceEditor*> key_shortcut_fields_;
MainWindow *main_window_;
};
}
#endif // PREFERENCESKEYBOARDTAB_H
| 4,293
|
C++
|
.h
| 117
| 33.247863
| 120
| 0.743071
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,531
|
preferencesappearancetab.h
|
olive-editor_olive/app/dialog/preferences/tabs/preferencesappearancetab.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 PREFERENCESAPPEARANCETAB_H
#define PREFERENCESAPPEARANCETAB_H
#include <QComboBox>
#include <QLineEdit>
#include <QPushButton>
#include "dialog/configbase/configdialogbase.h"
#include "ui/style/style.h"
#include "widget/colorlabelmenu/colorcodingcombobox.h"
namespace olive {
class PreferencesAppearanceTab : public ConfigDialogBaseTab
{
Q_OBJECT
public:
PreferencesAppearanceTab();
virtual void Accept(MultiUndoCommand* command) override;
private:
/**
* @brief UI widget for selecting the current UI style
*/
QComboBox* style_combobox_;
QVector<ColorCodingComboBox*> color_btns_;
ColorCodingComboBox* marker_btn_;
};
}
#endif // PREFERENCESAPPEARANCETAB_H
| 1,408
|
C++
|
.h
| 39
| 33.538462
| 71
| 0.79142
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,532
|
exportsavepresetdialog.h
|
olive-editor_olive/app/dialog/export/exportsavepresetdialog.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 EXPORTSAVEPRESETDIALOG_H
#define EXPORTSAVEPRESETDIALOG_H
#include <QDialog>
#include <QLineEdit>
#include <QListWidget>
#include "codec/encoder.h"
namespace olive {
class ExportSavePresetDialog : public QDialog
{
Q_OBJECT
public:
ExportSavePresetDialog(const EncodingParams &p, QWidget *parent = nullptr);
QString GetSelectedPresetName() const
{
return name_edit_->text();
}
public slots:
virtual void accept() override;
private:
QLineEdit *name_edit_;
EncodingParams params_;
};
}
#endif // EXPORTSAVEPRESETDIALOG_H
| 1,269
|
C++
|
.h
| 38
| 30.789474
| 77
| 0.78089
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,533
|
exportvideotab.h
|
olive-editor_olive/app/dialog/export/exportvideotab.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 EXPORTVIDEOTAB_H
#define EXPORTVIDEOTAB_H
#include <QCheckBox>
#include <QComboBox>
#include <QWidget>
#include "common/qtutils.h"
#include "dialog/export/codec/av1section.h"
#include "dialog/export/codec/cineformsection.h"
#include "dialog/export/codec/codecstack.h"
#include "dialog/export/codec/h264section.h"
#include "dialog/export/codec/imagesection.h"
#include "node/color/colormanager/colormanager.h"
#include "widget/colorwheel/colorspacechooser.h"
#include "widget/slider/integerslider.h"
#include "widget/standardcombos/standardcombos.h"
namespace olive {
class ExportVideoTab : public QWidget
{
Q_OBJECT
public:
ExportVideoTab(ColorManager* color_manager, QWidget* parent = nullptr);
int SetFormat(ExportFormat::Format format);
bool IsImageSequenceSet() const;
void SetImageSequence(bool e) const;
rational GetStillImageTime() const
{
return image_section_->GetTime();
}
ExportCodec::Codec GetSelectedCodec() const
{
return static_cast<ExportCodec::Codec>(codec_combobox()->currentData().toInt());
}
void SetSelectedCodec(ExportCodec::Codec c)
{
QtUtils::SetComboBoxData(codec_combobox(), c);
}
QComboBox* codec_combobox() const
{
return codec_combobox_;
}
IntegerSlider* width_slider() const
{
return width_slider_;
}
IntegerSlider* height_slider() const
{
return height_slider_;
}
QCheckBox* maintain_aspect_checkbox() const
{
return maintain_aspect_checkbox_;
}
QComboBox* scaling_method_combobox() const
{
return scaling_method_combobox_;
}
rational GetSelectedFrameRate() const
{
return frame_rate_combobox_->GetFrameRate();
}
void SetSelectedFrameRate(const rational& fr)
{
frame_rate_combobox_->SetFrameRate(fr);
UpdateFrameRate(fr);
}
QString CurrentOCIOColorSpace()
{
return color_space_chooser_->input();
}
void SetOCIOColorSpace(const QString &s)
{
color_space_chooser_->set_input(s);
}
CodecSection* GetCodecSection() const
{
return static_cast<CodecSection*>(codec_stack_->currentWidget());
}
void SetCodecSection(CodecSection* section)
{
if (section) {
codec_stack_->setVisible(true);
codec_stack_->setCurrentWidget(section);
} else {
codec_stack_->setVisible(false);
}
}
InterlacedComboBox* interlaced_combobox() const
{
return interlaced_combobox_;
}
PixelAspectRatioComboBox* pixel_aspect_combobox() const
{
return pixel_aspect_combobox_;
}
PixelFormatComboBox* pixel_format_field() const
{
return pixel_format_field_;
}
const int& threads() const
{
return threads_;
}
void SetThreads(int t)
{
threads_ = t;
}
const QString& pix_fmt() const { return pix_fmt_; }
void SetPixFmt(const QString &s) { pix_fmt_ = s; }
VideoParams::ColorRange color_range() const { return color_range_; }
void SetColorRange(VideoParams::ColorRange c) { color_range_ = c; }
public slots:
void VideoCodecChanged();
void SetTime(const rational &time);
signals:
void ColorSpaceChanged(const QString& colorspace);
void ImageSequenceCheckBoxChanged(bool e);
void TimeChanged(const rational &time);
private:
QWidget* SetupResolutionSection();
QWidget* SetupColorSection();
QWidget* SetupCodecSection();
QComboBox* codec_combobox_;
FrameRateComboBox* frame_rate_combobox_;
QCheckBox* maintain_aspect_checkbox_;
QComboBox* scaling_method_combobox_;
CodecStack* codec_stack_;
ImageSection* image_section_;
H264Section* h264_section_;
H264Section* h265_section_;
AV1Section* av1_section_;
CineformSection *cineform_section_;
ColorSpaceChooser* color_space_chooser_;
IntegerSlider* width_slider_;
IntegerSlider* height_slider_;
ColorManager* color_manager_;
InterlacedComboBox* interlaced_combobox_;
PixelAspectRatioComboBox* pixel_aspect_combobox_;
PixelFormatComboBox* pixel_format_field_;
int threads_;
QString pix_fmt_;
VideoParams::ColorRange color_range_;
ExportFormat::Format format_;
private slots:
void MaintainAspectRatioChanged(bool val);
void OpenAdvancedDialog();
void UpdateFrameRate(rational r);
};
}
#endif // EXPORTVIDEOTAB_H
| 4,907
|
C++
|
.h
| 163
| 26.773006
| 84
| 0.754158
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,534
|
exportformatcombobox.h
|
olive-editor_olive/app/dialog/export/exportformatcombobox.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 EXPORTFORMATCOMBOBOX_H
#define EXPORTFORMATCOMBOBOX_H
#include <QComboBox>
#include <QWidgetAction>
#include "codec/exportformat.h"
#include "node/output/track/track.h"
#include "widget/menu/menu.h"
namespace olive {
class ExportFormatComboBox : public QComboBox
{
Q_OBJECT
public:
enum Mode {
kShowAllFormats,
kShowAudioOnly,
kShowVideoOnly,
kShowSubtitlesOnly
};
ExportFormatComboBox(Mode mode, QWidget *parent = nullptr);
ExportFormatComboBox(QWidget *parent = nullptr) :
ExportFormatComboBox(kShowAllFormats, parent)
{}
ExportFormat::Format GetFormat() const
{
return current_;
}
void showPopup();
signals:
void FormatChanged(ExportFormat::Format fmt);
public slots:
void SetFormat(ExportFormat::Format fmt);
private slots:
void HandleIndexChange(QAction *a);
private:
void PopulateType(Track::Type type);
QWidgetAction *CreateHeader(const QIcon &icon, const QString &title);
Menu *custom_menu_;
ExportFormat::Format current_;
};
}
#endif // EXPORTFORMATCOMBOBOX_H
| 1,764
|
C++
|
.h
| 55
| 29.163636
| 71
| 0.776987
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
19,535
|
exportsubtitlestab.h
|
olive-editor_olive/app/dialog/export/exportsubtitlestab.h
|
/***
Olive - Non-Linear Video Editor
Copyright (C) 2022 Olive 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 EXPORTSUBTITLESTAB_H
#define EXPORTSUBTITLESTAB_H
#include <QCheckBox>
#include <QComboBox>
#include <QLabel>
#include "codec/exportformat.h"
#include "common/qtutils.h"
#include "dialog/export/exportformatcombobox.h"
namespace olive {
class ExportSubtitlesTab : public QWidget
{
Q_OBJECT
public:
ExportSubtitlesTab(QWidget *parent = nullptr);
bool GetSidecarEnabled() const { return sidecar_checkbox_->isChecked(); }
void SetSidecarEnabled(bool e) { sidecar_checkbox_->setEnabled(e); }
ExportFormat::Format GetSidecarFormat() const { return sidecar_format_combobox_->GetFormat(); }
void SetSidecarFormat(ExportFormat::Format f) { sidecar_format_combobox_->SetFormat(f); }
int SetFormat(ExportFormat::Format format);
ExportCodec::Codec GetSubtitleCodec()
{
return static_cast<ExportCodec::Codec>(codec_combobox_->currentData().toInt());
}
void SetSubtitleCodec(ExportCodec::Codec c)
{
QtUtils::SetComboBoxData(codec_combobox_, c);
}
private:
QCheckBox *sidecar_checkbox_;
QLabel *sidecar_format_label_;
ExportFormatComboBox *sidecar_format_combobox_;
QComboBox *codec_combobox_;
};
}
#endif // EXPORTSUBTITLESTAB_H
| 1,892
|
C++
|
.h
| 49
| 35.836735
| 97
| 0.775521
|
olive-editor/olive
| 8,144
| 552
| 131
|
GPL-3.0
|
9/20/2024, 9:26:25 PM (Europe/Amsterdam)
| false
| false
| false
| false
| false
| false
| false
| false
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.