Abstract:
The disclosure discloses a method for sharing audio and/or video. The method includes the steps that: a first terminal writes audio and/or video from an audio-video providing module into a cache space according to a play request of a second terminal, and transmits the audio and/or video stored in the cache space to the second terminal. 
     The disclosure further discloses a system for sharing the audio and/or video. With the disclosure, a video conference of a mobile terminal can be displayed at a digital home network terminal in real time, so that the video content can be displayed through the digital terminal that does not support video conferences. Moreover, when a user gets home, a mobile phone terminal involved in the video conference can conveniently switch the images to a television terminal, thus not needing to be held by the user. Therefore, user experience is improved.

Description:
TECHNICAL FIELD 
       [0001]    The disclosure relates to the field of mobile communications, and more particularly, to a method and a system for sharing audio and/or video. 
       BACKGROUND 
       [0002]    Digital Living Network Alliance (DLNA) is a cross-industry organization which consists of a plurality of companies leading consumer electronics industry, computer industry and mobile setting industry. The DLNA aims to share wired and wireless networks that are formed by indoor and outdoor interconnected consumer electronics, personal computers, mobile equipment and the like, thereby promoting the sharing of digital multimedia content and service. The DLNA devotes to launching an open industrial standard-based interconnection guideline to realize cross-industry digital convergence. The DLNA does not create a technology, but forms a solution and a standard which can be complied with. Therefore, various technologies and protocols selected by the DLNA are the technologies and the protocols which are applied very widely at present. The DLNA equipment must support a HyperText Transfer Protocol (HTTP) serving as a basic transmission mode to transmit multimedia content, for which, in addition, a Real-time Transport Protocol (RTP) can serve as an optional media transmission mode, but the HTTP as a mandatory requirement must be supported. 
         [0003]    Streaming media refers to a media format played on the Internet by adopting a stream transmission mode. The streaming media is also called a streaming-type media, which refers to that a dealer sends out a program as a data packet to a network by using a video transmission server. After a user decompresses the data by decompression equipment, the program can be displayed. Three streaming media protocols, which are widely applied in current mobile internet, are an HTTP progressive download streaming media protocol, a Real Time Streaming Protocol (RTSP)/RTP-based real-time streaming media protocol stack, and a HTTP Live Streaming Protocol proposed by Apple Inc lately. 
         [0004]    A video conference, which is also called a televised conference, a teleconference and the like, can transmit the information in the forms of moving images, audio and application data (electronic whiteboard and graphics) and the like between two points and among a plurality of points in real time. By the video conference, people can communicate more effectively, because visual communication is the most natural communication mode. Therefore, seeing can deepen the understanding and memory of people better than saying, particularly when the topic per se is a very figurative point of view, the video conference make the people in different places influence each other, no matter the distance between the people is 10 minutes&#39; walk or 10 hours&#39; airplane travel. The video conference can make people exchange ideas and exchange information as they are in the same room. This means that the people need not spend their working time in waiting E-mails, faxes or express. 
         [0005]    By the DLNA, the terminal supporting the DLNA protocol can share pictures, videos, files and the like through the HTTP protocol conveniently. For example, the pictures on a mobile phone terminal are shared with a television for displaying. However, what shared by the DLNA is mainly the contents which have been stored in a digital terminal, while the media contents transmitted in a streaming mode cannot be shared by the DLNA at present. 
       SUMMARY 
       [0006]    In view of the above, the main aim of the disclosure is to provide a method and a system for sharing audio and/or video. The audio and/or video can be shared between a mobile terminal and a digital home network terminal through the DLNA, so that user experience is improved. 
         [0007]    The following technical solutions of the disclosure are provided. 
         [0008]    A method for sharing the audio and/or video is provided, which includes the following steps. 
         [0009]    A first terminal writes audio and/or video from an audio-video providing module into a cache space according to a play request of a second terminal, and transmits the audio and/or video stored in the cache space to the second terminal. 
         [0010]    The step that the first terminal writes the audio and video from the audio-video providing module into the cache space includes the following steps: the first terminal synchronizes the audio-video according to time stamp information in a code stream of the audio and video RTP, and writes the synchronized audio-video into the cache space frame by frame. 
         [0011]    The step that the first writes the audio and/or video from the audio-video providing module into the cache space includes the following steps: when the cache space is full, the first terminal stops writing data into the cache space; and when the cache space is not full, the first terminal continues writing the data into the cache space. 
         [0012]    The step that the first terminal transmits the audio and/or video stored in the cache space to the second terminal includes the following steps: when the first terminal determines that the occupied space of the cache space is no greater than a set threshold, the first terminal stops transmitting the audio and/or video stored in the cache space to the second terminal until the occupied space of the cache space is greater than the set threshold, and then continues transmitting the audio and/or video stored in the cache space to the second terminal. 
         [0013]    The first terminal is the mobile terminal. The second terminal is a home digital terminal. The audio-video providing module is a video conference server. 
         [0014]    A system for sharing audio and/or video is provided, which includes a first terminal, a second terminal and an audio-video providing module. 
         [0015]    The first terminal is configured to write audio and/or video from the audio-video providing module into a cache space according to a play request of the second terminal, and to transmit the audio and/or video stored in the cache space to the second terminal. 
         [0016]    The first terminal writing the audio and video from the audio-video providing module into the cache space includes the follows: the first terminal synchronizes the audio-video according to the time stamp information in the code stream of the audio and video RTP, and writes the synchronized audio-video into the cache space frame by frame. 
         [0017]    The first writing the audio and/or video from the audio-video providing module into the cache space includes the follows: when the cache space is full, the first terminal stops writing data into the cache space; and when the cache space is not full, the first terminal continues writing the data into the cache space. 
         [0018]    The first terminal transmits the audio and/or video stored in the cache space to the second terminal includes the follows: when the first terminal determines that the occupied space of the cache space is no greater than the set threshold, stops transmitting the audio and/or video stored in the cache space to the second terminal until the occupied space of the cache space is greater than the set threshold, and then continues transmitting the audio and/or video stored in the cache space to the second terminal. 
         [0019]    The first terminal is a mobile terminal. The second terminal is a home digital terminal. The audio-video providing module is a video conference server. 
         [0020]    According to the method and the system for sharing the audio and/or video, the first terminal writes the audio and/or video from the audio-video providing module into the cache space according to the play request of the second terminal, and transmits the audio and/or video stored in the cache space to the second terminal. In this way, the video conference of the mobile terminal can be displayed on the digital home network terminal in real time, so that the digital terminal that does not support video conferences can display the video content. Moreover, when a user gets home, the mobile phone terminal involved in the video conference can conveniently switch the images to a television terminal, thus not needing to be held by the user. Therefore, the user experience is improved. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0021]      FIG. 1  shows a flow chart of the method for sharing the audio and/or video of the disclosure; 
           [0022]      FIG. 2  shows a block diagram of the overall system of the embodiment of the disclosure; and 
           [0023]      FIG. 3  shows a diagram of the solution for sharing a video conference of the embodiment of the disclosure. 
       
    
    
     DETAILED DESCRIPTION 
       [0024]    The basic concept of the disclosure is that: the first terminal writes the audio and/or video from the audio-video providing module into the cache space according to the play request of the second terminal, and transmits the audio and/or video stored in the cache space to the second terminal. 
         [0025]    The overall system of the video conference is mature, including the initiation and control of the video conference and the audio-video transmission. What the disclosure relates to is not the interaction process between a video conference terminal B and a video conference server A. In a similar way, because of the specification of the DLNA, the switch transmission between B and C and the discovery of equipment are controlled by the specification standard of the DLNA, which are therefore not included within the scope of the disclosure. 
         [0026]    Actually, what the disclosure relates to is how to display on C images and video transmitted to the terminal B from A. Known from the DLNA protocol, if what stored on the B is a fixed video, it is easy share the fixed video on the C according to the DLNA specification. The disclosure focuses on how to share a dynamic video code stream transmitted from the A on the C successfully. 
         [0027]      FIG. 1  shows the flow chart of the method for sharing the audio and/or video of the disclosure. As shown in  FIG. 1 , the method includes the following steps: 
         [0028]    Step  101 : the first terminal receives a play request of the second terminal. 
         [0029]    For example, the mobile terminal receives a request about HTTP streaming media play from a home digital terminal. 
         [0030]    Step  102 : the first terminal writes the audio and/or video from the audio-video providing module into the cache space. 
         [0031]    In the disclosure, the first terminal mainly refers to the mobile terminal (for example the mobile phone terminal); the second terminal mainly refers to the home digital terminal; and the audio-video providing module mainly refers to the video conference server. 
         [0032]    Note that, for the situation that the audio-video providing module provides the audio and the video at the same time, the first terminal (correspondingly, the first terminal needs to be added with a module which is similar to a streaming media server) synchronizes the audio-video according to the time stamp information in the code stream of the audio and video RTP, and writes the synchronized audio-video into the cache space frame by frame. Generally, the cache space is a first-in first-out linearly structured cache, and the capacity of the cache space can be measured by the play length of the audio and/or video. For example, the cache space with the play length of 20 S is set on the mobile phone terminal. 
         [0033]    When the cache space is full, the first terminal stops writing data into the cache space; and when the cache space is not full, the first terminal continues writing the data into the cache space. In practical application, a flag bit can be configured to identify whether the cache space is full or not, for example, when the flag bit is 1, the cache space is full; and when the flag bit is 0, the cache space is not full. 
         [0034]    According to the DLNA protocol, the home digital terminal can transmits DLNA connection information in a broadcast mode. After the mobile terminal detects the DLNA connection information, the mobile terminal caches the audio and/or video from the audio-video providing module. Specifically, the mobile terminal cures a piece of file header information in a 3rd-generation platform (3GP) format at the very beginning section of the cache space, wherein the file header information includes an audio format (for example Adaptive Multi-Rate (AMR)) and/or a video format (for example Moving 
         [0035]    Picture Expert Group-4 (MEPG-4)) of the 3GP file to be written. After the mobile terminal receives the code stream of the audio and/or video RTP transferred from the video conference server, in a similar way, writes the audio and/or video into the cache space that is regarded as the file in the 3GP format until the cache space (for example 20 S) is full, at this time, the flag bit P is set as 1, and subsequently waits for the arrival of the flag bit P=0. 
         [0036]    Note that, the sequence of the Step  101  and the Step  102  are not limited by the disclosure. 
         [0037]    Step  103 : the first terminal transmits the audio and/or video stored in the cache space to the second terminal. 
         [0038]    Generally, the first terminal extracts the streamlining media information from the cache space in the mode of a streaming media server, and transmits the streaming media information to the second terminal frame by frame through the HTTP. 
         [0039]    Note that, in the process of transmitting the audio and/or video, the first terminal determines whether the occupied space of the cache space is greater than the set threshold. When the first terminal determines that the occupied space of the cache space is no greater than the set threshold, stops transmitting the audio and/or video stored in the cache space to the second terminal until the occupied space of the cache space is greater than the set threshold, and then continues transmitting the audio and/or video stored in the cache space to the second terminal. In practical application, the flag bit can be configured to identify whether the occupied space of the cache space is greater than the set threshold, for example, when the flag bit is 1, the occupied space of the cache space is greater than the set threshold; and when the flag bit is 0, the occupied space of the cache space is no greater than the set threshold. 
         [0040]    When the transmission of the streaming media is completed, the cache space needs to be emptied and waits for the next DLNA connection. 
         [0041]    The disclosure further discloses a system for sharing the audio and/or video correspondingly. The system includes the first terminal, the second terminal and the audio-video providing module. 
         [0042]    The first terminal is configured to write the audio and/or video from the audio-video providing module into the cache space according to the play request of the second terminal, and transmit the audio and/or video stored in the cache space to the second terminal. 
         [0043]    The first terminal writing the audio and video from the audio-video providing module into the cache space includes that: the first terminal synchronizes the audio-video according to the time stamp information in the code stream of the audio and video RTP, and writes the synchronized audio-video into the cache space frame by frame. 
         [0044]    The first terminal writing the audio and/or video from the audio-video providing module into the cache space includes that: when the cache space is full, the first terminal stops writing data into the cache space; and when the cache space is not full, the first terminal continues writing the data into the cache space. 
         [0045]    The first terminal transmitting the audio and/or video stored in the cache space to the second terminal includes that: the first terminal determines that the occupied space of the cache space is no greater than a set threshold, stops transmitting the audio and/or video stored in the cache space to the second terminal until the occupied space of the cache space is greater than the set threshold, and then continues transmitting the audio and/or video stored in the cache space to the second terminal. 
         [0046]    The first terminal is a mobile terminal. The second terminal is a home digital terminal. The audio-video providing module is a video conference server. 
         [0047]    It can be seen that, by reforming the related modules of the video conference terminal, the audio and the video from the video conference server are converged together on the basis of the code stream of the RTP to form a module similar to the streamlining media server. The video content is shared and displayed on the digital home terminal according to the HTTP of the streaming media through the DLNA technology. 
         [0048]    The implementation of the technical solution is described below with reference to specific embodiments in detail. 
         [0049]    The block diagram of the overall system of the embodiment of the disclosure is shown as  FIG. 2 , and the scheme for sharing the video conference is shown as  FIG. 3 . The embodiment of the disclosure includes the following steps that: 
         [0050]    a) A mobile phone terminal A performs a 3rd-generation (3G) video conference outdoors, wherein various functions of the video conference are normal and both the audio and the video are opened. The video conference adopts the 3G network of a Universal Mobile Telecommunications System (UMTS). Moreover, the DLNA server of the mobile phone terminal is opened and can be captured by a client of other DLNAs. In addition, the Wireless Local Area Network (WLAN) of the mobile phone terminal is also opened. 
         [0051]    b) The mobile phone terminal enters indoors. At this time, a wireless terminal detects the Access Point (AP) of the indoor WLAN, accesses into the AP of the WLAN automatically, and starts to connect the indoor wireless local area network. At this time, the indoor home information terminal, namely the television B is performing the DLNA network scanning, the television B initiates the DLNA broadcast information on the WLAN in a broadcast mode. After the mobile phone terminal A receives the DLNA broadcast information, because the mobile phone has a DLNA function, the mobile phone responds through the WLAN. The terminal B therefore finishes the discovery process of DLNA equipment and locates the mobile terminal A. 
         [0052]    c) The terminal B initiates a video sharing request to the terminal A. After receiving the request, the streaming media server on the terminal A is started: firstly, the streamlining media server empties the 20 S cache information, and secondly, writes the header information of the 3GP file into the 20 S cache module, wherein the header information includes the video of MPEG-4 and the audio of AMR. 
         [0053]    d) On one hand, display the received audio-video code streaming on the mobile phone terminal; and on the other hand, copy the received audio-video code streaming, and write the received audio-video code streaming into the 20 S cache according to the time stamp of each module. 
         [0054]    e) when the data in the cache exceeds 5 S, the streaming media server starts responding to the request of the home digital terminal, starts to provides the streamlining media of the video conference for the home digital terminal, reads a piece of data in the cache in the HTTP mode, transmits the data through the HTTP, and reads continuously until the cache space is less than the length of 5 S. 
         [0055]    Note that, when the cache space is not full, turn to the Step d, continue writing; in addition, when the cache space is greater than 5 S, restart the Step e, continue transmitting until the home digital terminal stops the sharing request or the video conference comes to an end, and then the overall process comes to an end, empties the cache space and resets all flag bits. 
         [0056]    The above is only the preferred embodiment of the disclosure and not intended to limit the scope of protection of the disclosure.