void AWindowGUI::create_objects()
{
lock_window("AWindowGUI::create_objects");
- asset_titles[0] = _("Title");
+ asset_titles[0] = C_("Title");
asset_titles[1] = _("Comments");
set_icon(mwindow->theme->get_image("awindow_icon"));
void AWindowGUI::filter_displayed_assets()
{
//allow_iconlisting = 1;
- asset_titles[0] = _("Title");
+ asset_titles[0] = C_("Title");
asset_titles[1] = _("Comments");
switch( mwindow->edl->session->awindow_folder ) {
case AW_LABEL_FOLDER:
copy_picons(displayed_assets, &labellist, AW_NO_FOLDER);
asset_titles[0] = _("Time Stamps");
- asset_titles[1] = _("Title");
+ asset_titles[1] = C_("Title");
//allow_iconlisting = 0;
break;
default:
// Initialize grabbing
- if(fd < 0)
- {
- if((fd = ::open(path, O_RDWR)) < 0)
- {
- printf("Device1394Input::open %s: %s\n", path, strerror(errno));
- }
- else
- {
+ if(fd < 0 && (fd = ::open(path, O_RDWR)) < 0) {
+ printf("Device1394Input::open %s: %s\n", path, strerror(errno));
+ result = 1;
+ }
+ if( !result ) {
#define CIP_N_NTSC 68000000
#define CIP_D_NTSC 1068000000
-
#define CIP_N_PAL 1
#define CIP_D_PAL 16
-
- struct dv1394_init init =
- {
- api_version: DV1394_API_VERSION,
- channel: (unsigned int)channel,
- n_frames: (unsigned int)length,
- format: is_pal ? DV1394_PAL: DV1394_NTSC,
- cip_n: 0,
- cip_d: 0,
- syt_offset: 0
- };
- if(ioctl(fd, DV1394_IOC_INIT, &init) < 0)
- {
- printf("Device1394Input::open DV1394_IOC_INIT: %s\n", strerror(errno));
- }
-
- input_buffer = (unsigned char*)mmap(0,
- length * buffer_size,
- PROT_READ | PROT_WRITE,
- MAP_SHARED,
- fd,
- 0);
-
- if(ioctl(fd, DV1394_IOC_START_RECEIVE, 0) < 0)
- {
- perror("Device1394Input::open DV1394_START_RECEIVE");
- }
+ struct dv1394_init init = {
+ api_version: DV1394_API_VERSION,
+ channel: (unsigned int)channel,
+ n_frames: (unsigned int)length,
+ format: is_pal ? DV1394_PAL: DV1394_NTSC,
+ cip_n: 0,
+ cip_d: 0,
+ syt_offset: 0
+ };
+ if(ioctl(fd, DV1394_IOC_INIT, &init) < 0) {
+ printf("Device1394Input::open DV1394_IOC_INIT: %s\n", strerror(errno));
+ result = 1;
}
+ }
+ if( !result ) {
+ input_buffer = (unsigned char*)mmap(0, length * buffer_size,
+ PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+ if( input_buffer == MAP_FAILED ) {
+ perror("Device1394Input::open mmap");
+ input_buffer = 0;
+ result = 1;
+ }
+ }
+ if( !result ) {
+ if(ioctl(fd, DV1394_IOC_START_RECEIVE, 0) < 0) {
+ perror("Device1394Input::open DV1394_START_RECEIVE");
+ result = 1;
+ }
+ }
-
-
+ if( !result ) {
buffer = new char*[total_buffers];
buffer_valid = new int[total_buffers];
bzero(buffer_valid, sizeof(int) * total_buffers);
- for(int i = 0; i < total_buffers; i++)
- {
+ for(int i = 0; i < total_buffers; i++) {
buffer[i] = new char[DV_PAL_SIZE];
}
-
audio_buffer = new char[INPUT_SAMPLES * 2 * channels];
audio_lock = new Condition(0, "Device1394Input::audio_lock");
video_lock = new Condition(0, "Device1394Input::video_lock");
{
while(!done)
{
+ int ret = 0;
// Wait for frame to arrive
struct dv1394_status status;
printf("Device1394Input::run %d done=%d\n", __LINE__, done);
Thread::enable_cancel();
- if(ioctl(fd, DV1394_IOC_WAIT_FRAMES, 1))
- {
+ if(ioctl(fd, DV1394_IOC_WAIT_FRAMES, 1)) {
perror("Device1394Input::run DV1394_IOC_WAIT_FRAMES");
- sleep(1);
+ ret = 1;
}
- else
- if(ioctl(fd, DV1394_IOC_GET_STATUS, &status))
- {
+ else if(ioctl(fd, DV1394_IOC_GET_STATUS, &status)) {
perror("Device1394Input::run DV1394_IOC_GET_STATUS");
+ ret = 1;
+ }
+ else if( !input_buffer ) {
+ fprintf(stderr, "Device1394Input::run !input_buffer");
+ ret = 1;
}
+ if( ret )
+ sleep(1);
Thread::disable_cancel();
-
-
+ if( ret ) continue;
buffer_lock->lock("Device1394Input::run 1");
unpack_xz=tar -xJf $(1)
bld_depends=$(if $(ver_$(1)),$(call pkg-built,$(1)))
bld_path=$(ver_$(1))/$(2)
-inc_path=$(inc_$(1))
-ld_path=$(if $(ver_$(1)),-L$(call bld_path,$(1),$(2)) $(lib_$(1)))
+if_pkg=$(if $(ver_$(1)),$(2))
+inc_path=$(call if_pkg,$(1),$(inc_$(1)))
+ld_path=$(call if_pkg,$(1),-L$(call bld_path,$(1),$(2)) $(lib_$(1)))
#$(eval $(call std-build,pkg,deps...))
#$(pkg.cflags) added as CFLAGS+=$(cflags) to pkg.vars
--enable-pthreads --enable-gpl \
--disable-ffserver --disable-ffplay \
--disable-vaapi \
- --enable-libfdk-aac \
- --enable-libtwolame \
- --enable-libopenjpeg \
- --enable-libmp3lame \
- --enable-libvorbis \
- --enable-libtheora \
- --enable-libvpx \
- --enable-libx264 \
- --enable-libx265 \
+ $(call if_pkg,fdk,--enable-libfdk-aac) \
+ $(call if_pkg,twolame,--enable-libtwolame) \
+ $(call if_pkg,openjpeg,--enable-libopenjpeg) \
+ $(call if_pkg,lame,--enable-libmp3lame) \
+ $(call if_pkg,libvorbis,--enable-libvorbis) \
+ $(call if_pkg,libtheora,--enable-libtheora) \
+ $(call if_pkg,libvpx,--enable-libvpx) \
+ $(call if_pkg,x264,--enable-libx264) \
+ $(call if_pkg,x265,--enable-libx265) \
--enable-nonfree \
--extra-cflags="\
- $(call inc_path,faad2,include) \
- $(call inc_path,faac,include) \
$(call inc_path,twolame,libtwolame) \
$(call inc_path,lame,include) \
$(call inc_path,openjpeg,src/lib/openjp2) \