Lines Matching refs:context

197 	ExportContext& context) {
201 context.writeAttr(key, "B_RGB32");
204 context.writeAttr(key, "B_RGBA32");
207 context.writeAttr(key, "B_RGB24");
210 context.writeAttr(key, "B_RGB16");
213 context.writeAttr(key, "B_RGB15");
216 context.writeAttr(key, "B_RGBA15");
219 context.writeAttr(key, "B_CMAP8");
222 context.writeAttr(key, "B_GRAY8");
225 context.writeAttr(key, "B_GRAY1");
228 context.writeAttr(key, "B_RGB32_BIG");
231 context.writeAttr(key, "B_RGBA32_BIG");
234 context.writeAttr(key, "B_RGB24_BIG");
237 context.writeAttr(key, "B_RGB16_BIG");
240 context.writeAttr(key, "B_RGB15_BIG");
243 context.writeAttr(key, "B_RGBA15_BIG");
246 context.writeAttr(key, "B_YCbCr422");
249 context.writeAttr(key, "B_YCbCr411");
252 context.writeAttr(key, "B_YCbCr444");
255 context.writeAttr(key, "B_YCbCr420");
258 context.writeAttr(key, "B_YUV422");
261 context.writeAttr(key, "B_YUV411");
264 context.writeAttr(key, "B_YUV444");
267 context.writeAttr(key, "B_YUV420");
270 context.writeAttr(key, "B_YUV9");
273 context.writeAttr(key, "B_YUV12");
276 context.writeAttr(key, "B_UVL24");
279 context.writeAttr(key, "B_UVL32");
282 context.writeAttr(key, "B_UVLA32");
285 context.writeAttr(key, "B_LAB24");
288 context.writeAttr(key, "B_LAB32");
291 context.writeAttr(key, "B_LABA32");
294 context.writeAttr(key, "B_HSI24");
297 context.writeAttr(key, "B_HSI32");
300 context.writeAttr(key, "B_HSIA32");
303 context.writeAttr(key, "B_HSV24");
306 context.writeAttr(key, "B_HSV32");
309 context.writeAttr(key, "B_HSVA32");
312 context.writeAttr(key, "B_HLS24");
315 context.writeAttr(key, "B_HLS32");
318 context.writeAttr(key, "B_HLSA32");
321 context.writeAttr(key, "B_CMY24");
324 context.writeAttr(key, "B_CMY32");
327 context.writeAttr(key, "B_CMYA32");
330 context.writeAttr(key, "B_CMYK32");
445 ExportContext& context) {
447 context.beginElement(MediaFormatIO::s_media_type_tag);
448 context.beginContent();
452 context.writeString("B_MEDIA_NO_TYPE");
455 context.writeString("B_MEDIA_UNKNOWN_TYPE");
458 context.writeString("B_MEDIA_RAW_AUDIO");
461 context.writeString("B_MEDIA_RAW_VIDEO");
464 context.writeString("B_MEDIA_VBL");
467 context.writeString("B_MEDIA_TIMECODE");
470 context.writeString("B_MEDIA_MIDI");
473 context.writeString("B_MEDIA_TEXT");
476 context.writeString("B_MEDIA_HTML");
479 context.writeString("B_MEDIA_MULTISTREAM");
482 context.writeString("B_MEDIA_PARAMETERS");
485 context.writeString("B_MEDIA_ENCODED_AUDIO");
488 context.writeString("B_MEDIA_ENCODED_VIDEO");
493 context.writeString(val);
496 context.endElement();
502 ImportContext& context) {
507 context.reportWarning("Ignoring media_type: maximum of 5 reached.");
546 ExportContext& context) {
551 context.writeAttr(gKey_frame_rate, f.frame_rate);
553 context.writeAttr(gKey_channel_count, f.channel_count);
555 context.writeAttr(gKey_buffer_size, f.buffer_size);
559 context.writeAttr(gKey_format, "B_AUDIO_UCHAR");
562 context.writeAttr(gKey_format, "B_AUDIO_SHORT");
565 context.writeAttr(gKey_format, "B_AUDIO_FLOAT");
568 context.writeAttr(gKey_format, "B_AUDIO_INT");
576 context.writeAttr(gKey_byte_order, "B_MEDIA_BIG_ENDIAN");
579 context.writeAttr(gKey_byte_order, "B_MEDIA_LITTLE_ENDIAN");
588 ExportContext& context) {
593 context.writeAttr(gKey_channel_mask, f.channel_mask);
596 context.writeAttr(gKey_valid_bits, f.valid_bits);
599 context.writeAttr(gKey_matrix_mask, f.matrix_mask);
604 ExportContext& context) {
609 context.writeAttr(gKey_line_width, d.line_width);
611 context.writeAttr(gKey_line_count, d.line_count);
613 context.writeAttr(gKey_bytes_per_row, d.bytes_per_row);
615 context.writeAttr(gKey_pixel_offset, d.pixel_offset);
617 context.writeAttr(gKey_line_offset, d.line_offset);
620 write_colorspace_attr(gKey_format, d.format, context);
626 ExportContext& context) {
632 context.writeAttr(gKey_field_rate, f.field_rate);
634 context.writeAttr(gKey_interlace, f.interlace);
636 context.writeAttr(gKey_first_active, f.first_active);
638 context.writeAttr(gKey_last_active, f.last_active);
640 context.writeAttr(gKey_pixel_width_aspect, (uint32)f.pixel_width_aspect);
642 context.writeAttr(gKey_pixel_height_aspect, (uint32)f.pixel_height_aspect);
646 context.writeAttr(gKey_orientation, "B_VIDEO_TOP_LEFT_RIGHT");
649 context.writeAttr(gKey_orientation, "B_VIDEO_BOTTOM_LEFT_RIGHT");
658 ExportContext& context) {
660 context.beginContent();
661 context.beginElement(MediaFormatIO::s_video_display_info_tag);
662 export_video_display_info_attr(f.display, context);
663 context.endElement();
668 ExportContext& context) {
671 context.writeAttr(gKey_header_has_flags, (int32)1);
674 context.writeAttr(gKey_clean_buffers, (int32)1);
677 context.writeAttr(gKey_homogenous_buffers, (int32)1);
682 ExportContext& context) {
686 context.writeAttr(gKey_frame_rate, f.frame_rate);
687 context.writeAttr(gKey_width, (uint32)f.width);
688 context.writeAttr(gKey_height, (uint32)f.height);
689 write_colorspace_attr(gKey_space, f.space, context);
690 context.writeAttr(gKey_sampling_rate, f.sampling_rate);
694 context.writeAttr(gKey_sample_format, "B_UNDEFINED_SAMPLES");
697 context.writeAttr(gKey_sample_format, "B_LINEAR_SAMPLES");
700 context.writeAttr(gKey_sample_format, "B_FLOAT_SAMPLES");
703 context.writeAttr(gKey_sample_format, "B_MULAW_SAMPLES");
711 context.writeAttr(gKey_byte_order, "B_MEDIA_BIG_ENDIAN");
714 context.writeAttr(gKey_byte_order, "B_MEDIA_LITTLE_ENDIAN");
720 context.writeAttr(gKey_channel_count, (uint32)f.channel_count);
725 ExportContext& context) {
727 context.writeAttr(gKey_us_per_frame, f.us_per_frame);
728 context.writeAttr(gKey_width, (uint32)f.width);
729 context.writeAttr(gKey_height, (uint32)f.height);
734 ExportContext& context) {
736 context.beginContent();
739 write_media_type(f.types[n], context);
744 ExportContext& context) {
751 context.writeAttr(gKey_multistream_format, "B_ANY");
754 context.writeAttr(gKey_multistream_format, "B_VID");
757 context.writeAttr(gKey_multistream_format, "B_AVI");
760 context.writeAttr(gKey_multistream_format, "B_MPEG1");
763 context.writeAttr(gKey_multistream_format, "B_MPEG2");
766 context.writeAttr(gKey_multistream_format, "B_QUICKTIME");
771 context.writeAttr(gKey_multistream_format, f.format);
777 context.writeAttr(gKey_avg_bit_rate, f.avg_bit_rate);
779 context.writeAttr(gKey_max_bit_rate, f.max_bit_rate);
781 context.writeAttr(gKey_avg_chunk_size, f.avg_chunk_size);
783 context.writeAttr(gKey_max_chunk_size, f.max_chunk_size);
788 ExportContext& context) {
790 context.beginContent();
793 context.beginElement(MediaFormatIO::s_multistream_flags_tag);
794 export_multistream_flags_attr(f.flags, context);
795 context.endElement();
799 context.beginElement(MediaFormatIO::s_multistream_vid_info_tag);
800 export_multistream_vid_info_attr(f.u.vid, context);
801 context.endElement();
804 context.beginElement(MediaFormatIO::s_multistream_avi_info_tag);
805 export_multistream_avi_info_attr(f.u.avi, context);
806 context.beginContent();
807 export_multistream_avi_info_content(f.u.avi, context);
808 context.endElement();
814 ExportContext& context) {
820 context.writeAttr(gKey_encoding, "B_ANY");
827 context.writeAttr(gKey_bit_rate, f.bit_rate);
830 context.writeAttr(gKey_frame_size, f.frame_size);
835 ExportContext& context) {
837 context.beginContent();
839 context.beginElement(MediaFormatIO::s_raw_audio_tag);
840 export_raw_audio_attr(f.output, context);
842 export_multi_audio_info_attr(f.multi_info, context);
844 context.endElement();
849 ExportContext& context) {
855 context.writeAttr(gKey_encoding, "B_ANY");
862 context.writeAttr(gKey_avg_bit_rate, f.avg_bit_rate);
864 context.writeAttr(gKey_max_bit_rate, f.max_bit_rate);
866 context.writeAttr(gKey_frame_size, f.frame_size);
868 context.writeAttr(gKey_forward_history, (int32)f.forward_history);
870 context.writeAttr(gKey_backward_history, (int32)f.backward_history);
875 ExportContext& context) {
877 context.beginContent();
879 context.beginElement(MediaFormatIO::s_raw_video_tag);
880 export_raw_video_attr(f.output, context);
881 context.endElement();
886 ExportContext& context) const {
891 context.beginElement(s_raw_audio_tag);
895 context.beginElement(s_raw_video_tag);
899 context.beginElement(s_multistream_tag);
903 context.beginElement(s_encoded_audio_tag);
907 context.beginElement(s_encoded_video_tag);
912 context.reportError("MediaFormatIO: type not supported\n");
918 ExportContext& context) const {
922 export_raw_audio_attr(m_format.u.raw_audio, context);
923 export_multi_audio_info_attr(m_format.u.raw_audio, context);
927 export_raw_video_attr(m_format.u.raw_video, context);
931 export_multistream_attr(m_format.u.multistream, context);
935 export_encoded_audio_attr(m_format.u.encoded_audio, context);
939 export_encoded_video_attr(m_format.u.encoded_video, context);
948 ExportContext& context) const {
952 export_raw_video_content(m_format.u.raw_video, context);
956 export_multistream_content(m_format.u.multistream, context);
960 export_encoded_audio_content(m_format.u.encoded_audio, context);
964 export_encoded_video_content(m_format.u.encoded_video, context);
973 ExportContext& context) const {
975 context.endElement();
986 ImportContext& context) {
1016 ImportContext& context) {
1030 ImportContext& context) {
1056 ImportContext& context) {
1077 ImportContext& context) {
1109 ImportContext& context) {
1126 ImportContext& context) {
1162 ImportContext& context) {
1176 ImportContext& context) {
1192 ImportContext& context) {
1213 ImportContext& context) {
1216 if(!strcmp(context.element(), s_raw_audio_tag)) {
1220 else if(!strcmp(context.element(), s_raw_video_tag)) {
1224 else if(!strcmp(context.element(), s_multistream_tag)) {
1228 else if(!strcmp(context.element(), s_encoded_audio_tag)) {
1232 else if(!strcmp(context.element(), s_encoded_video_tag)) {
1237 context.reportError("Bad element mapping? MediaFormatIO can't cope.");
1243 ImportContext& context) {
1247 m_format.u.raw_audio, key, value, context);
1250 m_format.u.raw_audio, key, value, context);
1255 m_format.u.raw_video, key, value, context);
1260 m_format.u.multistream, key, value, context);
1265 m_format.u.encoded_audio, key, value, context);
1270 m_format.u.encoded_video, key, value, context);
1274 context.reportError("MediaFormatIO: bad type.");
1281 ImportContext& context) {}
1285 ImportContext& context) {
1291 context.reportError("Expected a raw_audio_format.");
1300 context.reportError("Expected a raw_video_format.");
1308 context.reportWarning("MediaFormatIO: Unexpected child element.");
1314 ImportContext& context) {
1323 ImportContext& context) {
1327 context.reportError("MediaFormatIO: unexpected element.");
1331 context.reportError("MediaFormatIO: unexpected element.");
1336 context.reportError("MediaFormatIO: unexpected element.");
1341 context.reportError("MediaFormatIO: unexpected element.");
1346 context.reportError("MediaFormatIO: unexpected element.");
1353 ImportContext& context) {
1355 if(!strcmp(context.element(), s_video_display_info_tag))
1357 m_format.u.raw_video.display, key, value, context);
1359 else if(!strcmp(context.element(), s_multistream_flags_tag ))
1361 m_format.u.multistream.flags, key, value, context);
1363 else if(!strcmp(context.element(), s_multistream_vid_info_tag ))
1365 m_format.u.multistream.u.vid, key, value, context);
1367 else if(!strcmp(context.element(), s_multistream_avi_info_tag ))
1369 m_format.u.multistream.u.avi, key, value, context);
1372 context.reportError("MediaFormatIO: bad child element.");
1378 ImportContext& context) {
1380 if(!strcmp(context.element(), s_media_type_tag)) {
1387 ImportContext& context) {
1389 if(!strcmp(context.element(), s_media_type_tag)) {
1392 m_mediaType.String(), context);