{
add_item(load_file = new AssetPopupLoadFile(mwindow, gui));
add_item(format = new AWindowListFormat(mwindow, gui));
+ add_item(select_used = new AssetSelectUsed(mwindow, gui));
+ BC_SubMenu *submenu;
+ select_used->add_submenu(submenu = new BC_SubMenu());
+ submenu->add_submenuitem(new AssetSelectUsedItem(select_used, _("Used"), SELECT_USED));
+ submenu->add_submenuitem(new AssetSelectUsedItem(select_used, _("Unused"), SELECT_UNUSED));
add_item(new AWindowListSort(mwindow, gui));
add_item(new AssetListCopy(mwindow, gui));
add_item(new AssetListPaste(mwindow, gui));
AWindowListFormat *format;
AssetSnapshot *asset_snapshot;
AssetGrabshot *asset_grabshot;
+ AssetSelectUsed *select_used;
int shots_displayed;
};
return 1;
}
+AssetSelectUsedItem::AssetSelectUsedItem(AssetSelectUsed *select_used, const char *text, int action)
+ : BC_MenuItem(text)
+{
+ this->select_used = select_used;
+ this->action = action;
+}
+
+int AssetSelectUsedItem::handle_event()
+{
+ MWindow *mwindow = select_used->mwindow;
+ AWindowGUI *gui = select_used->gui;
+ AWindowAssets *asset_list = gui->asset_list;
+ ArrayList<BC_ListBoxItem*> *data = gui->displayed_assets;
+ asset_list->set_all_selected(data, 0);
+
+ for( int i = 0; i < data->total; i++ ) {
+ AssetPicon *picon = (AssetPicon*)data->values[i];
+ Indexable *idxbl = picon->indexable ? picon->indexable :
+ picon->edl ? picon->edl->get_proxy_asset() : 0;
+ int used = idxbl && mwindow->edl->in_use(idxbl) ? 1 : 0;
+ int selected = 0;
+ switch( action ) {
+ case SELECT_USED: selected = used; break;
+ case SELECT_UNUSED: selected = !used; break;
+ }
+ asset_list->set_selected(data, i, selected);
+ }
+
+ int asset_xposition = asset_list->get_xposition();
+ int asset_yposition = asset_list->get_yposition();
+ asset_list->update(gui->displayed_assets, gui->asset_titles,
+ mwindow->edl->session->asset_columns, ASSET_COLUMNS,
+ asset_xposition, asset_yposition, -1, 0);
+ asset_list->center_selection();
+ return 1;
+}
+
+AssetSelectUsed::AssetSelectUsed(MWindow *mwindow, AWindowGUI *gui)
+ : BC_MenuItem(_("Select used"))
+{
+ this->mwindow = mwindow;
+ this->gui = gui;
+}
+
#include "samples.inc"
#include "vicon.h"
+#define SELECT_USED 0
+#define SELECT_UNUSED 1
+
class AWindowFolderItem : public BC_ListBoxItem
{
public:
AWindowGUI *gui;
};
+class AssetSelectUsedItem : public BC_MenuItem
+{
+public:
+ AssetSelectUsedItem(AssetSelectUsed *select_used, const char *text, int action);
+ int handle_event();
+
+ int action;
+ AssetSelectUsed *select_used;
+};
+
+class AssetSelectUsed : public BC_MenuItem
+{
+public:
+ AssetSelectUsed(MWindow *mwindow, AWindowGUI *gui);
+
+ MWindow *mwindow;
+ AWindowGUI *gui;
+};
+
#endif
class AVIconDrawing;
class AWindowListFormat;
class AWindowListSort;
+class AssetSelectUsedItem;
+class AssetSelectUsed;
#endif
int result = 0;
int cwindow_operation = CWINDOW_NONE;
- switch(get_keypress())
- {
- case 'w':
- case 'W':
- close_event();
- result = 1;
- break;
- case '+':
- case '=':
- keyboard_zoomin();
- result = 1;
- break;
- case '-':
- keyboard_zoomout();
- result = 1;
- break;
- case 'f':
+ switch( get_keypress() ) {
+ case 'w':
+ case 'W':
+ close_event();
+ result = 1;
+ break;
+ case '+':
+ case '=':
+ keyboard_zoomin();
+ result = 1;
+ break;
+ case '-':
+ keyboard_zoomout();
+ result = 1;
+ break;
+ case 'f':
+ unlock_window();
+ if(mwindow->session->cwindow_fullscreen)
+ canvas->stop_fullscreen();
+ else
+ canvas->start_fullscreen();
+ lock_window("CWindowGUI::keypress_event 1");
+ result = 1;
+ break;
+ case 'x':
+ if( ctrl_down() || shift_down() || alt_down() ) break;
+ unlock_window();
+ mwindow->gui->lock_window("CWindowGUI::keypress_event 2");
+ mwindow->cut();
+ mwindow->gui->unlock_window();
+ lock_window("CWindowGUI::keypress_event 2");
+ result = 1;
+ break;
+ case DELETE:
+ unlock_window();
+ mwindow->gui->lock_window("CWindowGUI::keypress_event 2");
+ mwindow->clear_entry();
+ mwindow->gui->unlock_window();
+ lock_window("CWindowGUI::keypress_event 3");
+ result = 1;
+ break;
+ case ESC:
+ unlock_window();
+ if(mwindow->session->cwindow_fullscreen)
+ canvas->stop_fullscreen();
+ lock_window("CWindowGUI::keypress_event 4");
+ result = 1;
+ break;
+ case LEFT:
+ if( !ctrl_down() ) {
+ int alt_down = this->alt_down();
+ int shift_down = this->shift_down();
unlock_window();
- if(mwindow->session->cwindow_fullscreen)
- canvas->stop_fullscreen();
+ stop_transport(0);
+ mwindow->gui->lock_window("CWindowGUI::keypress_event 5");
+ if( alt_down )
+ mwindow->prev_edit_handle(shift_down);
else
- canvas->start_fullscreen();
- lock_window("CWindowGUI::keypress_event 1");
- break;
- case 'x':
- if( ctrl_down() || shift_down() || alt_down() ) break;
- unlock_window();
- mwindow->gui->lock_window("CWindowGUI::keypress_event 2");
- mwindow->cut();
+ mwindow->move_left();
mwindow->gui->unlock_window();
- lock_window("CWindowGUI::keypress_event 2");
- break;
- case DELETE:
+ lock_window("CWindowGUI::keypress_event 6");
+ result = 1;
+ }
+ break;
+
+ case ',':
+ if( !ctrl_down() && !alt_down() ) {
unlock_window();
- mwindow->gui->lock_window("CWindowGUI::keypress_event 2");
- mwindow->clear_entry();
+ stop_transport(0);
+ mwindow->gui->lock_window("CWindowGUI::keypress_event 7");
+ mwindow->move_left();
mwindow->gui->unlock_window();
- lock_window("CWindowGUI::keypress_event 3");
- break;
- case ESC:
+ lock_window("CWindowGUI::keypress_event 8");
+ result = 1;
+ }
+ break;
+
+ case RIGHT:
+ if( !ctrl_down() ) {
+ int alt_down = this->alt_down();
+ int shift_down = this->shift_down();
unlock_window();
- if(mwindow->session->cwindow_fullscreen)
- canvas->stop_fullscreen();
- lock_window("CWindowGUI::keypress_event 4");
- break;
- case LEFT:
- if( !ctrl_down() ) {
- int alt_down = this->alt_down();
- int shift_down = this->shift_down();
- unlock_window();
- stop_transport(0);
- mwindow->gui->lock_window("CWindowGUI::keypress_event 5");
- if( alt_down )
- mwindow->prev_edit_handle(shift_down);
- else
- mwindow->move_left();
- mwindow->gui->unlock_window();
- lock_window("CWindowGUI::keypress_event 6");
- result = 1;
- }
- break;
+ stop_transport(0);
+ mwindow->gui->lock_window("CWindowGUI::keypress_event 8");
+ if( alt_down )
+ mwindow->next_edit_handle(shift_down);
+ else
+ mwindow->move_right();
+ mwindow->gui->unlock_window();
+ lock_window("CWindowGUI::keypress_event 9");
+ result = 1;
+ }
+ break;
- case ',':
- if( !ctrl_down() && !alt_down() ) {
- unlock_window();
- stop_transport(0);
- mwindow->gui->lock_window("CWindowGUI::keypress_event 7");
- mwindow->move_left();
- mwindow->gui->unlock_window();
- lock_window("CWindowGUI::keypress_event 8");
- result = 1;
- }
- break;
+ case '.':
+ if( !ctrl_down() && !alt_down() ) {
+ unlock_window();
+ stop_transport(0);
+ mwindow->gui->lock_window("CWindowGUI::keypress_event 10");
+ mwindow->move_right();
+ mwindow->gui->unlock_window();
+ lock_window("CWindowGUI::keypress_event 11");
+ result = 1;
+ }
+ break;
+ }
- case RIGHT:
- if( !ctrl_down() ) {
- int alt_down = this->alt_down();
- int shift_down = this->shift_down();
- unlock_window();
- stop_transport(0);
- mwindow->gui->lock_window("CWindowGUI::keypress_event 8");
- if( alt_down )
- mwindow->next_edit_handle(shift_down);
- else
- mwindow->move_right();
- mwindow->gui->unlock_window();
- lock_window("CWindowGUI::keypress_event 9");
- result = 1;
+ if( !result && !ctrl_down() ) {
+ switch( get_keypress() ) {
+ case KEY_F1:
+ if( shift_down() ) {
+ mwindow->toggle_camera_xyz(); result = 1;
}
+ else
+ cwindow_operation = CWINDOW_PROTECT;
break;
-
- case '.':
- if( !ctrl_down() && !alt_down() ) {
- unlock_window();
- stop_transport(0);
- mwindow->gui->lock_window("CWindowGUI::keypress_event 10");
- mwindow->move_right();
- mwindow->gui->unlock_window();
- lock_window("CWindowGUI::keypress_event 11");
- result = 1;
+ case KEY_F2:
+ if( shift_down() ) {
+ mwindow->toggle_projector_xyz(); result = 1;
}
+ else
+ cwindow_operation = CWINDOW_ZOOM;
break;
-
- case KEY_F1: if( shift_down() ) { mwindow->toggle_camera_xyz(); break; }
- cwindow_operation = CWINDOW_PROTECT; break;
- case KEY_F2: if( shift_down() ) { mwindow->toggle_projector_xyz(); break; }
- cwindow_operation = CWINDOW_ZOOM; break;
+ }
+ }
+ if( !result && cwindow_operation < 0 && !ctrl_down() && !shift_down() ) {
+ switch( get_keypress() ) {
case KEY_F3: cwindow_operation = CWINDOW_MASK; break;
case KEY_F4: cwindow_operation = CWINDOW_RULER; break;
case KEY_F5: cwindow_operation = CWINDOW_CAMERA; break;
case KEY_F8: cwindow_operation = CWINDOW_EYEDROP; break;
case KEY_F9: cwindow_operation = CWINDOW_TOOL_WINDOW; break;
case KEY_F10: cwindow_operation = CWINDOW_TITLESAFE; break;
- case KEY_F11: canvas->reset_camera(); break;
- case KEY_F12: canvas->reset_projector(); break;
+ case KEY_F11: canvas->reset_camera(); result = 1; break;
+ case KEY_F12: canvas->reset_projector(); result = 1; break;
+ }
}
if( cwindow_operation >= 0 ) {
result = 1;
}
- if(!result) result = transport->keypress_event();
+ if( !result )
+ result = transport->keypress_event();
return result;
}
{
//printf("Edits::insert_new_edit 1\n");
Edit *current = split_edit(position);
- if(current) current = PREVIOUS;
//printf("Edits::insert_new_edit 1\n");
Edit *new_edit = create_edit();
+ if( current ) new_edit->hard_right = current->hard_left;
+ if( current ) current = PREVIOUS;
+ if( current ) new_edit->hard_left = current->hard_right;
//printf("Edits::insert_new_edit 1\n");
insert_after(current, new_edit);
new_edit->startproject = position;
int64_t current_start = current->startproject;
int64_t next_end = next_edit->startproject + next_edit->length;
current->length = next_end - current_start;
+ current->hard_right = next_edit->hard_right;
remove(next_edit);
result = 1;
}
}
- if( last && last->silence() && !last->transition ) {
+ if( last && last->silence() &&
+ !last->transition && !last->hard_left && !last->hard_right ) {
delete last;
result = 1;
}
Edit *new_edit = editof(start, PLAY_FORWARD, 0);
if (!new_edit) return;
- if( !new_edit->silence() ) {
+ if( !new_edit->silence() || new_edit->hard_right ) {
new_edit = insert_new_edit(start);
new_edit->length = end - start;
}
local_session->zoom_sample / session->sample_rate;
}
+int EDL::in_use(Indexable *indexable)
+{
+ for( Track *track=tracks->first; track; track=track->next ) {
+ for( Edit *edit=track->edits->first; edit; edit=edit->next ) {
+ Indexable *idxbl = (Indexable *)edit->asset;
+ if( !idxbl ) idxbl = (Indexable *)edit->nested_edl;
+ if( !idxbl ) continue;
+ if( idxbl->id == indexable->id ) return 1;
+ if( !indexable->is_asset != !idxbl->is_asset ) continue;
+ if( !strcmp(idxbl->path, indexable->path) ) return 1;
+ }
+ }
+ for( int i=0; i<clips.size(); ++i )
+ if( clips[i]->in_use(indexable) ) return 1;
+ for( int i=0; i<nested_edls.size(); ++i )
+ if( nested_edls[i]->in_use(indexable) ) return 1;
+ return 0;
+}
+
int edit_labels /* = 1 */,
int edit_plugins,
int edit_autos);
+ int in_use(Indexable *indexable);
void remove_from_project(ArrayList<Indexable*> *assets);
void remove_from_project(ArrayList<EDL*> *clips);
int blade(double position);
int FFStream::encode_frame(AVFrame *frame)
{
int pkts = 0, ret = 0;
- for( int retry=100; --retry>=0; ) {
+ for( int retry=MAX_RETRY; --retry>=0; ) {
if( frame || !pkts )
ret = avcodec_send_frame(avctx, frame);
if( !ret && frame ) return pkts;
{
switch(get_keypress()) {
case KEY_F1:
- if( shift_down() )
+ if( !ctrl_down() && shift_down() )
toggle_camera_xyz();
break;
case KEY_F2:
- if( shift_down() )
+ if( !ctrl_down() && shift_down() )
toggle_projector_xyz();
break;
case 'w':
#include "dvdcreate.h"
#include "edl.h"
#include "edlsession.h"
+#include "file.h"
#include "filesystem.h"
#include "filexml.h"
#include "floatauto.h"
windowmenu->add_item(split_y = new SplitY(mwindow));
windowmenu->add_item(mixer_viewer = new MixerViewer(mwindow));
windowmenu->add_item(new TileMixers(mwindow));
- windowmenu->add_item(new TileWindows(mwindow,_("Default positions"),-1,_("Ctrl-P"),'p'));
windowmenu->add_item(new TileWindows(mwindow,_("Tile left"),0));
windowmenu->add_item(new TileWindows(mwindow,_("Tile right"),1));
+ windowmenu->add_item(new BC_MenuItem("-"));
+
+ windowmenu->add_item(new TileWindows(mwindow,_("Default positions"),-1,_("Ctrl-P"),'p'));
+ windowmenu->add_item(load_layout = new LoadLayout(mwindow, _("Load layout..."),LAYOUT_LOAD));
+ load_layout->create_objects();
+ windowmenu->add_item(save_layout = new LoadLayout(mwindow, _("Save layout..."),LAYOUT_SAVE));
+ save_layout->create_objects();
}
int MainMenu::load_defaults(BC_Hash *defaults)
return 1;
}
+
+LoadLayoutItem::LoadLayoutItem(LoadLayout *load_layout, const char *text, int no, int hotkey)
+ : BC_MenuItem(text, "", hotkey)
+{
+ this->no = no;
+ this->load_layout = load_layout;
+ if( hotkey ) {
+ char hot_txt[BCSTRLEN];
+ sprintf(hot_txt, _("Ctl+Shift+F%d"), hotkey-KEY_F1+1);
+ set_ctrl(); set_shift();
+ set_hotkey_text(hot_txt);
+ }
+}
+
+int LoadLayoutItem::handle_event()
+{
+ char layout_path[BCTEXTLEN];
+ snprintf(layout_path, sizeof(layout_path), "%s/" LAYOUT_FILE,
+ File::get_config_path(), no);
+ MWindow *mwindow = load_layout->mwindow;
+ switch( load_layout->action ) {
+ case LAYOUT_LOAD:
+ mwindow->session->load_file(layout_path);
+ break;
+ case LAYOUT_SAVE:
+ mwindow->session->save_file(layout_path);
+ break;
+ }
+ mwindow->restore_windows();
+ mwindow->gui->default_positions();
+ mwindow->save_defaults();
+ return 1;
+}
+
+LoadLayout::LoadLayout(MWindow *mwindow, const char *text, int action)
+ : BC_MenuItem(text)
+{
+ this->mwindow = mwindow;
+ this->action = action;
+}
+
+void LoadLayout::create_objects()
+{
+ BC_SubMenu *layout_submenu = new BC_SubMenu();
+ add_submenu(layout_submenu);
+ for( int i=1; i<=4; ++i ) {
+ char text[BCSTRLEN];
+ sprintf(text, _("Layout %d"), i);
+ LoadLayoutItem *load_layout_item =
+ new LoadLayoutItem(this, text, i,
+ action==LAYOUT_LOAD ? KEY_F1-1+i : 0);
+ layout_submenu->add_submenuitem(load_layout_item);
+ }
+}
+
class SplitX;
class SplitY;
class MixerViewer;
+class LoadLayoutItem;
+class LoadLayout;
#include "arraylist.h"
#define TOTAL_LOADS 10 // number of files to cache
#define TOTAL_EFFECTS 10 // number of effects to cache
+#define LAYOUT_LOAD 0
+#define LAYOUT_SAVE 1
+
class MainMenu : public BC_MenuBar
{
public:
SplitX *split_x;
SplitY *split_y;
MixerViewer *mixer_viewer;
+ LoadLayout *load_layout;
+ LoadLayout *save_layout;
};
// ========================================= edit
MWindow *mwindow;
};
+
+class LoadLayoutItem : public BC_MenuItem
+{
+public:
+ LoadLayoutItem(LoadLayout *load_layout, const char *text, int no, int hotkey);
+ int handle_event();
+
+ int no;
+ LoadLayout *load_layout;
+};
+
+class LoadLayout : public BC_MenuItem
+{
+public:
+ LoadLayout(MWindow *mwindow, const char *text, int action);
+ void create_objects();
+
+ MWindow *mwindow;
+ int action;
+};
+
#endif
clip_number = clip_no+1;
}
+int MainSession::load_file(const char *path)
+{
+ int ret = 1;
+ FILE *fp = fopen(path,"r");
+ if( fp ) {
+ BC_Hash defaults;
+ defaults.load_file(fp);
+ load_defaults(&defaults);
+ fclose(fp);
+ ret = 0;
+ }
+ return ret;
+}
+
+int MainSession::save_file(const char *path)
+{
+ int ret = 1;
+ FILE *fp = fopen(path,"w");
+ if( fp ) {
+ BC_Hash defaults;
+ save_defaults(&defaults);
+ defaults.save_file(fp);
+ fclose(fp);
+ ret = 0;
+ }
+ return ret;
+}
+
void boundaries();
Track *drag_handle_track();
void update_clip_number();
+ int load_file(const char *path);
+ int save_file(const char *path);
// For drag and drop events
// The entire track where the dropped asset is going to go
gui->mainmenu->show_lwindow->set_checked(1);
}
+void MWindow::restore_windows()
+{
+ if( !session->show_vwindow ) {
+ for( int i=0, n=vwindows.size(); i<n; ++i ) {
+ VWindow *vwindow = vwindows[i];
+ if( !vwindow ) continue;
+ vwindow->gui->close(0);
+ }
+ }
+ else
+ show_vwindow();
+
+ if( !session->show_awindow )
+ awindow->gui->close(0);
+ else
+ show_awindow();
+
+ if( !session->show_cwindow )
+ cwindow->gui->close(0);
+ else
+ show_cwindow();
+
+ if( !session->show_gwindow )
+ gwindow->gui->close(0);
+ else
+ show_gwindow();
+
+ if( !session->show_lwindow )
+ lwindow->gui->close(0);
+ else
+ show_lwindow();
+}
+
int MWindow::tile_windows(int window_config)
{
int need_reload = 0;
void show_cwindow();
void show_gwindow();
void hide_gwindow();
+ void restore_windows();
int tile_windows(int window_config);
char *get_cwindow_display();
void set_screens(int value);
#define DEAMON_PORT 400
#define BACKUP_FILE "backup.xml"
#define BACKUP_FILE1 "backup.prev"
+#define LAYOUT_FILE "layout%d_rc"
#define DEFAULT_LV2_PATH CINDAT_DIR "/lv2"
#define FFMPEG_EARLY_TIP _("Currently: Try FFMpeg first\n Click to: Try FFMpeg last")
#define FFMPEG_LATE_TIP _("Currently: Try FFMpeg last\n Click to: Try FFMpeg first")
<td align="left"><font face="Liberation Serif" size=4>'Shift'</font></td>
<td align="left"><font face="Liberation Serif" size=4>Toggle on/off all XYZ of projector</font></td>
</tr>
+ <tr>
+ <td height="26" align="left"><font face="Liberation Serif" size=4><br></font></td>
+ <td align="left"><font face="Liberation Serif" size=4>F1</font></td>
+ <td align="left"><font face="Liberation Serif" size=4>'Ctrl+Shift'</font></td>
+ <td align="left"><font face="Liberation Serif" size=4>Use window layout #1</font></td>
+ </tr>
+ <tr>
+ <td height="26" align="left"><font face="Liberation Serif" size=4><br></font></td>
+ <td align="left"><font face="Liberation Serif" size=4>F2</font></td>
+ <td align="left"><font face="Liberation Serif" size=4>'Ctrl+Shift'</font></td>
+ <td align="left"><font face="Liberation Serif" size=4>Use window layout #2r</font></td>
+ </tr>
+ <tr>
+ <td height="26" align="left"><font face="Liberation Serif" size=4><br></font></td>
+ <td align="left"><font face="Liberation Serif" size=4>F3</font></td>
+ <td align="left"><font face="Liberation Serif" size=4>'Ctrl+Shift'</font></td>
+ <td align="left"><font face="Liberation Serif" size=4>Use window layout #3</font></td>
+ </tr>
+ <tr>
+ <td height="26" align="left"><font face="Liberation Serif" size=4><br></font></td>
+ <td align="left"><font face="Liberation Serif" size=4>F4</font></td>
+ <td align="left"><font face="Liberation Serif" size=4>'Ctrl+Shift'</font></td>
+ <td align="left"><font face="Liberation Serif" size=4>Use window layout #4</font></td>
+ </tr>
<tr>
<td height="26" align="left"><font face="Liberation Serif" size=4><br></font></td>
<td align="left"><font face="Liberation Serif" size=4><br></font></td>
abench
-#abitscope rate=25:size=1024x256
-#abuffer abuffer=sample_rate=48000:sample_fmt=s16p:channel_layout=stereo
-#abuffersink
+#abitscope rate=25:size=1024x256 ###Input/output error
+#abuffer abuffer=sample_rate=48000:sample_fmt=s16p:channel_layout=stereo ###Invalid argument
+#abuffersink ###Input/output error
acompressor
-#acrossfade
+#acrossfade ###Input/output error
acrusher
adelay delays=1
-#adrawgraph signalstats,drawgraph=lavfi.signalstats.YAVG:min=0:max=255
+#adrawgraph signalstats,drawgraph=lavfi.signalstats.YAVG:min=0:max=255 ###Input/output error
aecho
aemphasis
aeval exprs=(sin(2*PI*t*440)+sin(2*PI*t*350))/2*mod(floor(2*t),2):channel_layout=1c
-#aevalsrc 0
+#aevalsrc 0 ###Cannot allocate memory
afade
#afftfilt 1-clip((b/nb)*b,0,1)
#afifo ###will not work within cin
aformat sample_fmts=u8|s16:channel_layouts=stereo
agate
-#ahistogram dmode=single:r=25:s=hd720:scale=log:ascale=log:slide=replace
+#ahistogram dmode=single:r=25:s=hd720:scale=log:ascale=log:slide=replace ###Input/output error
#ainterleave
#alimiter
allpass
#allrgb
#allyuv
aloop
-#alphaextract
-#alphamerge
-#amerge
-ametadata mode=print:file=/tmp/ametadata.txt
-#amix
-#amovie
-#anequalizer c0 f=200 w=100 g=-10 t=1|c1 f=200 w=100 g=-10 t=1
+#alphaextract ###Operation not permitted
+#alphamerge ###Input/output error
+#amerge ###Operation not permitted
+#ametadata mode=add:file=/tmp/ametadata.txt
+#amix ###Operation not permitted
+#amovie ###Operation not permitted
+#anequalizer c0 f=200 w=100 g=-10 t=1|c1 f=200 w=100 g=-10 t=1 ###Operation not permitted
anoisesrc d=60:c=pink:r=48000:a=0.5
#anull
-#anullsink
+#anullsink ###Input/output error
#anullsrc
#apad ###not part of frame data
aperms
-#aphasemeter r=25:s=800x400:rc=2:gc=7:bc=1
+#aphasemeter r=25:s=800x400:rc=2:gc=7:bc=1 ###Operation not permitted
aphaser
#apulsator
arealtime
aresample sample_rate=48000
#areverse
-#aselect
-#asendcmd
+#aselect ###Operation not permitted
+#asendcmd ###Invalid argument
#asetnsamples
#asetpts ###not part of frame data
asetrate r=48000
#asettb
#ashowinfo ###not part of frame data
-#asidedata
-#asplit
+#asidedata ###Invalid argument
+#asplit ###Operation not permitted
astats
-#astreamselect
+#astreamselect ###Operation not permitted
atadenoise
atempo
atrim start=1:end=240:start_pts=1:end_pts=2:duration=1:start_sample=1:end_sample=2
-#avectorscope
+#avectorscope ###Input/output error
avgblur
bandpass
bandreject
biquad
blackdetect
blackframe
-#blend
+#blend ###Input/output error
boxblur
-#buffer size=320x240:pixfmt=6:time_base=1/24:pixel_aspect=1/1
-#buffersink
+#buffer size=320x240:pixfmt=6:time_base=1/24:pixel_aspect=1/1 ###Invalid argument
+#buffersink ###Input/output error
bwdif
#cellauto p=@:s=100x400:full=0:rule=18
-#channelmap 1|2|0|5|3|4:5.1
-#channelsplit
+#channelmap 1|2|0|5|3|4:5.1 ###Invalid argument
+#channelsplit ###Operation not permitted
chorus in_gain=0.400000:out_gain=0.400000:delays=1|1:decays=1|1:speeds=1|1:depths=1|1
chromakey
#codecview
#colorspace bt709
compand
compensationdelay
-#concat
+#concat ###Operation not permitted
#convolution 0 -1 0 -1 5 -1 0 -1 0:0 -1 0 -1 5 -1 0 -1 0:0 -1 0 -1 5 -1 0 -1 0:0 -1 0 -1 5 -1 0 -1 0
#copy
cover_rect
drawgrid
dynaudnorm
earwax
-#ebur128
+#ebur128 ###Operation not permitted
edgedetect
elbg
eq
equalizer frequency=1000.000000:width_type=1:width=200.000000:gain=-10.000000
erosion
-#extractplanes
+#extractplanes ###Operation not permitted
extrastereo
fade
fftfilt
field
-#fieldhint
-#fieldmatch
+#fieldhint ###Invalid argument
+#fieldmatch ###Operation not permitted
fieldorder
#fifo ###will not work within cin
fillborders
-#find_rect
+#find_rect ###Invalid argument
#firequalizer delay=0.1:fixed=on:zero_phase=on
flanger
format pix_fmts=yuv420p|yuv444p|yuv410p
#fps 30
-#framepack
+#framepack ###Input/output error
framerate
framestep step=30
fspp
gblur
-#geq
+#geq ###Invalid argument
gradfun
-#haldclut ###not working due to need for multiple video streams
+#haldclut ###not working due to need for multiple video streams ###Input/output error
haldclutsrc
#hdcd
hflip
histogram
hqdn3d
hqx
-#hstack
+#hstack ###Operation not permitted
hue
#hwdownload
#hwmap
#hwupload
#hwupload_cuda
-#hysteresis
+#hysteresis ###Input/output error
idet
il
inflate
interlace
-#interleave
+#interleave ###Operation not permitted
#join
kerndeint
lenscorrection
loudnorm
lowpass
lut
-#lut2
+#lut2 ###Input/output error
lut3d
lutrgb
lutyuv
mandelbrot
-#maskedclamp
-#maskedmerge
+#maskedclamp ###Input/output error
+#maskedmerge ###Input/output error
mcdeint
#mergeplanes 0x03010200:yuva444p
mestimate
-metadata mode=print:file=/tmp/metadata.txt
-#midequalizer
+#metadata mode=add:file=/tmp/metadata.txt
+#midequalizer ###Input/output error
#minterpolate
-#movie
+#movie ###Operation not permitted
mpdecimate
mptestsrc t=dc_luma
negate
nlmeans r=15:p=7:s=2
-#nnedi
+#nnedi ###Invalid argument
#noformat ###not part of frame data
noise
#null
-#nullsink
+#nullsink ###Input/output error
#nullsrc
-#overlay x=main_w-overlay_w-10:y=main_h-overlay_h-10
+#overlay x=main_w-overlay_w-10:y=main_h-overlay_h-10 ###Input/output error
owdenoise
pad
#palettegen
-#paletteuse
+#paletteuse ###Input/output error
pan 1c|c0=0.9*c0+0.1*c1
perms
perspective
#pixdesctest
pp
pp7
-#premultiply
+#premultiply ###Operation not permitted
prewitt
-#psnr PSNR=10*log10(MAX^2/MSE)
+#psnr PSNR=10*log10(MAX^2/MSE) ###Input/output error
#pullup
#qp ###not part of frame data
#random seed=-1
readeia608
readvitc
realtime
-#remap
+#remap ###Input/output error
removegrain
-#removelogo
+#removelogo ###Invalid argument
repeatfields
#replaygain
#reverse
rotate
sab
scale 200:100
-#scale2ref
-#select
+#scale2ref ###Input/output error
+#select ###Operation not permitted
#selectivecolor greens=.5 0 -.33 0:blues=0 .27
-#sendcmd
+#sendcmd ###Invalid argument
separatefields
#setdar ###will not work because Format already set
#setfield ###not part of frame data
#setpts ###not part of frame data
#setsar ###will not work because Format already set
#settb
-#showcqt
-#showfreqs
+#showcqt ###Input/output error
+#showfreqs ###Input/output error
#showinfo ###not part of frame data
showpalette s=30
-#showspectrum s=1280x480:scale=log
-#showspectrumpic
-#showvolume r=30
-#showwaves
-#showwavespic
+#showspectrum s=1280x480:scale=log ###Input/output error
+#showspectrumpic ###Input/output error
+#showvolume r=30 ###Input/output error
+#showwaves ###Input/output error
+#showwavespic ###Input/output error
shuffleframes
shuffleplanes
-#sidechaincompress
-#sidechaingate
-#sidedata mode=add
+#sidechaincompress ###Input/output error
+#sidechaingate ###Input/output error
+#sidedata mode=add ###Invalid argument
signalstats
-#signature
+#signature ###Operation not permitted
#silencedetect n=0.001 ###does not appear to work
silenceremove
sine
smptebars
smptehdbars
sobel
-#spectrumsynth
-#split
+#spectrumsynth ###Input/output error
+#split ###Operation not permitted
spp
-#ssim
+#ssim ###Input/output error
stereo3d
stereotools
stereowiden
-#streamselect
+#streamselect ###Operation not permitted
super2xsai
swaprect
swapuv
#telecine
testsrc duration=5.3:size=qcif:rate=10
testsrc2 duration=5.3:size=qcif:rate=10
-#threshold
+#threshold ###Input/output error
#thumbnail n=50
tile layout=3x2:nb_frames=5:padding=7:margin=2
tinterlace
vignette
volume
volumedetect
-#vstack
+#vstack ###Operation not permitted
w3fdif
waveform
weave
#vmafmotion
; new in 4.0
acontrast
-#afir
-#convolve
-#deconvolve
+#afir ###Operation not permitted
+#convolve ###Input/output error
+#deconvolve ###Input/output error
drmeter
entropy
fillborders
#headphone
hilbert
mcompand
-#mix
+#mix ###Operation not permitted
normalize
setrange
-#unpremultiply
+#unpremultiply ###Operation not permitted
vfrdet
; new in 4.1
acue
tmix
vibrance
; broken in 4.1
-#acrossover
-#aiir
-#amultiply
-#bm3d sigma=3:block=4:bstep=2:group=1:estim=basic
-#sr
-#xstack
-#agraphmonitor
+#acrossover ###Operation not permitted
+#aiir ###Operation not permitted
+#amultiply ###Input/output error
+#bm3d sigma=3:block=4:bstep=2:group=1:estim=basic ###Operation not permitted
+#sr ###Input/output error
+#xstack ###Operation not permitted
+#agraphmonitor ###Input/output error
#include "bcsignals.h"
#include "bcwindowbase.h"
#include "bccolors.h"
+#include "cstrdup.h"
#include <string.h>
BC_MenuItem::BC_MenuItem(const char *text, const char *hotkey_text, int hotkey)
{
+ this->text = 0;
+ this->hotkey_text = 0;
reset();
if(text) set_text(text);
void BC_MenuItem::reset()
{
- text = new char[1];
- hotkey_text = new char[1];
- text[0] = 0;
- hotkey_text[0] = 0;
+ set_text("");
+ set_hotkey_text("");
icon = 0;
}
void BC_MenuItem::set_text(const char *text)
{
- if(this->text) delete [] this->text;
- this->text = new char[strlen(text) + 1];
- strcpy(this->text, text);
+ delete [] this->text;
+ this->text = cstrdup(text);
}
void BC_MenuItem::set_hotkey_text(const char *text)
{
- if(this->hotkey_text) delete [] this->hotkey_text;
- this->hotkey_text = new char[strlen(text) + 1];
- strcpy(this->hotkey_text, text);
+ delete [] this->hotkey_text;
+ this->hotkey_text = cstrdup(text);
}
int BC_MenuItem::deactivate_submenus(BC_MenuPopup *exclude)
return 0;
}
+void VFrame::write_ppm(VFrame *vfrm, const char *fmt, ...)
+{
+ va_list ap;
+ va_start(ap, fmt);
+ char fn[BCTEXTLEN];
+ vsnprintf(fn, sizeof(fn), fmt, ap);
+ va_end(ap);
+ FILE *fp = fopen(fn,"w");
+ if( !fp ) { perror("write_ppm"); return; }
+ VFrame *frm = vfrm;
+ if( frm->get_color_model() != BC_RGB888 ) {
+ frm = new VFrame(frm->get_w(), frm->get_h(), BC_RGB888);
+ frm->transfer_from(vfrm);
+ }
+ int w = frm->get_w(), h = frm->get_h();
+ fprintf(fp,"P6\n%d %d\n255\n",w,h);
+ unsigned char **rows = frm->get_rows();
+ for( int i=0; i<h; ++i ) fwrite(rows[i],3,w,fp);
+ fclose(fp);
+ if( frm != vfrm ) delete frm;
+}
+
#define ZERO_YUV(components, type, max) \
{ \
int data_size,
int data_allocated);
-// Write a PNG for debugging
+// Write a PNG/PPM for debugging
int write_png(const char *path);
+ static void write_ppm(VFrame *vfrm, const char *fmt, ...);
+ void write_ppm(const char *path) { write_ppm(this, "%s", path); }
+//static int n = 0; write_ppm(vframe, "/tmp/data/f%05d", ++n);
// if frame points to the same data as this return 1
int equals(VFrame *frame);
mcanvas_y = mtimebar_y + mtimebar_h;
mcanvas_w = w;
mcanvas_h = patchbay_h;
+ pane_w = get_image_set("xpane")[0]->get_w();
+ pane_h = get_image_set("ypane")[0]->get_h();
+ pane_x = mcanvas_x + mcanvas_w;
+ pane_y = mcanvas_y + mcanvas_h;
mhscroll_x = 0;
mhscroll_y = mcanvas_y + mcanvas_h;
mhscroll_w = w - BC_ScrollBar::get_span(SCROLL_VERT) - patchbay_w;
mcanvas_w = w;
mcanvas_h = patchbay_h;
//COPIED START
+ control_pixels = (mcanvas_w * control_pixels) / 1000;
+ pane_w = get_image_set("xpane")[0]->get_w();
+ pane_h = get_image_set("ypane")[0]->get_h();
+ pane_x = mcanvas_x + mcanvas_w;
+ pane_y = mcanvas_y + mcanvas_h;
mhscroll_x = 0;
mhscroll_y = mzoom_y - BC_ScrollBar::get_span(SCROLL_HORIZ);
mhscroll_w = w - BC_ScrollBar::get_span(SCROLL_VERT);