WO2016101698A1 - Dlna technology-based screen push method and system - Google Patents

Dlna technology-based screen push method and system Download PDF

Info

Publication number
WO2016101698A1
WO2016101698A1 PCT/CN2015/092898 CN2015092898W WO2016101698A1 WO 2016101698 A1 WO2016101698 A1 WO 2016101698A1 CN 2015092898 W CN2015092898 W CN 2015092898W WO 2016101698 A1 WO2016101698 A1 WO 2016101698A1
Authority
WO
WIPO (PCT)
Prior art keywords
push
receiving end
screen
rtsp
media type
Prior art date
Application number
PCT/CN2015/092898
Other languages
French (fr)
Chinese (zh)
Inventor
周勇
Original Assignee
深圳Tcl数字技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳Tcl数字技术有限公司 filed Critical 深圳Tcl数字技术有限公司
Publication of WO2016101698A1 publication Critical patent/WO2016101698A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications

Definitions

  • the present invention relates to the field of optical communication technologies, and in particular, to a method and system for implementing screen push based on DLNA technology.
  • DLNA technology can easily realize mutual discovery and access between multiple devices, and support multimedia file sharing and push between devices.
  • the protocol itself does not support mirroring, that is, we cannot achieve the transmission screen through DLNA protocol.
  • the mature intelligent screen technology is WIFI-Display, which can realize the mutual discovery and screen transmission between any two devices, but it has requirements for the device, that is, it must support WIFI and WIFI-Display, so many do not have WIFI and Devices with WIFI-Display function cannot implement screen push.
  • the present invention provides a method for implementing screen push based on DLNA technology, and the method for implementing screen push based on DLNA technology includes the following steps:
  • the receiving end is selected, and a push instruction is sent to the selected receiving end, where the pushing instruction includes a media type and the URL address, and the media type in the push instruction is set to an RTSP type.
  • the step of selecting the receiving end comprises:
  • the obtained description file includes customized information, determining that the receiving end has a screen pushing function
  • the obtained receiving end information does not include the customized information, determining that the receiving end does not have a screen pushing function
  • the screen information comprises: an image, a sound, and a video.
  • the present invention further provides a method for implementing screen pushing based on DLNA technology, and the method for implementing screen pushing based on DLNA technology includes:
  • the URL address is not accessed, and the screen information of the push end is initialized.
  • the present invention further provides a system for implementing screen pushing based on DLNA technology, and the system for implementing screen pushing based on DLNA technology includes a push end and a receiving end.
  • the push end includes:
  • a screen recording module for recording screen information into a streaming media file and saving
  • An RTSP service module configured to start an RTSP service, add the streaming media file to the RTSP service, and generate a URL address that can be RTSP remote access;
  • a first DLNA protocol stack module configured to select a receiving end, and send a push instruction to the selected receiving end, where the push instruction includes a media type and the URL address, and set a media type in the push instruction For the RTSP type;
  • the receiving end includes:
  • a second DLNA protocol stack module configured to receive a push instruction sent by the push end
  • a parsing module configured to parse the push instruction, and obtain a media type and a URL address included in the message of the push instruction
  • the RTSP playing module is configured to obtain and play the screen information pushed by the push end according to the media type and the URL address.
  • the first DLNA protocol stack module includes:
  • a scanning unit configured to scan the receiving end, and obtain a description file of the receiving end
  • a first unit configured to determine that the receiving end has a screen pushing function if the received end information includes customized information
  • a second unit configured to determine that the receiving end does not have a screen pushing function if the received information of the receiving end does not include customized information
  • Select unit to select the receiver with screen push function.
  • the RTSP play module includes:
  • a determining unit configured to determine whether the parsed media type is consistent with a media type recorded by the push end
  • the playing unit is configured to access the URL address if it is consistent, and initialize the player to play.
  • the RTSP play module further includes:
  • the initialization unit is configured to not access the URL address and initialize the screen information of the push end if the parsed media type is inconsistent with the media type recorded by the push end.
  • the invention is based on the DLNA technology, searches the receiving end through the push end, saves the searched receiving end information in the device list, and then selects the receiving end according to the searched device information, and records the obtained playing screen information into a stream.
  • the media file is saved locally and generates a remotely accessible URL address and media type, and a push command containing the URL address and media type is sent to the receiving end.
  • devices that do not have the WIFI-Display function even if they do not have a WIFI module, can easily implement screen push as long as they are connected to the local area network or establish a point-to-point connection, thereby enabling users to enjoy the fun of multi-screen interaction.
  • FIG. 1 is a schematic flowchart of an embodiment of a method for implementing screen pushing based on DLNA technology according to the present invention
  • FIG. 2 is a schematic diagram of a refinement process of step S103 in FIG. 1;
  • FIG. 3 is a schematic flow chart of another embodiment of a method for implementing screen pushing based on DLNA technology according to the present invention.
  • FIG. 4 is a schematic diagram of a refinement process of step S203 in FIG. 3;
  • FIG. 5 is a schematic diagram of functional modules of a system for implementing screen push based on DLNA technology according to the present invention
  • FIG. 6 is a schematic diagram of functional modules of an embodiment of the push end of FIG. 5;
  • FIG. 7 is a schematic diagram of a refinement function module of the first DLNA protocol stack module in FIG. 6;
  • FIG. 8 is a schematic diagram of functional modules of an embodiment of the receiving end of FIG. 5;
  • FIG. 9 is a schematic diagram of a refinement function module of the RTSP play module in FIG. 8.
  • the present invention provides a method for implementing screen push based on DLNA technology, which is applied to a push end.
  • the method for implementing screen push based on DLNA technology includes:
  • Step S101 recording screen information into a streaming media file and saving
  • the push end and the receiving end may respectively be any one of a mobile phone, a television, a computer, or an IPAD.
  • the following full-text push end uses a mobile phone as an example, and the receiving end uses a television as an example.
  • the screen information includes images, sounds, and videos.
  • Step S102 starting an RTSP service, adding the streaming media file to the RTSP service, and generating a URL address that can be RTSP remote access;
  • the push end saves the screen recording process of the screen information to the local streaming media file, and then adds to the RTSP (Real Time).
  • Streaming Protocal, real-time streaming protocol Streaming Protocal, real-time streaming protocol
  • URLs Uniform Resource Locator, Uniform Resource Locator
  • other servers may be selected for saving and generating a corresponding remotely accessible URL2.
  • the recorded streaming media file can be played synchronously on the television in real time during the recording process on the mobile phone; or the screen information on the mobile phone can be recorded and then played on the television.
  • Step S103 selecting a receiving end, and sending a push instruction to the selected receiving end, where the pushing instruction includes a media type and the URL address, and sets a media type in the push instruction to an RTSP type.
  • the mobile phone sends a push command to the selected TV through the DLNA protocol stack, sets the URL to URL1 in the message of the push command, and sets the file type to video/RTSP, which is assumed to be TYPE1.
  • the TV determines through the DLNA protocol stack that the TYPE1 in the received push command is video/RTSP, it accesses URL1 and invokes the RTSP player to play the screen information.
  • the step of selecting the receiving end includes:
  • Step S1031 Scan the information of the receiving end to obtain a scan file of the receiving end;
  • the mobile phone and the TV are connected by the same router, and the user turns on the mobile phone and the television, and the DLNA service is automatically turned on after the TV is turned on, and the DMR (Digital Media) is broadcasted. Render, digital media renderer) device type.
  • the DLNA service is automatically turned on, and the device having the DMR module function is searched, and the searched device information is saved in the device list, where the device information includes the device name and other description fields for the device.
  • Step S1032 If the acquired scan file includes customized information, determine that the receiving end has a screen push function
  • Step S1033 If the obtained receiving end information does not include customized information, it is determined that the receiving end does not have a screen pushing function;
  • the push end when the push end searches for the receiving end, it scans the description file of the receiving end, and detects whether the description file contains customized information.
  • the customized information is set according to actual needs.
  • the set TV customization information is nScreenDevice. If the description file of the receiving end of the scan contains the customized information nScreenDevice, it is considered to support the screen push function; otherwise it is considered to be an ordinary DLNA device and does not have the screen push capability.
  • step S1034 the receiving end having the screen pushing function is selected.
  • various receiving ends having the function of the DMR module such as a mobile phone, a computer, an IPAD, or even another television, broadcast their respective DMR device types, and the mobile phone as the push end selects and selects according to the searched device information.
  • the DMR module features a TV and receives requests for screen information sent by the TV.
  • the program pops up the device selection list, and the list only lists the devices that support the screen push function. At this point, the user can select the receiving end that needs to play synchronously.
  • the present invention also provides a method for implementing screen push based on DLNA technology, which is applied to a receiving end.
  • the method for implementing screen pushing based on DLNA technology includes:
  • Step S201 receiving a push instruction sent by the push end
  • Step S202 parsing the push instruction, and acquiring a media type and a URL address included in the message of the push instruction;
  • the television when the television receives the push command sent by the mobile phone, if the television is selected for reception, the television parses the file type included in the push command message, such as TYPE1 and URL address URL1, through the DLNA protocol.
  • Step S203 Acquire screen information pushed by the push end according to the media type and the URL address, and play.
  • the URL1 address is accessed, and the RTSP player is called to play.
  • the step S203 includes:
  • Step S2031 determining whether the parsed media type is consistent with the media type recorded by the push end
  • Step S2032 if they are consistent, access the URL address, and initialize the player to prepare for playing;
  • step S2033 if they do not match, the URL address is not accessed, and the screen information of the push end is initialized.
  • the screen recording process is saved to the local streaming media file, and then added to the RTSP server, and a remotely accessible URL is generated, because the streaming media added to the RTSP server is generated.
  • the file, the generated remotely accessible address is set to URL1, such as RTSP://192.168.1.100:8090/screen; and the file type setting is set to TYPE1, such as video/RTSP.
  • the TV receives the push command of the mobile phone, it determines whether the file type in the received push command is consistent with TYPE1 through the DLNA protocol stack. If TYPE1 in the push command message parsed by the TV is video/RTSP, access URL1 and call the RTSP player to play the screen information.
  • other servers may be selected for saving and generating a corresponding remotely accessible URL2. If the TYPE1 in the push command message parsed by the TV is not video/RTSP, the URL1 cannot be accessed, and the screen information of the mobile phone is initialized.
  • the present invention also provides a system for implementing screen push based on DLNA technology.
  • the system for implementing screen push based on DLNA technology includes a push end and a receiving end.
  • the push end is provided. include:
  • the screen recording module 101 is configured to record screen information into a streaming media file and save the file;
  • the push end and the receiving end may respectively be any one of a mobile phone, a television, a computer, or an IPAD.
  • the following full-text push end uses a mobile phone as an example, and the receiving end uses a television as an example.
  • the push end and the receiving end may respectively be any one of a mobile phone, a television, a computer, or an IPAD.
  • the following full-text push end uses a mobile phone as an example, and the receiving end uses a television as an example.
  • the screen information includes images, sounds, and videos.
  • the RTSP service module 102 is configured to start an RTSP service, add the streaming media file to the RTSP service, and generate a URL address that can be RTSP remote access;
  • the push end saves the screen recording process of the screen information to the local streaming media file, and then adds to the RTSP (Real Time).
  • Streaming Protocal, real-time streaming protocol Streaming Protocal, real-time streaming protocol
  • URLs Uniform Resource Locator, Uniform Resource Locator
  • other servers may be selected for saving and generating a corresponding remotely accessible URL2.
  • the recorded streaming media file can be played synchronously on the television in real time during the recording process on the mobile phone; or the screen information on the mobile phone can be recorded and then played on the television.
  • the first DLNA protocol stack module 103 is configured to select a receiving end, and send a push instruction to the selected receiving end, where the push instruction includes a media type and the URL address, and the media type in the push instruction Set to RTSP type.
  • the mobile phone sends a push command to the selected TV through the DLNA protocol stack, sets the URL to URL1 in the message of the push command, and sets the file type to video/RTSP, which is assumed to be TYPE1.
  • the TV determines through the DLNA protocol stack that the TYPE1 in the received push command is video/RTSP, it accesses URL1 and invokes the RTSP player to play the screen information.
  • the first DLNA protocol stack module 103 includes:
  • the scanning unit 1031 is configured to scan the receiving end information, and obtain a description file of the receiving end;
  • the mobile phone and the TV are connected by the same router, and the user turns on the mobile phone and the television, and the DLNA service is automatically turned on after the TV is turned on, and the DMR (Digital Media) is broadcasted. Render, digital media renderer) device type.
  • the DLNA service is automatically turned on, and the device having the DMR module function is searched, and the searched device information is saved in the device list, where the device information includes the device name and other description fields for the device.
  • the first unit 1032 is configured to determine that the receiving end has a screen pushing function if the received receiving end information includes customized information.
  • the second unit 1033 is configured to determine that the receiving end does not have a screen pushing function if the received receiving end information does not include the customized information.
  • the push end when the push end searches for the receiving end, it scans the description file of the receiving end, and detects whether the description file contains customized information.
  • the customized information is set according to actual needs.
  • the set TV customization information is nScreenDevice. If the description file of the receiving end of the scan contains the customized information nScreenDevice, it is considered to support the screen push function; otherwise it is considered to be an ordinary DLNA device and does not have the screen push capability.
  • the selecting unit 1034 selects a receiving end having a screen pushing function.
  • various receiving ends having the function of the DMR module such as a mobile phone, a computer, an IPAD, or even another television, broadcast their respective DMR device types, and the mobile phone as the push end selects and selects according to the searched device information.
  • the DMR module features a TV and receives requests for screen information sent by the TV.
  • the program pops up the display device list for the user to select, and the list only lists the devices that support the screen push function. At this point, the user can select the receiving end that needs to play synchronously.
  • the receiving end includes:
  • a second DLNA protocol stack 201 configured to receive a push command sent by the push end
  • the parsing module 202 is configured to parse the push instruction, and obtain a media type and a URL address included in the message of the push instruction;
  • the television when the television receives the push command sent by the mobile phone, if the television is selected for reception, the television parses the file type included in the push command message, such as TYPE1 and URL address URL1, through the DLNA protocol.
  • the RTSP playing module 203 is configured to acquire and play the screen information pushed by the push end according to the media type and the URL address.
  • the URL1 address is accessed, and the RTSP player is called to play.
  • the RTSP playback module 203 includes:
  • the determining unit 2031 is configured to determine whether the parsed media type is consistent with the media type recorded by the push end;
  • the playing unit 2032 is configured to, if consistent, access the URL address, and initialize the player to prepare to play;
  • the initializing unit 2033 is configured to not access the URL address if it is inconsistent, and initialize the screen information of the push end.
  • the screen recording process is saved to the local streaming media file, and then added to the RTSP server, and a remotely accessible URL is generated, because the streaming media added to the RTSP server is generated.
  • the file, the generated remotely accessible address is set to URL1, such as RTSP://192.168.1.100:8090/screen; and the file type setting is set to TYPE1, such as video/RTSP.
  • the TV receives the push command of the mobile phone, it determines whether the file type in the received push command is consistent with TYPE1 through the DLNA protocol stack. If TYPE1 in the push command message parsed by the TV is video/RTSP, access URL1 and call the RTSP player to play the screen information.
  • other servers may be selected for saving and generating a corresponding remotely accessible URL2. If the TYPE1 in the push command message parsed by the TV is not video/RTSP, the URL1 cannot be accessed, and the screen information of the mobile phone is initialized.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

