A kind of method that media resource pre-review information is provided
Technical field
The present invention relates to UPnP (Universal Plug and Play, abbreviation UPnP) audio frequency and video (Audio Video, abbreviation AV) system technical field, be specifically related to a kind of method that media resource pre-review information is provided in this technical field.
Background technology
UPnP is a kind of general plug and play technique that is used for home network that is proposed by Microsoft company.Complete UPnP service system is made of jointly the network of supporting UPnP and the equipment that meets the UPnP standard, and UPnP can connect PC, various smart machine and wireless device pellucidly, and network enabled and point-to-point automatic discovery and self-configuration.Along with the development of digitizing technique, increasing household equipment begins to support the UPnP technology.By UPnPAV (Audio Video, Voice ﹠ Video) system technology, the user can use the media player of support UPnP AV system and the media resource on the playing media server easily, and does not need to do any configuration.The user selects media resource to play by the media resource on the media player query media servers.Fig. 1 is the syndeton schematic diagram of media player and media server in the prior art, and they get up by home-network linkups, uses the UPnP agreement to communicate.
Send the request of inquiry media resource to media server by media player as the user, media server can return to media player with the form of Word message with the feature of corresponding media resource, media player is presented to the user after these information vias that return are made up, the user selects media resource to use by reading these information.But media resource itself often has very big amount of information, only is difficult to accurately, is described intuitively by Word message, and user's expectation can be understood media resource in more direct and lively mode.
The UPnP AV system that in UPnP equipment system framework, defines, stipulated to meet the UPnPAV system equipment the function that must support, wherein with regard to content directory service (CDS, Content Directory Service) function.For instance, media services equipment includes miscellaneous equipment and wants the dissimilar content of visiting, for example music, video, still image or the like, therefore media services equipment can provide the interface of a visit, by the resources such as video, audio frequency and still image of this interface on can the access medium service equipment.In order to allow the user can enjoy these contents, the user must can browse the object that exists on the media services equipment, select a specific object, and allow this project on suitable apparatus for media playing, play, for example audio player can the playing back music object, TV can the displaying video content, and an electronics frame can show still image.In order to make things convenient for the user to initiate these operations as far as possible by various apparatus for media playing, media services equipment need come content on the browsing media service equipment for apparatus for media playing provides a unified mechanism, obtain the details of each content object, the purpose of control directory services that Here it is.
Control directory services also provides and searches/stores service, and this service allows client (as apparatus for media playing) can locate specific object (as song, film, image etc.), these specific to as if media services equipment can provide.Control directory services can be used for enumerating movie listings, the current TV program list of broadcasting (EPG just) on the list of songs that is stored on the MP3 player, the tabulation of the still image on the slide projector, the DVD jukebox, be stored in list of songs on the CD jukebox, be stored in the rendition list on the PVR (personal video recording) or the like, and the content of many close types also can be enumerated by control directory services.To these equipment that comprises polytype content (as HMP3, MPEG2, JPEG etc.), the example of CDS just can be enumerated these all objects, no matter what type they are.Media server responds the browse request of media player by the CDS of UPnPAV architecture regulation.CDS has defined a dissimilar object that type systematic is described to be managed, and its base class is object, and other class all derives from from base class.The attribute of CDS definition and element are used for describing the feature of the object (comprising media resource) of CDS management.The feature of media resource is used XML (Extension Markup Language by CDS, extend markup language) " description " attribute of language definition, " res " element wait and describe, and these descriptions all are to be described with the feature of mode word to media resource.When media player requires media server that the characteristic information of specifying media resource is provided, media server will comprise the feedback information such as media characteristic of above-mentioned attribute and element to media player like this, and the information is here packed in the mode of XML language.Media player is presented to the user with these Word message combinations after obtaining these features, the user understands the feature of media resource by reading these information.
The difference of element and attribute is that an element can comprise a plurality of attributes and daughter element, and attribute itself can only have oneself property value, " description " attribute is with the feature of this media resource of formal description of a character string, such as brief introduction of this medium etc.; " res " element has then specifically comprised the various information of these medium, as code stream of the length of media resource, the position of depositing, coding etc.UPnP demand of technical standard CDS uses the XML language to define and express, and " res " that describe the media resource attribute such as being used for of using in the UPnP the inside uses XML language definition like this:
<xsd:element?name=″res″type=″didl-lite:resType″/>
<xsd:complexType?name=″resType″mixed=″true″>
<xsd:annotation>
<xsd:documentation>A′res′element?indentifies?a?resource.A?resource?is?typically
some?type?of?a?binary?asset,such?as?photo,song,video,etc.A′res′element?contains?a
uri?that?identifies?the?resource.</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:restriction?base=″xsd:string″>
<xsd:attribute?name=″importUri″type=″xsd:anyURI″/>
<xsd:attribute?name=″protocolInfo″type=″xsd:string″use=″required″/>
<xsd:attribute?name=″size″type=″xsd:unsignedLong″/>
<xsd:attribute?name=″duration″type=″xsd:string″/>
<xsd:attribute?name=″bitrate″type=″xsd:unsignedInt″/>
<xsd:attribute?name=″sampleFrequency″type=″xsd:unsignedInt″/>
<xsd:attribute?name=″bitsPerSample″type=″xsd:unsignedInt″/>
<xsd:attribute?name=″nrAudioChannels″type=″xsd:unsignedInt″/>
<xsd:attribute?name=″resolution″>
<xsd:simpleType>
<xsd:restriction?base=″xsd:string″>
<xsd:pattern?value=″[0-9]+x[0-9]+″/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
<xsd:attribute?name=″colorDepth″type=″xsd:unsignedInt″/>
<xsd:attribute?name=″protection″type=″xsd:string″/>
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
Present UPnPAV architecture does not provide the function of preview media resource; Can only be described with written form the media resource feature, be difficult to make the user that the media resource feature is carried out accurately, got information about; May cause the user to use the media resource that does not conform to original idea, thereby influence the normal use of user, waste user's time media resource.
Summary of the invention
The technical problem to be solved in the present invention is to provide a kind of method that media resource pre-review information is provided, the shortcoming that the CDS that overcomes prior art can only be described with written form the media resource feature, and can be fast positioning media resource characteristic exactly.
The present invention adopts following technical scheme:
This method that media resource pre-review information is provided comprises step:
A, the preview attribute or the preview element of preview resource characteristic described in definition in the control directory services of UPnP Voice ﹠ Video system;
B, media server are given the value of corresponding preview attribute or preview element to the preview resource of media resource correspondence, the value of described preview attribute or preview element comprises the positional information of described preview resource, and when the request of the output preview resource of receiving media player, export the preview resource of the value appointment of preview attribute or preview element to media player, comprise the value of described preview attribute or preview element in the described request.
Described technical scheme, wherein: described step B may further comprise the steps:
B1, media player and media server connect;
B2, media player send the request of inquiry media resource information to media server;
B3, media server will comprise that the information of the value of preview attribute or preview element sends to media player;
B4, media player send the request of obtaining the preview resource to media server;
B5, media server are to the preview resource of media player output by the value appointment of preview attribute or preview element.
Described technical scheme, wherein: described preview resource is generated automatically by the previewing module of media server.
Described technical scheme, wherein: the value of described preview attribute or preview element comprises the positional information of preview resource.
Described technical scheme, wherein: the value of described preview attribute or preview element is finished editor automatically by manual input editing or by media server.
Technical scheme of the present invention provides preview function for the media resource on the media server, the user can be before using media resource quick positioning media resource characteristic exactly, come to understand accurately, intuitively the feature of media resource by browsing the preview resource, select suitable media resource to use then, operate friendly and comfort level thereby improved the user.
Description of drawings
Fig. 1 is the syndeton schematic diagram of media player and media server in the prior art;
Fig. 2 is an embodiment of the invention flow chart.
Embodiment
Below in conjunction with drawings and Examples the present invention is described in further detail:
In the UPnP AV system that defines in UPnP equipment system framework, expansion CDS function increases the preview feature that preview attribute or preview element are described the object class, and it includes the information such as position of preview resource, to realize the preview of media resource.Present embodiment is that example describes with preview element previewres, for example can use XML language definition preview element previewres as follows:
<xsd:element?name=″previewres″type=″didl-lite:resType″/>
<xsd:complexType?name=″resType″mixed=″true″>
<xsd:annotation>
<xsd:documentation>A′previewres′element?indentifies?a?resource.A?resource?is
typically?some?type?of?a?binary?asset,such?as?photo,song,video,etc.A′previewres′
element?contains?a?uri?that?identifies?the?resource.</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:restriction?base=″xsd:string″>
<xsd:attribute?name=″importUri″type=″xsd:anyURI″/>
<xsd:attribute?name=″protocolInfo″type=″xsd:string″use=″required″/>
<xsd:attribute?name=″size″type=″xsd:unsignedLong″/>
<xsd:attribute?name=″duration″type=″xsd:string″/>
<xsd:attribute?name=″bitrate″type=″xsd:unsignedInt″/>
<xsd:attribute?name=″sampleFrequency″type=″xsd:unsignedInt″/>
<xsd:attribute?name=″bitsPerSample″type=″xsd:unsignedInt″/>
<xsd:attribute?name=″nrAudioChannels″type=″xsd:unsignedInt″/>
<xsd:attribute?name=″resolution″>
<xsd:simpleType>
<xsd:restriction?base=″xsd:string″>
<xsd:pattern?value=″[0-9]+x[0-9]+″/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
<xsd:attribute?name=″colorDepth″type=″xsd:unsignedInt″/>
<xsd:attribute?name=″protection″type=″xsd:string″/>
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
No matter the editor of the value of preview attribute or preview element generates or manual input automatically, process is very simple, directly the URL address of preview resource is composed to preview attribute or preview element to get final product.
Preview element " previewres " is the same with element " res " to be an element that is used for describing base class object, because the element that defines in the XML language can have a plurality of sub-attributes, consider from autgmentability in the future, use this mode extensibility of increase preview element better.The preview feature that present embodiment is described the object class with increase definition preview element " previewres " in CDS is that example describes, the type of " res " element that defines among the type of preview element and the CDS is the same, its content includes the positional information of preview resource, the characteristic information (as information such as length, authors) that can also comprise preview resource itself is to realize the preview function of media resource.For media resource, can get segment wherein, provide with the form of preview resource.The user is before using media resource, and the preview element of this media resource that provides by browsing media server in advance or the preview resource that preview attribute is pointed to can be understood the feature of media resource accurately, intuitively.
As shown in Figure 2, embodiment of the invention flow process is as follows:
1. media server is when increasing media resource, edits the preview element of preview resource of this media resource correspondence or the value of preview attribute simultaneously, and wherein the value of this preview element or preview attribute comprises the information such as position of the preview resource of this media resource correspondence.
For example: in media server as the value of the preview element of following mode editing media resource correspondence:
Media resource 1. preview element " http: // 192.168.0.1/1_preview.avi ", (value of the preview element of media resource 1 correspondence);
Media resource 2. preview element " http: // 192.168.0.1/2_preview.avi ", (value of the preview element of media resource 2 correspondences).
The preview resource can be existing media resource, as one section video media asset, placard etc.; Also can be by the preview generation module of media server.The preview generation module is to utilize various existing technology to generate the corresponding preview resource of media resource, as can adopt the mode of using image decoder to generate corresponding thumbnail image to generate the image preview resource for image resource, can adopt the mode of one section continuous audio frequency generation corresponding audio preview resource in the direct extraction audio resource to generate the audio preview resource for audio resource.The crucial camera lens that can adopt " Shot Detection " technology to extract in the video resource for video resource generates corresponding video preview resource, camera lens is meant a series of continuous recording picture frames, be used to represent the continuous action of a time period or same place, " Shot Detection " technology is by certain algorithm each camera lens in the video to be extracted, and realizes analysis, tissue and index to video content.The value of preview element or preview attribute can be imported and revise by hand, or finishes editor automatically by media server.
2. media player and media server connect.
Media player and media server connect, and prepare the inquiry media resource.
3. receive the request of media player inquiry media resource information.
Media player sends querying command to media server, and request obtains the characteristic information of the media resource on the media server.
4. provide Query Result to media player, comprise the information such as value of the preview element of media resource correspondence.
The result that media server will be inquired about returns to media player, comprises the value (as position of preview resource etc.) of the preview element of media resource correspondence in the information of returning.
5. receive the request of the preview resource of media player requirement output medium resource.
The content information of the preview element that media player can return according to step 4 requires the preview resource of media server output medium resource correspondence.Suppose that media player and media server all support the mode of HTTP mode transmission medium, the request that only need send " HTTP-GEThttp: // 192.168.0.1/1_preview.avi " to media server of the media player preview resource that obtains media file 1 in the step 1 gets final product so.
6. to the preview resource of media player output medium resource correspondence.
By the preview resource of media server to media player output medium resource correspondence, the user just can the preview media resource.
7. receive the request of media player requirement output appointment media resource.
After the preview media resource, if require to use certain media resource, then media player requires media server to export this media resource.
8. specify media resource to media player output.
By the media resource of media server, so specify media resource just on media player, to demonstrate to media player output request.
Though pass through with reference to the preferred embodiments of the present invention, the present invention is illustrated and describes, but those of ordinary skill in the art should be understood that, can do various changes to it in the form and details, and the spirit and scope of the present invention that do not depart from appended claims and limited.