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: Text movie bug



I recently discovered that the following (C++) code works if you have UTF-8 (or UTF-16 with a BOM) text, but I have not found any documentation anywhere; I just pieced it together from studying actual movies and an obscure post from the about a year ago. Hopefully someone more knowledgeable can comment on whether this is the right way and if there are any limitations or font issues or whatnot...

Media md; // set appropriately
MediaHandler mh; // set appropriately
UInt32 encoding = 256; // 256 stands for unicode; works for UTF-8 if there's no BOM
encoding = EndianU32_NtoB( encoding );
TextMediaSetTextSampleData( mh, &encoding, 'encd');


    // Now add samples with TextMediaAddTextSample
    BeginMediaEdits( md);
    Rect textBox; // set appropriately

    UInt8 *text; / set appropriately
    unsigned long textLength; // set appropriately
    TimeScale duration; // set appropriately

     TextMediaAddTextSample(
                             mh,
                             const_cast<char*>(text), textLength,
                             0, 0, 0, nil, nil,
                             teCenter,
                             &textBox,
                             dfClipToTextBox,
                             0, 0, 0,
                             nil,
                             duration,
                             nil );

    EndMediaEdits( md );

On Aug 8, 2005, at 12:08 PM, email@hidden wrote:

Dear All,

Now i have a question about text track movie. I make a slideshow include text media, but if the text described in Japanese,it will not show rightly. I want to know how make a movie that can show text in Japanese correctly. I use quicktime api TextMediaAddSample to add text sample into the media .In that api ,there is a parameter to set font.Under Japan language environment ,I set Japanese text font into the api, as well as the Osaka font, but the movie show mess code when played with Quicktime Player.
I sincerely wish someone can give me some suggestion about how to show Japanese in a movie.
Thank you.



BestRegards


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