Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Video output through firewire



Hi!

I've posted this some months ago and I still haven't got it to work.

I'm trying to play .dv files through firewire to a DV-cam from Cocoa.

I can get the display on the DV-cam connected to the computer to turn black,
so it seams I have managed to choose the correct output component.
But when I start to play a movie I doesn't show up on the display of the DV-Cam.
I know the movie is playing because I can hear the audio from the computer's speakers.


I have taken most of the code from the SimpleVideoOut example code.
The SimpleVideoOut example code works fine with the same DV-cam.



Here is my code:

------------------------------------------------------------------------ -------------------------------

#import "Orama.h"


@implementation Orama

-(void)awakeFromNib {

EnterMovies();

Movie myMovie = OpenMovie((CFStringRef)@"/Users/xxx/Movies/ Untitled3-1.dv");


GWorldPtr displayGWorld; OSErr myErr; ComponentInstance _displayComponent; ComponentInstance mVideoOutputClockInstance; ComponentDescription cd; Component c;

_displayComponent = NULL;

cd.componentType = QTVideoOutputComponentType;
cd.componentSubType = 'fire';
cd.componentManufacturer = 'appl';
cd.componentFlags = 0;
cd.componentFlagsMask = QTVideoOutputSetDisplayMode;
c = FindNextComponent(c, &cd);

if (c == NULL) {
goto bail;
}

_displayComponent = OpenComponent(c);
if (_displayComponent == NULL) {
myErr = internalComponentErr;
goto bail;
}

QTVideoOutputSetClientName(_displayComponent, "DV Exporter");

myErr = QTVideoOutputSetDisplayMode(_displayComponent,2); //NOTE: 1 = NTSC and 2 = PAL
if (myErr != noErr) goto bail;


myErr = QTVideoOutputBegin(_displayComponent);
if (myErr != noErr) goto bail;

myErr = QTVideoOutputGetGWorld(_displayComponent, &displayGWorld);
if (myErr != noErr) goto bail;

myErr = QTVideoOutputGetClock( _displayComponent, &mVideoOutputClockInstance );
if (myErr != noErr) goto bail;


SetMovieMasterClock( myMovie, (Component)mVideoOutputClockInstance, (TimeRecord*)NULL );

SetMovieVideoOutput(myMovie, _displayComponent);

SetMovieGWorld(myMovie, displayGWorld, nil);

StartMovie (myMovie);

return;

bail: {
NSLog(@"bail!");
}

}


Movie OpenMovie(CFStringRef inPath) { Movie myMovie = NULL; OSType myDataRefType; Handle myDataRef = NULL; short myResID = 0; OSErr myErr = noErr;


// create the data reference
myErr = QTNewDataReferenceFromFullPathCFString(inPath, kQTNativeDefaultPathStyle, 0, &myDataRef, &myDataRefType);
if (myErr != noErr) goto bail;


// get the Movie
myErr = NewMovieFromDataRef(&myMovie, newMovieActive | newMovieAsyncOK, &myResID, myDataRef, myDataRefType);
if (myErr != noErr) goto bail;


// dispose of the data reference handle - we no longer need it
DisposeHandle(myDataRef);


return myMovie;

bail: {
NSLog(@"bail!");
return nil;
}

}

@end
_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-api/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.