changeset 5372:ee9dd55ef383

some under-devel code, will be required for qtx codecs
author arpi
date Wed, 27 Mar 2002 21:27:38 +0000
parents 81f22cd2c212
children b476f5d1c91e
files libmpdemux/demux_mov.c
diffstat 1 files changed, 35 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_mov.c	Wed Mar 27 21:10:46 2002 +0000
+++ b/libmpdemux/demux_mov.c	Wed Mar 27 21:27:38 2002 +0000
@@ -1,3 +1,5 @@
+//#define USE_QTX_CODECS
+
 //  QuickTime MOV file parser by A'rpi
 //  additional work by Atmos
 //  based on TOOLS/movinfo.c by A'rpi & Al3x
@@ -32,6 +34,10 @@
 #include "qtpalette.h"
 #include "parse_mp4.h" // MP3 specific stuff
 
+#ifdef USE_QTX_CODECS
+#include "../loader/qtx/qtxsdk/components.h"
+#endif
+
 #ifdef HAVE_ZLIB
 #include <zlib.h>
 #endif
@@ -111,6 +117,8 @@
     mov_durmap_t* durmap;
     int keyframes_size;
     unsigned int* keyframes;
+    //
+    void* desc; // image/sound/etc description (pointer to ImageDescription etc)
 } mov_track_t;
 
 void mov_build_index(mov_track_t* trak){
@@ -785,6 +793,33 @@
 //      82  char[4]	atom type
 //	86  ...		atom data
 
+#ifdef USE_QTX_CODECS
+	{	ImageDescription* id=malloc(8+trak->stdata_len);
+		trak->desc=id;
+		id->idSize=8+trak->stdata_len;
+		id->cType=trak->fourcc;
+		id->version=char2short(trak->stdata,8);
+		id->revisionLevel=char2short(trak->stdata,10);
+		id->vendor=char2int(trak->stdata,12);
+		id->temporalQuality=char2int(trak->stdata,16);
+		id->spatialQuality=char2int(trak->stdata,20);
+		id->width=char2short(trak->stdata,24);
+		id->height=char2short(trak->stdata,26);
+		id->hRes=char2int(trak->stdata,28);
+		id->vRes=char2int(trak->stdata,32);
+		id->dataSize=char2int(trak->stdata,36);
+		id->frameCount=char2short(trak->stdata,40);
+		memcpy(&id->name,trak->stdata+42,32);
+		id->depth=char2short(trak->stdata,74);
+		id->clutID=char2short(trak->stdata,76);
+		memcpy(((char*)&id->clutID)+2,trak->stdata+78,trak->stdata_len-78);
+		if(1) // debug
+		{   FILE *f=fopen("ImageDescription","wb");
+		    fwrite(id,id->idSize,1,f);
+		    fclose(f);
+		}
+	}
+#endif
 
 		if(trak->stdata_len >= 86) { // extra atoms found
 		  int pos=78;