MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / start_command_packet

Function start_command_packet

libavformat/mmst.c:100–115  ·  view source on GitHub ↗

Create MMST command packet header */

Source from the content-addressed store, hash-verified

98
99/** Create MMST command packet header */
100static void start_command_packet(MMSTContext *mmst, MMSCSPacketType packet_type)
101{
102 MMSContext *mms = &mmst->mms;
103 mms->write_out_ptr = mms->out_buffer;
104
105 bytestream_put_le32(&mms->write_out_ptr, 1); // start sequence
106 bytestream_put_le32(&mms->write_out_ptr, 0xb00bface);
107 bytestream_put_le32(&mms->write_out_ptr, 0); // Length starts from after the protocol type bytes
108 bytestream_put_le32(&mms->write_out_ptr, MKTAG('M','M','S',' '));
109 bytestream_put_le32(&mms->write_out_ptr, 0);
110 bytestream_put_le32(&mms->write_out_ptr, mmst->outgoing_packet_seq++);
111 bytestream_put_le64(&mms->write_out_ptr, 0); // timestamp
112 bytestream_put_le32(&mms->write_out_ptr, 0);
113 bytestream_put_le16(&mms->write_out_ptr, packet_type);
114 bytestream_put_le16(&mms->write_out_ptr, 3); // direction to server
115}
116
117/** Add prefixes to MMST command packet. */
118static void insert_command_prefixes(MMSContext *mms,

Callers 9

send_time_test_dataFunction · 0.85
send_protocol_selectFunction · 0.85
send_media_file_requestFunction · 0.85
send_keepalive_packetFunction · 0.85
send_startup_packetFunction · 0.85
send_close_packetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected