Пример #1
0
void pix_movieDS::openMess(t_symbol *filename, int format)
{
//	if (filename == x_filename)
//	{
//		return;
//	}

	x_filename	= filename;

	if (format)
	{
		m_colorspace	= format;
	}

	char buf[MAXPDSTRING];
	canvas_makefilename(getCanvas(), filename->s_name, buf, MAXPDSTRING);

	// Clean up any open files
	closeMess();

	realOpen(buf);

	if (FALSE == m_haveMovie)
	{
		return;
	}

	t_atom	ap[3];

	SETFLOAT(ap, m_numFrames);
	SETFLOAT(ap+1, m_xsize);
	SETFLOAT(ap+2, m_ysize);

	m_newFilm	= 1;
}
Пример #2
0
void pix_filmOS :: openMess(t_symbol *filename, int format)
{
  //  if (filename==x_filename)return;
  x_filename=filename;
  if (format)m_colorspace=format;

  char buf[MAXPDSTRING];
  canvas_makefilename(const_cast<t_canvas*>(getCanvas()), filename->s_name, buf, MAXPDSTRING);

  // Clean up any open files
  closeMess();

  m_haveMovie = GEM_MOVIE_NONE;
  realOpen(buf);
  if (m_haveMovie == GEM_MOVIE_NONE)return;
  
#ifndef __APPLE__
  createBuffer();
  prepareTexture();
#endif

  t_atom ap[3];
  SETFLOAT(ap, m_numFrames);
  SETFLOAT(ap+1, m_xsize);
  SETFLOAT(ap+2, m_ysize);

  m_newFilm = 1;
  post("loaded file: %s with %d frames (%dx%d)", buf, m_numFrames, m_xsize, m_ysize);
  outlet_list(m_outNumFrames, 0, 3, ap);
}
Пример #3
0
{
    __int32_t fd;
    pthread_t new_thread;

    //
    // Get the real "open" symbol
    //
    if (realOpen == NULL)
    {
        realOpen = (typeof(open)*)dlsym(RTLD_NEXT, "open");
    }

    //
    // Call the real function
    //
    fd = realOpen(name, flags);

    //
    // Check if this is the init daemon opening /dev/lxss
    //
    if ((getpid() == 1) && (strcmp(name, "/dev/lxss") == 0))
    {
        //
        // Inject a thread in init waiting for connections to our socket
        //
        pthread_create(&new_thread, NULL, ServerRoutine, (void*)(__int64_t)fd);
        pthread_detach(new_thread);
    }

    //
    // Return the file descriptor