Mailing Lists: Apple Mailing Lists

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

Quicktime Win/COM Issue with Clipboard



I’m having a problem with using the clipboard to generate movies with the QuickTime COM object.  I am building an application that will export frame data to QuickTime formats. 

 

I am doing this by the method mentioned in “QuickTime for .NET and COM Developers” by John Cromie.  That is, I am copying each frame (a bitmap) to the clipboard, and then pasting using the Movie.Paste() method.  After all the frames are added, the audio is added to the movie in the following manner: a second quicktime control is created, a WAV file is loaded in that control, and is copied to the clipboard using Movie.SelectAll() and Movie.Copy().  Then, it is pasted to the original movie with Movie.Add(). 

 

Now, all of this works just fine… until I open quicktime player to watch a movie.  When I come back to my application, it no longer pastes any of the frame data.  From then on Movie.Paste() only pastes the audio (so I end up with an audio-only movie that has many copies of the same WAV file over and over).  I know that my frames are being copied to the clipboard because they appear in the Windows ClipBook application or if I paste to another application like Paint while debugging I can see the frames.  It just seems like Movie.Paste() is no longer looking at the system clipboard for its data anymore.

 

This seems like very odd behavior, and I was wondering if anyone has a clue?

 

 

(All of the code is done in Borland C++ Builder)

 

Here is the init code:

 

    // create the QuickTime ActiveX object

    qtControl = new TQTControl( owner );

    qtControl->Parent = owner;

    qtControl->Visible = false;

 

    // create a new movie

    qtControl->CreateNewMovie(Variant(true));

    

Here is the code called for every frame:

 

    Clipboard()->Open();

    Clipboard()->Clear();

    Clipboard()->Assign(bitmap);

    Clipboard()->Close();

 

    qtControl->Movie->Paste();

 

Here is the “finish” code:

 

    // get the QuickTime audio data on to the clipboard

    TQTControl* qtControl2 = new TQTControl( owner );

    qtControl2->Parent = owner;

    qtControl2->Visible = false;

    qtControl2->URL = "">

    qtControl2->Movie->SelectAll();

    qtControl2->Movie->Copy();

 

    // paste the audio data on to the main movie

    qtControl->Movie->Rewind();

    qtControl->Movie->Add();

    qtControl->Movie->Rewind();

 _______________________________________________
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.