Disclosed is a DLNA technology-based screen push method. The DLNA technology-based screen push method comprises the following steps: recording screen information into a streaming media file and storing the streaming media file; starting an RTSP service, adding the streaming media file into the RTSP service, and generating a URL address that can be remotely accessed over RTSP; and selecting a receiving end, sending to the selected receiving end a push instruction containing a media type and the URL address, and setting the media type in the push instruction as the RTSP type. Also disclosed is a DLNA technology-based screen push system. In this way, a device that does not have the WIFI-Display function or even does not have a WIFI module can easily implement screen push as long as the device accesses a local area network or establishes a point-to-point connection, so that a user can enjoy the fun brought by multi-screen interaction.

Description

基于DLNA技术实现屏幕推送的方法及系统  Method and system for realizing screen push based on DLNA technology
技术领域Technical field
本发明涉及光通信技术领域,尤其涉及一种基于DLNA技术实现屏幕推送的方法及系统。The present invention relates to the field of optical communication technologies, and in particular, to a method and system for implementing screen push based on DLNA technology.
背景技术Background technique
随着消费电子产品的普及以及无线通讯技术的成熟,家电、电脑以及手机等电子产品,基本上都支持WIFI,但由于各个产品之间的接口或者关联没有一个相应的标准存在,只能各守各业而无法达成跨平台互通的目的。不过现在通过DLNA(Digital Living Nerwork Alliance,数字生活网络联盟)技术的应用,无需使用各种不同的传输线,利用有线或者无线网络,就可以轻轻松松来连接电视、电脑或者其它支持DLNA功能的设备,从而无障碍的在各个产品之间分享资源,而这就是DLNA所带给我们的便利。With the popularity of consumer electronics and the maturity of wireless communication technologies, electronic products such as home appliances, computers, and mobile phones basically support WIFI. However, since there is no corresponding standard in the interface or association between products, they can only be maintained. The industry cannot achieve the goal of cross-platform interoperability. But now through DLNA (Digital Living Nerwork Alliance, Digital Living Network Alliance) technology, without the use of a variety of different transmission lines, can easily connect to TV, computer or other DLNA-enabled devices using wired or wireless networks, making it accessible to various products. Sharing resources between them, and this is the convenience that DLNA brings to us.
DLNA技术能轻松实现多个设备间相互发现并访问,支持设备间多媒体文件共享和推送,但协议本身是不支持镜像的,也就是我们并不能通过DLNA协议达到传输屏幕的目的。成熟的智能传屏技术当属WIFI-Display,它能实现任意两台设备间相互发现并实现屏幕传递,但对设备是有要求的,即必须支持WIFI和WIFI-Display,所以众多不具备WIFI和WIFI-Display功能的设备无法实现屏幕推送。 DLNA technology can easily realize mutual discovery and access between multiple devices, and support multimedia file sharing and push between devices. However, the protocol itself does not support mirroring, that is, we cannot achieve the transmission screen through DLNA protocol. The mature intelligent screen technology is WIFI-Display, which can realize the mutual discovery and screen transmission between any two devices, but it has requirements for the device, that is, it must support WIFI and WIFI-Display, so many do not have WIFI and Devices with WIFI-Display function cannot implement screen push.
上述内容仅用于辅助理解本发明的技术方案,并不代表承认上述内容是现有技术。The above content is only used to assist in understanding the technical solutions of the present invention, and does not constitute an admission that the above is prior art.
发明内容Summary of the invention
本发明的主要目的在于提供一种基于DLNA技术实现屏幕推送的方法和系统。It is a primary object of the present invention to provide a method and system for implementing screen push based on DLNA technology.
为实现上述目的,本发明提供的一种基于DLNA技术实现屏幕推送的方法,所述基于DLNA技术实现屏幕推送的方法包括以下步骤:To achieve the above object, the present invention provides a method for implementing screen push based on DLNA technology, and the method for implementing screen push based on DLNA technology includes the following steps:
将屏幕信息录制成流媒体文件并保存;Record screen information as a streaming file and save it;
启动RTSP服务,将所述流媒体文件添加到所述RTSP服务中,并生成可RTSP远程访问的URL地址;Initiating an RTSP service, adding the streaming media file to the RTSP service, and generating a URL address that is RTSP remotely accessible;
选定接收端,并向选定的接收端发送推送指令,所述推送指令中包含媒体类型和所述URL地址,并将所述推送指令中的媒体类型设置为RTSP类型。The receiving end is selected, and a push instruction is sent to the selected receiving end, where the pushing instruction includes a media type and the URL address, and the media type in the push instruction is set to an RTSP type.
优选地,所述选定接收端的步骤包括:Preferably, the step of selecting the receiving end comprises:
扫描接收端,获取接收端的描述文件;Scan the receiving end to obtain a description file of the receiving end;
若获取的所述描述文件包含有定制信息,则判定所述接收端具备屏幕推送功能;If the obtained description file includes customized information, determining that the receiving end has a screen pushing function;
若获取的所述接收端信息不包含有定制信息,则判定所述接收端不具备屏幕推送功能;If the obtained receiving end information does not include the customized information, determining that the receiving end does not have a screen pushing function;
选定具备屏幕推送功能的接收端。Select the receiver with the screen push function.
优选地,所述屏幕信息包括:图像、声音和视频。Preferably, the screen information comprises: an image, a sound, and a video.
此外,为实现上述目的,本发明还提供一种基于DLNA技术实现屏幕推送的方法,所述基于DLNA技术实现屏幕推送的方法包括:In addition, in order to achieve the above object, the present invention further provides a method for implementing screen pushing based on DLNA technology, and the method for implementing screen pushing based on DLNA technology includes:
接收推送端发送的推送指令;Receiving a push instruction sent by the push end;
解析所述推送指令,并获取所述推送指令的报文中包含的媒体类型及URL地址;Parsing the push instruction, and acquiring a media type and a URL address included in the message of the push instruction;
根据所述媒体类型和所述URL地址获取推送端推送的屏幕信息并播放。Obtaining and playing the screen information pushed by the push end according to the media type and the URL address.
优选地,所述根据所述媒体类型和所述URL地址获取推送端推送的屏幕信息并播放的步骤包括:Preferably, the step of obtaining, according to the media type and the URL address, the screen information pushed by the push end and playing:
判断解析的所述媒体类型是否与所述推送端录制的媒体类型一致;Determining whether the parsed media type is consistent with the media type recorded by the push end;
若一致,则访问所述URL地址,并初始化播放器准备播放。If they are consistent, access the URL address and initialize the player to play.
优选地,若解析的所述媒体类型与所述推送端录制的媒体类型不一致,则不访问所述URL地址,并初始化所述推送端的屏幕信息。Preferably, if the parsed media type is inconsistent with the media type recorded by the push end, the URL address is not accessed, and the screen information of the push end is initialized.
此外,为实现上述目的,本发明还提供一种基于DLNA技术实现屏幕推送的系统,所述基于DLNA技术实现屏幕推送的系统包括推送端和接收端,In addition, in order to achieve the above object, the present invention further provides a system for implementing screen pushing based on DLNA technology, and the system for implementing screen pushing based on DLNA technology includes a push end and a receiving end.
所述推送端包括:The push end includes:
屏幕录制模块,用于将屏幕信息录制成流媒体文件并保存;a screen recording module for recording screen information into a streaming media file and saving;
RTSP服务模块,用于启动RTSP服务,将所述流媒体文件添加到所述RTSP服务中,并生成可RTSP远程访问的URL地址;An RTSP service module, configured to start an RTSP service, add the streaming media file to the RTSP service, and generate a URL address that can be RTSP remote access;
第一DLNA协议栈模块,用于选定接收端,并向选定的接收端发送推送指令,所述推送指令中包含媒体类型和所述URL地址,并将所述推送指令中的媒体类型设置为RTSP类型;a first DLNA protocol stack module, configured to select a receiving end, and send a push instruction to the selected receiving end, where the push instruction includes a media type and the URL address, and set a media type in the push instruction For the RTSP type;
所述接收端包括:The receiving end includes:
第二DLNA协议栈模块,用于接收推送端发送的推送指令;a second DLNA protocol stack module, configured to receive a push instruction sent by the push end;
解析模块,用于解析所述推送指令,并获取所述推送指令的报文中包含的媒体类型及URL地址;a parsing module, configured to parse the push instruction, and obtain a media type and a URL address included in the message of the push instruction;
RTSP播放模块,用于根据所述媒体类型和所述URL地址获取推送端推送的屏幕信息并播放。The RTSP playing module is configured to obtain and play the screen information pushed by the push end according to the media type and the URL address.
优选地,所述第一DLNA协议栈模块包括:Preferably, the first DLNA protocol stack module includes:
扫描单元,用于扫描接收端,获取接收端的描述文件;a scanning unit, configured to scan the receiving end, and obtain a description file of the receiving end;
第一单元,用于若获取的所述接收端信息包含有定制信息,则判定所述接收端具备屏幕推送功能;a first unit, configured to determine that the receiving end has a screen pushing function if the received end information includes customized information;
第二单元,用于若获取的所述接收端信息不包含有定制信息,则判定所述接收端不具备屏幕推送功能;a second unit, configured to determine that the receiving end does not have a screen pushing function if the received information of the receiving end does not include customized information;
选择单元,用于选定具备屏幕推送功能的接收端。Select unit to select the receiver with screen push function.
优选地,所述RTSP播放模块包括:Preferably, the RTSP play module includes:
判断单元,用于判断解析的所述媒体类型是否与所述推送端录制的媒体类型一致;a determining unit, configured to determine whether the parsed media type is consistent with a media type recorded by the push end;
播放单元,用于若一致,则访问所述URL地址,并初始化播放器准备播放。The playing unit is configured to access the URL address if it is consistent, and initialize the player to play.
优选地,所述RTSP播放模块还包括:Preferably, the RTSP play module further includes:
初始化单元,用于若解析的所述媒体类型与所述推送端录制的媒体类型不一致,则不访问所述URL地址,并初始化推送端的屏幕信息。The initialization unit is configured to not access the URL address and initialize the screen information of the push end if the parsed media type is inconsistent with the media type recorded by the push end.
本发明基于DLNA技术,通过推送端搜索接收端,并将搜索到的接收端信息保存在设备列表中,然后根据搜索到的设备信息选定接收端,将获取的正在播放的屏幕信息录制成流媒体文件保存到本地,并生成可远程访问的URL地址和媒体类型,再将含有所述URL地址和媒体类型的推送指令发送到所述接收端。这样,不具有WIFI-Display功能,甚至不具备WIFI模块的设备只要是接入了局域网或者建立了点对点连接,就能轻松实现屏幕推送,从而使用户享受到多屏互动带来的乐趣。The invention is based on the DLNA technology, searches the receiving end through the push end, saves the searched receiving end information in the device list, and then selects the receiving end according to the searched device information, and records the obtained playing screen information into a stream. The media file is saved locally and generates a remotely accessible URL address and media type, and a push command containing the URL address and media type is sent to the receiving end. In this way, devices that do not have the WIFI-Display function, even if they do not have a WIFI module, can easily implement screen push as long as they are connected to the local area network or establish a point-to-point connection, thereby enabling users to enjoy the fun of multi-screen interaction.
附图说明DRAWINGS
图1为本发明基于DLNA技术实现屏幕推送的方法一实施例的流程示意图;1 is a schematic flowchart of an embodiment of a method for implementing screen pushing based on DLNA technology according to the present invention;
图2为图1中步骤S103的细化流程示意图;2 is a schematic diagram of a refinement process of step S103 in FIG. 1;
图3为本发明另一基于DLNA技术实现屏幕推送的方法一实施例的流程示意图;3 is a schematic flow chart of another embodiment of a method for implementing screen pushing based on DLNA technology according to the present invention;
图4为图3中步骤S203的细化流程示意图;4 is a schematic diagram of a refinement process of step S203 in FIG. 3;
图5为本发明基于DLNA技术实现屏幕推送的系统的功能模块示意图;5 is a schematic diagram of functional modules of a system for implementing screen push based on DLNA technology according to the present invention;
图6为图5中推送端一实施例的功能模块示意图;6 is a schematic diagram of functional modules of an embodiment of the push end of FIG. 5;
图7为图6中第一DLNA协议栈模块的细化功能模块示意图;7 is a schematic diagram of a refinement function module of the first DLNA protocol stack module in FIG. 6;
图8为图5中接收端一实施例的功能模块示意图;8 is a schematic diagram of functional modules of an embodiment of the receiving end of FIG. 5;
图9为图8中RTSP播放模块的细化功能模块示意图。FIG. 9 is a schematic diagram of a refinement function module of the RTSP play module in FIG. 8.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features, and advantages of the present invention will be further described in conjunction with the embodiments.
具体实施方式detailed description
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
本发明提供一种基于DLNA技术实现屏幕推送的方法,应用于推送端,参照图1,在一实施例中,该基于DLNA技术实现屏幕推送的方法包括:The present invention provides a method for implementing screen push based on DLNA technology, which is applied to a push end. Referring to FIG. 1 , in an embodiment, the method for implementing screen push based on DLNA technology includes:
步骤S101,将屏幕信息录制成流媒体文件并保存;Step S101, recording screen information into a streaming media file and saving;
本实施例中,推送端和接收端分别可以为手机、电视、电脑或IPAD等中的任一种,以下全文推送端以手机为例,接收端以电视为例。In this embodiment, the push end and the receiving end may respectively be any one of a mobile phone, a television, a computer, or an IPAD. The following full-text push end uses a mobile phone as an example, and the receiving end uses a television as an example.
本实施例中,所述屏幕信息包括图像、声音和视频。In this embodiment, the screen information includes images, sounds, and videos.
步骤S102,启动RTSP服务,将所述流媒体文件添加到所述RTSP服务中,并生成可RTSP远程访问的URL地址;Step S102, starting an RTSP service, adding the streaming media file to the RTSP service, and generating a URL address that can be RTSP remote access;
本实施例中,在用户启动手机的录屏程序后,推送端将屏幕信息的录屏进程保存到本地的流媒体文件,然后再添加到RTSP(Real Time Streaming Protocal,实时流传输协议)服务器中,并生成可远程访问的URL(Uniform Resource Locator,统一资源定位器),如RTSP://192.168.1.100:8090/screen,并假定为URL1。其他实施例中,可以选定其他服务器进行保存并生成对应的可远程访问的URL2。In this embodiment, after the user starts the screen recording program of the mobile phone, the push end saves the screen recording process of the screen information to the local streaming media file, and then adds to the RTSP (Real Time). Streaming Protocal, real-time streaming protocol) server, and generate remotely accessible URLs (Uniform Resource Locator, Uniform Resource Locator), such as RTSP://192.168.1.100:8090/screen, and assumed to be URL1. In other embodiments, other servers may be selected for saving and generating a corresponding remotely accessible URL2.
本实施例中,录制的流媒体文件,可以在手机上进行录制的过程中,实时在电视上进行同步播放;也可以将手机上的屏幕信息录制完成后,再在电视上进行播放。In this embodiment, the recorded streaming media file can be played synchronously on the television in real time during the recording process on the mobile phone; or the screen information on the mobile phone can be recorded and then played on the television.
步骤S103,选定接收端,并向选定的接收端发送推送指令,所述推送指令中包含媒体类型和所述URL地址,并将所述推送指令中的媒体类型设置为RTSP类型。Step S103, selecting a receiving end, and sending a push instruction to the selected receiving end, where the pushing instruction includes a media type and the URL address, and sets a media type in the push instruction to an RTSP type.
本实施例中,手机通过DLNA协议栈向选定的电视发送推送指令,在推送指令的报文中设置URL为URL1,同时将文件类型设置为video/RTSP,假定为TYPE1。当电视通过DLNA协议栈判断出接收到的推送指令中的TYPE1为video/RTSP时,则访问URL1,并调用RTSP播放器播放屏幕信息。In this embodiment, the mobile phone sends a push command to the selected TV through the DLNA protocol stack, sets the URL to URL1 in the message of the push command, and sets the file type to video/RTSP, which is assumed to be TYPE1. When the TV determines through the DLNA protocol stack that the TYPE1 in the received push command is video/RTSP, it accesses URL1 and invokes the RTSP player to play the screen information.
在一优选实施例中,如图2所示,在上述图1的实施例的基础上,本实施例中,所述选定接收端的步骤包括:In a preferred embodiment, as shown in FIG. 2, based on the foregoing embodiment of FIG. 1, in the embodiment, the step of selecting the receiving end includes:
步骤S1031,扫描接收端信息,获取接收端的扫描文件;Step S1031: Scan the information of the receiving end to obtain a scan file of the receiving end;
本实施例中,手机和电视由同一路由器连接,用户开启手机和电视,电视开机后会自动开启DLNA服务,并广播其DMR(Digital Media Render,数字媒体渲染器)设备类型。手机开机后会自动开启DLNA服务,并搜索具有DMR模块功能的设备,并将搜索到的设备信息保存在设备列表中,其中所述设备信息包括设备名称以及其他针对该设备的描述字段。In this embodiment, the mobile phone and the TV are connected by the same router, and the user turns on the mobile phone and the television, and the DLNA service is automatically turned on after the TV is turned on, and the DMR (Digital Media) is broadcasted. Render, digital media renderer) device type. After the mobile phone is powered on, the DLNA service is automatically turned on, and the device having the DMR module function is searched, and the searched device information is saved in the device list, where the device information includes the device name and other description fields for the device.
步骤S1032,若获取的所述扫描文件包含有定制信息,则判定所述接收端具备屏幕推送功能;Step S1032: If the acquired scan file includes customized information, determine that the receiving end has a screen push function;
步骤S1033,若获取的所述接收端信息不包含有定制信息,则判定所述接收端不具备屏幕推送功能;Step S1033: If the obtained receiving end information does not include customized information, it is determined that the receiving end does not have a screen pushing function;
本实施例中,推送端在搜索接收端时,会扫描接收端的描述文件,并检测该描述文件中是否包含有定制信息。该定制信息会根据实际需要设置,本实施例中,设置的电视定制信息为nScreenDevice。若扫描的接收端的描述文件中包含定制信息nScreenDevice,则认为其支持屏幕推送功能;否则认为是普通的DLNA设备,不具备屏幕推送能力。In this embodiment, when the push end searches for the receiving end, it scans the description file of the receiving end, and detects whether the description file contains customized information. The customized information is set according to actual needs. In this embodiment, the set TV customization information is nScreenDevice. If the description file of the receiving end of the scan contains the customized information nScreenDevice, it is considered to support the screen push function; otherwise it is considered to be an ordinary DLNA device and does not have the screen push capability.
步骤S1034,选定具备屏幕推送功能的接收端。In step S1034, the receiving end having the screen pushing function is selected.
本实施例中,各种具备DMR模块功能的接收端,如手机、电脑或IPAD甚至另一台电视,会广播各自的DMR设备类型,作为推送端的手机则会根据搜索到的设备信息选定具备DMR模块功能的电视,并接收电视发送的获取屏幕信息请求。In this embodiment, various receiving ends having the function of the DMR module, such as a mobile phone, a computer, an IPAD, or even another television, broadcast their respective DMR device types, and the mobile phone as the push end selects and selects according to the searched device information. The DMR module features a TV and receives requests for screen information sent by the TV.
本实施例中,在用户触发推送端的DLNA推送程序的推送屏幕按钮事件后,该程序弹出设备选择列表,该列表只列出支持屏幕推送功能的设备。此时,用户就可以选择需要同步播放的接收端。In this embodiment, after the user triggers the push screen button event of the DLNA push program of the push end, the program pops up the device selection list, and the list only lists the devices that support the screen push function. At this point, the user can select the receiving end that needs to play synchronously.
本发明还提供一种基于DLNA技术实现屏幕推送的方法,应用于接收端,参照图3,在一实施例中,该基于DLNA技术实现屏幕推送的方法包括:The present invention also provides a method for implementing screen push based on DLNA technology, which is applied to a receiving end. Referring to FIG. 3, in an embodiment, the method for implementing screen pushing based on DLNA technology includes:
步骤S201,接收推送端发送的推送指令;Step S201, receiving a push instruction sent by the push end;
步骤S202,解析所述推送指令,并获取所述推送指令的报文中包含的媒体类型及URL地址;Step S202, parsing the push instruction, and acquiring a media type and a URL address included in the message of the push instruction;
本实施例中,在电视接收到手机发送的推送指令时,若选择接收则电视通过DLNA协议,解析出所述推送指令的报文中包含的文件类型如TYPE1及URL地址URL1。In this embodiment, when the television receives the push command sent by the mobile phone, if the television is selected for reception, the television parses the file type included in the push command message, such as TYPE1 and URL address URL1, through the DLNA protocol.
步骤S203,根据所述媒体类型和所述URL地址获取推送端推送的屏幕信息并播放。Step S203: Acquire screen information pushed by the push end according to the media type and the URL address, and play.
本实施例中,只有电视解析出的TYPE1为之前设定的video/RTSP时,才会访问URL1地址,并调用RTSP播放器进行播放。In this embodiment, only when the TYPE1 parsed by the TV is the previously set video/RTSP, the URL1 address is accessed, and the RTSP player is called to play.
在一优选实施例中,如图4所示,在上述图3的实施例的基础上,本实施例中,所述步骤S203包括:In a preferred embodiment, as shown in FIG. 4, on the basis of the foregoing embodiment of FIG. 3, in the embodiment, the step S203 includes:
步骤S2031,判断解析的所述媒体类型是否与所述推送端录制的媒体类型一致;Step S2031, determining whether the parsed media type is consistent with the media type recorded by the push end;
步骤S2032,若一致,则访问所述URL地址,并初始化播放器准备播放;Step S2032, if they are consistent, access the URL address, and initialize the player to prepare for playing;
步骤S2033,若不一致,则不访问所述URL地址,并初始化所述推送端的屏幕信息。In step S2033, if they do not match, the URL address is not accessed, and the screen information of the push end is initialized.
本实施例中,用户启动手机的录屏程序后,将录屏进程保存到本地的流媒体文件,再添加到RTSP服务器中,并生成可远程访问的URL,由于添加到RTSP服务器中的流媒体文件,其生成的可远程访问的地址设定为URL1,如RTSP://192.168.1.100:8090/screen;同时将文件类型设置设定为TYPE1,如video/RTSP。在电视接收到手机的推送指令后,会通过DLNA协议栈判断出接收到的推送指令中的文件类型是否与TYPE1一致。若电视解析的推送指令报文中的TYPE1为video/RTSP时,则访问URL1,并调用RTSP播放器播放屏幕信息。其他实施例中,可以选定其他服务器进行保存并生成对应的可远程访问的URL2。若电视解析的推送指令报文中的TYPE1不是video/RTSP时,则不能访问URL1,此时初始化手机的屏幕信息。In this embodiment, after the user starts the screen recording process of the mobile phone, the screen recording process is saved to the local streaming media file, and then added to the RTSP server, and a remotely accessible URL is generated, because the streaming media added to the RTSP server is generated. The file, the generated remotely accessible address is set to URL1, such as RTSP://192.168.1.100:8090/screen; and the file type setting is set to TYPE1, such as video/RTSP. After the TV receives the push command of the mobile phone, it determines whether the file type in the received push command is consistent with TYPE1 through the DLNA protocol stack. If TYPE1 in the push command message parsed by the TV is video/RTSP, access URL1 and call the RTSP player to play the screen information. In other embodiments, other servers may be selected for saving and generating a corresponding remotely accessible URL2. If the TYPE1 in the push command message parsed by the TV is not video/RTSP, the URL1 cannot be accessed, and the screen information of the mobile phone is initialized.
本发明还提供一种基于DLNA技术实现屏幕推送的系统,参照图5,在一实施例中,所述基于DLNA技术实现屏幕推送的系统包括推送端和接收端,参照图6,所述推送端包括:The present invention also provides a system for implementing screen push based on DLNA technology. Referring to FIG. 5, in an embodiment, the system for implementing screen push based on DLNA technology includes a push end and a receiving end. Referring to FIG. 6, the push end is provided. include:
屏幕录制模块101,用于将屏幕信息录制成流媒体文件并保存;The screen recording module 101 is configured to record screen information into a streaming media file and save the file;
本实施例中,推送端和接收端分别可以为手机、电视、电脑或IPAD等中的任一种,以下全文推送端以手机为例,接收端以电视为例。In this embodiment, the push end and the receiving end may respectively be any one of a mobile phone, a television, a computer, or an IPAD. The following full-text push end uses a mobile phone as an example, and the receiving end uses a television as an example.
本实施例中,推送端和接收端分别可以为手机、电视、电脑或IPAD等中的任一种,以下全文推送端以手机为例,接收端以电视为例。In this embodiment, the push end and the receiving end may respectively be any one of a mobile phone, a television, a computer, or an IPAD. The following full-text push end uses a mobile phone as an example, and the receiving end uses a television as an example.
本实施例中,所述屏幕信息包括图像、声音和视频。In this embodiment, the screen information includes images, sounds, and videos.
RTSP服务模块102,用于启动RTSP服务,将所述流媒体文件添加到所述RTSP服务中,并生成可RTSP远程访问的URL地址;The RTSP service module 102 is configured to start an RTSP service, add the streaming media file to the RTSP service, and generate a URL address that can be RTSP remote access;
本实施例中,在用户启动手机的录屏程序后,推送端将屏幕信息的录屏进程保存到本地的流媒体文件,然后再添加到RTSP(Real Time Streaming Protocal,实时流传输协议)服务器中,并生成可远程访问的URL(Uniform Resource Locator,统一资源定位器),如RTSP://192.168.1.100:8090/screen,并假定为URL1。其他实施例中,可以选定其他服务器进行保存并生成对应的可远程访问的URL2。In this embodiment, after the user starts the screen recording program of the mobile phone, the push end saves the screen recording process of the screen information to the local streaming media file, and then adds to the RTSP (Real Time). Streaming Protocal, real-time streaming protocol) server, and generate remotely accessible URLs (Uniform Resource Locator, Uniform Resource Locator), such as RTSP://192.168.1.100:8090/screen, and assumed to be URL1. In other embodiments, other servers may be selected for saving and generating a corresponding remotely accessible URL2.
本实施例中,录制的流媒体文件,可以在手机上进行录制的过程中,实时在电视上进行同步播放;也可以将手机上的屏幕信息录制完成后,再在电视上进行播放。In this embodiment, the recorded streaming media file can be played synchronously on the television in real time during the recording process on the mobile phone; or the screen information on the mobile phone can be recorded and then played on the television.
第一DLNA协议栈模块103,用于选定接收端,并向选定的接收端发送推送指令,所述推送指令中包含媒体类型和所述URL地址,并将所述推送指令中的媒体类型设置为RTSP类型。The first DLNA protocol stack module 103 is configured to select a receiving end, and send a push instruction to the selected receiving end, where the push instruction includes a media type and the URL address, and the media type in the push instruction Set to RTSP type.
本实施例中,手机通过DLNA协议栈向选定的电视发送推送指令,在推送指令的报文中设置URL为URL1,同时将文件类型设置为video/RTSP,假定为TYPE1。当电视通过DLNA协议栈判断出接收到的推送指令中的TYPE1为video/RTSP时,则访问URL1,并调用RTSP播放器播放屏幕信息。In this embodiment, the mobile phone sends a push command to the selected TV through the DLNA protocol stack, sets the URL to URL1 in the message of the push command, and sets the file type to video/RTSP, which is assumed to be TYPE1. When the TV determines through the DLNA protocol stack that the TYPE1 in the received push command is video/RTSP, it accesses URL1 and invokes the RTSP player to play the screen information.
在一优选实施例中,如图7所示,在上述图6的实施例的基础上,本实施例中,所述第一DLNA协议栈模块103包括:In a preferred embodiment, as shown in FIG. 7, on the basis of the foregoing embodiment of FIG. 6, in the embodiment, the first DLNA protocol stack module 103 includes:
扫描单元1031,用于扫描接收端信息,获取接收端的描述文件;The scanning unit 1031 is configured to scan the receiving end information, and obtain a description file of the receiving end;
本实施例中,手机和电视由同一路由器连接,用户开启手机和电视,电视开机后会自动开启DLNA服务,并广播其DMR(Digital Media Render,数字媒体渲染器)设备类型。手机开机后会自动开启DLNA服务,并搜索具有DMR模块功能的设备,并将搜索到的设备信息保存在设备列表中,其中所述设备信息包括设备名称以及其他针对该设备的描述字段。In this embodiment, the mobile phone and the TV are connected by the same router, and the user turns on the mobile phone and the television, and the DLNA service is automatically turned on after the TV is turned on, and the DMR (Digital Media) is broadcasted. Render, digital media renderer) device type. After the mobile phone is powered on, the DLNA service is automatically turned on, and the device having the DMR module function is searched, and the searched device information is saved in the device list, where the device information includes the device name and other description fields for the device.
第一单元1032,用于若获取的所述接收端信息包含有定制信息,则判定所述接收端具备屏幕推送功能;The first unit 1032 is configured to determine that the receiving end has a screen pushing function if the received receiving end information includes customized information.
第二单元1033,用于若获取的所述接收端信息不包含有定制信息,则判定所述接收端不具备屏幕推送功能。The second unit 1033 is configured to determine that the receiving end does not have a screen pushing function if the received receiving end information does not include the customized information.
本实施例中,推送端在搜索接收端时,会扫描接收端的描述文件,并检测该描述文件中是否包含有定制信息。该定制信息会根据实际需要设置,本实施例中,设置的电视定制信息为nScreenDevice。若扫描的接收端的描述文件中包含定制信息nScreenDevice,则认为其支持屏幕推送功能;否则认为是普通的DLNA设备,不具备屏幕推送能力。In this embodiment, when the push end searches for the receiving end, it scans the description file of the receiving end, and detects whether the description file contains customized information. The customized information is set according to actual needs. In this embodiment, the set TV customization information is nScreenDevice. If the description file of the receiving end of the scan contains the customized information nScreenDevice, it is considered to support the screen push function; otherwise it is considered to be an ordinary DLNA device and does not have the screen push capability.
选择单元1034,选定具备屏幕推送功能的接收端。The selecting unit 1034 selects a receiving end having a screen pushing function.
本实施例中,各种具备DMR模块功能的接收端,如手机、电脑或IPAD甚至另一台电视,会广播各自的DMR设备类型,作为推送端的手机则会根据搜索到的设备信息选定具备DMR模块功能的电视,并接收电视发送的获取屏幕信息请求。In this embodiment, various receiving ends having the function of the DMR module, such as a mobile phone, a computer, an IPAD, or even another television, broadcast their respective DMR device types, and the mobile phone as the push end selects and selects according to the searched device information. The DMR module features a TV and receives requests for screen information sent by the TV.
本实施例中,在用户触发推送端的DLNA推送程序的推送屏幕按钮事件后,该程序弹出显示设备列表以供用户选择,该列表只列出支持屏幕推送功能的设备。此时,用户就可以选择需要同步播放的接收端。In this embodiment, after the user triggers the push screen button event of the DLNA push program of the push end, the program pops up the display device list for the user to select, and the list only lists the devices that support the screen push function. At this point, the user can select the receiving end that needs to play synchronously.
参照图8,在一实施例中,所述接收端包括:Referring to FIG. 8, in an embodiment, the receiving end includes:
第二DLNA协议栈201,用于接收推送端发送的推送指令;a second DLNA protocol stack 201, configured to receive a push command sent by the push end;
解析模块202,用于解析所述推送指令,并获取所述推送指令的报文中包含的媒体类型及URL地址;The parsing module 202 is configured to parse the push instruction, and obtain a media type and a URL address included in the message of the push instruction;
本实施例中,在电视接收到手机发送的推送指令时,若选择接收则电视通过DLNA协议,解析出所述推送指令的报文中包含的文件类型如TYPE1及URL地址URL1。In this embodiment, when the television receives the push command sent by the mobile phone, if the television is selected for reception, the television parses the file type included in the push command message, such as TYPE1 and URL address URL1, through the DLNA protocol.
RTSP播放模块203,用于根据所述媒体类型和所述URL地址获取推送端推送的屏幕信息并播放。The RTSP playing module 203 is configured to acquire and play the screen information pushed by the push end according to the media type and the URL address.
本实施例中,只有电视解析出的TYPE1为之前设定的video/RTSP时,才会访问URL1地址,并调用RTSP播放器进行播放。In this embodiment, only when the TYPE1 parsed by the TV is the previously set video/RTSP, the URL1 address is accessed, and the RTSP player is called to play.
在一优选实施例中,如图9所示,在上述图8的实施例的基础上,本实施例中,所述RTSP播放模块203包括:In a preferred embodiment, as shown in FIG. 9, on the basis of the foregoing embodiment of FIG. 8, in the embodiment, the RTSP playback module 203 includes:
判断单元2031,用于判断解析的所述媒体类型是否与所述推送端录制的媒体类型一致;The determining unit 2031 is configured to determine whether the parsed media type is consistent with the media type recorded by the push end;
播放单元2032,用于若一致,则访问所述URL地址,并初始化播放器准备播放;The playing unit 2032 is configured to, if consistent, access the URL address, and initialize the player to prepare to play;
初始化单元2033,用于若不一致,则不访问所述URL地址,并初始化所述推送端的屏幕信息。The initializing unit 2033 is configured to not access the URL address if it is inconsistent, and initialize the screen information of the push end.
本实施例中,用户启动手机的录屏程序后,将录屏进程保存到本地的流媒体文件,再添加到RTSP服务器中,并生成可远程访问的URL,由于添加到RTSP服务器中的流媒体文件,其生成的可远程访问的地址设定为URL1,如RTSP://192.168.1.100:8090/screen;同时将文件类型设置设定为TYPE1,如video/RTSP。在电视接收到手机的推送指令后,会通过DLNA协议栈判断出接收到的推送指令中的文件类型是否与TYPE1一致。若电视解析的推送指令报文中的TYPE1为video/RTSP时,则访问URL1,并调用RTSP播放器播放屏幕信息。其他实施例中,可以选定其他服务器进行保存并生成对应的可远程访问的URL2。若电视解析的推送指令报文中的TYPE1不是video/RTSP时,则不能访问URL1,此时初始化手机的屏幕信息。In this embodiment, after the user starts the screen recording process of the mobile phone, the screen recording process is saved to the local streaming media file, and then added to the RTSP server, and a remotely accessible URL is generated, because the streaming media added to the RTSP server is generated. The file, the generated remotely accessible address is set to URL1, such as RTSP://192.168.1.100:8090/screen; and the file type setting is set to TYPE1, such as video/RTSP. After the TV receives the push command of the mobile phone, it determines whether the file type in the received push command is consistent with TYPE1 through the DLNA protocol stack. If TYPE1 in the push command message parsed by the TV is video/RTSP, access URL1 and call the RTSP player to play the screen information. In other embodiments, other servers may be selected for saving and generating a corresponding remotely accessible URL2. If the TYPE1 in the push command message parsed by the TV is not video/RTSP, the URL1 cannot be accessed, and the screen information of the mobile phone is initialized.
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only the preferred embodiments of the present invention, and are not intended to limit the scope of the invention, and the equivalent structure or equivalent process transformations made by the description of the present invention and the drawings are directly or indirectly applied to other related technical fields. The same is included in the scope of patent protection of the present invention.

