cocoa/DVDPlayback example code?
cocoa/DVDPlayback example code?
- Subject: cocoa/DVDPlayback example code?
- From: Bob Kuehne <email@hidden>
- Date: Mon, 7 Feb 2005 09:51:07 -0500
hi gang,
i've done some research over the weekend into how
DVDPlayback.framework operates, and i've made some
progress, but information is pretty sparse on the
apple web sites, google, the ADC docs, etc. the
closest thing i can find to a complete example is
described in a comment in the DVDPlayback.h header.
but it's not quite enough. i'm looking for sample
code to show me how to do the following operations
with either a Cocoa View or Window. this recommended
cookbook is copied from the header and converted
into code below. the parts outside of the #if function
fine, but the parts inside, i can't quite get to go.
--
OSStatus result = DVDInitialize();
if ( noErr == result )
{
void* pwin = [ [ self window ] windowRef ];
result = DVDSetVideoWindowID( GetWindowPort( pwin ) );
NSLog( @"DVDSetVideoWindowID: %d\n", result );
#if HOW_SHOULD_THIS_WORK
NSScreen *mainscreen = [ [ NSScreen screens ] objectAtIndex:0 ];
NSDictionary *mainscreendict = [ mainscreen deviceDescription ];
NSNumber *dispnum = [ mainscreendict
objectForKey:@"NSScreenNumber" ];
result = DVDSetVideoDisplay( (CGDirectDisplayID)[ dispnum
intValue ] );
NSLog( @"DVDSetVideoDisplay: %d\n", result );
NSLog( @"noErr: %d\n", noErr );
result = DVDSetVideoBounds( (CGRect){ NSMinX(pwinFrame),
NSMinY(pwinFrame),
NSWidth(pwinFrame), NSHeight(pwinFrame) } );
NSLog( @"DVDSetVideoBounds: %d\n", result );
#endif
// cleanup
result = DVDDispose();
NSLog( @"DVDDispose: %d\n", result );
}
--
a few questions:
- can anyone provide a complete example (ideally
including a nib) of how this works?
- can anyone flesh out how the above code should
work from a custom View?
- … custom Window?
- am i even close?
thanks!
bob
_______________________________________________
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