35 lines
9.3 KiB
HTML
35 lines
9.3 KiB
HTML
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>The Be Book - Classes And Methods - The Translation Kit</title><link rel="stylesheet" href="be_book.css" type="text/css" media="all" /><link rel="shortcut icon" type="image/vnd.microsoft.icon" href="./images/favicon.ico" /><!--[if IE]>
|
||
<link rel="stylesheet" type="text/css" href="be_book_ie.css" />
|
||
<![endif]--><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="Access, BeOS, BeBook, API" /><link rel="start" href="index.html" title="The Be Book" /><link rel="up" href="TheTranslationKit.html" title="The Translation Kit" /><link rel="prev" href="TranslatorAddOns.html" title="Translator Add-Ons" /><link rel="next" href="SpecialTopics.html" title="Special Topics" /></head><body><div id="header"><div id="headerT"><div id="headerTL"><a accesskey="p" href="TranslatorAddOns.html" title="Translator Add-Ons"><img src="./images/navigation/prev.png" alt="Prev" /></a> <a accesskey="u" href="TheTranslationKit.html" title="The Translation Kit"><img src="./images/navigation/up.png" alt="Up" /></a> <a accesskey="n" href="SpecialTopics.html" title="Special Topics"><img src="./images/navigation/next.png" alt="Next" /></a></div><div id="headerTR"><div id="navigpeople"><a href="http://www.haiku-os.org"><img src="./images/People_24.png" alt="haiku-os.org" title="Visit The Haiku Website" /></a></div><div class="navighome" title="Home"><a accesskey="h" href="index.html"><img src="./images/navigation/home.png" alt="Home" /></a></div><div class="navigboxed" id="navigindex"><a accesskey="i" href="ClassIndex.html" title="Index">I</a></div><div class="navigboxed" id="naviglang" title="English">en</div></div><div id="headerTC">The Be Book - Classes And Methods - The Translation Kit</div></div><div id="headerB">Prev: <a href="TranslatorAddOns.html">Translator Add-Ons</a> Up: <a href="TheTranslationKit.html">The Translation Kit</a> Next: <a href="SpecialTopics.html">Special Topics</a></div><hr /></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h2 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="TheTranslationKit_DefaultMediaFormats"></a>Default Media Formats</h2></div></div></div><p>Declared in: <code class="filename">translation/TranslatorFormats.h</code></p><p>This section describes the default media formats for each of the media
|
||
groups defined by the Translation Kit.</p><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><hr /><div xmlns:d="http://docbook.org/ns/docbook"><h3 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="TheTranslationKit_MediaFormats"></a>Media Formats</h3></div></div></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="B_TRANSLATOR_BITMAP"></a>B_TRANSLATOR_BITMAP</h4></div></div></div><a id="id1298182" class="indexterm"></a><pre class="programlisting definition c">struct <span class="type">TranslatorBitmap</span> {
|
||
<span class="type">int32</span> <code class="varname">magic</code>;
|
||
<code class="classname">BRect</code> <code class="varname">bounds</code>;
|
||
<span class="type">uint32</span> <code class="varname">rowBytes</code>;
|
||
<span class="type">color_space</span> <code class="varname">colors</code>;
|
||
<span class="type">uint32</span> <code class="varname">dataSize</code>;
|
||
}</pre><p><span class="type">TranslatorBitmap</span> holds the header information for a
|
||
translator bitmap. <code class="varname">magic</code> should always be set to
|
||
<code class="constant">B_TRANSLATOR_BITMAP</code>. The uncompressed image data
|
||
immediately follows the header in the stream. This image data should be
|
||
precisely <code class="varname">dataSize</code> bytes long.</p><p>All data in the header is stored in big endian format. The data is stored
|
||
in either big- or little- endian format, depending on the value of the
|
||
<code class="varname">colors</code> field.</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="B_TRANSLATOR_MIDI"></a>B_TRANSLATOR_MIDI</h4></div></div></div><a id="id1298284" class="indexterm"></a><p>This is a standard type 1 MIDI file, as read by and written to the
|
||
<a class="link" href="BMidiStore.html" title="BMidiStore"><code class="classname">BMidiStore</code></a> class.</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="B_TRANSLATOR_MEDIA"></a>B_TRANSLATOR_MEDIA</h4></div></div></div><a id="id1298315" class="indexterm"></a><p>As of this writing, a standard for this format has not been finalized,
|
||
although it will be in a future release.</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="B_TRANSLATOR_NONE"></a>B_TRANSLATOR_NONE</h4></div></div></div><a id="id1298340" class="indexterm"></a><p>Obviously, there is no standard format for the no media type.</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="B_TRANSLATOR_PICTURE"></a>B_TRANSLATOR_PICTURE</h4></div></div></div><a id="id1298364" class="indexterm"></a><p><span class="deprecated">Streams in this format are stored as
|
||
<code class="methodname">BPicture::Flatten()</code>.</span></p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="B_TRANSLATOR_SOUND"></a><a id="TranslatorSound"></a>
|
||
B_TRANSLATOR_SOUND</h4></div></div></div><a id="id1298398" class="indexterm"></a><a id="id1298405" class="indexterm"></a><pre class="programlisting definition c">struct <span class="type">TranslatorSound</span> {
|
||
<span class="type">int32</span> <code class="varname">magic</code>;
|
||
<span class="type">uint32</span> <code class="varname">channels</code>;
|
||
<span class="type">float</span> <code class="varname">sampleFreq</code>;
|
||
<span class="type">uint32</span> <code class="varname">numFrames</code>;
|
||
}</pre><p><span class="type">TranslatorSound</span> holds the header information for the
|
||
default sound format. <code class="varname">magic</code> should always be set to
|
||
<code class="constant">B_TRANSLATOR_SOUND</code>. The raw sound data stored in 16
|
||
bit linear format, left channel first, immediately follows the header. The
|
||
data in both the header and the stream are stored in big endian
|
||
format.</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="B_TRANSLATOR_TEXT"></a>B_TRANSLATOR_TEXT</h4></div></div></div><a id="id1298485" class="indexterm"></a><p>This is a plain ASCII text file.</p></div></div></div><div id="footer"><hr /><div id="footerT">Prev: <a href="TranslatorAddOns.html">Translator Add-Ons</a> Up: <a href="TheTranslationKit.html">The Translation Kit</a> Next: <a href="SpecialTopics.html">Special Topics</a> </div><div id="footerB"><div id="footerBL"><a href="TranslatorAddOns.html" title="Translator Add-Ons"><img src="./images/navigation/prev.png" alt="Prev" /></a> <a href="TheTranslationKit.html" title="The Translation Kit"><img src="./images/navigation/up.png" alt="Up" /></a> <a href="SpecialTopics.html" title="Special Topics"><img src="./images/navigation/next.png" alt="Next" /></a></div><div id="footerBR"><div><a href="http://www.haiku-os.org"><img src="./images/People_24.png" alt="haiku-os.org" title="Visit The Haiku Website" /></a></div><div class="navighome" title="Home"><a accesskey="h" href="index.html"><img src="./images/navigation/home.png" alt="Home" /></a></div></div><div id="footerBC"><a href="http://www.access-company.com/home.html" title="ACCESS Co."><img alt="Access Company" src="./images/access_logo.png" /></a></div></div></div><div id="licenseFooter"><div id="licenseFooterBL"><a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/" title="Creative Commons License"><img alt="Creative Commons License" style="border-width:0" src="https://licensebuttons.net/l/by-nc-nd/3.0/88x31.png" /></a></div><div id="licenseFooterBR"><a href="./LegalNotice.html">Legal Notice</a></div><div id="licenseFooterBC"><span id="licenseText">This work is licensed under a
|
||
<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/">Creative
|
||
Commons Attribution-Non commercial-No Derivative Works 3.0 License</a>.</span></div></div></body></html>
|