Claims (17)

  1. 一种基于DLNA技术实现屏幕推送的方法,其特征在于,所述基于DLNA技术实现屏幕推送的方法包括以下步骤: A method for implementing screen pushing based on DLNA technology, wherein the method for implementing screen pushing based on DLNA technology comprises the following steps:
    将屏幕信息录制成流媒体文件并保存;Record screen information as a streaming file and save it;
    启动RTSP服务,将所述流媒体文件添加到所述RTSP服务中,并生成可RTSP远程访问的URL地址;Initiating an RTSP service, adding the streaming media file to the RTSP service, and generating a URL address that is RTSP remotely accessible;
    选定接收端,并向选定的接收端发送推送指令,所述推送指令中包含媒体类型和所述URL地址,并将所述推送指令中的媒体类型设置为RTSP类型。The receiving end is selected, and a push instruction is sent to the selected receiving end, where the pushing instruction includes a media type and the URL address, and the media type in the push instruction is set to an RTSP type.
  2. 如权利要求1所述的基于DLNA技术实现屏幕推送的方法,其特征在于,所述选定接收端的步骤包括: The method for implementing screen pushing based on the DLNA technology according to claim 1, wherein the step of selecting the receiving end comprises:
    扫描接收端,获取接收端的描述文件;Scan the receiving end to obtain a description file of the receiving end;
    若获取的所述描述文件包含有定制信息,则判定所述接收端具备屏幕推送功能;If the obtained description file includes customized information, determining that the receiving end has a screen pushing function;
    若获取的所述接收端信息不包含有定制信息,则判定所述接收端不具备屏幕推送功能;If the obtained receiving end information does not include the customized information, determining that the receiving end does not have a screen pushing function;
    选定具备屏幕推送功能的接收端。Select the receiver with the screen push function.
  3. 如权利要求2所述的基于DLNA技术实现屏幕推送的方法,其特征在于,所述扫描接收端,获取接收端的描述文件的步骤包括:The method for implementing a screen push based on the DLNA technology according to claim 2, wherein the step of acquiring the description file of the receiving end by the scanning receiving end comprises:
    建立与所述接收端之间的无线网络连接,并扫描所述接收端;Establishing a wireless network connection with the receiving end, and scanning the receiving end;
    在扫描到所述接收端时,判断所述接收端是否具有DMR模块功能;When scanning to the receiving end, determining whether the receiving end has a DMR module function;
    若是,则获取所述接收端的描述文件。If yes, the description file of the receiving end is obtained.
  4. 如权利要求1所述的基于DLNA技术实现屏幕推送的方法,其特征在于,所述屏幕信息包括:图像、声音和视频。The method for implementing screen pushing based on DLNA technology according to claim 1, wherein the screen information comprises: an image, a sound, and a video.
  5. 一种基于DLNA技术实现屏幕推送的方法,其特征在于,所述基于DLNA技术实现屏幕推送的方法包括:A method for implementing screen push based on DLNA technology, wherein the method for implementing screen push based on DLNA technology comprises:
    接收推送端发送的推送指令;Receiving a push instruction sent by the push end;
    解析所述推送指令,并获取所述推送指令的报文中包含的媒体类型及URL地址;Parsing the push instruction, and acquiring a media type and a URL address included in the message of the push instruction;
    根据所述媒体类型和所述URL地址获取推送端推送的屏幕信息并播放。Obtaining and playing the screen information pushed by the push end according to the media type and the URL address.
  6. 如权利要求5所述的基于DLNA技术实现屏幕推送的方法,其特征在于,所述根据所述媒体类型和所述URL地址获取推送端推送的屏幕信息并播放的步骤包括:The method for implementing screen push based on the DLNA technology according to claim 5, wherein the step of acquiring the screen information pushed by the push end according to the media type and the URL address and playing comprises:
    判断解析的所述媒体类型是否与所述推送端录制的媒体类型一致;Determining whether the parsed media type is consistent with the media type recorded by the push end;
    若一致,则访问所述URL地址,并初始化播放器准备播放。If they are consistent, access the URL address and initialize the player to play.
  7. 如权利要求6所述的基于DLNA技术实现屏幕推送的方法,其特征在于,所述判断解析的所述媒体类型是否与所述推送端录制的媒体类型一致的步骤之后还包括:The method for implementing a screen push based on the DLNA technology according to claim 6, wherein the step of determining whether the parsed media type is consistent with the media type recorded by the push end further comprises:
    若解析的所述媒体类型与所述推送端录制的媒体类型不一致,则不访问所述URL地址,并初始化所述推送端的屏幕信息。If the parsed media type does not match the media type recorded by the push end, the URL address is not accessed, and the screen information of the push end is initialized.
  8. 一种推送端,其特征在于,所述推送端包括:A push end, wherein the push end comprises:
    屏幕录制模块,用于将屏幕信息录制成流媒体文件并保存;a screen recording module for recording screen information into a streaming media file and saving;
    RTSP服务模块,用于启动RTSP服务,将所述流媒体文件添加到所述RTSP服务中,并生成可RTSP远程访问的URL地址;An RTSP service module, configured to start an RTSP service, add the streaming media file to the RTSP service, and generate a URL address that can be RTSP remote access;
    第一DLNA协议栈模块,用于选定接收端,并向选定的接收端发送推送指令,所述推送指令中包含媒体类型和所述URL地址,并将所述推送指令中的媒体类型设置为RTSP类型。a first DLNA protocol stack module, configured to select a receiving end, and send a push instruction to the selected receiving end, where the push instruction includes a media type and the URL address, and set a media type in the push instruction For the RTSP type.
  9. 如权利要求8所述的推送端,其特征在于,所述第一DLNA协议栈模块包括:The push end according to claim 8, wherein the first DLNA protocol stack module comprises:
    扫描单元,用于扫描接收端,获取接收端的描述文件;a scanning unit, configured to scan the receiving end, and obtain a description file of the receiving end;
    第一单元,用于若获取的所述接收端信息包含有定制信息,则判定所述接收端具备屏幕推送功能;a first unit, configured to determine that the receiving end has a screen pushing function if the received end information includes customized information;
    第二单元,用于若获取的所述接收端信息不包含有定制信息,则判定所述接收端不具备屏幕推送功能;a second unit, configured to determine that the receiving end does not have a screen pushing function if the received information of the receiving end does not include customized information;
    选择单元,用于选定具备屏幕推送功能的接收端。Select unit to select the receiver with screen push function.
  10. 如权利要求9所述的推送端,其特征在于,所述扫描单元包括:The push end according to claim 9, wherein the scanning unit comprises:
    扫描子单元,用于建立与所述接收端之间的无线网络连接,并扫描所述接收端;a scanning subunit, configured to establish a wireless network connection with the receiving end, and scan the receiving end;
    判断子单元,用于在扫描到所述接收端时,判断所述接收端是否具有DMR模块功能;a determining subunit, configured to determine, when scanning to the receiving end, whether the receiving end has a DMR module function;
    获取子单元,用于若是,则获取所述接收端的描述文件。Obtaining a subunit, if yes, acquiring a description file of the receiving end.
  11. 一种接收端,其特征在于,所述接收端包括:A receiving end, wherein the receiving end comprises:
    第二DLNA协议栈模块,用于接收推送端发送的推送指令;a second DLNA protocol stack module, configured to receive a push instruction sent by the push end;
    解析模块,用于解析所述推送指令,并获取所述推送指令的报文中包含的媒体类型及URL地址;a parsing module, configured to parse the push instruction, and obtain a media type and a URL address included in the message of the push instruction;
    RTSP播放模块,用于根据所述媒体类型和所述URL地址获取推送端推送的屏幕信息并播放。The RTSP playing module is configured to obtain and play the screen information pushed by the push end according to the media type and the URL address.
  12. 如权利要求11所述的接收端,其特征在于,所述RTSP播放模块包括:The receiving end according to claim 11, wherein the RTSP playing module comprises:
    判断单元,用于判断解析的所述媒体类型是否与所述推送端录制的媒体类型一致;a determining unit, configured to determine whether the parsed media type is consistent with a media type recorded by the push end;
    播放单元,用于若一致,则访问所述URL地址,并初始化播放器准备播放。The playing unit is configured to access the URL address if it is consistent, and initialize the player to play.
  13. 如权利要求12所述的接收端,其特征在于,所述RTSP播放模块还包括:The receiving end according to claim 12, wherein the RTSP playing module further comprises:
    初始化单元,用于若解析的所述媒体类型与所述推送端录制的媒体类型不一致,则不访问所述URL地址,并初始化推送端的屏幕信息。The initialization unit is configured to not access the URL address and initialize the screen information of the push end if the parsed media type is inconsistent with the media type recorded by the push end.
  14. 一种基于DLNA技术实现屏幕推送的系统,所述基于DLNA技术实现屏幕推送的系统包括推送端和接收端,A system for implementing screen pushing based on DLNA technology, wherein the system for implementing screen pushing based on DLNA technology comprises a push end and a receiving end,
    所述推送端包括:The push end includes:
    屏幕录制模块,用于将屏幕信息录制成流媒体文件并保存;a screen recording module for recording screen information into a streaming media file and saving;
    RTSP服务模块,用于启动RTSP服务,将所述流媒体文件添加到所述RTSP服务中,并生成可RTSP远程访问的URL地址;An RTSP service module, configured to start an RTSP service, add the streaming media file to the RTSP service, and generate a URL address that can be RTSP remote access;
    第一DLNA协议栈模块,用于选定接收端,并向选定的接收端发送推送指令,所述推送指令中包含媒体类型和所述URL地址,并将所述推送指令中的媒体类型设置为RTSP类型;a first DLNA protocol stack module, configured to select a receiving end, and send a push instruction to the selected receiving end, where the push instruction includes a media type and the URL address, and set a media type in the push instruction For the RTSP type;
    所述接收端包括:The receiving end includes:
    第二DLNA协议栈模块,用于接收推送端发送的推送指令;a second DLNA protocol stack module, configured to receive a push instruction sent by the push end;
    解析模块,用于解析所述推送指令,并获取所述推送指令的报文中包含的媒体类型及URL地址;a parsing module, configured to parse the push instruction, and obtain a media type and a URL address included in the message of the push instruction;
    RTSP播放模块,用于根据所述媒体类型和所述URL地址获取推送端推送的屏幕信息并播放。The RTSP playing module is configured to obtain and play the screen information pushed by the push end according to the media type and the URL address.
  15. 如权利要求14所述的基于DLNA技术实现屏幕推送的系统,其特征在于,所述第一DLNA协议栈模块包括:The system for implementing screen pushing based on the DLNA technology according to claim 14, wherein the first DLNA protocol stack module comprises:
    扫描单元,用于扫描接收端,获取接收端的描述文件;a scanning unit, configured to scan the receiving end, and obtain a description file of the receiving end;
    第一单元,用于若获取的所述接收端信息包含有定制信息,则判定所述接收端具备屏幕推送功能;a first unit, configured to determine that the receiving end has a screen pushing function if the received end information includes customized information;
    第二单元,用于若获取的所述接收端信息不包含有定制信息,则判定所述接收端不具备屏幕推送功能;a second unit, configured to determine that the receiving end does not have a screen pushing function if the received information of the receiving end does not include customized information;
    选择单元,用于选定具备屏幕推送功能的接收端。Select unit to select the receiver with screen push function.
  16. 如权利要求14所述的基于DLNA技术实现屏幕推送的系统,其特征在于,所述RTSP播放模块包括:The system for implementing screen pushing based on the DLNA technology according to claim 14, wherein the RTSP playing module comprises:
    判断单元,用于判断解析的所述媒体类型是否与所述推送端录制的媒体类型一致;a determining unit, configured to determine whether the parsed media type is consistent with a media type recorded by the push end;
    播放单元,用于若一致,则访问所述URL地址,并初始化播放器准备播放。The playing unit is configured to access the URL address if it is consistent, and initialize the player to play.
  17. 如权利要求16所述的基于DLNA技术实现屏幕推送的系统,其特征在于,所述RTSP播放模块还包括:The system for implementing a screen push based on the DLNA technology according to claim 16, wherein the RTSP play module further comprises:
    初始化单元,用于若解析的所述媒体类型与所述推送端录制的媒体类型不一致,则不访问所述URL地址,并初始化推送端的屏幕信息。The initialization unit is configured to not access the URL address and initialize the screen information of the push end if the parsed media type is inconsistent with the media type recorded by the push end.
