Reference will now be made in detail to the embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the like elements throughout. The embodiments are described below to explain the present invention by referring to the figures. Although the embodiments described below are discussed with reference to particular combinations of software and hardware, alternative combinations of software and hardware are contemplated. For example, features embodied as software conceivably could be embodied as hardware, and vice versa. These alternative combinations are considered to be within the scope of the invention.
The present invention is directed to distributing media received from a media server over a single logical connection to multiple clients.
The resource server 12 may contain one or more streaming resources (or media or data resources). For each streaming resource, the resource server 12 may be in communication with the intermediary server 14 via a single logical connection that may include a number of individual connections. In an embodiment, the single logical connection may include an RTSP connection 18, an RTP audio connection 20, an RTCP audio connection 22, an RTP video connection 24, and an RTCP video connection 26.
The intermediary server 14 may include a session dynamic library 30 as well as further packet processing hardware and software, such as a Platform Process Unit (PFP) 32, a Telephony Application Programming Interface (TAPI), and a time division multiplexing (TDM) or Voice over Internet Protocol (VOIP) board 36. The PFP may hold the state of calls in progress, and, based on the telephony application being processed, may send commands to other components. For example, in the case of a streaming video application, the PFP uses an RTSP SAP to gather video information and the PFP passes this information to the TAPI component. The session dynamic library 30 may establish a session for each single logical connection between the intermediary server 14 and the resource server 12.
The intermediary server 14 may be in communication with the client 16 via a communications network 28. The communications network 28 may include a third-generation, PSTN, Cellular, Cable and/or VoIP network.
A client 16 may send a request to the intermediary server 14 for a streaming resource through the communications network 28. The session dynamic library 30 may provide the streaming resource provided from the resource server 12 to the client 16. If there are multiple clients requesting the same streaming resource, the session dynamic library may cause the duplication of the streaming resource received from the resource server 12 over the single logical connection, and distribution of the duplicated streaming resource to the multiple clients.
The session dynamic library 30 may include a session manager 40. The session manager 40 may include information for a session or multiple sessions. As a non-limiting example, the session manager 40 as it is depicted in
In the non-limiting example depicted in
If, during operation 106, it is determined that the requested streaming resource is not already streaming over a single logical connection to the intermediary device, a new session may be created (operation 108) and a single logical connection may be established between the intermediary device and the resource provider (operation 110). In an embodiment, the single logical connection includes a set of socket connections to the resource provider. In operation 112, the client requesting the steaming resource may be associated with the session for the streaming resource streaming over the logical connection between the intermediary device and the resource provider. If during operation 106, it is determined that the requested streaming resource is streaming over a single logical connection to the intermediary device, the client requesting the streaming resource may be associated (operation 112) with the session for the streaming resource. Whenever a new client requests the streaming resource that is being received from the resource provider over the single logical connection, operations 104,106, and 112 may be repeated so as to associate new clients with the session for the streaming resource.
In operation 114, the streaming resource is received from the resource provider over the single logical connection. The streaming resource received over the single logical connection may be distributed (operation 116) to the client or clients that is/are associated with the session for the requested streaming resource. In an embodiment, the streaming resource received over the single logical connection may be received in packets.
In operation 118, a determination may be made regarding whether streaming of the streaming resource is complete. If, during operation 118, it is determined that streaming of the streaming resource is not compete, the receiving and distributing operations (operations 114 and 116) may continue. After it is determined that streaming of the streaming resource is complete, the process 100 terminates.
Operations 142 through 152 are similar to operations 104 through 112 of
In operation 154, a period of waiting may result until the occurrence of: the receipt of additional streaming resource information; the passage of a predetermined period of time without receiving any additional streaming resource information (a timeout); or, the loss of all clients associated with the session. If, during operation 154, it is determined that a passage of a predetermined period of time without any activity (a timeout) occurs, or that there are no longer any more clients associated with the session, streaming of the streaming resource terminates. A session manager may make the determination that there are no longer any more clients associated with the session by examining a client list associated with the session. A client may indicate that it is no longer interested in the streaming resource by hanging up, or by switching to a different application. In an embodiment, A PFP may inform an RTSP SAP that a client is no longer interested. The session manager may then remove the client from the list of clients associated with the session.
In an embodiment, operation 154 may be accomplished using multiple processing threads. A first thread may be associated with a session and may gather information from a socket. This first thread may enter a period of waiting (or blocking) for an event. A second thread may inform a session manager that no more clients remain associated with the session. If this occurs, the session manager (using the second thread) may inform the session to shut down and terminate current session handling. This may end the waiting (or blocking) of the first thread. The session may then detect that the end of the waiting (or blocking) was due to a session shutdown.
If during operation 154, it is determined that additional streaming resource information has been received, the streaming resource may be received (operation 156) over the single logical connection from the resource provider. The streaming resource may then be distributed (operation 158) to each client associated with the session. In an embodiment, the streaming resource may be received in packets, and those packets may be forwarded, copied and written into each client's corresponding telephony port.
In operation 160, a determination may be made regarding whether streaming of the streaming resource is complete. If, during operation 160, it is determined that streaming is not complete, the waiting, receiving and distributing operations (operations 154,156 and 160) may be repeated. In an embodiment, a determination that streaming is complete may be made upon receiving an RTCP BYE packet. If, during operation 160, it is determined that streaming is complete, streaming of the streaming resource terminates.
When a client hangs up or otherwise stops receiving a streaming resource, that particular client may be removed from the session for that streaming resource. If no more clients are associated with the session for a streaming resource, that particular session may terminate.
In addition to the components of the various embodiments, the system also may include permanent or removable storage, such as magnetic and optical discs, RAM, ROM, etc. on which the processes and data structures of the present invention can be stored and distributed. The processes may also be distributed via, for example, downloading over a network such as the Internet.
The above exemplary embodiments enable distribution of media received from a media server over a single logical connection to multiple clients.
Although a few embodiments of the present invention have been shown and described, it would be appreciated by those skilled in the art that changes may be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the claims and their equivalents.