• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Render DVD into GWorldPtr?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Render DVD into GWorldPtr?
      • From: "Finlay Dobbie" <email@hidden>
  • Prev by Date: Re: A problem of NSImageView
  • Next by Date: Re: [OT] OS X Icon Designers
  • Previous by thread: menu bar MIA
  • Next by thread: Re: Render DVD into GWorldPtr?
  • Index(es):
    • Date
    • Thread