PCT/CN2015/092898 2014-12-23 2015-10-27 Dlna technology-based screen push method and system WO2016101698A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410812403.6 2014-12-23
CN201410812403.6A CN105791351A (en) 2014-12-23 2014-12-23 Method and system for realizing screen pushing based on DLNA technology

Publications (1)

Publication Number Publication Date
WO2016101698A1 true WO2016101698A1 (en) 2016-06-30

Family

ID=56149197

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/092898 WO2016101698A1 (en) 2014-12-23 2015-10-27 Dlna technology-based screen push method and system

Country Status (2)

Country Link
CN (1) CN105791351A (en)
WO (1) WO2016101698A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110445625A (en) * 2018-05-02 2019-11-12 鸿合科技股份有限公司 A kind of large-size screen monitors broadcast controlling method and system
CN113189920A (en) * 2021-05-28 2021-07-30 重庆长安汽车股份有限公司 Android-based remote control method for vehicle-mounted entertainment information system
CN114553847A (en) * 2022-04-24 2022-05-27 深圳市前海日新数码科技有限公司 Stream media device management method, management device and readable storage medium

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106534519A (en) * 2016-10-28 2017-03-22 努比亚技术有限公司 Screen projection method and mobile terminal
CN106658175A (en) * 2016-11-15 2017-05-10 Tcl集团股份有限公司 Video display method and system for television terminal
CN107743116B (en) * 2017-08-21 2020-10-27 深圳市万普拉斯科技有限公司 Information transmission method and device, computer equipment and computer readable storage medium
CN108200468B (en) * 2018-01-09 2021-04-23 武汉斗鱼网络科技有限公司 Screen projection implementation method, storage medium, electronic device and system
CN112839250B (en) * 2018-01-30 2023-03-31 上海赛连信息科技有限公司 Wireless screen transmission method and device
CN110446065A (en) * 2019-08-02 2019-11-12 腾讯科技(武汉)有限公司 A kind of video recalls method, apparatus and storage medium
CN111182342A (en) * 2019-12-24 2020-05-19 腾讯科技(深圳)有限公司 Media data playing method, device, equipment and storage medium based on DLNA
CN112333492B (en) * 2020-09-25 2024-04-30 深圳Tcl新技术有限公司 Video return control method and device, intelligent large-screen equipment and storage medium
CN112351319B (en) * 2020-11-04 2024-02-09 深圳Tcl新技术有限公司 Network download service method, device and computer storage medium
CN114286137A (en) * 2021-08-23 2022-04-05 海信视像科技股份有限公司 Mirror image screen projection method, display device and terminal

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013063941A1 (en) * 2011-11-02 2013-05-10 中兴通讯股份有限公司 Screen sharing method and system for dlna terminal in home network
CN103338221A (en) * 2013-05-20 2013-10-02 珠海市魅族科技有限公司 Data transmission method, data reception method, and terminal
CN103338139A (en) * 2013-06-18 2013-10-02 华为技术有限公司 Multi-screen interaction method and device, and terminal equipment
KR101493772B1 (en) * 2014-09-20 2015-02-16 (주)캐스트프로 Device for multimedia data repeating

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013063941A1 (en) * 2011-11-02 2013-05-10 中兴通讯股份有限公司 Screen sharing method and system for dlna terminal in home network
CN103338221A (en) * 2013-05-20 2013-10-02 珠海市魅族科技有限公司 Data transmission method, data reception method, and terminal
CN103338139A (en) * 2013-06-18 2013-10-02 华为技术有限公司 Multi-screen interaction method and device, and terminal equipment
KR101493772B1 (en) * 2014-09-20 2015-02-16 (주)캐스트프로 Device for multimedia data repeating

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110445625A (en) * 2018-05-02 2019-11-12 鸿合科技股份有限公司 A kind of large-size screen monitors broadcast controlling method and system
CN113189920A (en) * 2021-05-28 2021-07-30 重庆长安汽车股份有限公司 Android-based remote control method for vehicle-mounted entertainment information system
CN114553847A (en) * 2022-04-24 2022-05-27 深圳市前海日新数码科技有限公司 Stream media device management method, management device and readable storage medium

