summaryrefslogtreecommitdiffstats
path: root/sys/osxvideo/cocoawindow.m
diff options
context:
space:
mode:
Diffstat (limited to 'sys/osxvideo/cocoawindow.m')
-rw-r--r--sys/osxvideo/cocoawindow.m97
1 files changed, 0 insertions, 97 deletions
diff --git a/sys/osxvideo/cocoawindow.m b/sys/osxvideo/cocoawindow.m
index e5f7694a..ef881a21 100644
--- a/sys/osxvideo/cocoawindow.m
+++ b/sys/osxvideo/cocoawindow.m
@@ -93,103 +93,6 @@
@end
-//
-// GstView
-// Deprecated QuickDraw implementation
-//
-
-@ implementation GstView
-
-- (void) drawRect:(NSRect) rect {
- /*NSRect bounds = [self bounds];
- [[NSColor greenColor] set];
- [NSBezierPath fillRect:bounds]; */
- [[NSColor blackColor] set];
- NSRectFill (rect);
- [super drawRect:rect];
-}
-
-- (id) initWithFrame:(NSRect) frame {
- NSRect bounds =[self bounds];
-
- [[NSColor greenColor] set];
-
- self =[super initWithFrame:frame];
- isPortSet = FALSE;
- [NSBezierPath fillRect:bounds];
- return self;
-}
-
-- (void) setVideoSize: (int) w:(int) h {
- GST_LOG ("width:%d height:%d", w, h);
-
- width = w;
- height = h;
-}
-
-- (void) setVideoImage:(GstBuffer *) img {
- if (isPortSet == FALSE) {
- // first image
- //GWorldPtr imgGWorld;
- //Rect coords;
- OSErr err;
- ImageDescriptionPtr pimgdesc;
-
- err = EnterMovies ();
-
- if (err != noErr)
- GST_ERROR ("EnterMovies error: %d", err);
- /*SetRect(&coords,0,0,width,height);
- NewGWorldFromPtr (&imgGWorld, kYUV420CodecType, &coords, 0, 0, 0, GST_BUFFER_DATA(img), width * 4);
- MakeImageDescriptionForPixMap (GetGWorldPixMap(imgGWorld), &imgdesc);
- DisposeGWorld(imgGWorld); */
- imgdesc =
- (ImageDescriptionHandle) NewHandleClear (sizeof (ImageDescription));
- pimgdesc = *imgdesc;
- pimgdesc->idSize = sizeof (ImageDescription);
- pimgdesc->cType = kYUV420CodecType;
- pimgdesc->version = 1;
- pimgdesc->revisionLevel = 0;
- pimgdesc->vendor = 'appl';
- pimgdesc->width = width;
- pimgdesc->height = height;
- pimgdesc->hRes = Long2Fix (72);
- pimgdesc->vRes = Long2Fix (72);
- pimgdesc->spatialQuality = codecLosslessQuality;
- pimgdesc->frameCount = 1;
- pimgdesc->clutID = -1;
- pimgdesc->dataSize = 0;
- pimgdesc->depth = 12;
-
- [self lockFocus];
- port =[self qdPort];
- g_warning ("port = 0x%x", (int) port);
- err = DecompressSequenceBeginS (&qtseqid, imgdesc, NULL, 0, port, NULL, NULL, NULL, 0, // srcCopy
- NULL, codecFlagUseImageBuffer, codecLosslessQuality, bestSpeedCodec);
- if (err != noErr) {
- GST_DEBUG ("DecompressSequenceBeginS error: %d", err);
- }
- [self unlockFocus];
- isPortSet = TRUE;
- }
-
- OSErr err;
- CodecFlags flags;
-
- GST_DEBUG ("qtseqid: %d img data: %p size: %d", (int) qtseqid,
- GST_BUFFER_DATA (img), GST_BUFFER_SIZE (img));
- err =
- DecompressSequenceFrameS (qtseqid, (char *) GST_BUFFER_DATA (img),
- GST_BUFFER_SIZE (img), codecFlagUseImageBuffer, &flags, NULL);
- if (err != noErr) {
- GST_DEBUG ("DecompressSequenceS erro: %d", err);
- } else {
- //QDFlushPortBuffer (port, nil);
- }
-
-}
-
-@end
//
// OpenGL implementation