LDFLAGS2 = -lcpml -lcxxstdma_rh60 -lcxxma_rh60 -lc -lots \
`expr /usr/lib/compaq/cxx-*/alpha-linux/`bin/crtend.o \
`expr /usr/lib/compaq/cxx-*/alpha-linux/`bin/crtn.o --no-demangle \
- --warn-once
+ --warn-once $(LDFLAGS)
LINKER = ld -o $(OUTPUT)
CFLAGS += -DUSE_ALPHA
else
LDFLAGS1 = -Wl,-export-dynamic -g
-LDFLAGS2 =
+LDFLAGS2 = $(LDFLAGS)
LINKER = $(CXX) -o $(OUTPUT)
endif
void MWindow::selected_to_clipboard(int packed)
{
int64_t start = INT64_MAX, end = -INT64_MAX, pos = 0;
+ Track *first_track=0, *last_track = 0;
for( Track *track=edl->tracks->first; track; track=track->next ) {
if( !track->record ) continue;
+ int empty = 1;
for( Edit *edit=track->edits->first; edit; edit=edit->next ) {
if( !edit->is_selected || edit->silence() ) continue;
if( start > (pos=edit->startproject) ) start = pos;
if( end < (pos+=edit->length) ) end = pos;
+ empty = 0;
}
+ if( empty ) continue;
+ if( !first_track ) first_track = track;
+ last_track = track;
}
+ if( !first_track ) return;
EDL *new_edl = new EDL();
new_edl->create_objects();
new_edl->copy_session(edl);
new_edl->session->audio_tracks = 0;
for( Track *track=edl->tracks->first; track; track=track->next ) {
if( !track->record ) continue;
+ if( first_track ) {
+ if( first_track != track ) continue;
+ first_track = 0;
+ }
Track *new_track = 0;
if( !packed )
new_track = new_edl->add_new_track(track->data_type);
new_track->edits->append(clip_edit);
}
}
+ if( last_track == track ) break;
}
double length = new_edl->tracks->total_length();
FileXML file;
Edit *last_edit = track->edits->last;
if( !last_edit || edit_position >= (last_edit->startproject+last_edit->length) ) {
*is_insertion = 0;
- return grab_position;
+ return edit_position;
}
int64_t drop_start = 0, drop_end = 0; // drop zone boundries
void Tracks::paste_transitions(double start, double end, int track_type, char* title)
{
- for(Track *current_track = first;
- current_track;
- current_track = current_track->next)
- {
- if(current_track->record && current_track->data_type == track_type)
- {
- int64_t start_units = current_track->to_units(start, 0);
- int64_t end_units = current_track->to_units(end, 0);
- if( start_units == end_units ) {
- for( Edit *current_edit = current_track->edits->first;
- current_edit; current_edit = current_edit->next) {
- int64_t edit_start = current_edit->startproject;
- int64_t edit_end = edit_start + current_edit->length;
- if( edit_start > start_units ) continue;
- if( start_units == current_track->edits->length() ) {
- double length = edl->session->default_transition_length;
- int64_t units = current_track->to_units(length, 1);
- current_edit = current_track->edits->
- create_silence(start_units, start_units+units);
- }
- else if( start_units >= edit_end ) continue;
- current_edit->insert_transition(title);
+ int count = 0;
+ for( Track *track=first; track; track=track->next ) {
+ if( !track->record || track->data_type != track_type ) continue;
+ for( Edit *edit=track->edits->first; edit; edit=edit->next ) {
+ if( !edit->is_selected ) continue;
+ edit->insert_transition(title);
+ ++count;
+ }
+ }
+ if( count > 0 ) {
+ clear_selected_edits();
+ return;
+ }
+
+ for( Track *track=first; track; track=track->next ) {
+ if( !track->record || track->data_type != track_type ) continue;
+ int64_t start_units = track->to_units(start, 0);
+ int64_t end_units = track->to_units(end, 0);
+ if( start_units == end_units ) {
+ for( Edit *edit = track->edits->first; edit; edit = edit->next) {
+ int64_t edit_start = edit->startproject;
+ int64_t edit_end = edit_start + edit->length;
+ if( edit_start > start_units ) continue;
+ if( start_units == track->edits->length() ) {
+ double length = edl->session->default_transition_length;
+ int64_t units = track->to_units(length, 1);
+ edit = track->edits->
+ create_silence(start_units, start_units+units);
}
+ else if( start_units >= edit_end ) continue;
+ edit->insert_transition(title);
}
- else {
- for( Edit *current_edit = current_track->edits->first;
- current_edit; current_edit = current_edit->next) {
- int64_t edit_start = current_edit->startproject;
- if( !edit_start ) continue;
- if( edit_start >= start_units && edit_start < end_units ) {
- current_edit->insert_transition(title);
- }
+ }
+ else {
+ for( Edit *edit=track->edits->first; edit; edit=edit->next) {
+ int64_t edit_start = edit->startproject;
+ if( !edit_start ) continue;
+ if( edit_start >= start_units && edit_start < end_units ) {
+ edit->insert_transition(title);
}
}
}
CFG_CFLAGS+=" -I/usr/include/uuid -I/usr/local/include/uuid"
CFG_CFLAGS+=" -I/usr/include/mjpegtools -I/usr/local/include/mjpegtools"
+CFG_LDFLAGS+=" -z noexecstack"
+
AC_DEFUN([CHECK_WITH], [
AC_ARG_WITH([$1],
AC_HELP_STRING([--with-[$1]], [$2 ($4)]),
echo "CFLAGS_ := ${CFLAGS:--g -O2}"
echo "endif"
echo "endif"
+echo "ifndef CXXFLAGS_"
+echo "ifdef CXXFLAGS"
+echo "CXXFLAGS_ := \$(CXXFLAGS)"
+echo "endif"
+echo "endif"
+echo "ifndef LDFLAGS_"
+echo "ifdef LDFLAGS"
+echo "LDFLAGS_ := \$(LDFLAGS)"
+echo "endif"
+echo "endif"
echo "CFLAGS := \$(CFLAGS_)"
echo "CFLAGS += '-DCIN=\"\$(WANT_CIN)\"'"
echo "CFLAGS += '-DCIN_BROWSER=\"$WANT_CIN_BROWSER\"'"
for flg in $CFG_CFLAGS; do echo "CFLAGS += $flg"; done
echo ""
-for flg in $CFG_CXXFLAGS; do echo "CXXFLAGS += $flg"; done
-echo ""
+if test "x$CFG_CXXFLAGS" != "x"; then
+ for flg in $CFG_CXXFLAGS; do echo "CXXFLAGS += $flg"; done
+ echo ""
+fi
+if test "x$CFG_LDFLAGS" != "x" ; then
+ echo "LDFLAGS +=$CFG_LDFLAGS"
+ echo ""
+fi
if test "x$WANT_X264_HIDEPTH" = "xyes" ; then
X264_CFG_PARAMS="$X264_CFG_PARAMS --bit-depth=10"
XColor fc, bc;
fc.flags = bc.flags = DoRed | DoGreen | DoBlue;
fc.red = 0xffff; fc.green = fc.blue = 0; // fg
- bc.red = bc.green = bc.blue = 0x0000; // bg
+ bc.red = 0xffff; bc.green = 0xffff; bc.blue = 0x0000; // bg
Cursor cursor = XCreatePixmapCursor(display, img_xpm,msk_xpm, &fc,&bc, iw2,ih2);
XFreePixmap(display, img_xpm);
XFreePixmap(display, msk_xpm);
Name=cin
Comment=MultiMedia Editor
Comment[fr]=Éditeur multimédia
-Categories=Application;AudioVideo;Multimedia;VideoEditing;
-Encoding=UTF-8
+Categories=AudioVideo;AudioVideoEditing;X-Multimedia;
Exec=cin
-Icon=cin.svg
+Icon=cin
Terminal=false
Type=Application
cr='
'
dir="$1"; shift 1
-$mkinstalldirs "$dir"
+mkdir -p "$dir"
if [ "$*" = "*" ]; then exit; fi
for f in "$@"; do
- if [ -f "$f" ]; then $install_sh -c "$f" "$dir"; continue; fi
+ if [ -f "$f" ]; then ( umask 755; cp "$f" "$dir" ); continue; fi
if [ -d "$f" ]; then ( cd $f; $inst_sh "$dir/$f" * )
- else echo "*** Error - install $f in $dir failed." 1>&2; exit 1; fi
+ else echo "*** Error - inst.sh $f in $dir failed." 1>&2; exit 1; fi
done
CFLAGS += $(static_incs)
LFLAGS += $(static_libs)
+LFLAGS += $(LDFLAGS)
LDLINKER ?= $(CXX) -shared
$(shell mkdir -p $(OBJDIR))
THEME_DATA = $(OBJDIR)/$(PLUGIN)_data.o
$(OUTPUT_THEME): $(OBJS) $(OUTPUT_DIR) $(THEME_DATA)
- $(LDLINKER) -o $(OUTPUT_THEME) $(OBJS) $(THEME_DATA)
+ $(LDLINKER) -o $(OUTPUT_THEME) $(OBJS) $(THEME_DATA) $(LDFLAGS)
$(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(OUTPUT_THEME) $(OUTPUT_G))
$(if $(findstring -ggdb,$(CFLAGS)),,strip $(OUTPUT_THEME))