summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas@apestaart.org>2004-04-29 17:37:01 +0000
committerThomas Vander Stichele <thomas@apestaart.org>2004-04-29 17:37:01 +0000
commita5a1ec4610e4d267e0f71afc38047dd6070143ea (patch)
treecc4f935a1e296c192dd353584ddbb867c9a0aff3
parentee9e8618ff3f0685e85e343863b234299f6bc838 (diff)
downloadgst-plugins-bad-a5a1ec4610e4d267e0f71afc38047dd6070143ea.tar.gz
gst-plugins-bad-a5a1ec4610e4d267e0f71afc38047dd6070143ea.tar.bz2
gst-plugins-bad-a5a1ec4610e4d267e0f71afc38047dd6070143ea.zip
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
-rw-r--r--ChangeLog17
-rw-r--r--gst/qtdemux/qtdemux.c12
-rw-r--r--sys/qcam/qcam-Linux.c8
-rw-r--r--sys/qcam/qcam-os.c8
4 files changed, 37 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index b916d0be..caa45e2b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2004-04-29 Thomas Vander Stichele <thomas at apestaart dot org>
+
+ * 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
+
2004-04-28 David Schleef <ds@schleef.org>
* gst/speed/gstspeed.c: (speed_parse_caps): Fix caps parsing.
diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c
index 7f57e975..7ba5440d 100644
--- a/gst/qtdemux/qtdemux.c
+++ b/gst/qtdemux/qtdemux.c
@@ -513,6 +513,7 @@ gst_qtdemux_loop_header (GstElement * element)
case QTDEMUX_STATE_HEADER:
{
do {
+ /* FIXME: we peek for 16 bytes, but what if the atom is smaller ? */
ret = gst_bytestream_peek_bytes (qtdemux->bs, &data, 16);
if (ret < 16) {
if (!gst_qtdemux_handle_sink_event (qtdemux)) {
@@ -526,12 +527,14 @@ gst_qtdemux_loop_header (GstElement * element)
length = GST_READ_UINT32_BE (data);
GST_DEBUG ("length %08x", length);
fourcc = GST_READ_UINT32_LE (data + 4);
- GST_DEBUG ("fourcc " GST_FOURCC_FORMAT, GST_FOURCC_ARGS (fourcc));
+ GST_DEBUG ("atom type " GST_FOURCC_FORMAT, GST_FOURCC_ARGS (fourcc));
if (length == 0) {
length = gst_bytestream_length (qtdemux->bs) - cur_offset;
}
if (length == 1) {
+ /* this means we have an extended size, which is the 64 bit value of
+ * the next 8 bytes */
guint32 length1, length2;
length1 = GST_READ_UINT32_BE (data + 8);
@@ -539,6 +542,7 @@ gst_qtdemux_loop_header (GstElement * element)
length2 = GST_READ_UINT32_BE (data + 12);
GST_DEBUG ("length2 %08x", length2);
+ /* FIXME: I guess someone didn't want to make 64 bit size work :) */
length = length2;
}
@@ -554,6 +558,7 @@ gst_qtdemux_loop_header (GstElement * element)
GstBuffer *moov;
do {
+ /* read in the complete data from the moov atom */
ret = gst_bytestream_read (qtdemux->bs, &moov, length);
if (ret < length) {
GST_DEBUG ("read failed (%d < %d)", ret, length);
@@ -942,6 +947,7 @@ qtdemux_parse_moov (GstQTDemux * qtdemux, void *buffer, int length)
qtdemux->moov_node = g_node_new (buffer);
+ GST_DEBUG_OBJECT (qtdemux, "parsing 'moov' atom");
qtdemux_parse (qtdemux, qtdemux->moov_node, buffer, length);
cmov = qtdemux_tree_get_child_by_type (qtdemux->moov_node, FOURCC_cmov);
@@ -983,7 +989,7 @@ qtdemux_parse (GstQTDemux * qtdemux, GNode * node, void *buffer, int length)
QtNodeType *type;
void *end;
- GST_LOG ("qtdemux_parse %p %d", buffer, length);
+ GST_LOG ("qtdemux_parse buffer %p length %d", buffer, length);
node_length = QTDEMUX_GUINT32_GET (buffer);
fourcc = QTDEMUX_FOURCC_GET (buffer + 4);
@@ -1026,6 +1032,8 @@ qtdemux_parse (GstQTDemux * qtdemux, GNode * node, void *buffer, int length)
void *buf;
guint32 len;
+ GST_DEBUG_OBJECT (qtdemux,
+ "parsing stsd (sample table, sample description) atom");
buf = buffer + 16;
end = buffer + length;
while (buf < end) {
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
diff --git a/sys/qcam/qcam-os.c b/sys/qcam/qcam-os.c
index 41f7046c..5a8f1259 100644
--- a/sys/qcam/qcam-os.c
+++ b/sys/qcam/qcam-os.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