mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-05 15:30:00 +01:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -115,7 +115,7 @@ std::string DialogToolkit::saveSessionFileDialog(const std::string &path)
|
||||
#endif
|
||||
|
||||
std::string extension = filename.substr(filename.find_last_of(".") + 1);
|
||||
if (extension != "mix")
|
||||
if (!filename.empty() && extension != "mix")
|
||||
filename += ".mix";
|
||||
|
||||
return filename;
|
||||
|
||||
@@ -316,6 +316,7 @@ void UserInterface::handleKeyboard()
|
||||
// No CTRL modifier
|
||||
else {
|
||||
ctrl_modifier_active = false;
|
||||
Source *_cs = Mixer::manager().currentSource();
|
||||
|
||||
// Application F-Keys
|
||||
if (ImGui::IsKeyPressed( GLFW_KEY_F1 ))
|
||||
@@ -328,6 +329,12 @@ void UserInterface::handleKeyboard()
|
||||
Mixer::manager().setView(View::TEXTURE);
|
||||
else if (ImGui::IsKeyPressed( GLFW_KEY_F12 ))
|
||||
StartScreenshot();
|
||||
// button home to toggle menu
|
||||
else if (ImGui::IsKeyPressed( GLFW_KEY_HOME ))
|
||||
navigator.togglePannelMenu();
|
||||
// button home to toggle menu
|
||||
else if (ImGui::IsKeyPressed( GLFW_KEY_INSERT ))
|
||||
navigator.togglePannelNew();
|
||||
// button esc
|
||||
else if (ImGui::IsKeyPressed( GLFW_KEY_ESCAPE )) {
|
||||
// 1. escape fullscreen
|
||||
@@ -348,14 +355,33 @@ void UserInterface::handleKeyboard()
|
||||
Mixer::selection().clear();
|
||||
}
|
||||
}
|
||||
// button home to toggle menu
|
||||
else if (ImGui::IsKeyPressed( GLFW_KEY_HOME ))
|
||||
navigator.togglePannelMenu();
|
||||
// button home to toggle menu
|
||||
else if (ImGui::IsKeyPressed( GLFW_KEY_INSERT ))
|
||||
navigator.togglePannelNew();
|
||||
|
||||
// keys to control the current source if media player is not focused
|
||||
if (_cs != nullptr && _cs->active() && (!ImGui::IsAnyWindowFocused() || sourcecontrol.Active()) )
|
||||
{
|
||||
// Space bar to toggle play / pause
|
||||
if (ImGui::IsKeyPressed( GLFW_KEY_SPACE )) {
|
||||
_cs->play( !_cs->playing() );
|
||||
}
|
||||
// B to rewind to Beginning
|
||||
else if (ImGui::IsKeyPressed( GLFW_KEY_B )) {
|
||||
_cs->replay();
|
||||
}
|
||||
// N for Next frame or fast forward
|
||||
else if (ImGui::IsKeyPressed( GLFW_KEY_N )) {
|
||||
MediaSource *ms = dynamic_cast<MediaSource *>(_cs);
|
||||
if ( ms != nullptr ) {
|
||||
if (ms->playing())
|
||||
ms->mediaplayer()->jump();
|
||||
else
|
||||
ms->mediaplayer()->step();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// normal keys in workspace // make sure no entry / window box is active
|
||||
else if ( !ImGui::IsAnyWindowFocused() ){
|
||||
if ( !ImGui::IsAnyWindowFocused() )
|
||||
{
|
||||
// Backspace to delete source
|
||||
if (ImGui::IsKeyPressed( GLFW_KEY_BACKSPACE ) || ImGui::IsKeyPressed( GLFW_KEY_DELETE ))
|
||||
Mixer::manager().deleteSelection();
|
||||
@@ -1986,7 +2012,7 @@ void ToolBox::Render()
|
||||
///
|
||||
/// SOURCE CONTROLLER
|
||||
///
|
||||
SourceController::SourceController() : min_width_(0.f), h_space_(0.f), v_space_(0.f), buttons_height_(0.f),
|
||||
SourceController::SourceController() : focused_(false), min_width_(0.f), h_space_(0.f), v_space_(0.f), buttons_height_(0.f),
|
||||
timeline_height_(0.f), scrollbar_(0.f), mediaplayer_height_(0.f), buttons_width_(0.f),
|
||||
active_label_(LABEL_AUTO_MEDIA_PLAYER), active_selection_(-1),
|
||||
selection_context_menu_(false), selection_mediaplayer_(nullptr), selection_target_slower_(0), selection_target_faster_(0),
|
||||
@@ -2003,6 +2029,14 @@ void SourceController::resetActiveSelection()
|
||||
active_label_ = LABEL_AUTO_MEDIA_PLAYER;
|
||||
}
|
||||
|
||||
|
||||
bool SourceController::Active()
|
||||
{
|
||||
return ( Settings::application.widget.media_player
|
||||
&& (Settings::application.widget.media_player_view < 0 || Settings::application.widget.media_player_view == Settings::application.current_view )
|
||||
&& focused_);
|
||||
}
|
||||
|
||||
void SourceController::Render()
|
||||
{
|
||||
// reset on session change
|
||||
@@ -2041,6 +2075,7 @@ void SourceController::Render()
|
||||
}
|
||||
source_window_pos = ImGui::GetWindowPos();
|
||||
source_window_size = ImGui::GetWindowSize();
|
||||
focused_ = ImGui::IsWindowFocused();
|
||||
|
||||
// menu (no title bar)
|
||||
if (ImGui::BeginMenuBar())
|
||||
|
||||
@@ -106,6 +106,7 @@ public:
|
||||
|
||||
class SourceController
|
||||
{
|
||||
bool focused_;
|
||||
float min_width_;
|
||||
float h_space_;
|
||||
float v_space_;
|
||||
@@ -152,6 +153,7 @@ public:
|
||||
|
||||
void resetActiveSelection();
|
||||
void Render();
|
||||
bool Active();
|
||||
};
|
||||
|
||||
|
||||
|
||||
124
osx/Info.plist
124
osx/Info.plist
@@ -2,69 +2,65 @@
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Apl</key>
|
||||
<string></string>
|
||||
<key>LSAppNapIsDisabled</key>
|
||||
<true/>
|
||||
<key>NSCameraUsageDescription</key>
|
||||
<string>vimix needs to access the camera to enable camera sources.</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.14.0</string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<true/>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>mix</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>vimix.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>vimix session</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
<key>LSIsAppleDefaultForType</key>
|
||||
<true/>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Owner</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>com.bhbn.mix</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>vimix</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>vimix - Video Live Mix</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>vimix.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.bhbn.vimix</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleLongVersionString</key>
|
||||
<string>0.6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>vimix</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.6</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>0.6</string>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Bruno Herbelin</string>
|
||||
<key>Apl</key>
|
||||
<string></string>
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>vimix session</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Owner</string>
|
||||
<key>LSIsAppleDefaultForType</key>
|
||||
<true/>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>com.bhbn.mix</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>vimix</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>vimix - Video Live Mix</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>vimix.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.bhbn.vimix</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleLongVersionString</key>
|
||||
<string>0.6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>vimix</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.6</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>0.6</string>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
<key>LSAppNapIsDisabled</key>
|
||||
<true/>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.video</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>NSCameraUsageDescription</key>
|
||||
<string>vimix needs to access the camera to enable camera sources.</string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<true/>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2021 Bruno Herbelin. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
12
vimix.entitlements
Normal file
12
vimix.entitlements
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.cs.disable-library-validation</key>
|
||||
<true/>
|
||||
<key>com.apple.security.device.camera</key>
|
||||
<true/>
|
||||
<key>com.apple.security.personal-information.photos-library</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
Reference in New Issue
Block a user