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