Home
last modified time | relevance | path

Searched refs:format (Results 1 – 25 of 1442) sorted by relevance

12345678910>>...58

/haiku/src/add-ons/media/media-add-ons/mixer/
H A DMixerUtils.cpp22 const char *StringForFormat(char *str, const media_format & format);
71 fix_multiaudio_format(media_multi_audio_format *format) in fix_multiaudio_format() argument
73 if (format->format == media_raw_audio_format::B_AUDIO_INT) { in fix_multiaudio_format()
74 if (format->valid_bits != 0 && (format->valid_bits < 16 || format->valid_bits >= 32)) in fix_multiaudio_format()
75 format->valid_bits = 0; in fix_multiaudio_format()
77 switch (format->channel_count) { in fix_multiaudio_format()
79 format->channel_mask = 0; in fix_multiaudio_format()
80 format->matrix_mask = 0; in fix_multiaudio_format()
83 if (count_nonzero_bits(format->channel_mask) != 1) { in fix_multiaudio_format()
84 format->channel_mask = B_CHANNEL_LEFT; in fix_multiaudio_format()
[all …]
/haiku/src/add-ons/kernel/drivers/disk/nvme/compat/
H A Dnvme_log.h15 void nvme_log(enum nvme_log_level level, const char *format, ...)
16 __attribute__((format(printf, 2, 3)));
17 void nvme_vlog(enum nvme_log_level level, const char *format, va_list ap)
18 __attribute__((format(printf,2,0)));
21 #define nvme_emerg(format, args...) \ argument
23 "libnvme (FATAL): " format, \
26 #define nvme_alert(format, args...) \ argument
28 "libnvme (ALERT): " format, \
31 #define nvme_crit(format, args...) \ argument
33 "libnvme (CRITICAL): " format, \
[all …]
/haiku/src/apps/cortex/addons/common/
H A DSoundUtils.cpp61 const media_raw_audio_format & format) in bytes_per_frame() argument
67 int bytesPerSample = format.format & 0xf; in bytes_per_frame()
68 return bytesPerSample * format.channel_count; in bytes_per_frame()
73 const media_raw_audio_format & format) in frames_per_buffer() argument
79 if (bytes_per_frame(format) > 0) { in frames_per_buffer()
80 frames = format.buffer_size / bytes_per_frame(format); in frames_per_buffer()
87 const media_raw_audio_format & format) in buffer_duration() argument
92 if (format.buffer_size > 0 && format.frame_rate > 0 && bytes_per_frame(format) > 0) { in buffer_duration()
98 duration = s_to_us((format.buffer_size / bytes_per_frame(format)) / format.frame_rate); in buffer_duration()
105 const media_raw_audio_format & format, int64 num_frames) in frames_duration() argument
[all …]
/haiku/src/apps/cortex/support/
H A DSoundUtils.cpp61 const media_raw_audio_format & format) in bytes_per_frame() argument
67 int bytesPerSample = format.format & media_raw_audio_format::B_AUDIO_SIZE_MASK; in bytes_per_frame()
68 return bytesPerSample * format.channel_count; in bytes_per_frame()
73 const media_raw_audio_format & format) in frames_per_buffer() argument
79 if (bytes_per_frame(format) > 0) { in frames_per_buffer()
80 frames = format.buffer_size / bytes_per_frame(format); in frames_per_buffer()
87 const media_raw_audio_format & format) in buffer_duration() argument
92 if (format.buffer_size > 0 && format.frame_rate > 0 && bytes_per_frame(format) > 0) { in buffer_duration()
98 duration = s_to_us((format.buffer_size / bytes_per_frame(format)) / format.frame_rate); in buffer_duration()
105 const media_raw_audio_format & format, int64 num_frames) in frames_duration() argument
[all …]
H A DMediaString.cpp266 const media_multi_audio_format &format, in getStringFor() argument
274 if (format.frame_rate != media_raw_audio_format::wildcard.frame_rate) { in getStringFor()
275 s << (empty ? "" : ", ") << forAudioFrameRate(format.frame_rate); in getStringFor()
280 if (format.format != media_raw_audio_format::wildcard.format) { in getStringFor()
281 s << (empty ? "" : ", ") << forAudioFormat(format.format, format.valid_bits); in getStringFor()
286 if (format.channel_count != media_raw_audio_format::wildcard.channel_count) { in getStringFor()
287 s << (empty ? "" : ", ") << forAudioChannelCount(format.channel_count); in getStringFor()
293 if (format.channel_mask != media_multi_audio_format::wildcard.channel_mask) { in getStringFor()
294 s << (empty ? "" : " ") << "(" << forAudioChannelMask(format.channel_mask) << ")"; in getStringFor()
299 if (format.matrix_mask != media_multi_audio_format::wildcard.matrix_mask) { in getStringFor()
[all …]
/haiku/src/system/libroot/posix/glibc/stdio-common/
H A Dprintf-parse.h95 find_spec (const UCHAR_T *format) in find_spec() argument
97 find_spec (const UCHAR_T *format, mbstate_t *ps) in find_spec()
101 return (const UCHAR_T *) __wcschrnul ((const CHAR_T *) format, L'%'); in find_spec()
103 while (*format != L_('\0') && *format != L_('%')) in find_spec()
109 if (! isascii (*format) && (len = __mbrlen (format, MB_CUR_MAX, ps)) > 0) in find_spec()
110 format += len; in find_spec()
112 ++format; in find_spec()
114 return format; in find_spec()
131 parse_one_spec (const UCHAR_T *format, size_t posn, struct printf_spec *spec, in parse_one_spec() argument
134 parse_one_spec (const UCHAR_T *format, size_t posn, struct printf_spec *spec, in parse_one_spec()
[all …]
/haiku/src/add-ons/media/media-add-ons/radeon/
H A DRadeonProducer.cpp221 fOutput.format.type = B_MEDIA_RAW_VIDEO; in CRadeonProducer()
222 fOutput.format.u.raw_video = media_raw_video_format::wildcard; in CRadeonProducer()
306 BDiscreteParameter *format = options1->MakeDiscreteParameter( in setupWeb() local
309 format->AddItem(B_YCbCr422, "YCbCr422 (fastest)"); in setupWeb()
310 format->AddItem(B_GRAY8, "8 Bits/Pixel (gray)"); in setupWeb()
311 format->AddItem(B_RGB15, "15 Bits/Pixel"); in setupWeb()
312 format->AddItem(B_RGB16, "16 Bits/Pixel"); in setupWeb()
313 format->AddItem(B_RGB32, "32 Bits/Pixel"); in setupWeb()
627 CRadeonProducer::verifySetMode( media_format *format ) in verifySetMode() argument
632 if( format->u.raw_video.interlace == media_raw_video_format::wildcard.interlace ) { in verifySetMode()
[all …]
/haiku/src/add-ons/media/media-add-ons/demultiplexer/
H A DMediaOutputInfo.cpp54 status_t MediaOutputInfo::FormatProposal(media_format * format) in FormatProposal() argument
58 if (!format_is_acceptible(*format,generalFormat)) { in FormatProposal()
63 format->SpecializeTo(&wildcardedFormat); in FormatProposal()
85 media_format * format, in PrepareToConnect() argument
93 status_t status = FormatChangeRequested(where,format); in PrepareToConnect()
106 const media_format & format, in Connect() argument
111 output.format = format; in Connect()
119 output.format = generalFormat; in Connect()
128 output.format = generalFormat; in Disconnect()
182 return ComputeBufferSize(output.format); in ComputeBufferSize()
[all …]
/haiku/src/apps/cortex/InfoView/
H A DEndPointInfoView.cpp83 MediaString::getStringFor(input.format.type)); in EndPointInfoView()
85 _addFormatFields(input.format); in EndPointInfoView()
112 MediaString::getStringFor(output.format.type)); in EndPointInfoView()
114 _addFormatFields(output.format); in EndPointInfoView()
151 const media_format &format) in _addFormatFields() argument
155 switch (format.type) { in _addFormatFields()
162 s = MediaString::forAudioFormat(format.u.raw_audio.format, in _addFormatFields()
163 format.u.raw_audio.valid_bits); in _addFormatFields()
166 s = MediaString::forAudioFrameRate(format.u.raw_audio.frame_rate); in _addFormatFields()
169 s = MediaString::forAudioChannelCount(format.u.raw_audio.channel_count); in _addFormatFields()
[all …]
H A DConnectionInfoView.cpp101 MediaString::getStringFor(connection.format().type)); in ConnectionInfoView()
104 _addFormatFields(connection.format()); in ConnectionInfoView()
117 const media_format &format) { in _addFormatFields() argument
120 switch (format.type) { in _addFormatFields()
127 s = MediaString::forAudioFormat(format.u.raw_audio.format, in _addFormatFields()
128 format.u.raw_audio.valid_bits); in _addFormatFields()
131 s = MediaString::forAudioFrameRate(format.u.raw_audio.frame_rate); in _addFormatFields()
134 s = MediaString::forAudioChannelCount(format.u.raw_audio.channel_count); in _addFormatFields()
137 s = MediaString::forAudioChannelMask(format.u.raw_audio.channel_mask); in _addFormatFields()
140 s = MediaString::forAudioMatrixMask(format.u.raw_audio.matrix_mask); in _addFormatFields()
[all …]
/haiku/src/apps/cortex/addons/AudioAdapter/
H A DAudioAdapterNode.cpp84 ioFormat.u.raw_audio.format = p->inputFormat.format; in getRequiredInputFormat()
115 if(p->inputFormat.format != w.format) in getPreferredInputFormat()
116 f.format = p->inputFormat.format; in getPreferredInputFormat()
129 if(f.format == w.format) in getPreferredInputFormat()
130 f.format = output().format.u.raw_audio.format; in getPreferredInputFormat()
132 f.channel_count = output().format.u.raw_audio.channel_count; in getPreferredInputFormat()
136 frames_per_buffer(output().format.u.raw_audio); in getPreferredInputFormat()
137 f.frame_rate = output().format.u.raw_audio.frame_rate; in getPreferredInputFormat()
150 ioFormat.u.raw_audio.format = media_raw_audio_format::wildcard.format; in getRequiredOutputFormat()
159 ioFormat.u.raw_audio.format = p->outputFormat.format; in getRequiredOutputFormat()
[all …]
/haiku/src/tools/fs_shell/
H A Dstdio.cpp13 fssh_sprintf(char *string, char const *format, ...) in fssh_sprintf() argument
16 va_start(args, format); in fssh_sprintf()
18 int result = vsprintf(string, format, args); in fssh_sprintf()
27 fssh_snprintf(char *string, fssh_size_t size, char const *format, ...) in fssh_snprintf() argument
30 va_start(args, format); in fssh_snprintf()
32 int result = vsnprintf(string, size, format, args); in fssh_snprintf()
41 fssh_vsprintf(char *string, char const *format, va_list ap) in fssh_vsprintf() argument
43 return vsprintf(string, format, ap); in fssh_vsprintf()
48 fssh_vsnprintf(char *string, fssh_size_t size, char const *format, va_list ap) in fssh_vsnprintf() argument
50 return vsnprintf(string, size, format, ap); in fssh_vsnprintf()
[all …]
/haiku/src/apps/mediaplayer/media_node_framework/audio/
H A DAudioProducer.cpp57 init_media_file(media_format format, BMediaTrack** _track) in init_media_file() argument
82 track = file->CreateTrack(&format, &info); in init_media_file()
95 estimate_internal_latency(const media_format& format) in estimate_internal_latency() argument
99 int32 sampleSize = format.u.raw_audio.format in estimate_internal_latency()
101 int32 sampleCount = format.u.raw_audio.buffer_size / sampleSize; in estimate_internal_latency()
157 fPreferredFormat.u.raw_audio.format in AudioProducer()
169 * (fPreferredFormat.u.raw_audio.format in AudioProducer()
182 fOutput.format = fPreferredFormat; in AudioProducer()
241 AudioProducer::FormatProposal(const media_source& output, media_format* format) in FormatProposal() argument
254 if ((format->type != B_MEDIA_UNKNOWN_TYPE in FormatProposal()
[all …]
/haiku/src/tests/kits/game/push_game_sound_test/
H A Dpush_game_sound_test.cpp76 media_format format; in main() local
77 memset(&format, 0, sizeof(format)); in main()
78 format.type = B_MEDIA_RAW_AUDIO; in main()
79 format.u.raw_audio.format = media_raw_audio_format::B_AUDIO_SHORT; in main()
80 format.u.raw_audio.byte_order = B_MEDIA_LITTLE_ENDIAN; in main()
82 if (mediaTrack->DecodedFormat(&format) != B_OK) { in main()
88 printf("frame rate: %g Hz\n", format.u.raw_audio.frame_rate); in main()
89 printf("channel count: %ld\n", format.u.raw_audio.channel_count); in main()
90 printf("buffer size: %ld bytes\n", format.u.raw_audio.buffer_size); in main()
94 gsFormat.frame_rate = format.u.raw_audio.frame_rate; in main()
[all …]
/haiku/src/kits/media/
H A DMediaDefs.cpp240 if (a.format != 0 && b.format != 0 && a.format != b.format) in raw_audio_format_matches()
312 if (a.display.format != 0 && b.display.format != 0 in raw_video_format_matches()
313 && a.display.format != b.display.format) { in raw_video_format_matches()
367 if (a.format != 0 && b.format != 0 && a.format != b.format) in multistream_format_matches()
370 if (a.format == 0 && b.format == 0) { in multistream_format_matches()
375 switch ((a.format != 0) ? a.format : b.format) { in multistream_format_matches()
527 raw_audio_format_specialize(media_raw_audio_format* format, in raw_audio_format_specialize() argument
530 if (format->frame_rate == 0) in raw_audio_format_specialize()
531 format->frame_rate = other->frame_rate; in raw_audio_format_specialize()
532 if (format->channel_count == 0) in raw_audio_format_specialize()
[all …]
H A DSoundPlayNode.cpp45 fOutput.format.type = B_MEDIA_RAW_AUDIO; in SoundPlayNode()
46 fOutput.format.u.raw_audio = media_multi_audio_format::wildcard; in SoundPlayNode()
67 int frameRate = (int)fOutput.format.u.raw_audio.frame_rate; in CurrentTime()
76 return fOutput.format.u.raw_audio; in Format()
121 fOutput.format.type = B_MEDIA_RAW_AUDIO; in NodeRegistered()
122 fOutput.format.u.raw_audio = media_multi_audio_format::wildcard; in NodeRegistered()
162 media_format* format) in FormatSuggestionRequested() argument
175 format->type = B_MEDIA_RAW_AUDIO; in FormatSuggestionRequested()
176 format->u.raw_audio = media_multi_audio_format::wildcard; in FormatSuggestionRequested()
183 SoundPlayNode::FormatProposal(const media_source& output, media_format* format) in FormatProposal() argument
[all …]
/haiku/src/system/kernel/lib/
H A Dkernel_vsprintf.cpp274 vsnprintf(char *buffer, size_t bufferSize, const char *format, va_list args) in vsnprintf() argument
286 for (; format[0]; format++) { in vsnprintf()
287 if (format[0] != '%') { in vsnprintf()
288 outBuffer.PutCharacter(format[0]); in vsnprintf()
297 format++; in vsnprintf()
299 switch (format[0]) { in vsnprintf()
307 outBuffer.PutCharacter(format[0]); in vsnprintf()
314 if (isdigit(*format)) in vsnprintf()
315 fieldWidth = skip_atoi(&format); in vsnprintf()
316 else if (format[0] == '*') { in vsnprintf()
[all …]
/haiku/src/bin/package/
H A Dcommand_info.cpp23 const char* format = "name: %name% version: %version%\n"; in command_info() local
39 format = optarg; in command_info()
75 while (*format != '\0') { in command_info()
76 char c = *format++; in command_info()
80 const char* start = format; in command_info()
81 while (*format != '\0' && *format != '%') in command_info()
82 format++; in command_info()
83 if (*format != '%') { in command_info()
89 if (format == start) { in command_info()
92 BString variable(start, format - start); in command_info()
[all …]
/haiku/headers/private/graphics/common/
H A Ddebug_ext.h78 #define SHOW_FLOW(seriousness, format, param...) \ argument
80 dprintf( "%s%s: " format "\n", FUNC_NAME, param ); DEBUG_WAIT \
83 #define SHOW_FLOW0(seriousness, format) \ argument
85 dprintf( "%s%s: " format "\n", FUNC_NAME); DEBUG_WAIT \
88 #define SHOW_INFO(seriousness, format, param...) \ argument
90 dprintf( "%s%s: " format "\n", FUNC_NAME, param ); DEBUG_WAIT \
93 #define SHOW_INFO0(seriousness, format) \ argument
95 dprintf( "%s%s: " format "\n", FUNC_NAME); DEBUG_WAIT \
98 #define SHOW_ERROR(seriousness, format, param...) \ argument
100 dprintf( "%s%s: " format "\n", FUNC_NAME, param ); DEBUG_WAIT_ERROR \
[all …]
/haiku/src/add-ons/kernel/generic/scsi_periph/
H A Dwrapper.h53 #define SHOW_FLOW(seriousness, format, param...) \ argument
55 dprintf("%s%s: " format "\n", FUNC_NAME, param ); DEBUG_WAIT \
58 #define SHOW_FLOW0(seriousness, format) \ argument
60 dprintf("%s%s: " format "\n", FUNC_NAME); DEBUG_WAIT \
63 #define SHOW_INFO(seriousness, format, param...) \ argument
65 dprintf("%s%s: " format "\n", FUNC_NAME, param ); DEBUG_WAIT \
68 #define SHOW_INFO0(seriousness, format) \ argument
70 dprintf("%s%s: " format "\n", FUNC_NAME); DEBUG_WAIT \
73 #define SHOW_ERROR(seriousness, format, param...) \ argument
75 dprintf("%s%s: " format "\n", FUNC_NAME, param ); DEBUG_WAIT_ERROR \
[all …]
/haiku/src/add-ons/kernel/bus_managers/scsi/
H A Dwrapper.h52 #define SHOW_FLOW(seriousness, format, param...) \ argument
54 dprintf("%s%s: " format "\n", FUNC_NAME, param ); DEBUG_WAIT \
57 #define SHOW_FLOW0(seriousness, format) \ argument
59 dprintf("%s%s: " format "\n", FUNC_NAME); DEBUG_WAIT \
62 #define SHOW_INFO(seriousness, format, param...) \ argument
64 dprintf("%s%s: " format "\n", FUNC_NAME, param ); DEBUG_WAIT \
67 #define SHOW_INFO0(seriousness, format) \ argument
69 dprintf("%s%s: " format "\n", FUNC_NAME); DEBUG_WAIT \
72 #define SHOW_ERROR(seriousness, format, param...) \ argument
74 dprintf("%s%s: " format "\n", FUNC_NAME, param ); DEBUG_WAIT_ERROR \
[all …]
/haiku/src/apps/mediaconverter/
H A DMediaFileInfo.cpp32 media_format format; in LoadInfo() local
33 format.Clear(); in LoadInfo()
52 ret = track->EncodedFormat(&format); in LoadInfo()
59 if (format.IsVideo()) { in LoadInfo()
60 format.Clear(); in LoadInfo()
61 format.type = B_MEDIA_RAW_VIDEO; in LoadInfo()
63 ret = track->DecodedFormat(&format); in LoadInfo()
67 media_raw_video_format *rvf = &(format.u.raw_video); in LoadInfo()
73 video.format << codecInfo.pretty_name; in LoadInfo()
81 (unsigned)format.Width(), (unsigned)format.Height(), in LoadInfo()
[all …]
/haiku/src/apps/mediaplayer/supplier/
H A DMediaTrackVideoSupplier.cpp69 MediaTrackVideoSupplier::GetEncodedFormat(media_format* format) const in GetEncodedFormat()
73 return fVideoTrack->EncodedFormat(format); in GetEncodedFormat()
88 const media_raw_video_format& format, bool& wasCached) in ReadFrame() argument
109 if (format.display.format in ReadFrame()
110 != fFormat.u.raw_video.display.format in ReadFrame()
112 != format.display.bytes_per_row) { in ReadFrame()
113 ret = _SwitchFormat(format.display.format, in ReadFrame()
114 format.display.bytes_per_row); in ReadFrame()
275 return fFormat.u.raw_video.display.format; in ColorSpace()
290 MediaTrackVideoSupplier::_SwitchFormat(color_space format, uint32 bytesPerRow) in _SwitchFormat() argument
[all …]
/haiku/src/kits/game/
H A DGameProducer.cpp42 const gs_audio_format* format) in GameProducer() argument
54 fPreferredFormat.u.raw_audio.format = format->format; in GameProducer()
55 fPreferredFormat.u.raw_audio.channel_count = format->channel_count; in GameProducer()
56 fPreferredFormat.u.raw_audio.frame_rate = format->frame_rate; // Hertz in GameProducer()
57 fPreferredFormat.u.raw_audio.byte_order = format->byte_order; in GameProducer()
69 fOutput.format = fPreferredFormat; in GameProducer()
71 fFrameSize = get_sample_size(format->format) * format->channel_count; in GameProducer()
130 media_format* format) in FormatSuggestionRequested() argument
133 if (!format) in FormatSuggestionRequested()
137 *format = fPreferredFormat; in FormatSuggestionRequested()
[all …]
/haiku/headers/private/kernel/boot/
H A Dstdio.h41 extern int printf(char const *format, ...) __PRINTFLIKE(1,2);
42 extern int fprintf(FILE *stream, char const *format, ...) __PRINTFLIKE(2,3);
43 extern int sprintf(char *str, char const *format, ...) __PRINTFLIKE(2,3);
44 extern int snprintf(char *str, size_t size, char const *format, ...) __PRINTFLIKE(3,4);
45 extern int asprintf(char **ret, char const *format, ...) __PRINTFLIKE(2,3);
46 extern int vprintf(char const *format, va_list ap);
47 extern int vfprintf(FILE *stream, char const *format, va_list ap);
48 extern int vsprintf(char *str, char const *format, va_list ap);
49 extern int vsnprintf(char *str, size_t size, char const *format, va_list ap);
50 extern int vasprintf(char **ret, char const *format, va_list ap);
[all …]

12345678910>>...58