Skip to content

Commit

Permalink
Merge branch 'main' into ci-fix-issue-with-icu4c
Browse files Browse the repository at this point in the history
  • Loading branch information
cedrik-fuoco-adsk authored Nov 13, 2024
2 parents e4aec7b + 7e8407a commit 5969fd4
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 21 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ compile_commands.json
**/.python-version

cmake-*/*
build/*
_build/*
/*build*/
_install/*
.venv/*
11 changes: 11 additions & 0 deletions src/lib/app/RvCommon/RvPreferences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3593,6 +3593,10 @@ RvPreferences::videoFormatChanged(int v)
settings.setValue("videoFormat", v);
settings.endGroup();

// The user has set a new video format which overrides the video format
// specified on the command line if any
Rv::Options::sharedOptions().presentFormat=nullptr;

updateVideoDataFormat(d);
updateVideoSync(d);
updateVideoSyncSource(d);
Expand Down Expand Up @@ -3651,6 +3655,10 @@ RvPreferences::videoDataFormatChanged(int v)
settings.setValue("dataFormat", v);
settings.endGroup();

// The user has set a new video data format which overrides the video
// data format specified on the command line if any
Rv::Options::sharedOptions().presentData=nullptr;

updateVideoSync(d);
updateVideoSyncSource(d);
updateVideoProfiles(d);
Expand Down Expand Up @@ -3711,6 +3719,9 @@ RvPreferences::videoAudioCheckBoxChanged(int v)
settings.beginGroup(QString::fromUtf8(str.str().c_str()));
settings.setValue("useAsAudioDevice", checked);
settings.endGroup();

// This user action overrides the presentAudio command line option if any
Rv::Options::sharedOptions().presentAudio=-1;
}
}

Expand Down
57 changes: 46 additions & 11 deletions src/lib/ip/IPBaseNodes/FileSourceIPNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -634,14 +634,8 @@ namespace IPCore
// e.g. propagateMediaChange() might occurs before those two.
if( m_workItemID )
{
// We make a copy of workItemID because it can be clear
// before the lamda is finished.
// It is used by the graph to indicate the start and end loading
// of a graph.
int workItemID = m_workItemID;
addDispatchJob( Application::instance()->dispatchToMainThread(
[this, sharedMedia, proxySharedMedia,
workItemID]( Application::DispatchID dispatchID )
[this, sharedMedia, proxySharedMedia]( Application::DispatchID dispatchID )
{
{
LockGuard dispatchGuard( m_dispatchIDCancelRequestedMutex );
Expand Down Expand Up @@ -2756,13 +2750,54 @@ namespace IPCore
}

mov = openProxyMovie( errMsg.str(), 0.0, filename, defaultFPS );
setMediaActive( false );

ostringstream str;
str << name() << ";;" << file << ";;" << mediaRepName();
TwkApp::GenericStringEvent event( "source-media-unavailable", graph(),
str.str() );
graph()->sendEvent( event );
TwkApp::GenericStringEvent event( "source-media-unavailable", graph(), str.str() );

// The following instructions can only be executed on the main thread.
// Dispatch to main thread only when using async loading.
if (!m_workItemID)
{
// We are not using async loading: we can safely execute the following instructions
setMediaActive( false );
graph()->sendEvent( event );
}
else
{
// We are using async loading: Dispatch to main thread
addDispatchJob( Application::instance()->dispatchToMainThread(
[this, event]( Application::DispatchID dispatchID )
{
{
LockGuard dispatchGuard( m_dispatchIDCancelRequestedMutex );

bool isCanceled =
( m_dispatchIDCancelRequestedSet.count( dispatchID ) >= 1 );
if( isCanceled )
{
m_dispatchIDCancelRequestedSet.erase( dispatchID );
return;
}
}

setMediaActive( false );
graph()->sendEvent( event );

{
LockGuard dispatchGuard( m_dispatchIDCancelRequestedMutex );
bool isCanceled =
( m_dispatchIDCancelRequestedSet.count( dispatchID ) >= 1 );
if( isCanceled )
{
m_dispatchIDCancelRequestedSet.erase( dispatchID );
return;
}
}

removeDispatchJob( dispatchID );
} ) );
}
}

SharedMediaPointer sharedMedia(
Expand Down
25 changes: 17 additions & 8 deletions src/plugins/rv-packages/otio_reader/annotation_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def hook_function(in_timeline, argument_map=None) -> None:
"join": 3,
"cap": 2,
"splat": 1,
"mode": 0 if layer.type.lower() == "color" else 1,
"mode": 0 if layer.type == "COLOR" else 1,
},
)

Expand All @@ -67,11 +67,20 @@ def hook_function(in_timeline, argument_map=None) -> None:
commands.newProperty(width_property, commands.FloatType, 1)

global_width = 2 / 15 # 0.133333...

for point in layer.points:
commands.insertFloatProperty(
points_property,
[point.x * global_scale.x, point.y * global_scale.y],
)
commands.insertFloatProperty(
width_property, [point.width * global_width]
)
points = commands.getFloatProperty(points_property)
if (
len(points) > 1
and points[-1] == point.y * global_scale.y
and points[-2] == point.x * global_scale.x
):
pass
else:
commands.insertFloatProperty(
points_property,
[point.x * global_scale.x, point.y * global_scale.y],
)
commands.insertFloatProperty(
width_property, [point.width * global_width]
)

0 comments on commit 5969fd4

Please sign in to comment.