Summary of the invention
Technical problem to be solved by this invention is to provide a kind of adaptation method of Streaming Media portable terminal, can be set to the media content that the user provides coupling according to the ability and the user of mobile device terminal.Can also make the mobile device terminal of lowest version by the stream media system compatibility of highest version, and the mobile device terminal of highest version also can be used on the stream media system of lowest version.
For solving the problems of the technologies described above, the invention provides a kind of adaptation method of Streaming Media portable terminal, comprise the steps:
A. mobile device terminal is to the stream media system reporting terminal capacity information;
B. stream media system reads the corresponding apparatus ability information according to the terminal ability information that receives from configuration server, and the part that repeats in the pairing device capability information of every terminal ability information upgraded according to default priority, the device capability information that priority is high is replaced the low device capability information of priority;
C. carry out selection of media content coupling according to device capability information, send into the stream media system buffer area after finding the media content of coupling, beginning to carry out from the stream media system buffer area, sending when Media Stream transmits this media content.
Described method can also may further comprise the steps:
If d. stream media system does not find the media content of coupling, stream media system returns error code information to mobile device terminal.
Described step a may further include: the user preference information that mobile device terminal reports mobile device user to be provided with to stream media system in the time of the stream media system reporting terminal capacity information;
Described step b may further include: stream media system synthesizes terminal ability information and the user preference information obtained earlier, and uses the terminal ability information after synthesizing to read the corresponding apparatus ability information from configuration server.
In the described method, the method that stream media system synthesizes the terminal ability information that obtains and user preference information can be: for each terminal ability information, if mobile device user is provided with corresponding user preference information, then use active user's preference information item to replace corresponding terminal ability information item.Be: if mobile device user is provided with corresponding user preference information, then corresponding user preference information is set to first-selection, and other information setting of same classification are alternative.
In the described method, can set compatible terminal ability information and user preference information at the mobile device terminal and the stream media system of different editions.
In the described method, stream media system according to the terminal ability information that receives when configuration server reads the corresponding apparatus ability information, for the terminal ability information of highest version, stream media system ignore wherein can not identification field.
In the described method, when configuration server read the corresponding apparatus ability information, for the terminal ability information of lowest version, stream media system can return the field of terminal ability information respective version to stream media system according to the terminal ability information that receives.
Terminal ability information in the described method can comprise: the mobile packet switch stream media services specification version information that the codec format that mobile device terminal display screen size information, mobile device terminal are supported, mobile device terminal are supported.
The adaptation method of the application of the invention Streaming Media portable terminal, coded format, the display window size that can realize the streaming medium content that mobile device terminal receives are complementary with mobile device terminal, can also realize the mobile device terminal of different editions and the compatibility of stream media system.
Embodiment
As shown in Figure 1, for the signal of the adaptation method of embodiment of the invention Streaming Media portable terminal transmits key diagram, step comprises:
1, mobile device terminal is to the information acquisition module reporting ability information of stream media system, and these information are carried in RTSP or HTTP request message.Be divided into two classes in this information, a class is the screen size that comprises mobile device terminal, mobile device information such as the codec format of support, and whether the PSS version of support information such as supports to the optional function in the version.Uaprof to the wap agreement supports situation, and this part information is preserved in the terminal ability information module, and this category information carries in " x-wap-profile " field; Another kind of is individual subscriber hobby configuration information, preserves in the user preference information module; This category information carries in " x-wap-profile-diff " field.For type I information, use url list to represent.
2, after stream media system obtains terminal ability information and user preference information by the information acquisition module from mobile device terminal, pass to information collocation module by the information acquisition module.
3, information collocation module is gone equipment disposition server fetch equipment ability information according to the URL information that comprises in the url list information, and the interaction protocol that obtains URL information is a http protocol.
4, the equipment disposition server information content of being located to the information collocation module Return URL of stream media system.
5, information collocation module passes to the information analysis module with the device capability information of configuration.
6, information analysis module is decomposed the information that each URL located, and ignores processing for unrecognizable field.The part of the repetition that each URL obtains after decomposing is changed according to the priority of URL, and the information among the high URL of priority is replaced the information among the low URL of priority.Device capability information and user preference information that integrated treatment obtains are synthesized, replace terminal ability information corresponding equipment ability information with user preference information corresponding equipment ability information.Generate final device capability information.
7, information analysis module sends to the capabilities match module with final device capability information.
If 8, the capabilities match module is carried out the selection of media content coupling according to final device capability information and found only media content, then under placeholder record on the stream media system, carry out to select this media content when Media Stream transmits beginning.And matching result sent to information sending module.
9, information sending module is to mobile device terminal feedback terminal capabilities match result, the result of coupling carried with " x-wap-profile-warning " field of the response message of RTSP/HTTP return.
As shown in Figure 2, for adopting HTTP, one embodiment of the invention transmits the flow chart of adaptation method of the Streaming Media portable terminal of the adaptive mode of terminal.
When mobile device terminal adopted the HTTP mode to obtain the SDP file of Streaming Media, mobile device terminal was carried to terminal ability information to stream media system in the HTTP message header.Stream media system is according to the URL address of mobile device terminal information and the selection of user preference, by the equipment disposition server, obtain the mobile device terminal ability, according to terminal capability, carry out the media content coupling, return the SDP information of appropriate media content and give mobile device terminal.It is adaptive to finish terminal capability.
Concrete steps comprise:
(step 301) user imports the media play mode of own preference by mobile device UI interface, and for example, the user selects to adopt AMR-WB form audio plays content.Mobile device terminal is supported more audio format, comprises the AMR-WB form.
(step 302) user adopts the SDP file of http protocol to stream media system request appropriate media content by mobile device terminal.Wherein in the HTTP message header, carry the URL address with one or more x-wap-profile field, in this example the supposition have three, priority with put in order identical.Carry user to set information with one or more x-wap-profile-diff field.Have only one in this example, adopt following form:
x-wap-profile-diff:audio/AMR-WB
The information acquisition module of (step 303) stream media system is according to the URL address information of carrying among the x-wap-profile, adopts http protocol to obtain information to the URL address three times respectively, obtains the unanimity of stipulating among the information format of returning such as the 3GPP PSS R6.
(step 304) stream media system is resolved return information according to the form of stipulating among the 3GPP PSS R6, for the part that attribute repeats, uses the content of the high URL appointment of priority to cover the content of the low URL appointment of priority.Find the audio format field at last, the audio format of all other is set to alternative, and the AMR-WB audio format is decided to be preferably.
The information acquisition module of (step 305) stream media system carries out the media formats coupling, after coupling is finished, returns in the response at HTTP, and x-wap-profile-warning carries matching result with field.Wherein 200 expression optimum Match successes.201 expression best match successes, 202 expressions are minimum, and the match is successful.203 expression couplings are unsuccessful.These mode fields with the ASCII character comma separately.If optimum Match is successfully returned:
x-wap-profile-warning:200,201,202
Wherein 201,202 can return as required.
Return if coupling is unsuccessful:
x-wap-profile-warning:203
If minimum the match is successful returns:
x-wap-profile-warning:202
Minimum coupling represents to mate the poorest situation of mobile device result of broadcast, selects the poorest medium of effect from the medium that satisfy the mobile device ability to play.For with a kind of media content, that can simply set the media content size minimum is the poorest coupling of result of broadcast.
Best match, result of broadcast matches some than minimum, if exist a plurality ofly, selects one at random by stream media system.Media play effect quality can be judged from media file size merely.
The medium coupling can have more algorithm, and this example is not enumerated one by one.
(step 306) for the content that optimum Match is arranged, stream media system returns the SDP content of optimum Match content.For the content that does not have optimum Match, stream media system returns the SDP file of best match content and minimum matching content.If there is not minimum coupling, then do not return the SDP content.
(step 307) for the SDP that does not have the optimum Match content, it still is that minimum coupling is carried out follow-up play that the user can select best match.
As shown in Figure 3, for adopting RTSP, another embodiment of the present invention transmits the flow chart of adaptation method of the Streaming Media portable terminal of the adaptive mode of terminal.
Mobile device terminal is when playing stream media, adopt the DISCRIBE message request of RTSP to obtain SDP file, in the RTSP message header, carry the mobile device terminal ability information, stream media system obtains terminal ability information according to URL slave unit configuration server, and carrying out the terminal ability information correction according to user preference, stream media system is according to the suitable media content of terminal ability information coupling.The SDP file of media content is returned to mobile device terminal, after mobile device terminal receives SDP file, continue follow-up RTSP flow process, can begin to carry out media play.
Concrete steps comprise:
(step 401) user imports the media play mode of own preference by mobile device UI interface, and for example, the user selects to adopt the content of bandwidth less than 100kbps.
(step 402) user adopts the SDP file of the DISCRIBE order of RTSP agreement to stream media system request appropriate media content by mobile device terminal.Wherein in the RTSP message header, carry the URL address with one or more x-wap-profile field, in this example the supposition have three, priority with put in order identical.Carry user to set information with one or more x-wap-profile-diff field.Have only one in this example, adopt following form:
x-wap-profile-diff:bitrate/100
The information acquisition module of (step 403) stream media system is according to the URL address information of carrying among the x-wap-profile, adopts http protocol to obtain information to the URL address three times respectively, obtains the unanimity of stipulating among the information format of returning such as the 3GPP PSS R6.
(step 404) stream media system is resolved return information according to the form of stipulating among the 3GPP PSS R6, for the part that attribute repeats, uses the content of the high URL appointment of priority to cover the content of the low URL appointment of priority.Find the bandwidth field at last, 100kbps is the highest as priority.Other bandwidth are as low priority.
The information acquisition module of (step 405) stream media system carries out the media formats coupling, after coupling is finished, returns in the response at the DISCRIBE of RTSP agreement, and x-wap-profile-warning carries matching result with field.Wherein 200 expression optimum Match successes.201 expression best match successes, 202 expressions are minimum, and the match is successful.203 expression couplings are unsuccessful.These mode fields with the ASCII character comma separately.If optimum Match is successfully returned:
x-wap-profile-warning:200,201,202
Wherein 201,202 can return as required.
Return if coupling is unsuccessful:
x-wap-profile-warning:203
If minimum the match is successful returns:
x-wap-profile-warning:202
Minimum coupling represents to mate the poorest situation of mobile device result of broadcast, selects the poorest medium of effect from the medium that satisfy the mobile device ability to play.For with a kind of media content, that can simply set the media content size minimum is the poorest coupling of result of broadcast.
(step 406) for the content that optimum Match is arranged, stream media system returns the SDP content of optimum Match content.For the content that does not have optimum Match, stream media system returns the SDP file of minimum matching content.If there is not minimum coupling, then do not return the SDP content.Because the RTSP protocols limit, the user can not independently select preferable media content to play.