updated code for clang compatibility
This commit is contained in:
+1
-1
@@ -189,7 +189,7 @@ void ExportThread::run() {
|
||||
acodec_ctx->channels = av_get_channel_layout_nb_channels(acodec_ctx->channel_layout);
|
||||
acodec_ctx->sample_fmt = acodec->sample_fmts[0];
|
||||
acodec_ctx->bit_rate = audio_bitrate * 1000;
|
||||
acodec_ctx->time_base = {1, audio_sampling_rate};
|
||||
acodec_ctx->time_base = (AVRational){1, audio_sampling_rate};
|
||||
|
||||
if (fmt_ctx->oformat->flags & AVFMT_GLOBALHEADER) {
|
||||
acodec_ctx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
|
||||
|
||||
@@ -103,9 +103,14 @@ FORMS += \
|
||||
dialogs/preferencesdialog.ui
|
||||
|
||||
win32 {
|
||||
LIBS += -L../ffmpeg/lib -lavutil -lavformat -lavcodec -lswscale -lswresample -lopengl32
|
||||
LIBS += -L../ffmpeg/lib -lopengl32
|
||||
INCLUDEPATH = ../ffmpeg/include
|
||||
RC_FILE = icons/win.rc
|
||||
LIBS += -lavutil -lavformat -lavcodec -lswscale -lswresample
|
||||
}
|
||||
|
||||
mac {
|
||||
INCLUDEPATH = /usr/local/include
|
||||
}
|
||||
|
||||
linux {
|
||||
|
||||
+12
-12
@@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 4.6.2, 2018-07-06T04:54:40. -->
|
||||
<!-- Written by QtCreator 4.6.2, 2018-07-06T11:56:30. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
<value type="QByteArray">{be57d5b1-e5ae-4026-9f48-bb6e01f50d4e}</value>
|
||||
<value type="QByteArray">{0973e18b-ea93-4e4c-8225-598cb1e91b00}</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
@@ -39,10 +39,10 @@
|
||||
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
||||
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
||||
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
||||
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">2</value>
|
||||
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
|
||||
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
|
||||
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
||||
<value type="int" key="EditorConfiguration.TabKeyBehavior">1</value>
|
||||
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
||||
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
||||
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
||||
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
||||
@@ -59,14 +59,14 @@
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.5.1 GCC 64bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.5.1 GCC 64bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.55.gcc_64_kit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.5.1 clang 64bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.5.1 clang 64bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.55.clang_64_kit</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/matt/Documents/build-olive-Desktop_Qt_5_5_1_GCC_64bit-Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/matt/build-olive-Desktop_Qt_5_5_1_clang_64bit-Debug</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
@@ -126,7 +126,7 @@
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/matt/build-olive-Desktop_Qt_5_5_1_GCC_64bit-Release</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/matt/build-olive-Desktop_Qt_5_5_1_clang_64bit-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
@@ -186,7 +186,7 @@
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/matt/build-olive-Desktop_Qt_5_5_1_GCC_64bit-Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/matt/build-olive-Desktop_Qt_5_5_1_clang_64bit-Profile</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
@@ -304,13 +304,13 @@
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">olive</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/home/matt/olive/olive.pro</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/Users/matt/olive/olive.pro</value>
|
||||
<value type="bool" key="QmakeProjectManager.QmakeRunConfiguration.UseLibrarySearchPath">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">olive.pro</value>
|
||||
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory.default">/home/matt/Documents/build-olive-Desktop_Qt_5_5_1_GCC_64bit-Debug</value>
|
||||
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory.default">/Users/matt/build-olive-Desktop_Qt_5_5_1_clang_64bit-Debug/olive.app/Contents/MacOS</value>
|
||||
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
|
||||
+2
-2
@@ -268,7 +268,7 @@ void Timeline::select_all() {
|
||||
selections.clear();
|
||||
for (int i=0;i<sequence->clip_count();i++) {
|
||||
Clip* c = sequence->get_clip(i);
|
||||
if (c != NULL) selections.append({c->timeline_in, c->timeline_out, c->track});
|
||||
if (c != NULL) selections.append((Selection){c->timeline_in, c->timeline_out, c->track});
|
||||
}
|
||||
repaint_timeline();
|
||||
}
|
||||
@@ -621,7 +621,7 @@ void Timeline::paste() {
|
||||
QVector<Selection> delete_areas;
|
||||
for (int i=0;i<clip_clipboard.size();i++) {
|
||||
Clip* c = clip_clipboard.at(i);
|
||||
delete_areas.append({c->timeline_in + playhead, c->timeline_out + playhead, c->track});
|
||||
delete_areas.append((Selection){c->timeline_in + playhead, c->timeline_out + playhead, c->track});
|
||||
}
|
||||
delete_areas_and_relink(delete_areas);
|
||||
|
||||
|
||||
@@ -35,7 +35,6 @@ private:
|
||||
void set_undo();
|
||||
QVector<QVector<Clip*>*> undo_stack;
|
||||
int undo_pointer;
|
||||
int undo_stack_start;
|
||||
};
|
||||
|
||||
// static variable for the currently active sequence
|
||||
|
||||
@@ -13,7 +13,7 @@ class CollapsibleWidgetHeader : public QWidget {
|
||||
Q_OBJECT
|
||||
public:
|
||||
CollapsibleWidgetHeader(QWidget* parent = 0);
|
||||
bool selected = false;
|
||||
bool selected;
|
||||
protected:
|
||||
void mousePressEvent(QMouseEvent* event);
|
||||
signals:
|
||||
|
||||
@@ -110,7 +110,7 @@ void TimelineWidget::dropEvent(QDropEvent* event) {
|
||||
QVector<Selection> delete_areas;
|
||||
for (int i=0;i<panel_timeline->ghosts.size();i++) {
|
||||
const Ghost& g = panel_timeline->ghosts.at(i);
|
||||
delete_areas.append({g.in, g.out, g.track});
|
||||
delete_areas.append((Selection){g.in, g.out, g.track});
|
||||
}
|
||||
panel_timeline->delete_areas_and_relink(delete_areas);
|
||||
|
||||
@@ -171,7 +171,7 @@ void TimelineWidget::mouseDoubleClickEvent(QMouseEvent *event) {
|
||||
if (clip_index >= 0) {
|
||||
Clip* clip = sequence->get_clip(clip_index);
|
||||
if (!(event->modifiers() & Qt::ShiftModifier)) panel_timeline->selections.clear();
|
||||
panel_timeline->selections.append({clip->timeline_in, clip->timeline_out, clip->track});
|
||||
panel_timeline->selections.append((Selection){clip->timeline_in, clip->timeline_out, clip->track});
|
||||
panel_timeline->repaint_timeline();
|
||||
}
|
||||
}
|
||||
@@ -222,7 +222,7 @@ void TimelineWidget::mousePressEvent(QMouseEvent *event) {
|
||||
|
||||
Clip* clip = sequence->get_clip(clip_index);
|
||||
if (clip != NULL) {
|
||||
panel_timeline->selections.append({clip->timeline_in, clip->timeline_out, clip->track});
|
||||
panel_timeline->selections.append((Selection){clip->timeline_in, clip->timeline_out, clip->track});
|
||||
|
||||
if (panel_timeline->select_also_seeks) {
|
||||
panel_timeline->seek(clip->timeline_in);
|
||||
@@ -233,7 +233,7 @@ void TimelineWidget::mousePressEvent(QMouseEvent *event) {
|
||||
for (int i=0;i<clip->linked.size();i++) {
|
||||
Clip* link = sequence->get_clip(c->linked.at(i));
|
||||
if (!panel_timeline->is_clip_selected(link)) {
|
||||
panel_timeline->selections.append({link->timeline_in, link->timeline_out, link->track});
|
||||
panel_timeline->selections.append((Selection){link->timeline_in, link->timeline_out, link->track});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -291,7 +291,7 @@ void TimelineWidget::mouseReleaseEvent(QMouseEvent *event) {
|
||||
c->timeline_out = g.out;
|
||||
c->track = g.track;
|
||||
|
||||
delete_areas.append({g.in, g.out, g.track});
|
||||
delete_areas.append((Selection){g.in, g.out, g.track});
|
||||
|
||||
old_clips.append(g.clip);
|
||||
copy_clips.append(c);
|
||||
@@ -321,7 +321,7 @@ void TimelineWidget::mouseReleaseEvent(QMouseEvent *event) {
|
||||
if (panel_timeline->tool == TIMELINE_TOOL_POINTER) {
|
||||
// step 2 - delete anything that exists in area that clip is moving to
|
||||
// note: ripples are non-destructive so this is pointer-tool exclusive
|
||||
delete_areas.append({g.in, g.out, g.track});
|
||||
delete_areas.append((Selection){g.in, g.out, g.track});
|
||||
}
|
||||
}
|
||||
panel_timeline->delete_areas_and_relink(delete_areas);
|
||||
@@ -762,7 +762,7 @@ void TimelineWidget::mouseMoveEvent(QMouseEvent *event) {
|
||||
for (int i=0;i<sequence->clip_count();i++) {
|
||||
Clip* c = sequence->get_clip(i);
|
||||
if (c != NULL && panel_timeline->is_clip_selected(c)) {
|
||||
panel_timeline->ghosts.append({c, c->timeline_in, c->timeline_out, c->track, c->clip_in});
|
||||
panel_timeline->ghosts.append((Ghost){c, c->timeline_in, c->timeline_out, c->track, c->clip_in});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -929,7 +929,7 @@ void TimelineWidget::mouseMoveEvent(QMouseEvent *event) {
|
||||
Clip* c = sequence->get_clip(i);
|
||||
if (c != NULL && c->track == mouse_track) {
|
||||
if (c->timeline_in > mouse_frame_lower && c->timeline_in < mouse_frame_upper) {
|
||||
int nc = abs(c->timeline_in + 1 - panel_timeline->cursor_frame);
|
||||
int nc = qAbs(c->timeline_in + 1 - panel_timeline->cursor_frame);
|
||||
if (nc < closeness) {
|
||||
panel_timeline->trim_target = i;
|
||||
panel_timeline->trim_in = true;
|
||||
@@ -938,7 +938,7 @@ void TimelineWidget::mouseMoveEvent(QMouseEvent *event) {
|
||||
}
|
||||
}
|
||||
if (c->timeline_out > mouse_frame_lower && c->timeline_out < mouse_frame_upper) {
|
||||
int nc = abs(c->timeline_out - 1 - panel_timeline->cursor_frame);
|
||||
int nc = qAbs(c->timeline_out - 1 - panel_timeline->cursor_frame);
|
||||
if (nc < closeness) {
|
||||
panel_timeline->trim_target = i;
|
||||
panel_timeline->trim_in = false;
|
||||
|
||||
Reference in New Issue
Block a user