Render DVD into GWorldPtr?
Render DVD into GWorldPtr?
- Subject: Render DVD into GWorldPtr?
- From: Devin Lane <email@hidden>
- Date: Mon, 10 Jul 2006 18:10:30 -0400
cocoa-dev:
I'm trying to set the dvd kit to render video frames into a gworld,
and while everything seems to be working, that is, dvdkit isn't
returning errors when I start playback, there is no video content in
the gworld, just black pixels.
Most of the dvd code is taken from the CocoaDVDPlayer sample app,
with the special gworld code below:
////////////////////////////////////////////
UInt16 w = 720, h = 480;
DVDGetNativeVideoSize (&w, &h);
width = w;
height = h;
NSLog(@"native video width: %d, height: %d", w, h);
Rect qdrect;
qdrect.left = 0;
qdrect.bottom = h;
qdrect.top = 0;
qdrect.right = w;
NewGWorld(&gworld,k32ARGBPixelFormat,&qdrect,NULL,NULL,0);
DVDSetVideoPort(gworld);
OSStatus result = DVDSetVideoBounds (&qdrect);
NSAssert1 (!result, @"DVDSetVideoBounds returned %d", result);
DVDSetVideoDevice(GetGWorldDevice(gworld));
Boolean isSupported = FALSE;
DVDSwitchToDevice(GetGWorldDevice(gworld),&isSupported);
NSLog(@"isSupported: %d", isSupported);
//////////////////////////////////////////////
I've tried getting the frame data from the gworld by creating an
CIImage from it's bytes, or just writing the gworld to a ppm file. In
either case, the frames are always black.
Any idea if this is possible, and if so, what needs to be done to
make the video draw correctly?
Devin Lane
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden