void AssetPopup::create_objects()
{
-// add_item(format = new AssetListFormat(mwindow));
add_item(info = new AssetPopupInfo(mwindow, this));
+ add_item(format = new AssetListFormat(mwindow));
add_item(new AssetPopupSort(mwindow, this));
add_item(index = new AssetPopupBuildIndex(mwindow, this));
add_item(view = new AssetPopupView(mwindow, this));
int AssetPopup::update()
{
-// format->update();
+ format->update();
gui->collect_assets();
return 0;
}
AssetPopupBuildIndex *index;
AssetPopupView *view;
AssetPopupViewWindow *view_window;
-// AssetListFormat *format;
+ AssetListFormat *format;
};
class AssetPopupInfo : public BC_MenuItem
CWrapper(set_outpoint)
CWrapper(clear_inpoint)
CWrapper(clear_outpoint)
-CWrapper(to_clip)
CWrapper(toggle_label)
CWrapper(prev_label)
CWrapper(next_label)
CWrapper(prev_edit)
CWrapper(next_edit)
+void CWindowEditing::to_clip()
+{
+ mwindow->to_clip(_("composer window: "));
+}
CWindowMeters::CWindowMeters(MWindow *mwindow,
mwindow->delete_outpoint();
}
-void EditPanel::to_clip()
-{
- subwindow->unlock_window();
- mwindow->to_clip();
- subwindow->lock_window("EditPanel::to_clip");
-}
-
EditInPoint::EditInPoint(MWindow *mwindow, EditPanel *panel, int x, int y)
: BC_Button(x, y, mwindow->theme->get_image_set("inbutton"))
virtual void set_outpoint();
virtual void clear_inpoint();
virtual void clear_outpoint();
- virtual void to_clip();
+ virtual void to_clip() = 0;
virtual void toggle_label();
virtual void prev_label();
virtual void next_label();
this->mbuttons = mbuttons;
}
+void MainEditing::to_clip()
+{
+ MWindowGUI *gui = mwindow->gui;
+ gui->unlock_window();
+ mwindow->to_clip(_("main window: "));
+ gui->lock_window("MainEditing::to_clip");
+}
+
public:
MainEditing(MWindow *mwindow, MButtons *mbuttons, int x, int y);
virtual ~MainEditing() {}
+ void to_clip();
MWindow *mwindow;
MButtons *mbuttons;
// Synchronize EDL settings with all playback engines depending on current
// operation. Doesn't redraw anything.
void sync_parameters(int change_type = CHANGE_PARAMS);
- void to_clip();
+ void to_clip(EDL *edl, const char *txt);
+ void to_clip(const char *txt);
int toggle_label(int is_mwindow);
void undo_entry(BC_WindowBase *calling_window_gui);
void redo_entry(BC_WindowBase *calling_window_gui);
#include "bchash.h"
#include "edl.h"
#include "edlsession.h"
+#include "filesystem.h"
#include "filexml.h"
#include "floatauto.h"
#include "floatautos.h"
sync_parameters(CHANGE_EDL);
}
-void MWindow::to_clip()
+void MWindow::to_clip(EDL *edl, const char *txt)
{
FileXML file;
double start, end;
start = edl->local_session->get_selectionstart();
end = edl->local_session->get_selectionend();
- if(EQUIV(end, start))
- {
+ if(EQUIV(end, start)) {
start = 0;
end = edl->tracks->total_length();
}
// Don't copy all since we don't want the clips twice.
- edl->copy(start,
- end,
- 0,
- 0,
- 0,
- &file,
- "",
- 1);
-
+ edl->copy(start, end, 0, 0, 0, &file, "", 1);
EDL *new_edl = new EDL(edl);
new_edl->create_objects();
new_edl->load_xml(&file, LOAD_ALL);
sprintf(new_edl->local_session->clip_title, _("Clip %d"), session->clip_number++);
- char string[BCTEXTLEN];
- Units::totext(string,
- end - start,
+ char duration[BCTEXTLEN];
+ Units::totext(duration, end - start,
edl->session->time_format,
edl->session->sample_rate,
edl->session->frame_rate,
edl->session->frames_per_foot);
- sprintf(new_edl->local_session->clip_notes, _("%s\nCreated from main window"), string);
+ const char *path = edl->path;
+ Track *track=edl->tracks->first;
+ for(; (!path || !*path) && track; track=track->next ) {
+ if( !track->record ) continue;
+ Edit *edit = track->edits->editof(start, PLAY_FORWARD, 0);
+ if( !edit ) continue;
+ Indexable *indexable = edit->get_source();
+ if( !indexable ) continue;
+ path = indexable->path;
+ }
+
+ time_t now; time(&now);
+ struct tm *tm = localtime(&now);
+ char *cp = new_edl->local_session->clip_notes;
+ int n, sz = sizeof(new_edl->local_session->clip_notes)-1;
+ if( txt && *txt ) {
+ n = snprintf(cp, sz, "%s", txt);
+ cp += n; sz -= n;
+ }
+ n = snprintf(cp, sz,
+ "%02d/%02d/%02d %02d:%02d:%02d, +%s\n",
+ tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday,
+ tm->tm_hour, tm->tm_min, tm->tm_sec, duration);
+ cp += n; sz -= n;
+ if( path && *path ) {
+ FileSystem fs;
+ char title[BCTEXTLEN];
+ fs.extract_name(title, path);
+ n = snprintf(cp, sz, "%s", title);
+ cp += n; sz -= n;
+ }
+ cp[n] = 0;
new_edl->local_session->set_selectionstart(0);
new_edl->local_session->set_selectionend(0);
save_backup();
gui->unlock_window();
}
+void MWindow::to_clip(const char *txt)
+{
+ to_clip(edl, txt);
+}
int MWindow::toggle_label(int is_mwindow)
{
void VWindowEditing::to_clip()
{
- if(vwindow->get_edl())
- {
- FileXML file;
- EDL *edl = vwindow->get_edl();
- double start = edl->local_session->get_selectionstart();
- double end = edl->local_session->get_selectionend();
-
- if(EQUIV(start, end))
- {
- end = edl->tracks->total_length();
- start = 0;
- }
-
-
-
- edl->copy(start,
- end,
- 1,
- 0,
- 0,
- &file,
- "",
- 1);
-
-
-
-
- EDL *new_edl = new EDL(mwindow->edl);
- new_edl->create_objects();
- new_edl->load_xml(&file, LOAD_ALL);
- sprintf(new_edl->local_session->clip_title,
- _("Clip %d"), mwindow->session->clip_number++);
- char string[BCTEXTLEN];
- Units::totext(string,
- end - start,
- edl->session->time_format,
- edl->session->sample_rate,
- edl->session->frame_rate,
- edl->session->frames_per_foot);
-
- sprintf(new_edl->local_session->clip_notes,
- _("%s\n Created from:\n%s"), string, vwindow->gui->loaded_title);
-
- new_edl->local_session->set_selectionstart(0);
- new_edl->local_session->set_selectionend(0);
-
-
-//printf("VWindowEditing::to_clip 1 %s\n", edl->local_session->clip_title);
- new_edl->local_session->set_selectionstart(0.0);
- new_edl->local_session->set_selectionend(0.0);
- vwindow->clip_edit->create_clip(new_edl);
- }
+ EDL *edl = vwindow->get_edl();
+ if( !edl ) return;
+ mwindow->to_clip(edl, _("viewer window: "));
}
-
VWindowSource::VWindowSource(MWindow *mwindow, VWindowGUI *vwindow, int x, int y)
: BC_PopupTextBox(vwindow,
&vwindow->sources,
IlmThread/.libs/libIlmThread.a ],
[ Iex Half Imath config IlmThread ])
-PKG_DEF([ladspa], [ladspa-05182015], [], [])
+PKG_DEF([ladspa], [ladspa-0.4.17], [], [])
PKG_3RD([lame],[auto],
[lame-3.99.5],
int BC_ListBox::get_text_h(BC_ListBoxItem *item)
{
int h = item->get_text_h();
- if( h < 0 ) item->set_text_h(h = get_text_height(MEDIUMFONT));
+ if( h < 0 ) item->set_text_h(h = get_text_height(MEDIUMFONT, item->get_text()));
return h;
}
$(LADSPA_DIR):
mkdir -p $@
- if [ -d $(THIRDPARTY)/ladspa-*/usr/local/lib/ladspa ]; then \
- cp -a $(THIRDPARTY)/ladspa-*/usr/local/lib/ladspa/. $@/. ; \
+ if [ -d $(THIRDPARTY)/ladspa-*/usr/local/lib*/ladspa ]; then \
+ cp -a $(THIRDPARTY)/ladspa-*/usr/local/lib*/ladspa/. $@/. ; \
fi
# parallel compilation of all directories
mjpegtools.cflags?="$(call inc_path,libjpeg) $(call ld_path,libjpeg,.libs)"
mjpegtools.mak_params?=; ln -s . $(call bld_path,mjpegtools,utils)/mjpegtools
mjpegtools.cfg_params?= --enable-shared=no
-ladspa.cfg_vars?= ./autogen.sh; CFLAGS+=' -Dinline="" '
+ladspa.cfg_vars?= CFLAGS+=' -Dinline="" '
ladspa.mak_params?=; $(MAKE) -C ladspa* install DESTDIR=$(call bld_path,ladspa)
libavc1394.cfg_vars?=PKG_CONFIG_PATH=$(call bld_path,libraw1394)
libavc1394.cflags?="$(call inc_path,libraw1394)"