summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-11-11 23:46:27 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-11-11 23:46:27 +0000
commit05b4ddb729fb24aa408a17fc7d66c5aeb6f6c8e4 (patch)
tree41387ea0fcee9560c52cab6dbd758e0c18635c38
parent6929055c9228dda600be7c37718ec70ab65417f7 (diff)
downloadmpv-05b4ddb729fb24aa408a17fc7d66c5aeb6f6c8e4.tar.bz2
mpv-05b4ddb729fb24aa408a17fc7d66c5aeb6f6c8e4.tar.xz
export imagedescription for qt video codecs
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8159 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--libmpdemux/demux_mov.c8
-rw-r--r--libmpdemux/stheader.h1
2 files changed, 6 insertions, 3 deletions
diff --git a/libmpdemux/demux_mov.c b/libmpdemux/demux_mov.c
index 8269b10354..e8e315061b 100644
--- a/libmpdemux/demux_mov.c
+++ b/libmpdemux/demux_mov.c
@@ -1,4 +1,4 @@
-//#define USE_QTX_CODECS
+#define USE_QTX_CODECS
// QuickTime MOV file parser by A'rpi
// additional work by Atmos
@@ -919,7 +919,7 @@ static void lschunks(demuxer_t* demuxer,int level,off_t endpos,mov_track_t* trak
{ ImageDescription* id=malloc(8+trak->stdata_len);
trak->desc=id;
id->idSize=8+trak->stdata_len;
- id->cType=trak->fourcc;
+ id->cType=bswap_32(trak->fourcc);
id->version=char2short(trak->stdata,8);
id->revisionLevel=char2short(trak->stdata,10);
id->vendor=char2int(trak->stdata,12);
@@ -935,11 +935,13 @@ static void lschunks(demuxer_t* demuxer,int level,off_t endpos,mov_track_t* trak
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
+ sh->ImageDesc=id;
+#if 0
{ FILE *f=fopen("ImageDescription","wb");
fwrite(id,id->idSize,1,f);
fclose(f);
}
+#endif
}
#endif
diff --git a/libmpdemux/stheader.h b/libmpdemux/stheader.h
index fa0e96b3f7..af79be5bed 100644
--- a/libmpdemux/stheader.h
+++ b/libmpdemux/stheader.h
@@ -108,6 +108,7 @@ typedef struct {
// win32-compatible codec parameters:
AVIStreamHeader video;
BITMAPINFOHEADER* bih;
+ void* ImageDesc; // for quicktime codecs
// codec-specific:
void* context; // codec-specific stuff (usually HANDLE or struct pointer)
} sh_video_t;