Also Published As

Publication number Publication date
CN105791351A (en) 2016-07-20

Similar Documents

Publication Publication Date Title
WO2016101698A1 (en) Dlna technology-based screen push method and system
WO2019128174A1 (en) Method for playing audio, smart television and computer-readable storage medium
WO2018023926A1 (en) Interaction method and system for television and mobile terminal
WO2016165556A1 (en) Data processing method, device and system for video stream
WO2015043120A1 (en) Cloud file sharing method and system
WO2016029594A1 (en) Method and system for terminal to connect with display device
WO2017190451A1 (en) Picture pushing method and apparatus
WO2014187158A1 (en) Method, server, and terminal for controlling cloud sharing of terminal data
WO2017206377A1 (en) Method and device for synchronous playback of program
WO2014182066A1 (en) Content providing method and device
WO2016192270A1 (en) Method and device for rapid opencast of media file
WO2019010926A1 (en) Advertisement push method and apparatus, and computer readable storage medium
WO2017020649A1 (en) Audio/video playback control method and device thereof
WO2019137016A1 (en) Television programme recommendation method, device, and computer readable storage medium
WO2015018185A1 (en) Method and device for realizing distributed remote control, and television terminal and mobile terminal thereof
WO2017113600A1 (en) Video playing method and device
WO2018006581A1 (en) Smart-television playback method and apparatus
WO2019085543A1 (en) Television system and television control method
WO2017024876A1 (en) Television program broadcast method and device
WO2016206223A1 (en) Screenshooting method and system
WO2017071223A1 (en) Control method and device for television application
WO2013015471A1 (en) Electronic device
WO2019051901A1 (en) Terminal control method and device, and computer readable storage medium
WO2017084297A1 (en) Method and system for playing back multimedia files
WO2017096764A1 (en) Audio data output method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15871771

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 13/11/2017)

122 Ep: pct application non-entry in european phase

Ref document number: 15871771

Country of ref document: EP

Kind code of ref document: A1