// CLAMP(sample_rate, 1, 1000000);
// CLAMP(frame_rate, 0.001, 1000000);
CLAMP(channels, 0, MAX_CHANNELS-1);
- CLAMP(width, 0, 32767);
- CLAMP(height, 0, 32767);
+ CLAMP(width, 0, ASSET_MAX_WIDTH);
+ CLAMP(height, 0, ASSET_MAX_HEIGHT);
//printf("Asset::boundaries %d %d %f\n", __LINE__, sample_rate, frame_rate);
}
#include "awindow.h"
#include "awindowgui.h"
#include "bccmodels.h"
+#include "bcdisplayinfo.h"
#include "bchash.h"
#include "bcsignals.h"
#include "bctimer.h"
AssetPicon *picon = new AssetPicon(mwindow,
this, current);
new_assets.append(picon);
+ if( current->width > ASSET_MAX_WIDTH || current->height > ASSET_MAX_HEIGHT ) {
+ eprintf(_("Warning: %s\n"
+ " dimensions %dx%d exceed asset maximum limits %dx%d\n"),
+ current->path, current->width, current->height,
+ ASSET_MAX_WIDTH, ASSET_MAX_HEIGHT);
+ }
+ else if( mwindow->edl->session->playback_config->vconfig->driver == PLAYBACK_X11_GL ) {
+ int texture_limit = BC_DisplayInfo::get_gl_max_texture_size();
+ if( texture_limit >= 0 &&
+ (current->width >= texture_limit || current->height >= texture_limit) ) {
+ eprintf(_("Warning: %s\n"
+ " dimensions %dx%d exceed OpenGL texture limit %d\n"),
+ current->path, current->width, current->height, texture_limit);
+ }
+ }
}
}
#define ASSETS_ICON_LIST 3
#define FOLDERS_TEXT 0
#define FOLDERS_ICONS 1
+#define ASSET_MAX_WIDTH 32767
+#define ASSET_MAX_HEIGHT 32767
#define ASSET_COLUMNS 2
max_position = Units::to_int64(nested_edl->tracks->total_length() *
frame_rate - 1);
}
+ if( max_position < 0 ) max_position = 0;
// if we hit the end of stream, freeze at last frame
CLAMP(position, 0, max_position);
int BC_DisplayInfo::right_border = -1;
int BC_DisplayInfo::auto_reposition_x = -1;
int BC_DisplayInfo::auto_reposition_y = -1;
+int BC_DisplayInfo::gl_max_texture_size = -1;
char BC_DisplayInfo::gl_shader_version[64] = { 0, };
BC_DisplayInfo::BC_DisplayInfo(const char *display_name, int show_error)
if( shader_version )
strncpy(gl_shader_version, shader_version, sizeof(gl_shader_version));
}
+ gl_max_texture_size = 0;
+ glGetIntegerv(GL_MAX_TEXTURE_SIZE, &gl_max_texture_size);
glXMakeContextCurrent(display, None, None, 0);
if( glx_ctx ) glXDestroyContext(display, glx_ctx);
if( glx_win ) glXDestroyWindow(display, glx_win);
return bottom_border;
}
+int BC_DisplayInfo::get_gl_max_texture_size()
+{
+ init_borders();
+ return gl_max_texture_size;
+}
+
const char *BC_DisplayInfo::get_gl_shader_version()
{
init_borders();
static int get_right_border();
static int get_bottom_border();
static const char *get_gl_shader_version();
+ static int get_gl_max_texture_size();
int get_screen_count();
void test_window(int &x_out, int &y_out, int &x_out2, int &y_out2, int x_in, int y_in);
static const char *host_display_name(const char *name);
static int right_border;
static int auto_reposition_x;
static int auto_reposition_y;
+ static int gl_max_texture_size;
static char gl_shader_version[64];
int depth;
char *display_name;