2 * Copyright (c) 1999-2000, Eric Moon.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions, and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions, and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
16 * 3. The name of the author may not be used to endorse or promote products
17 * derived from this software without specific prior written permission.
19 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
20 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21 * OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
23 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
26 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
27 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 // MediaStrings.h (Cortex/Support)
35 // Provide routines to translate MediaKit objects, values
36 // and constants into human-readable text
39 // c.lenz 2nov99 Begun
40 // c.lenz 11nov99 Format strings are now aware
42 // c.lenz 25dec99 Added functions to retrieve strings
43 // for single format fields
46 #ifndef __MediaString_H__
47 #define __MediaString_H__
50 #include <InterfaceDefs.h>
52 #include <MediaDefs.h>
53 #include <MediaNode.h>
57 #include "cortex_defs.h"
58 __BEGIN_CORTEX_NAMESPACE
63 public: // media_node strings
65 static BString
getStringFor(
67 bool complete
= true);
68 static BString
getStringFor(
69 BMediaNode::run_mode runMode
,
70 bool complete
= true);
72 public: // media_format strings
74 static BString
getStringFor(
75 const media_format
&format
,
76 bool complete
= true);
77 static BString
getStringFor(
78 media_format_family family
,
79 bool complete
= true);
80 static BString
getStringFor(
82 bool complete
= true);
83 static BString
getStringFor(
84 const media_multi_audio_format
&format
,
85 bool complete
= true);
86 static BString
getStringFor(
87 const media_raw_video_format
&format
,
88 bool complete
= true);
89 static BString
getStringFor(
90 const media_encoded_audio_format
&format
,
91 bool complete
= true);
92 static BString
getStringFor(
93 const media_encoded_video_format
&format
,
94 bool complete
= true);
95 static BString
getStringFor(
96 const media_multistream_format
&format
,
97 bool complete
= true);
99 public: // media_source / media_destination strings
101 static BString
getStringFor(
102 const media_source
&source
,
103 bool complete
= true);
104 static BString
getStringFor(
105 const media_destination
&destination
,
106 bool complete
= true);
108 public: // strings for single fields in media_raw_audio_format
110 static BString
forAudioFormat(
113 static BString
forAudioFrameRate(
115 static BString
forAudioChannelCount(
116 uint32 channelCount
);
117 static BString
forAudioByteOrder(
119 static BString
forAudioBufferSize(
121 static BString
forAudioChannelMask(
123 static BString
forAudioMatrixMask(
126 public: // strings for single fields in media_encoded_audio_format
128 static BString
forAudioBitRate(
130 static BString
forAudioFrameSize(
133 public: // strings for single fields in media_raw_video_format
135 static BString
forVideoFormat(
137 static BString
forVideoFieldRate(
140 static BString
forVideoResolution(
143 static BString
forVideoAspectRatio(
146 static BString
forVideoOrientation(
148 static BString
forVideoActiveLines(
151 static BString
forVideoBytesPerRow(
153 static BString
forVideoOffset(
157 public: // strings for single fields in media_encoded_video_format
159 static BString
forVideoBitRate(
162 static BString
forVideoFrameSize(
164 static BString
forVideoHistory(
165 int16 forwardHistory
,
166 int16 backwardHistory
);
168 public: // strings for single fields media_multistream_format
170 static BString
forMultistreamFormat(
172 static BString
forMultistreamBitRate(
175 static BString
forMultistreamChunkSize(
177 uint32 maxChunkSize
);
178 static BString
forMultistreamFlags(
182 __END_CORTEX_NAMESPACE
183 #endif /* __MediaStrings_H__ */