DVBCore  22.3.0
Open Source DVB Engine
rtp_queue.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2020 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2020 Ocean Blue Software Ltd
4  *
5  * This file is part of a DTVKit Software Component
6  * You are permitted to copy, modify or distribute this file subject to the terms
7  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
8  *
9  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
10  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
11  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
12  *
13  * If you or your organisation is not a member of DTVKit then you have access
14  * to this source code outside of the terms of the licence agreement
15  * and you are expected to delete this and any associated files immediately.
16  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
17  *******************************************************************************/
18 
25 #ifndef __RTP_QUEUE_H
26 #define __RTP_QUEUE_H
27 
28 /*---includes for this file--------------------------------------------------*/
29 
30 #include "techtype.h"
31 
32 
33 /*---Constant and macro definitions for public use---------------------------*/
34 
35 /*---Enumerations for public use---------------------------------------------*/
36 
37 /*---Global type defs for public use-----------------------------------------*/
38 
39 typedef struct s_item_info
40 {
41  U8BIT *buffer;
42  U32BIT send_clock;
43  U32BIT rcvd_clock;
44  U16BIT buff_size;
45 } S_ITEM_INFO;
46 
47 /*---Global variable declarations for public use-----------------------------*/
48 
49 /*---Global Function prototypes for public use-------------------------------*/
50 
58 void *RTPCreateSequencingArray(U32BIT fec_layer);
59 
64 void RTPDestroySequencingArray(void *handle);
65 
79 void* RTPCreatePlayoutQueue(U32BIT low_threshold, U32BIT high_threshold);
80 
85 void RTPDeletePlayoutQueue(void *handle);
86 
93 void RTPConnectSeqArrayToPlayoutQueue(void *seq_array_hdl, void *queue_hdl);
94 
101 void* RTPAllocateMedia(U8BIT **buffer, U16BIT data_size);
102 
109 void* RTPAllocateFEC(U8BIT **buffer, U16BIT buff_size);
110 
115 void RTPFreePkt(void *handle);
116 
125 BOOLEAN RTPInsertMedia(void *seq_array_hdl, void *rtp_packet_hdl, U16BIT buffer_bytes);
126 
133 void RTPParseCntl(void *seq_array_hdl, U8BIT *buffer, U16BIT buffer_bytes);
134 
144 BOOLEAN RTPInsertFec(void *seq_array_hdl, void *fec_packet_hdl, U16BIT buffer_len, BOOLEAN second_stream);
145 
154 void* RTPRemoveQueueItem(void *queue_handle, S_ITEM_INFO *info);
155 
162 void RTPUnpauseQueue(void *queue_handle);
163 
164 #endif /* __RTP_QUEUE_H */
void RTPDeletePlayoutQueue(void *handle)
Deletes a queue created by RTPCreatePlayoutQueue, freeing all RTP packets still on the queue...
Definition: rtp_queue.c:325
void RTPParseCntl(void *seq_array_hdl, U8BIT *buffer, U16BIT buffer_bytes)
Parse RTCP packet - Sender Report, Source Description or Goodbye packet.
Definition: rtp_queue.c:448
void * RTPAllocateFEC(U8BIT **buffer, U16BIT buff_size)
Allocates an FEC packet including the buffer for the RTP packet.
Definition: rtp_queue.c:407
Definition: rtp_queue.h:39
void * RTPCreatePlayoutQueue(U32BIT low_threshold, U32BIT high_threshold)
Creates a queue for holding RTP packets. The queue has low and high thresholds and no packets can be ...
Definition: rtp_queue.c:293
void RTPDestroySequencingArray(void *handle)
Destroys sequence queue created by RTPCreateSequencingArray, freeing all RTP packets still in the que...
Definition: rtp_queue.c:240
void RTPUnpauseQueue(void *queue_handle)
Unpauses the queue even if the number of time difference is less than the low threshold. Note that if a call is made to RTPRemoveQueueItem after this function is called and the time difference is less than the low threshold then the queue will be paused again.
Definition: rtp_queue.c:838
void RTPConnectSeqArrayToPlayoutQueue(void *seq_array_hdl, void *queue_hdl)
Connect sequencing array to a playout queue created by RTPCreatePlayoutQueue This will allow sequenci...
Definition: rtp_queue.c:366
BOOLEAN RTPInsertMedia(void *seq_array_hdl, void *rtp_packet_hdl, U16BIT buffer_bytes)
Insert RTP media packet to the sequencing array as long as the packet has matching SSRC...
Definition: rtp_queue.c:506
System Wide Global Technical Data Type Definitions.
void * RTPCreateSequencingArray(U32BIT fec_layer)
Creates a sequence queue for holding RTP packets as they arrive from the network. The sequence number...
Definition: rtp_queue.c:207
void * RTPRemoveQueueItem(void *queue_handle, S_ITEM_INFO *info)
Removes next queue item, but the item isn't freed. The queue item is returned with info for buffer po...
Definition: rtp_queue.c:752
void * RTPAllocateMedia(U8BIT **buffer, U16BIT data_size)
Allocates an RTP packet structure including the buffer for the RTP packet.
Definition: rtp_queue.c:382
void RTPFreePkt(void *handle)
Free an RTP packet allocated with RTPAllocateMedia or RTPAllocateFEC.
Definition: rtp_queue.c:430
BOOLEAN RTPInsertFec(void *seq_array_hdl, void *fec_packet_hdl, U16BIT buffer_len, BOOLEAN second_stream)
Inserts the RTP packet to the sequencing array as long as the packet has matching SSRC...
Definition: rtp_queue.c:620