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
|
#endif
|
||||||
|
|
||||||
std::string extension = filename.substr(filename.find_last_of(".") + 1);
|
std::string extension = filename.substr(filename.find_last_of(".") + 1);
|
||||||
if (extension != "mix")
|
if (!filename.empty() && extension != "mix")
|
||||||
filename += ".mix";
|
filename += ".mix";
|
||||||
|
|
||||||
return filename;
|
return filename;
|
||||||
|
|||||||
@@ -316,6 +316,7 @@ void UserInterface::handleKeyboard()
|
|||||||
// No CTRL modifier
|
// No CTRL modifier
|
||||||
else {
|
else {
|
||||||
ctrl_modifier_active = false;
|
ctrl_modifier_active = false;
|
||||||
|
Source *_cs = Mixer::manager().currentSource();
|
||||||
|
|
||||||
// Application F-Keys
|
// Application F-Keys
|
||||||
if (ImGui::IsKeyPressed( GLFW_KEY_F1 ))
|
if (ImGui::IsKeyPressed( GLFW_KEY_F1 ))
|
||||||
@@ -328,6 +329,12 @@ void UserInterface::handleKeyboard()
|
|||||||
Mixer::manager().setView(View::TEXTURE);
|
Mixer::manager().setView(View::TEXTURE);
|
||||||
else if (ImGui::IsKeyPressed( GLFW_KEY_F12 ))
|
else if (ImGui::IsKeyPressed( GLFW_KEY_F12 ))
|
||||||
StartScreenshot();
|
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
|
// button esc
|
||||||
else if (ImGui::IsKeyPressed( GLFW_KEY_ESCAPE )) {
|
else if (ImGui::IsKeyPressed( GLFW_KEY_ESCAPE )) {
|
||||||
// 1. escape fullscreen
|
// 1. escape fullscreen
|
||||||
@@ -348,14 +355,33 @@ void UserInterface::handleKeyboard()
|
|||||||
Mixer::selection().clear();
|
Mixer::selection().clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// button home to toggle menu
|
|
||||||
else if (ImGui::IsKeyPressed( GLFW_KEY_HOME ))
|
// keys to control the current source if media player is not focused
|
||||||
navigator.togglePannelMenu();
|
if (_cs != nullptr && _cs->active() && (!ImGui::IsAnyWindowFocused() || sourcecontrol.Active()) )
|
||||||
// button home to toggle menu
|
{
|
||||||
else if (ImGui::IsKeyPressed( GLFW_KEY_INSERT ))
|
// Space bar to toggle play / pause
|
||||||
navigator.togglePannelNew();
|
if (ImGui::IsKeyPressed( GLFW_KEY_SPACE )) {
|
||||||
// normal keys in workspace // make sure no entry / window box is active
|
_cs->play( !_cs->playing() );
|
||||||
else if ( !ImGui::IsAnyWindowFocused() ){
|
}
|
||||||
|
// 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
|
||||||
|
if ( !ImGui::IsAnyWindowFocused() )
|
||||||
|
{
|
||||||
// Backspace to delete source
|
// Backspace to delete source
|
||||||
if (ImGui::IsKeyPressed( GLFW_KEY_BACKSPACE ) || ImGui::IsKeyPressed( GLFW_KEY_DELETE ))
|
if (ImGui::IsKeyPressed( GLFW_KEY_BACKSPACE ) || ImGui::IsKeyPressed( GLFW_KEY_DELETE ))
|
||||||
Mixer::manager().deleteSelection();
|
Mixer::manager().deleteSelection();
|
||||||
@@ -1986,7 +2012,7 @@ void ToolBox::Render()
|
|||||||
///
|
///
|
||||||
/// SOURCE CONTROLLER
|
/// 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),
|
timeline_height_(0.f), scrollbar_(0.f), mediaplayer_height_(0.f), buttons_width_(0.f),
|
||||||
active_label_(LABEL_AUTO_MEDIA_PLAYER), active_selection_(-1),
|
active_label_(LABEL_AUTO_MEDIA_PLAYER), active_selection_(-1),
|
||||||
selection_context_menu_(false), selection_mediaplayer_(nullptr), selection_target_slower_(0), selection_target_faster_(0),
|
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;
|
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()
|
void SourceController::Render()
|
||||||
{
|
{
|
||||||
// reset on session change
|
// reset on session change
|
||||||
@@ -2041,6 +2075,7 @@ void SourceController::Render()
|
|||||||
}
|
}
|
||||||
source_window_pos = ImGui::GetWindowPos();
|
source_window_pos = ImGui::GetWindowPos();
|
||||||
source_window_size = ImGui::GetWindowSize();
|
source_window_size = ImGui::GetWindowSize();
|
||||||
|
focused_ = ImGui::IsWindowFocused();
|
||||||
|
|
||||||
// menu (no title bar)
|
// menu (no title bar)
|
||||||
if (ImGui::BeginMenuBar())
|
if (ImGui::BeginMenuBar())
|
||||||
|
|||||||
@@ -106,6 +106,7 @@ public:
|
|||||||
|
|
||||||
class SourceController
|
class SourceController
|
||||||
{
|
{
|
||||||
|
bool focused_;
|
||||||
float min_width_;
|
float min_width_;
|
||||||
float h_space_;
|
float h_space_;
|
||||||
float v_space_;
|
float v_space_;
|
||||||
@@ -152,6 +153,7 @@ public:
|
|||||||
|
|
||||||
void resetActiveSelection();
|
void resetActiveSelection();
|
||||||
void Render();
|
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">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>Apl</key>
|
<key>Apl</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
<key>LSAppNapIsDisabled</key>
|
<key>CFBundleDocumentTypes</key>
|
||||||
<true/>
|
<array>
|
||||||
<key>NSCameraUsageDescription</key>
|
<dict>
|
||||||
<string>vimix needs to access the camera to enable camera sources.</string>
|
<key>CFBundleTypeName</key>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<string>vimix session</string>
|
||||||
<string>10.14.0</string>
|
<key>CFBundleTypeRole</key>
|
||||||
<key>NSHighResolutionCapable</key>
|
<string>Editor</string>
|
||||||
<true/>
|
<key>LSHandlerRank</key>
|
||||||
<key>NSPrincipalClass</key>
|
<string>Owner</string>
|
||||||
<string>NSApplication</string>
|
<key>LSIsAppleDefaultForType</key>
|
||||||
<key>NSAppTransportSecurity</key>
|
<true/>
|
||||||
<dict>
|
<key>LSItemContentTypes</key>
|
||||||
<key>NSAllowsArbitraryLoads</key>
|
<array>
|
||||||
<true/>
|
<string>com.bhbn.mix</string>
|
||||||
</dict>
|
</array>
|
||||||
<key>CFBundleDocumentTypes</key>
|
</dict>
|
||||||
<array>
|
</array>
|
||||||
<dict>
|
<key>CFBundleExecutable</key>
|
||||||
<key>CFBundleTypeExtensions</key>
|
<string>vimix</string>
|
||||||
<array>
|
<key>CFBundleGetInfoString</key>
|
||||||
<string>mix</string>
|
<string>vimix - Video Live Mix</string>
|
||||||
</array>
|
<key>CFBundleIconFile</key>
|
||||||
<key>CFBundleTypeIconFile</key>
|
<string>vimix.icns</string>
|
||||||
<string>vimix.icns</string>
|
<key>CFBundleIdentifier</key>
|
||||||
<key>CFBundleTypeName</key>
|
<string>com.bhbn.vimix</string>
|
||||||
<string>vimix session</string>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<key>CFBundleTypeRole</key>
|
<string>6.0</string>
|
||||||
<string>Editor</string>
|
<key>CFBundleLongVersionString</key>
|
||||||
<key>LSIsAppleDefaultForType</key>
|
<string>0.6.0</string>
|
||||||
<true/>
|
<key>CFBundleName</key>
|
||||||
<key>LSHandlerRank</key>
|
<string>vimix</string>
|
||||||
<string>Owner</string>
|
<key>CFBundlePackageType</key>
|
||||||
<key>LSItemContentTypes</key>
|
<string>APPL</string>
|
||||||
<array>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>com.bhbn.mix</string>
|
<string>0.6</string>
|
||||||
</array>
|
<key>CFBundleVersion</key>
|
||||||
</dict>
|
<string>0.6</string>
|
||||||
</array>
|
<key>CSResourcesFileMapped</key>
|
||||||
<key>CFBundleExecutable</key>
|
<true/>
|
||||||
<string>vimix</string>
|
<key>LSAppNapIsDisabled</key>
|
||||||
<key>CFBundleGetInfoString</key>
|
<true/>
|
||||||
<string>vimix - Video Live Mix</string>
|
<key>LSApplicationCategoryType</key>
|
||||||
<key>CFBundleIconFile</key>
|
<string>public.app-category.video</string>
|
||||||
<string>vimix.icns</string>
|
<key>LSMinimumSystemVersion</key>
|
||||||
<key>CFBundleIdentifier</key>
|
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||||
<string>com.bhbn.vimix</string>
|
<key>NSAppTransportSecurity</key>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<dict>
|
||||||
<string>6.0</string>
|
<key>NSAllowsArbitraryLoads</key>
|
||||||
<key>CFBundleLongVersionString</key>
|
<true/>
|
||||||
<string>0.6.0</string>
|
</dict>
|
||||||
<key>CFBundleName</key>
|
<key>NSCameraUsageDescription</key>
|
||||||
<string>vimix</string>
|
<string>vimix needs to access the camera to enable camera sources.</string>
|
||||||
<key>CFBundlePackageType</key>
|
<key>NSHighResolutionCapable</key>
|
||||||
<string>APPL</string>
|
<true/>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>NSHumanReadableCopyright</key>
|
||||||
<string>0.6</string>
|
<string>Copyright © 2021 Bruno Herbelin. All rights reserved.</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>NSPrincipalClass</key>
|
||||||
<string>0.6</string>
|
<string>NSApplication</string>
|
||||||
<key>CSResourcesFileMapped</key>
|
|
||||||
<true/>
|
|
||||||
<key>NSHumanReadableCopyright</key>
|
|
||||||
<string>Bruno Herbelin</string>
|
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</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