From a5a1ec4610e4d267e0f71afc38047dd6070143ea Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Thu, 29 Apr 2004 17:37:01 +0000 Subject: ext/jpeg/: move format setting to inner loop Original commit message from CVS: * ext/jpeg/gstjpegdec.c: (gst_jpegdec_get_type): * ext/jpeg/gstjpegenc.c: (gst_jpegenc_get_type), (gst_jpegenc_getcaps): move format setting to inner loop * gst/ffmpegcolorspace/gstffmpegcolorspace.c: (gst_ffmpegcolorspace_getcaps): use GST_PAD_CAPS if available so that we use already negotiated caps * gst/qtdemux/qtdemux.c: (gst_qtdemux_loop_header), (qtdemux_parse_moov), (qtdemux_parse): extra debugging * sys/qcam/qcam-Linux.c: (qc_lock_wait), (qc_unlock): * sys/qcam/qcam-os.c: (qc_lock_wait), (qc_unlock): move hardcoded path to DEFINE --- sys/qcam/qcam-Linux.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sys/qcam/qcam-Linux.c') diff --git a/sys/qcam/qcam-Linux.c b/sys/qcam/qcam-Linux.c index 41f7046c..07e69170 100644 --- a/sys/qcam/qcam-Linux.c +++ b/sys/qcam/qcam-Linux.c @@ -3,6 +3,8 @@ /* Version 0.1, January 2, 1996 */ /* Version 0.5, August 24, 1996 */ +#define LOCALSTATEDIR "" +//#define LOCALSTATEDIR "/var/run" /****************************************************************** @@ -118,7 +120,7 @@ qc_lock_wait (struct qcam *q, int wait) if (-1 == q->fd) { /* we've yet to open the lock file */ static char lockfile[128]; - sprintf (lockfile, "/var/run/LOCK.qcam.0x%x", q->port); + sprintf (lockfile, LOCALSTATEDIR "/LOCK.qcam.0x%x", q->port); if (-1 == (q->fd = open (lockfile, O_WRONLY | O_CREAT, 0666))) { perror ("open"); return 1; @@ -160,7 +162,7 @@ qc_lock_wait (struct qcam *q, int wait) char lockfile[128], tmp[128]; struct stat statbuf; - sprintf (lockfile, "/var/run/LOCK.qcam.0x%x", q->port); + sprintf (lockfile, LOCALSTATEDIR "/LOCK.qcam.0x%x", q->port); sprintf (tmp, "%s-%d", lockfile, getpid ()); if ((creat (tmp, 0) == -1) || @@ -219,7 +221,7 @@ qc_unlock (struct qcam *q) #else char lockfile[128]; - sprintf (lockfile, "/var/run/LOCK.qcam.0x%x", q->port); + sprintf (lockfile, LOCALSTATEDIR "/LOCK.qcam.0x%x", q->port); unlink (lockfile); /* What would I do with an error? */ #endif -- cgit v1.2.1