| /xiu/protocol/rtmp/src/handshake/ |
| H A D | handshake_server.rs | 37 reader: BytesReader::new(BytesMut::new()), in new() 38 writer: AsyncBytesWriter::new(io), in new() 41 c1_bytes: BytesMut::new(), in new() 89 reader: BytesReader::new(BytesMut::new()), in new() 93 c1_digest: BytesMut::new(), in new() 197 let mut key = BytesMut::new(); in read_c1() 227 let mut key = BytesMut::new(); in write_s1() 247 let mut key = BytesMut::new(); in write_s2() 250 let mut digest_processor = DigestProcessor::new(BytesMut::new(), key); in write_s2() 257 let mut digest_processor_2 = DigestProcessor::new(BytesMut::new(), tmp_key); in write_s2() [all …]
|
| /xiu/protocol/rtmp/src/chunk/ |
| H A D | mod.rs | 19 pub fn new(fmt: u8, csid: u32) -> ChunkBasicHeader { in new() method 59 pub fn new(timestamp: u32, msg_length: u32, msg_type_id: u8, msg_stream_id: u32) -> Self { in new() method 78 Self::new() in default() 83 pub fn new() -> ChunkHeader { in new() method 85 basic_header: ChunkBasicHeader::new(0, 0), in new() 86 message_header: ChunkMessageHeader::new(0, 0, 0, 0), in new() 125 Self::new(0, 0, 0, 0, 0, 0, BytesMut::new()) in default() 130 pub fn new( in new() method 140 basic_header: ChunkBasicHeader::new(format, csid), in new() 141 message_header: ChunkMessageHeader::new( in new()
|
| /xiu/protocol/rtmp/src/cache/ |
| H A D | gop.rs | 9 Self::new() in default() 14 pub fn new() -> Self { in new() method 15 Self { datas: Vec::new() } in new() 43 Self::new(1) in default() 48 pub fn new(size: usize) -> Self { in new() method 50 gops: VecDeque::from([Gop::new()]), in new() 65 self.gops.push_back(Gop::new()); in save_frame_data()
|
| H A D | metadata.rs | 15 Self::new() in default() 20 pub fn new() -> Self { in new() method 22 chunk_body: BytesMut::new(), in new() 35 let mut amf_writer: Amf0Writer = Amf0Writer::new(); in remove_set_data_frame() 44 let reader = BytesReader::new(body); in is_metadata() 45 let result = Amf0Reader::new(reader).read_all(); in is_metadata() 47 let mut values: Vec<Amf0ValueType> = Vec::new(); in is_metadata()
|
| /xiu/library/container/flv/src/ |
| H A D | demuxer.rs | 83 pub fn new() -> Self { in new() method 89 data: BytesMut::new(), in new() 103 pub fn new() -> Self { in new() method 109 data: BytesMut::new(), in new() 120 pub fn new() -> Self { in new() method 130 let mut reader = BytesReader::new(data); in demux() 168 pub fn new() -> Self { in new() method 179 let mut reader = BytesReader::new(data); in demux() 208 Ok(FlvDemuxerAudioData::new()) in demux() 217 pub fn new(data: BytesMut) -> Self { in new() method [all …]
|
| H A D | mpeg4_avc.rs | 21 pub fn new() -> Self { in new() method 24 data: BytesMut::new(), in new() 43 pub fn new() -> Self { in new() method 46 data: BytesMut::new(), in new() 98 pub fn new() -> Self { in new() method 110 sps: Vec::new(), in new() 111 pps: Vec::new(), in new() 113 sps_annexb_data: BytesWriter::new(), in new() 129 pub fn new() -> Self { in new() method 131 mpeg4_avc: Mpeg4Avc::new(), in new() [all …]
|
| H A D | mpeg4_aac.rs | 31 Self::new() in default() 36 pub fn new() -> Self { in new() method 46 pce: BytesMut::new(), in new() 61 Self::new() in default() 66 pub fn new() -> Self { in new() method 68 bytes_reader: BytesReader::new(BytesMut::new()), in new() 69 bytes_writer: BytesWriter::new(), in new() 70 bits_reader: BitsReader::new(BytesReader::new(BytesMut::new())), in new() 71 mpeg4_aac: Mpeg4Aac::new(), in new() 292 let mut pce_bits_vec = BitsWriter::new(BytesWriter::new()); in pce_load()
|
| /xiu/application/xiu/src/ |
| H A D | main.rs | 16 let mut cmd = Command::new("XIU") in main() 22 Arg::new("config_file_path") in main() 31 Arg::new("rtmp") in main() 40 Arg::new("rtsp") in main() 49 Arg::new("webrtc") in main() 58 Arg::new("httpflv") in main() 67 Arg::new("hls") in main() 76 Arg::new("log") in main() 156 Config::new( in main() 182 Logger::new(&String::from("info"), None, None)? in main() [all …]
|
| /xiu/library/streamhub/src/statistics/ |
| H A D | avstatistics.rs | 36 pub fn new(identifier: StreamIdentifier) -> Self { in new() method 39 video_bytes: Arc::new(Mutex::new(0.0)), in new() 40 audio_bytes: Arc::new(Mutex::new(0.0)), in new() 41 frame_count: Arc::new(Mutex::new(0)), in new() 42 gop_frame_count: Arc::new(Mutex::new(0)), in new() 43 stream_statistics: Arc::new(Mutex::new(StreamStatistics::new(identifier))), in new()
|
| /xiu/library/container/mpegts/src/ |
| H A D | pmt.rs | 25 Self::new() in default() 30 pub fn new() -> Self { in new() method 37 program_info: BytesMut::new(), in new() 38 streams: Vec::new(), in new() 49 Self::new() in default() 54 pub fn new() -> Self { in new() method 56 bytes_writer: BytesWriter::new(), in new() 64 let mut tmp_bytes_writer = BytesWriter::new(); in write()
|
| H A D | pat.rs | 20 Self::new() in default() 25 pub fn new() -> Self { in new() method 31 pmt: Vec::new(), in new() 41 Self::new() in default() 46 pub fn new() -> Self { in new() method 48 bytes_writer: BytesWriter::new(), in new()
|
| /xiu/protocol/rtsp/src/ |
| H A D | rtsp_channel.rs | 58 pub fn new(codec_info: RtspCodecInfo) -> Self { in new() method 118 self.rtp_unpacker = Some(Box::new(RtpH264UnPacker::new())); in create_unpacker() 121 self.rtp_unpacker = Some(Box::new(RtpH265UnPacker::new())); in create_unpacker() 124 self.rtp_unpacker = Some(Box::new(RtpAacUnPacker::new())); in create_unpacker() 132 self.rtp_packer = Some(Box::new(RtpH264Packer::new( in create_packer() 141 self.rtp_packer = Some(Box::new(RtpH265Packer::new( in create_packer() 150 self.rtp_packer = Some(Box::new(RtpAacPacker::new( in create_packer() 172 let mut reader_clone = BytesReader::new(reader.get_remaining_bytes()); in on_rtcp() 201 let mut bytes_writer = AsyncBytesWriter::new(rtcp_io); in send_rr()
|
| H A D | rtsp_track.rs | 48 pub fn new(track_type: TrackType, codec_info: RtspCodecInfo, media_control: String) -> Self { in new() method 49 let rtp_channel = RtpChannel::new(codec_info); in new() 56 rtp_channel: Arc::new(Mutex::new(rtp_channel)), in new() 57 rtcp_channel: Arc::new(Mutex::default()), in new() 64 let mut reader = BytesReader::new(BytesMut::new()); in rtp_receive_loop() 87 let mut reader = BytesReader::new(BytesMut::new()); in rtcp_receive_loop()
|
| /xiu/protocol/webrtc/src/ |
| H A D | webrtc.rs | 21 pub fn new(address: String, event_producer: StreamHubEventSender) -> Self { in new() method 25 uuid_2_sessions: Arc::new(Mutex::new(HashMap::new())), in new() 36 let session = Arc::new(Mutex::new(WebRTCServerSession::new( in run()
|
| H A D | whip.rs | 39 let mut registry = Registry::new(); in handle_whip() 45 let api = APIBuilder::new() in handle_whip() 60 let peer_connection = Arc::new(api.new_peer_connection(config).await?); in handle_whip() 68 send_encodings: Vec::new(), in handle_whip() 77 send_encodings: Vec::new(), in handle_whip() 86 peer_connection.on_track(Box::new(move |track, _, _| { in handle_whip() 99 result = pc.write_rtcp(&[Box::new(PictureLossIndication{ in handle_whip() 156 peer_connection.on_ice_connection_state_change(Box::new( in handle_whip() 169 peer_connection.on_peer_connection_state_change(Box::new(move |s: RTCPeerConnectionState| { in handle_whip()
|
| H A D | whep.rs | 44 let mut registry = Registry::new(); in handle_whep() 50 let api = APIBuilder::new() in handle_whep() 65 let peer_connection = Arc::new(api.new_peer_connection(config).await?); in handle_whep() 68 let video_track = Arc::new(TrackLocalStaticRTP::new( in handle_whep() 78 let audio_track = Arc::new(TrackLocalStaticRTP::new( in handle_whep() 107 peer_connection.on_ice_connection_state_change(Box::new( in handle_whep() 120 peer_connection.on_peer_connection_state_change(Box::new(move |s: RTCPeerConnectionState| { in handle_whep()
|
| /xiu/protocol/rtmp/src/messages/ |
| H A D | parser.rs | 21 pub fn new(chunk_info: ChunkInfo) -> Self { in new() method 25 let mut reader = BytesReader::new(self.chunk_info.payload); in parse() 32 let mut amf_reader = Amf0Reader::new(reader); in parse() 85 let data = EventMessagesReader::new(reader).parse_event()?; in parse() 89 let chunk_size = ProtocolControlMessageReader::new(reader).read_set_chunk_size()?; in parse() 94 ProtocolControlMessageReader::new(reader).read_abort_message()?; in parse() 99 ProtocolControlMessageReader::new(reader).read_acknowledgement()?; in parse() 104 ProtocolControlMessageReader::new(reader).read_window_acknowledgement_size()?; in parse() 109 ProtocolControlMessageReader::new(reader).read_set_peer_bandwidth()?; in parse() 142 let mut unpacker = ChunkUnpacketizer::new(); in test_message_parse() [all …]
|
| /xiu/library/bytesio/src/ |
| H A D | bits_reader.rs | 14 pub fn new(reader: BytesReader) -> Self { in new() method 78 let mut bytes_reader = BytesReader::new(BytesMut::new()); in test_read_bit() 85 let mut bit_reader = BitsReader::new(bytes_reader); in test_read_bit() 109 let mut bytes_reader = BytesReader::new(BytesMut::new()); in test_read_n_bits() 117 let mut bit_reader = BitsReader::new(bytes_reader); in test_read_n_bits() 127 let mut bytes_reader = BytesReader::new(BytesMut::new()); in test_bits_aligment_8() 133 let mut bit_reader = BitsReader::new(bytes_reader); in test_bits_aligment_8()
|
| H A D | bytes_reader.rs | 16 pub fn new(input: BytesMut) -> Self { in new() method 57 let tmp_cursor = Cursor::new(tmp_bytes); in read_bytes_cursor() 66 let tmp_cursor = Cursor::new(tmp_bytes); in advance_bytes_cursor() 160 pub fn new(io: Arc<Mutex<T1>>) -> Self { in new() function 162 bytes_reader: BytesReader::new(BytesMut::default()), in new() 253 let reader = Rc::new(RefCell::new(BytesReader::new(BytesMut::new()))); in test_rc_refcell() 272 pub fn new(reader: Rc<RefCell<BytesReader>>) -> Self { in new() method 287 let reader = Rc::new(RefCell::new(BytesReader::new(BytesMut::new()))); in test_struct_rc_refcell() 289 let mut ref_struct = RefStruct::new(reader); in test_struct_rc_refcell()
|
| /xiu/protocol/rtmp/src/session/ |
| H A D | client_session.rs | 94 pub fn new( in new() method 110 let tcp_io: Box<dyn TNetIO + Send + Sync> = Box::new(TcpIO::new(stream)); in new() 111 let net_io = Arc::new(Mutex::new(tcp_io)); in new() 113 let subscriber_id = Uuid::new(RandomDigitCount::Four); in new() 116 Some(ChunkPacketizer::new(Arc::clone(&net_io))) in new() 131 unpacketizer: ChunkUnpacketizer::new(), in new() 289 let empty_cmd_name = &String::new(); in on_amf0_command_message() 436 ProtocolControlMessagesWriter::new(AsyncBytesWriter::new(self.io.clone())); in send_set_chunk_size() 446 ProtocolControlMessagesWriter::new(AsyncBytesWriter::new(self.io.clone())); in send_window_acknowledgement_size() 458 let mut eventmessages = EventMessagesWriter::new(AsyncBytesWriter::new(self.io.clone())); in send_set_buffer_length() [all …]
|
| H A D | server_session.rs | 78 let tcp_io: Box<dyn TNetIO + Send + Sync> = Box::new(TcpIO::new(stream)); in new() 79 let net_io = Arc::new(Mutex::new(tcp_io)); in new() 87 unpacketizer: ChunkUnpacketizer::new(), in new() 89 common: Common::new( in new() 95 session_id: Uuid::new(RandomDigitCount::Four), in new() 96 bytesio_data: BytesMut::new(), in new() 235 ProtocolControlMessagesWriter::new(AsyncBytesWriter::new(self.io.clone())); in send_set_chunk_size() 289 let empty_cmd_name = &String::new(); in on_amf0_command_message() 430 ProtocolControlMessagesWriter::new(AsyncBytesWriter::new(self.io.clone())); in on_connect() 587 let mut event_messages = EventMessagesWriter::new(AsyncBytesWriter::new(self.io.clone())); in on_play() [all …]
|
| /xiu/application/pprtmp/src/ |
| H A D | main.rs | 20 let mut cmd = Command::new("pprtmp") in main() 26 Arg::new("pullrtmp") in main() 35 Arg::new("pushrtmp") in main() 53 let mut stream_hub = StreamsHub::new(None); in main() 57 let mut pull_parser = RtmpUrlParser::new(pull_rtmp_url); in main() 63 let mut pull_client_session = ClientSession::new( in main() 80 let mut push_parser = RtmpUrlParser::new(push_rtmp_url); in main() 87 let mut push_client_session = ClientSession::new( in main()
|
| /xiu/protocol/hls/ |
| H A D | README.md | 19 - Reference rtmp/xflv/mpegts new version. 23 - Reference xflv new version v0.2.1. 24 - Reference rtmp new version v0.3.1. 31 - Reference streamhub new version v0.1.2.
|
| /xiu/protocol/rtsp/src/session/ |
| H A D | mod.rs | 113 let net_io: Box<dyn TNetIO + Send + Sync> = Box::new(TcpIO::new(stream)); in new() 114 let io = Arc::new(Mutex::new(net_io)); in new() 119 writer: AsyncBytesWriter::new(io), in new() 120 tracks: HashMap::new(), in new() 124 stream_handler: Arc::new(RtspStreamHandler::new()), in new() 366 track.create_packer(Arc::new(Mutex::new(box_udp_io))).await; in handle_setup() 378 Arc::new(Mutex::new(Box::new(rtcp_io))); in handle_setup() 665 Uuid::new(RandomDigitCount::Zero) in get_subscriber_info() 683 Uuid::new(RandomDigitCount::Zero) in get_publisher_info() 711 pub fn new() -> Self { in new() method [all …]
|
| /xiu/protocol/hls/src/ |
| H A D | flv2hls.rs | 36 pub fn new(duration: i64, app_name: String, stream_name: String, need_record: bool) -> Self { in new() method 37 let mut ts_muxer = TsMuxer::new(); in new() 39 .add_stream(epsi_stream_type::PSI_STREAM_AAC, BytesMut::new()) in new() 42 .add_stream(epsi_stream_type::PSI_STREAM_H264, BytesMut::new()) in new() 46 video_demuxer: FlvVideoTagDemuxer::new(), in new() 47 audio_demuxer: FlvAudioTagDemuxer::new(), in new() 63 m3u8_handler: M3u8::new(duration, 6, app_name, stream_name, need_record), in new() 115 let mut payload: BytesMut = BytesMut::new(); in process_demux_data()
|