1 /* 2 * Copyright 2002, Marcus Overhagen. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 6 #ifndef _DATA_EXCHANGE_H 7 #define _DATA_EXCHANGE_H 8 9 #include <MediaFormats.h> 10 #include <MediaNode.h> 11 #include <MediaAddOn.h> 12 #include <Messenger.h> 13 #include <Buffer.h> 14 #include <Entry.h> 15 16 namespace BPrivate { 17 namespace media { 18 namespace dataexchange { 19 20 struct reply_data; 21 struct request_data; 22 struct command_data; 23 24 // BMessage based data exchange with the media_server 25 status_t SendToServer(BMessage *msg); 26 status_t QueryServer(BMessage &request, BMessage &reply); 27 28 // Raw data based data exchange with the media_server 29 status_t SendToServer(int32 msgcode, command_data *msg, int size); 30 status_t QueryServer(int32 msgcode, request_data *request, int requestsize, reply_data *reply, int replysize); 31 32 // Raw data based data exchange with the media_addon_server 33 status_t SendToAddonServer(int32 msgcode, command_data *msg, int size); 34 status_t QueryAddonServer(int32 msgcode, request_data *request, int requestsize, reply_data *reply, int replysize); 35 36 // Raw data based data exchange with any (media node control-) port 37 status_t SendToPort(port_id sendport, int32 msgcode, command_data *msg, int size); 38 status_t QueryPort(port_id requestport, int32 msgcode, request_data *request, int requestsize, reply_data *reply, int replysize); 39 40 // The base struct used for all raw requests 41 struct request_data 42 { 43 port_id reply_port; 44 45 status_t SendReply(status_t result, reply_data *reply, int replysize) const; 46 }; 47 48 // The base struct used for all raw replys 49 struct reply_data 50 { 51 status_t result; 52 }; 53 54 // The base struct used for all raw commands (asynchronous, no answer) 55 struct command_data 56 { 57 // yes, it's empty ;) 58 }; 59 60 }; // dataexchange 61 }; // media 62 }; // BPrivate 63 64 using namespace BPrivate::media::dataexchange; 65 66 // BMessage based server communication 67 enum { 68 // BMediaRoster notification service 69 MEDIA_SERVER_REQUEST_NOTIFICATIONS = 1000, 70 MEDIA_SERVER_CANCEL_NOTIFICATIONS, 71 MEDIA_SERVER_SEND_NOTIFICATIONS, 72 73 MEDIA_SERVER_GET_FORMATS, 74 MEDIA_SERVER_MAKE_FORMAT_FOR, 75 }; 76 77 // Raw port based communication 78 enum { 79 ADDONSERVER_RESCAN_MEDIAADDON_FLAVORS = 0x50, 80 81 SERVER_MESSAGE_START = 0x100, 82 SERVER_REGISTER_ADDONSERVER, 83 SERVER_REGISTER_APP, 84 SERVER_UNREGISTER_APP, 85 SERVER_GET_NODE, 86 SERVER_SET_NODE, 87 SERVER_PUBLISH_INPUTS, 88 SERVER_PUBLISH_OUTPUTS, 89 SERVER_NODE_ID_FOR, 90 SERVER_GET_LIVE_NODE_INFO, 91 SERVER_GET_LIVE_NODES, 92 SERVER_GET_NODE_FOR, 93 SERVER_RELEASE_NODE, 94 SERVER_REGISTER_NODE, 95 SERVER_UNREGISTER_NODE, 96 SERVER_GET_DORMANT_NODE_FOR, 97 SERVER_GET_INSTANCES_FOR, 98 SERVER_GET_SHARED_BUFFER_AREA, 99 SERVER_REGISTER_BUFFER, 100 SERVER_UNREGISTER_BUFFER, 101 SERVER_RESCAN_DEFAULTS, 102 SERVER_SET_NODE_CREATOR, 103 SERVER_CHANGE_ADDON_FLAVOR_INSTANCES_COUNT, 104 SERVER_REWINDTYPES, 105 SERVER_REWINDREFS, 106 SERVER_GETREFFOR, 107 SERVER_SETREFFOR, 108 SERVER_REMOVEREFFOR, 109 SERVER_REMOVEITEM, 110 SERVER_GET_FORMAT_FOR_DESCRIPTION, 111 SERVER_GET_DESCRIPTION_FOR_FORMAT, 112 SERVER_GET_READERS, 113 SERVER_GET_DECODER_FOR_FORMAT, 114 SERVER_MESSAGE_END, 115 NODE_MESSAGE_START = 0x200, 116 117 NODE_START, 118 NODE_STOP, 119 NODE_SEEK, 120 NODE_SET_RUN_MODE, 121 NODE_TIME_WARP, 122 NODE_PREROLL, 123 NODE_SET_TIMESOURCE, 124 NODE_GET_TIMESOURCE, 125 NODE_REQUEST_COMPLETED, 126 NODE_FINAL_RELEASE, 127 128 NODE_MESSAGE_END, 129 CONSUMER_MESSAGE_START = 0x300, 130 CONSUMER_GET_NEXT_INPUT, 131 CONSUMER_DISPOSE_INPUT_COOKIE, 132 CONSUMER_ACCEPT_FORMAT, 133 CONSUMER_CONNECTED, 134 CONSUMER_DISCONNECTED, 135 136 CONSUMER_BUFFER_RECEIVED, 137 CONSUMER_PRODUCER_DATA_STATUS, 138 CONSUMER_GET_LATENCY_FOR, 139 CONSUMER_FORMAT_CHANGED, 140 CONSUMER_SEEK_TAG_REQUESTED, 141 142 CONSUMER_MESSAGE_END, 143 PRODUCER_MESSAGE_START = 0x400, 144 PRODUCER_GET_NEXT_OUTPUT, 145 PRODUCER_DISPOSE_OUTPUT_COOKIE, 146 PRODUCER_FORMAT_PROPOSAL, 147 PRODUCER_PREPARE_TO_CONNECT, 148 PRODUCER_CONNECT, 149 PRODUCER_DISCONNECT, 150 151 PRODUCER_LATE_NOTICE_RECEIVED, 152 PRODUCER_LATENCY_CHANGED, 153 PRODUCER_ADDITIONAL_BUFFER_REQUESTED, 154 PRODUCER_VIDEO_CLIPPING_CHANGED, 155 PRODUCER_FORMAT_CHANGE_REQUESTED, 156 PRODUCER_SET_BUFFER_GROUP, 157 PRODUCER_GET_LATENCY, 158 PRODUCER_GET_INITIAL_LATENCY, 159 PRODUCER_FORMAT_SUGGESTION_REQUESTED, 160 PRODUCER_SET_PLAY_RATE, 161 PRODUCER_ENABLE_OUTPUT, 162 PRODUCER_SET_RUN_MODE_DELAY, 163 164 PRODUCER_MESSAGE_END, 165 FILEINTERFACE_MESSAGE_START = 0x500, 166 FILEINTERFACE_MESSAGE_END, 167 CONTROLLABLE_MESSAGE_START = 0x600, 168 CONTROLLABLE_GET_PARAMETER_WEB, 169 CONTROLLABLE_GET_PARAMETER_DATA, 170 CONTROLLABLE_SET_PARAMETER_DATA, 171 CONTROLLABLE_MESSAGE_END, 172 TIMESOURCE_MESSAGE_START = 0x700, 173 174 TIMESOURCE_OP, // datablock is a struct time_source_op_info 175 TIMESOURCE_ADD_SLAVE_NODE, 176 TIMESOURCE_REMOVE_SLAVE_NODE, 177 TIMESOURCE_GET_START_LATENCY, 178 179 TIMESOURCE_MESSAGE_END, 180 }; 181 182 183 /* We can't send an entry_ref through a port to another team, 184 * but we can assign it to an xfer_entry_ref and send this one, 185 * when we receive it we can assign it to a normal entry_ref 186 */ 187 struct xfer_entry_ref 188 { 189 public: 190 xfer_entry_ref() 191 { 192 device = -1; 193 directory = -1; 194 name[0] = 0; 195 } 196 operator entry_ref() const 197 { 198 entry_ref ref(device, directory, name); 199 return ref; 200 } 201 void operator=(const entry_ref &ref) 202 { 203 device = ref.device; 204 directory = ref.directory; 205 if(ref.name) 206 strcpy(name, ref.name); 207 else 208 name[0] = 0; 209 } 210 private: 211 dev_t device; 212 ino_t directory; 213 char name[B_FILE_NAME_LENGTH]; // == 256 bytes 214 }; 215 216 217 218 // used by SERVER_GET_NODE and SERVER_SET_NODE 219 enum node_type 220 { 221 VIDEO_INPUT, 222 AUDIO_INPUT, 223 VIDEO_OUTPUT, 224 AUDIO_MIXER, 225 AUDIO_OUTPUT, 226 AUDIO_OUTPUT_EX, 227 TIME_SOURCE, 228 SYSTEM_TIME_SOURCE 229 }; 230 231 // used by SERVER_PUBLISH_INPUTS and SERVER_PUBLISH_OUTPUTS 232 enum 233 { 234 MAX_OUTPUTS = 8, 235 MAX_INPUTS = 8, 236 }; 237 238 // used by SERVER_GET_LIVE_NODES 239 enum 240 { 241 MAX_LIVE_INFO = 16, 242 }; 243 244 // used by SERVER_GET_INSTANCES_FOR 245 enum 246 { 247 MAX_NODE_ID = 4000, 248 }; 249 250 // used by SERVER_GET_READERS 251 enum 252 { 253 MAX_READERS = 40, 254 }; 255 256 struct addonserver_instantiate_dormant_node_request : public request_data 257 { 258 media_addon_id addonid; 259 int32 flavorid; 260 team_id creator_team; 261 }; 262 263 struct addonserver_instantiate_dormant_node_reply : public reply_data 264 { 265 media_node node; 266 }; 267 268 struct server_set_node_request : public request_data 269 { 270 node_type type; 271 bool use_node; 272 media_node node; 273 bool use_dni; 274 dormant_node_info dni; 275 bool use_input; 276 media_input input; 277 }; 278 279 struct server_set_node_reply : public reply_data 280 { 281 }; 282 283 struct server_get_node_request : public request_data 284 { 285 node_type type; 286 team_id team; 287 }; 288 289 struct server_get_node_reply : public reply_data 290 { 291 media_node node; 292 293 // for AUDIO_OUTPUT_EX 294 char input_name[B_MEDIA_NAME_LENGTH]; 295 int32 input_id; 296 }; 297 298 struct producer_format_proposal_request : public request_data 299 { 300 media_source output; 301 media_format format; 302 }; 303 304 struct producer_format_proposal_reply : public reply_data 305 { 306 media_format format; 307 }; 308 309 struct producer_prepare_to_connect_request : public request_data 310 { 311 media_source source; 312 media_destination destination; 313 media_format format; 314 char name[B_MEDIA_NAME_LENGTH]; 315 }; 316 317 struct producer_prepare_to_connect_reply : public reply_data 318 { 319 media_format format; 320 media_source out_source; 321 char name[B_MEDIA_NAME_LENGTH]; 322 }; 323 324 struct producer_connect_request : public request_data 325 { 326 status_t error; 327 media_source source; 328 media_destination destination; 329 media_format format; 330 char name[B_MEDIA_NAME_LENGTH]; 331 }; 332 333 struct producer_connect_reply : public reply_data 334 { 335 char name[B_MEDIA_NAME_LENGTH]; 336 }; 337 338 struct producer_disconnect_request : public request_data 339 { 340 media_source source; 341 media_destination destination; 342 }; 343 344 struct producer_disconnect_reply : public reply_data 345 { 346 }; 347 348 struct producer_format_suggestion_requested_request : public request_data 349 { 350 media_type type; 351 int32 quality; 352 }; 353 354 struct producer_format_suggestion_requested_reply : public reply_data 355 { 356 media_format format; 357 }; 358 359 struct producer_set_play_rate_request : public request_data 360 { 361 int32 numer; 362 int32 denom; 363 }; 364 365 struct producer_set_play_rate_reply : public reply_data 366 { 367 }; 368 369 struct producer_get_initial_latency_request : public request_data 370 { 371 }; 372 373 struct producer_get_initial_latency_reply : public reply_data 374 { 375 bigtime_t initial_latency; 376 uint32 flags; 377 }; 378 379 struct producer_get_latency_request : public request_data 380 { 381 }; 382 383 struct producer_get_latency_reply : public reply_data 384 { 385 bigtime_t latency; 386 }; 387 388 struct producer_set_buffer_group_command : public command_data 389 { 390 media_source source; 391 media_destination destination; 392 void *user_data; 393 int32 change_tag; 394 int32 buffer_count; 395 media_buffer_id buffers[1]; 396 }; 397 398 struct producer_format_change_requested_command : public command_data 399 { 400 media_source source; 401 media_destination destination; 402 media_format format; 403 void *user_data; 404 int32 change_tag; 405 }; 406 407 struct producer_video_clipping_changed_command : public command_data 408 { 409 media_source source; 410 media_destination destination; 411 media_video_display_info display; 412 void *user_data; 413 int32 change_tag; 414 int32 short_count; 415 int16 shorts[1]; 416 }; 417 418 struct producer_additional_buffer_requested_command : public command_data 419 { 420 media_source source; 421 media_buffer_id prev_buffer; 422 bigtime_t prev_time; 423 bool has_seek_tag; 424 media_seek_tag prev_tag; 425 }; 426 427 struct producer_latency_changed_command : public command_data 428 { 429 media_source source; 430 media_destination destination; 431 bigtime_t latency; 432 uint32 flags; 433 }; 434 435 struct producer_enable_output_command : public command_data 436 { 437 media_source source; 438 media_destination destination; 439 bool enabled; 440 void *user_data; 441 int32 change_tag; 442 }; 443 444 struct producer_late_notice_received_command : public command_data 445 { 446 media_source source; 447 bigtime_t how_much; 448 bigtime_t performance_time; 449 }; 450 451 struct producer_set_run_mode_delay_command : public command_data 452 { 453 BMediaNode::run_mode mode; 454 bigtime_t delay; 455 }; 456 457 struct consumer_accept_format_request : public request_data 458 { 459 media_destination dest; 460 media_format format; 461 }; 462 463 struct consumer_accept_format_reply : public reply_data 464 { 465 media_format format; 466 }; 467 468 struct consumer_connected_request : public request_data 469 { 470 media_input input; 471 }; 472 473 struct consumer_connected_reply : public reply_data 474 { 475 media_input input; 476 }; 477 478 struct server_publish_inputs_request : public request_data 479 { 480 media_node node; 481 int32 count; 482 area_id area; // if count > MAX_INPUTS, inputs are in the area 483 // area is created in the library, and also deleted 484 // in the library after the reply has been received 485 media_input inputs[MAX_INPUTS]; 486 }; 487 488 struct server_publish_inputs_reply : public reply_data 489 { 490 }; 491 492 struct server_publish_outputs_request : public request_data 493 { 494 media_node node; 495 int32 count; 496 area_id area; // if count > MAX_OUTPUTS, outputs are in the area 497 // area is created in the library, and also deleted 498 // in the library after the reply has been received 499 media_output outputs[MAX_OUTPUTS]; 500 }; 501 502 struct server_publish_outputs_reply : public reply_data 503 { 504 }; 505 506 struct producer_get_next_output_request : public request_data 507 { 508 int32 cookie; 509 }; 510 511 struct producer_get_next_output_reply : public reply_data 512 { 513 int32 cookie; 514 media_output output; 515 }; 516 517 struct producer_dispose_output_cookie_request : public request_data 518 { 519 int32 cookie; 520 }; 521 522 struct producer_dispose_output_cookie_reply : public reply_data 523 { 524 }; 525 526 struct consumer_get_next_input_request : public request_data 527 { 528 int32 cookie; 529 }; 530 531 struct consumer_get_next_input_reply : public reply_data 532 { 533 int32 cookie; 534 media_input input; 535 }; 536 537 struct consumer_dispose_input_cookie_request : public request_data 538 { 539 int32 cookie; 540 }; 541 542 struct consumer_dispose_input_cookie_reply : public reply_data 543 { 544 }; 545 546 struct consumer_disconnected_request : public request_data 547 { 548 media_source source; 549 media_destination destination; 550 }; 551 552 struct consumer_disconnected_reply : public reply_data 553 { 554 }; 555 556 struct consumer_buffer_received_command : public command_data 557 { 558 media_buffer_id buffer; 559 media_header header; 560 }; 561 562 struct consumer_producer_data_status_command : public command_data 563 { 564 media_destination for_whom; 565 int32 status; 566 bigtime_t at_performance_time; 567 }; 568 569 struct consumer_get_latency_for_request : public request_data 570 { 571 media_destination for_whom; 572 }; 573 574 struct consumer_get_latency_for_reply : public reply_data 575 { 576 bigtime_t latency; 577 media_node_id timesource; 578 }; 579 580 struct consumer_format_changed_request : public request_data 581 { 582 media_source producer; 583 media_destination consumer; 584 int32 change_tag; 585 media_format format; 586 }; 587 588 struct consumer_format_changed_reply : public reply_data 589 { 590 }; 591 592 struct consumer_seek_tag_requested_request : public request_data 593 { 594 media_destination destination; 595 bigtime_t target_time; 596 uint32 flags; 597 }; 598 599 struct consumer_seek_tag_requested_reply : public reply_data 600 { 601 media_seek_tag seek_tag; 602 bigtime_t tagged_time; 603 uint32 flags; 604 }; 605 606 struct server_register_addonserver_request : public request_data 607 { 608 team_id team; 609 }; 610 611 struct server_register_addonserver_reply : public reply_data 612 { 613 }; 614 615 struct server_register_app_request : public request_data 616 { 617 team_id team; 618 BMessenger messenger; 619 }; 620 621 struct server_register_app_reply : public reply_data 622 { 623 }; 624 625 struct server_unregister_app_request : public request_data 626 { 627 team_id team; 628 }; 629 630 struct server_unregister_app_reply : public reply_data 631 { 632 }; 633 634 struct server_set_node_creator_request : public request_data 635 { 636 media_node_id node; 637 team_id creator; 638 }; 639 640 struct server_set_node_creator_reply : public reply_data 641 { 642 }; 643 644 struct server_change_addon_flavor_instances_count_request : public request_data 645 { 646 media_addon_id addonid; 647 int32 flavorid; 648 int32 delta; // must be +1 or -1 649 team_id team; 650 }; 651 652 struct server_change_addon_flavor_instances_count_reply : public reply_data 653 { 654 }; 655 656 struct server_register_node_request : public request_data 657 { 658 media_addon_id addon_id; 659 int32 addon_flavor_id; 660 char name[B_MEDIA_NAME_LENGTH]; 661 uint64 kinds; 662 port_id port; 663 team_id team; 664 }; 665 666 struct server_register_node_reply : public reply_data 667 { 668 media_node_id nodeid; 669 }; 670 671 struct server_unregister_node_request : public request_data 672 { 673 media_node_id nodeid; 674 team_id team; 675 }; 676 677 struct server_unregister_node_reply : public reply_data 678 { 679 media_addon_id addonid; 680 int32 flavorid; 681 }; 682 683 struct server_get_live_node_info_request : public request_data 684 { 685 media_node node; 686 }; 687 688 struct server_get_live_node_info_reply : public reply_data 689 { 690 live_node_info live_info; 691 }; 692 693 struct server_get_live_nodes_request : public request_data 694 { 695 int32 maxcount; 696 bool has_input; 697 bool has_output; 698 bool has_name; 699 media_format inputformat; 700 media_format outputformat; 701 char name[B_MEDIA_NAME_LENGTH + 1]; // 1 for a trailing "*" 702 uint64 require_kinds; 703 }; 704 705 struct server_get_live_nodes_reply : public reply_data 706 { 707 int32 count; 708 area_id area; // if count > MAX_LIVE_INFO, live_node_infos are in the area 709 // area is created in the server, but deleted in the library 710 live_node_info live_info[MAX_LIVE_INFO]; 711 }; 712 713 struct server_node_id_for_request : public request_data 714 { 715 port_id port; 716 }; 717 718 struct server_node_id_for_reply : public reply_data 719 { 720 media_node_id nodeid; 721 }; 722 723 struct server_get_node_for_request : public request_data 724 { 725 media_node_id nodeid; 726 team_id team; 727 }; 728 729 struct server_get_node_for_reply : public reply_data 730 { 731 media_node clone; 732 }; 733 734 struct server_release_node_request : public request_data 735 { 736 media_node node; 737 team_id team; 738 }; 739 740 struct server_release_node_reply : public reply_data 741 { 742 }; 743 744 struct server_get_dormant_node_for_request : public request_data 745 { 746 media_node node; 747 }; 748 749 struct server_get_dormant_node_for_reply : public reply_data 750 { 751 dormant_node_info node_info; 752 }; 753 754 struct server_get_instances_for_request : public request_data 755 { 756 int32 maxcount; 757 media_addon_id addon_id; 758 int32 addon_flavor_id; 759 }; 760 761 struct server_get_instances_for_reply : public reply_data 762 { 763 int32 count; 764 media_node_id node_id[MAX_NODE_ID]; // no area here, MAX_NODE_ID is really large 765 }; 766 767 struct server_rescan_defaults_command : public command_data 768 { 769 }; 770 771 struct addonserver_rescan_mediaaddon_flavors_command : public command_data 772 { 773 media_addon_id addonid; 774 }; 775 776 struct server_register_mediaaddon_request : public request_data 777 { 778 xfer_entry_ref ref; // a ref to the file 779 }; 780 781 struct server_register_mediaaddon_reply : public reply_data 782 { 783 media_addon_id addonid; 784 }; 785 786 struct server_unregister_mediaaddon_command : public command_data 787 { 788 media_addon_id addonid; 789 }; 790 791 struct server_get_mediaaddon_ref_request : public request_data 792 { 793 media_addon_id addonid; 794 }; 795 796 struct server_get_mediaaddon_ref_reply : public reply_data 797 { 798 xfer_entry_ref ref; // a ref to the file 799 }; 800 801 struct server_get_shared_buffer_area_request : public request_data 802 { 803 }; 804 805 struct server_get_shared_buffer_area_reply : public reply_data 806 { 807 area_id area; 808 }; 809 810 struct server_register_buffer_request : public request_data 811 { 812 team_id team; 813 //either info.buffer is != 0, or the area, size, offset is used 814 buffer_clone_info info; 815 }; 816 817 struct server_register_buffer_reply : public reply_data 818 { 819 buffer_clone_info info; 820 }; 821 822 struct server_unregister_buffer_command : public command_data 823 { 824 team_id team; 825 media_buffer_id bufferid; 826 }; 827 828 struct server_rewindtypes_request : public request_data 829 { 830 }; 831 832 struct server_rewindtypes_reply : public reply_data 833 { 834 int32 count; 835 area_id area; 836 }; 837 838 struct server_rewindrefs_request : public request_data 839 { 840 char type[B_MEDIA_NAME_LENGTH]; 841 }; 842 843 struct server_rewindrefs_reply : public reply_data 844 { 845 int32 count; 846 area_id area; 847 }; 848 849 struct server_getreffor_request : public request_data 850 { 851 char type[B_MEDIA_NAME_LENGTH]; 852 char item[B_MEDIA_NAME_LENGTH]; 853 }; 854 855 struct server_getreffor_reply : public reply_data 856 { 857 xfer_entry_ref ref; // a ref to the file 858 }; 859 860 struct server_setreffor_request : public request_data 861 { 862 char type[B_MEDIA_NAME_LENGTH]; 863 char item[B_MEDIA_NAME_LENGTH]; 864 xfer_entry_ref ref; // a ref to the file 865 }; 866 867 struct server_setreffor_reply : public reply_data 868 { 869 }; 870 871 struct server_removereffor_request : public request_data 872 { 873 char type[B_MEDIA_NAME_LENGTH]; 874 char item[B_MEDIA_NAME_LENGTH]; 875 xfer_entry_ref ref; // a ref to the file 876 }; 877 878 struct server_removereffor_reply : public reply_data 879 { 880 }; 881 882 struct server_removeitem_request : public request_data 883 { 884 char type[B_MEDIA_NAME_LENGTH]; 885 char item[B_MEDIA_NAME_LENGTH]; 886 }; 887 888 struct server_removeitem_reply : public reply_data 889 { 890 }; 891 892 struct server_get_decoder_for_format_request : public request_data 893 { 894 media_format format; 895 }; 896 897 struct server_get_decoder_for_format_reply : public reply_data 898 { 899 xfer_entry_ref ref; // a ref to the decoder 900 }; 901 902 struct server_get_readers_request : public request_data 903 { 904 }; 905 906 struct server_get_readers_reply : public reply_data 907 { 908 xfer_entry_ref ref[MAX_READERS]; // a list of refs to the reader 909 int32 count; 910 }; 911 912 struct node_request_completed_command : public command_data 913 { 914 media_request_info info; 915 }; 916 917 struct node_start_command : public command_data 918 { 919 bigtime_t performance_time; 920 }; 921 922 struct node_stop_command : public command_data 923 { 924 bigtime_t performance_time; 925 bool immediate; 926 }; 927 928 struct node_seek_command : public command_data 929 { 930 bigtime_t media_time; 931 bigtime_t performance_time; 932 }; 933 934 struct node_set_run_mode_command : public command_data 935 { 936 BMediaNode::run_mode mode; 937 }; 938 939 struct node_time_warp_command : public command_data 940 { 941 bigtime_t at_real_time; 942 bigtime_t to_performance_time; 943 }; 944 945 struct node_set_timesource_command : public command_data 946 { 947 media_node_id timesource_id; 948 }; 949 950 struct node_get_timesource_request : public request_data 951 { 952 }; 953 954 struct node_get_timesource_reply : public reply_data 955 { 956 media_node_id timesource_id; 957 }; 958 959 struct node_final_release_command : public command_data 960 { 961 }; 962 963 struct timesource_add_slave_node_command : public command_data 964 { 965 media_node node; 966 }; 967 968 struct timesource_remove_slave_node_command : public command_data 969 { 970 media_node node; 971 }; 972 973 struct timesource_get_start_latency_request : public request_data 974 { 975 }; 976 977 struct timesource_get_start_latency_reply : public reply_data 978 { 979 bigtime_t start_latency; 980 }; 981 982 struct controllable_get_parameter_web_request : public request_data 983 { 984 area_id area; 985 int32 maxsize; 986 }; 987 988 struct controllable_get_parameter_web_reply : public reply_data 989 { 990 type_code code; 991 int32 size; // = -1: parameter web data too large, = 0: no p.w., > 0: flattened p.w. data 992 }; 993 994 #define MAX_PARAMETER_DATA (B_MEDIA_MESSAGE_SIZE - 100) 995 996 struct controllable_get_parameter_data_request : public request_data 997 { 998 int32 parameter_id; 999 size_t requestsize; 1000 area_id area; //if area != -1, data is too large and must be passed in the area 1001 }; 1002 1003 struct controllable_get_parameter_data_reply : public reply_data 1004 { 1005 bigtime_t last_change; 1006 char rawdata[MAX_PARAMETER_DATA]; 1007 size_t size; 1008 }; 1009 1010 struct controllable_set_parameter_data_request : public request_data 1011 { 1012 int32 parameter_id; 1013 bigtime_t when; 1014 area_id area; //if area != -1, data is too large and is passed in the area 1015 size_t size; 1016 char rawdata[MAX_PARAMETER_DATA]; 1017 }; 1018 1019 struct controllable_set_parameter_data_reply : public reply_data 1020 { 1021 }; 1022 1023 #endif // _DATA_EXCHANGE_H 1024