Mailing Lists: Apple Mailing Lists

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

Re: Video output through firewire



I'm not showing the video on my monitor so that should not be the issue.
It is possible to show on both the monitor and through firewire at the same time by calling QTVideoOutputSetEchoPort (SimpleVideoOut does that).
But for now I'm only interested in sending the video through firewire.


Much of the code I use comes from the SimpleVideoOut example which is written in Carbon. I'm trying to do the same thing from Cocoa.

I have managed to use similar code with Black Magic Decklink cards with success, but I haven't succeeded yet with firewire.


/VH



23 feb 2006 kl. 01.55 skrev Adriano Angelillis:

Hi,

to watch your video on camcorder, you must first hide it on your monitor.
You cannot watch it on both your computer and camcorder at the same time.


Here's a nice utility for developers which will solve your problem i think:
http://developer.apple.com/samplecode/SimpleVideoOut/ SimpleVideoOut.html


Adriano

Il giorno 23/feb/06, alle ore 00:31, Vasilios Hatciliamis ha scritto:

Hi!

I'm trying to play .dv files through firewire from Cocoa.

I can get the screen 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 screen.
I know the movie is playing because I can hear the audio from the computer's speakers.


I'm quite new to Quicktime and Cocoa development so maybe I'm doing something wrong.


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/se6ciocco% 40gmail.com


This email sent to email@hidden


_______________________________________________ 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
References: 
 >Video output through firewire (From: Vasilios Hatciliamis <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.