CN106791546B - Media data playing method and device - Google Patents
Media data playing method and device Download PDFInfo
- Publication number
- CN106791546B CN106791546B CN201710005498.4A CN201710005498A CN106791546B CN 106791546 B CN106791546 B CN 106791546B CN 201710005498 A CN201710005498 A CN 201710005498A CN 106791546 B CN106791546 B CN 106791546B
- Authority
- CN
- China
- Prior art keywords
- media
- media data
- factory
- primary
- play
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/443—OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
- H04N21/4431—OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB characterized by the use of Application Program Interface [API] libraries
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/85—Assembly of content; Generation of multimedia applications
- H04N21/858—Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot
- H04N21/8586—Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot by using a URL
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/76—Television signal recording
- H04N5/765—Interface circuits between an apparatus for recording and another apparatus
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Library & Information Science (AREA)
- Software Systems (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The present invention relates to a kind of media data playing method and devices, this method comprises: obtaining media data address;Using the media data address as call parameters, standard media data playback interface is called;By calling the standard media data playback interface, whether the primary media play mode of detection trigger is supported to play media data corresponding to the media data address;When detecting that support plays, primary media play mode is matched for the media data;When detect do not support play when, for the media data matching extension media play mode;The media data is played according to the matched media play mode.Media data playing method and device provided by the invention improve the compatibility to media data.
Description
Technical field
The present invention relates to media data processing technology fields, more particularly to a kind of media data playing method and device.
Background technique
Media data includes audio data, video data or its combination, is for storing and transmitting a kind of heavy of information
Want medium.Operating system can provide the ability of processing media data at present, and the application program run in operating system can
Media data is played with the media data processing capacity that provides by operating system.
However, the media data processing capacity that operating system provides is limited, all media data lattice can not be supported
The broadcasting of formula.For example the Android operation system of certain versions does not just support the video of MPEG2 coded format, wherein mpeg table shows
Moving Picture Experts Group, means Motion Picture Experts Group.In this case needing user to install manually can
With the play-back application for the media data format that play operation system is not supported, and needing to play the matchmaker not supported every time
The play-back application is jumped to when volume data format to play out, and causes operating system to the poor compatibility of media data.
Summary of the invention
Based on this, it is necessary to for realizing the technology for not supporting the playing efficiency of media data low operating system at present
Problem provides a kind of media data playing method and device.
A kind of media data playing method, comprising:
Obtain media data address;
Using the media data address as call parameters, standard media data playback interface is called;
By calling the standard media data playback interface, whether the primary media play mode of detection trigger is supported to broadcast
Put media data corresponding to the media data address;
When detecting that support plays, primary media play mode is matched for the media data;
When detect do not support play when, for the media data matching extension media play mode;
The media data is played according to the matched media play mode.
A kind of media data playing device, comprising:
Address acquisition module, for obtaining media data address;
Standard media data playback interface calling module, for calling mark using the media data address as call parameters
Quasi- media data playback interface;
Media play mode matching module, for by calling the standard media data playback interface, detection trigger to be former
Whether raw media play mode is supported to play media data corresponding to the media data address;It supports to play when detecting
When, primary media play mode is matched for the media data;When detect do not support play when, be the media data
Media play mode with extension;
Playing module, for playing the media data according to the matched media play mode.
Above-mentioned media data playing method and device are supported to play or do not support to broadcast for primary media play mode
The case where putting media data corresponding to media data address can realize broadcasting, realize the extension of ability to play, improve
Compatibility.And primary media play mode is preferentially used when playing, it does not support to broadcast in primary media play mode
When putting, just using the media play mode of extension, it can guarantee the stability played as far as possible.Furthermore it is unified to pass through calling standard
Media data playback interface, so that it may realize and primary media play mode is supported to play and do not support the media number played
According to broadcasting, have play media data demand application program do not need to do additional improvement, improve versatility.
Detailed description of the invention
Fig. 1 is in one embodiment for realizing the schematic diagram of internal structure of the electronic equipment of media data playing method;
Fig. 2 is the flow diagram of media data playing method in one embodiment;
Fig. 3 is the flow diagram of media data playing method in another embodiment;
Fig. 4 is the media factory of extension to be called, with inspection by calling standard media data playback interface in one embodiment
Survey the flow diagram whether primary media factory supports the step of playing media data corresponding to media data address;
Fig. 5 is to inject media factory of the custom code to add extension to primary media services process in one embodiment
The step of flow diagram;
Fig. 6 is in one embodiment by calling standard media data playback interface, the primary media play of detection trigger
Whether mode supports the flow diagram for the step of playing media data corresponding to media data address;
Fig. 7 is to inject matchmaker of the custom code to add extension to primary media services process in a concrete application scene
The flow diagram of the step of body factory;
Fig. 8 is the flow diagram of media data playing method in a concrete application scene.
Fig. 9 is the structural block diagram of media data playing device in one embodiment;
Figure 10 is the structural block diagram of media data playing device in another embodiment.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
Fig. 1 is in one embodiment for realizing the schematic diagram of internal structure of the electronic equipment of media data playing method.
Referring to Fig.1, which includes processor, the non-volatile memory medium, built-in storage, network connected by system bus
Interface, display screen and input unit.Wherein, the non-volatile memory medium of electronic equipment is stored with operating system, is also stored with
A kind of media data playing device, the media data playing device is for realizing a kind of media data playing method.Electronic equipment
Processor for provide calculate and control ability, support the operation of entire electronic equipment.Built-in storage in electronic equipment is
The operation of media data playing device in non-volatile memory medium provides environment.Computer can be stored in the built-in storage
Readable instruction when the computer-readable instruction is executed by processor, may make processor to execute a kind of media data playing method.
The network interface of electronic equipment is used to download the media data of document form or streaming.The display screen of electronic equipment can be liquid
Crystal display screen or electric ink display screen, the input unit of electronic equipment can be the touch layer covered on display screen, can also
To be the key being arranged on electronic equipment casing, trace ball or Trackpad, external keyboard, Trackpad or mouse can also be
Deng.The electronic equipment can be personal computer or mobile electronic device, mobile electronic device include mobile phone, tablet computer,
At least one of personal digital assistant or wearable device etc..It will be understood by those skilled in the art that being tied shown in Fig. 1
Structure, the only block diagram of part-structure relevant to application scheme are not constituted and are applied thereon to application scheme
The restriction of electronic equipment, specific electronic equipment may include more certain than more or fewer components shown in Fig. 1, or combination
Component, or with different component layouts.
Fig. 2 is the flow diagram of media data playing method in one embodiment.The present embodiment is mainly answered in this way
It is illustrated for the electronic equipment in above-mentioned Fig. 1.Referring to Fig. 2, which specifically comprises the following steps:
S202 obtains media data address.
Wherein, media data address is the data for indicating media data position, can be media data and sets in electronics
Standby local store path, is also possible to the URL of media data.URL is the abbreviation of Uniform Resource Locator, table
Show uniform resource locator, is the expression of the position and access mode to the resource that can be obtained from network, is network subscript
The address of quasi- resource.Media data address can be obtained from electronic equipment local or network.Media are properly termed as media.
S204 calls standard media data playback interface using media data address as call parameters.
Wherein, standard media data playback interface is a kind of application programming interface for standard that operating system provides
(Application Programming Interface, API), for providing media data processing capacity.In Android
(Android) in operating system, standard media data playback interface is the SDK (Software of Android operation system
Development Kit, Software Development Kit) provided by MediaPlayer interface.It is operated at form (Windows) and is
There is also corresponding standard media numbers in system, Apple Desktop operating system (Mac OS) and apple Mobile operating system (iOS)
According to playback interface.
Specifically, electronic equipment can obtain media data address by running on the application program in operating system, pass through
The application call standard media data playback interface, and with being passed to media data to the standard media data playback interface
Location.It calls standard media data playback interface that can generate corresponding media data and plays object, which plays object fortune
Row is in the process of application program.
S206, by calling standard media data playback interface, whether the primary media play mode of detection trigger is supported
Play media data corresponding to media data address.
Wherein, media data corresponding to media data address is media data represented by media data address.Media
Broadcast mode refers to the computer disposal logic for playing media data.It is primary refer to integrated by operating system itself.Primary
For concept for indicating the relationship with operating system, being not offered as related technology is the prior art.Primary media play side
Formula refers to the included media play mode of operating system.It supports to play media data, is to refer to play corresponding media number
According to.
Specifically, electronic equipment specifically can directly detect primary media play by standard media data playback interface
Whether mode is supported to play media data corresponding to media data address.Electronic equipment can also be broadcast by standard media data
It puts interface and calls other functions, whether support to play matchmaker corresponding to media data address in a manner of primary media play to detect
Volume data.
S208 matches primary media play mode when detecting that support plays for media data.
Specifically, electronic equipment detect primary media play mode support play media data address corresponding to
When media data, using primary media play mode as with the matched media play mode of media data.
S210, when detect do not support play when, for media data matching extension media play mode.
Specifically, electronic equipment detect primary media play mode do not support play media data address corresponding to
Media data when, using the media play mode of extension as with the matched media play mode of media data.
Wherein, the media play mode of extension is the media play mode of non-protogenous, can be by running on operating system
On application program addition extension media play mode.The media play mode of extension, including playing primary media play
The computer disposal logic for the media data that mode is not supported can further include and play primary media play mode
The computer disposal logic for the media data supported.
S212 plays media data according to matched media play mode.
Specifically, electronic equipment detect primary media play mode support play media data address corresponding to
When media data, using primary media play mode, the broadcasting to media data is realized.Electronic equipment detect it is primary
When media play mode is not supported to play media data corresponding to media data address, using the media play mode of extension,
Realize the broadcasting to media data.
Above-mentioned media data playing method is supported to play or does not support to play media for primary media play mode
The case where media data corresponding to data address, can realize broadcasting, realize the extension of ability to play, improve compatibility
Property.And primary media play mode is preferentially used when playing, when primary media play mode is not supported to play,
Using the media play mode of extension, it can guarantee the stability played as far as possible.Furthermore it is unified by calling standard media data
Playback interface, so that it may realize and primary media play mode is supported to play and do not support broadcasting for the media data played
It puts, there is the application program for playing media data demand not need to do additional improvement, improve versatility.
In one embodiment, primary media play mode uses primary media factory;The media play side of extension
Formula is using the media factory extended.
Wherein, media factory is the factory for handling media data.Media factory can be simple factory mode
(Simple Factory), factory method pattern (Factory Method) or abstract factory pattern (Abstract
Factory).Factory method pattern is a kind of Object-Oriented Design mode, be can be used for the case where not specifying object concrete type
Lower creation object.Factory method pattern defines the interface of a creation object, allows the class for realizing the interface where to determine instantiation
The instantiation of class is postponed till in subclass and is carried out by a class.For creating player example, which is used for for media factory
Play media data.
Primary different media factories, the player example being respectively used under creation different scenes.In Android operation system,
Primary media factory such as StagefrightPlayerFactory, NuPlayerFactory or
SonivoxPlayerFactory.Wherein StagefrightPlayerFactory is the media work of Android operation system default
Factory plays for general local video.NuPlayerFactory is used for streaming media playing, such as RTSP (Real Time
Streaming Protocol, real time streaming transport protocol) or m3u8 format Streaming Media.SonivoxPlayerFactory is used for
The broadcasting of the media files such as MIDI (Musical Instrument Digital Interface) format.
The media factory of extension can be only used for creation play operation system and not support the player of media data real
Example.The media factory of extension, can be used for creation can the supported media data of play operation system, and energy play operation system
System does not support the player example of media data.The player example created by the media factory of extension, can play
The media data that operating system is not supported.
In the present embodiment, small change can be passed through using the primary broadcasting logic of system in operation using media factory
Realize the extension of operating system ability to play.
In one embodiment, step S212 includes: to create corresponding player example using matched media factory, is led to
The player example for crossing creation plays media data.Specifically, electronic equipment can be by player example with opening media data
Media data corresponding to location and reading, decoding media data simultaneously play, and export video and/or audio.Electronic equipment can be with
It is synchronized by audio and video of the player example to broadcasting.In Android operation system, player example is
The example of MediaPlayerBase type.
In one embodiment, step S206 includes: to call the matchmaker of extension by calling standard media data playback interface
Body factory, to detect whether primary media factory supports to play media data corresponding to media data address.
Specifically, the media factory of extension includes whether the primary media factory of detection supports to play media data address institute
The computer disposal logic of corresponding media data.The media factory of extension can specifically be detected by inherent logic, can also be adjusted
With primary function check.
Further, the media factory of extension can support to play media data detecting primary media play mode
When, primary media play mode is matched for media data;The media factory of extension can detect primary media play
When mode is not supported to play media data, for the media play mode of media data matching extension.
In the present embodiment, by calling the media factory of extension, realize whether primary media factory supports to play media
The detection of media data corresponding to data address changes operating system small.
In one embodiment, described by calling the standard media data playback interface, call the media work of extension
Whether factory supports to play media data corresponding to the media data address with the media factory for detecting primary, comprising: pass through
The standard media data playback interface is called, the media factory in traversal media factory set carries out the media data
Tenability scoring;The media factory set includes the media factory of primary media factory and extension;According to each of traversal
The scoring of tenability corresponding to media factory, determines whether the primary media play mode is supported to play the media number
According to media data corresponding to address.
In one embodiment, tenability corresponding to each media factory according to traversal scores, described in determination
Before whether primary media play mode is supported to play media data corresponding to the media data address, the method packet
Include: the media factory by traversing extension extremely detects whether primary media factory supports to play the media data address
Corresponding media data;When detecting that support plays, acquisition is corresponding with the media factory of extension, and being used for accordingly will be primary
Media factory be allocated to the media data tenability scoring;When detect do not support play when, obtain with extension
Media factory is corresponding, and for the tenability that the media factory of extension is allocated to the media data to score accordingly.
In one embodiment, described when detecting that support plays, acquisition is corresponding with the media factory of extension, and is used for
The tenability that primary media factory is allocated to the media data is scored accordingly, comprising: when detecting that support plays,
Tenability scoring by the minimum value in tenability scoring range, as the media factory for corresponding to extension.It is described to work as inspection
Measure do not support play when, obtain with extension media factory it is corresponding, and be used for the media factory of extension is allocated to institute accordingly
State media data tenability scoring, comprising: when detect do not support play when, by tenability score range in maximum
Value, the tenability scoring as the media factory for corresponding to extension.
In one embodiment, tenability corresponding to each media factory according to traversal scores, described in determination
Before whether primary media play mode is supported to play media data corresponding to the media data address, the method packet
Include: by traversing primary media factory extremely, whether the primary media factory of detection traversal extremely itself is supported described in broadcasting
Media data corresponding to media data address;When detecting that support plays, the primary media factory extremely with traversal is obtained
It is corresponding, and for the tenability that the primary media factory of traversal extremely is allocated to the media data to score accordingly;Work as inspection
It when measuring support and playing, obtains corresponding with traversal primary media factory extremely, and is used to traverse extremely primary accordingly
Media factory is allocated to the tenability scoring of the media data.Wherein, for the primary media work accordingly by traversal extremely
Factory is allocated to the tenability scoring of the media data such as 1, for the not primary media factory by traversal extremely accordingly
The tenability scoring for being allocated to the media data is such as 0.
In one embodiment, tenability corresponding to each media factory according to traversal scores, described in determination
Whether primary media play mode is supported to play media data corresponding to the media data address, comprising: from traversal
Maximum tenability scoring is filtered out in the corresponding tenability scoring of each media factory;When the scoring pair of maximum tenability
When answering primary media factory, determine that the primary media play mode is supported to play corresponding to the media data address
Media data;When maximum tenability scores the media factory of corresponding extension, the primary media play mode is determined
It does not support to play media data corresponding to the media data address.
Fig. 3 is the flow diagram of media data playing method in another embodiment.Referring to Fig. 3, this method is specifically wrapped
Include following steps:
S302 obtains media data address.
S304 calls standard media data playback interface using media data address as call parameters.
S306 traverses the media factory in media factory set, to media by calling standard media data playback interface
Data are supported ability scoring;Media factory set includes the media factory of primary media factory and extension.
Wherein, media factory set is the set that more than one media factory is constituted, including at least one primary matchmaker
The media factory of body factory and at least one extension.Each media factory in media factory set includes score function and broadcasting
Device example creates function.Score function is used to be supported the media data address of input ability scoring, exports corresponding branch
Hold ability scoring.Player example creation function is for creating corresponding player example.
Specifically, electronic equipment can pass through primary media services process time when calling standard media data playback interface
Media factory set is gone through, by the score function of each media factory in media factory set to corresponding to media data address
Media data be supported ability scoring, obtain the scoring of corresponding tenability.In traversal to primary media factory, then
Corresponding output indicates whether primary media factory supports the tenability of media data corresponding to media data address to score.
Tenability scoring has tenability scoring range, and tenability scoring range may include two kinds or taking more than two kinds
Value.
S308, by traversing primary media factory extremely, whether the primary media factory of detection traversal extremely itself is propped up
It holds and plays media data corresponding to media data address;When detecting that support plays, the primary media extremely with traversal are obtained
Factory is corresponding, and for the tenability that the primary media factory of traversal extremely is allocated to media data to score accordingly;Work as inspection
It when measuring support and playing, obtains corresponding with traversal primary media factory extremely, and is used to traverse extremely primary accordingly
Media factory is allocated to the tenability scoring of media data.
S310 detects whether primary media factory supports to play media number by traversing the media factory of extension extremely
According to media data corresponding to address;When detecting that support plays, acquisition is corresponding with the media factory of extension, and for accordingly
Primary media factory is allocated to the tenability scoring of media data;When detect do not support play when, obtain and extension
Media factory it is corresponding, and for the tenability that the media factory of extension is allocated to media data to be scored accordingly.
Specifically, if tenability scoring is positively correlated with tenability, electronic equipment can determine media data address
When corresponding media data is supported by primary media factory, the media factory of the extension corresponding to traversal, output is less than pair
It should be in the tenability scoring that the tenability of primary media factory scores.
In one embodiment, if tenability scoring and tenability are negatively correlated, electronic equipment can determine media
When media data corresponding to data address is supported by primary media factory, the media factory of the extension corresponding to traversal is defeated
It is greater than the tenability scoring scored corresponding to the tenability of primary media factory out.
If tenability scoring is positively correlated with tenability, electronic equipment can determine corresponding to media data address
When media data is not supported by primary media factory, the media factory output of the extension corresponding to traversal is greater than corresponding to primary
Media factory tenability scoring tenability scoring.
In one embodiment, if tenability scoring and tenability are negatively correlated, electronic equipment can determine media
When media data corresponding to data address is not supported by primary media factory, the media factory of the extension corresponding to traversal is defeated
It is less than the tenability scoring scored corresponding to the tenability of primary media factory out.
S312 scores according to the corresponding tenability of each media factory traversed in media factory set, is media data
Match corresponding media factory.
Specifically, if tenability scoring is positively correlated with tenability, the desirable traversal media factory set of electronic equipment
The obtained maximum value in tenability scoring gives the maximum value corresponding media factory matching corresponding to media data address
Media data.If tenability scoring and tenability are negatively correlated, the desirable traversal media factory of electronic equipment gathers to obtain
Tenability scoring in minimum value, matchmaker corresponding to media data address is given into the matching of the minimum value corresponding media factory
Volume data.
S314 plays media data according to matched media factory.
Specifically, electronic equipment can create corresponding player example according to matched media factory, to pass through creation
Player example play media data.
In the present embodiment, by the media factory of extension to the scoring logic of media data, so that it may using it is primary really
Surely the logic for matching media factory, realizes the extension to operating system media data processing capacity.Reduce development amount, it is right
The primary logic intervention of operating system is fewer, can reduce the case where carrying out new defect because of the modification primary logical band of operating system.
In one embodiment, step S310 include: when detect support play when, will tenability score range in
Minimum value, the tenability scoring as the media factory for corresponding to extension;When detect do not support play when, by tenability
Maximum value in the range that scores, the tenability scoring as the media factory for corresponding to extension.
Specifically, it is assumed that the maximum value in tenability scoring range is 1, minimum value 0, then in traversal to the matchmaker of extension
When body factory, if it is determined that media data corresponding to media data address is supported by primary media factory, then the extension is exported
Media factory be 0 to the scoring of the tenability of the media data.Even if the media factory of extension supports media data address institute
Corresponding media data remains on the minimum value in output tenability scoring range.In the media factory of traversal to extension,
If it is determined that media data corresponding to media data address is not supported by primary media factory, then the media work of the extension is exported
Factory is 1 to the tenability scoring of the media data.
If media data corresponding to media data address is supported by primary media factory, the support energy traversed
Maximum value in power scoring is that a primary media factory scores to the tenability of media data.If media data address institute
Corresponding media data is not supported that the maximum value in tenability scoring then traversed is one by primary media factory
The media factory of extension scores to the tenability of media data.
In the present embodiment, by scoring logic of the media factory to media data for modifying extension, so that it may utilize primary
Determine that the logic of matching media factory realizes extension to operating system media data processing capacity, reduce development
Amount, it is fewer to the intervention of operating system primary logic, the case where carrying out new defect because of the modification primary logical band of operating system can be reduced.
As shown in figure 4, in one embodiment, by calling standard media data playback interface, calling the media of extension
Factory, to detect whether primary media factory supports the step of playing media data corresponding to media data address specifically to wrap
Include following steps:
S402, by calling standard media data playback interface, Xiang Yuansheng media services process is passed to media data address.
Specifically, electronic equipment is connect when calling standard media data playback interface by the standard media data playback
Mouth is passed to media data address to primary media services process.In Android operation system, primary media services process is
MediaServer process, electronic equipment pass through standard media data playback interface MediaPlayer to MediaServer process
Incoming media data address.
S404 calls the media factory by added extension in the global address space of primary media services process,
To detect whether primary media factory supports to play media data corresponding to media data address.
Specifically, the media factory of primary media factory and extension is stored in primary media services process globally
In the space of location.Whether electronic equipment can judge media data corresponding to media data address by primary media services process
It is supported to play by primary media factory.Wherein, the global address space of primary media services process is primary media services into
The applied address space of journey, and the data in the address space can be by the primary media services process operation.
In the present embodiment, the media factory of extension is added in the global address space of primary media services process, with
It realizes the broadcasting supported primary media factory and do not support media data, reduces development amount, be to operation
Primary logic intervention of uniting is fewer, can reduce the case where carrying out new defect because of the modification primary logical band of operating system.
In one embodiment, before step S402, the media data playing method further include to primary media services into
Journey injects the step of media factory of the custom code to add extension.Referring to Fig. 5, this is injected certainly to primary media services process
The step of media factory of the definition code to add extension, specifically comprises the following steps:
S502, Xiang Yuansheng media services process inject custom code.
Specifically, electronic equipment can inject custom code by customized process, Xiang Yuansheng media services process.It is needing
Administration authority is got to execute the operating system of injecting codes operation, step can be executed after obtaining corresponding administration authority
Rapid S502.
Wherein, customized process is the primary process of non-OS.Custom code is non-OS primary generation
Code, the media data processing capacity for extended operation system.In Android operation system, Ptrace () function reality can be passed through
The injection of existing custom code.Initial processes are first user level process that operating system starts after starting.Pacifying
In tall and erect operating system, initial processes are init process.
In one embodiment, customized process can start after os starting.In one embodiment, certainly
Definition process can follow os starting and start.
In one embodiment, after os starting finishes and starts initial processes, initial processes can be according to starting
The self defining programm path configured in configuration file starts customized process.Initial processes can specifically receive starting configuration text
After the os starting configured in part finishes notice, certainly according to the self defining programm path starting configured in starting configuration file
Definition process.
In Android operation system, initial processes are init process, and starting configuration file is init.rc file.?
In init.rc file, customized process can be configured as service in starting configuration file;Customized process is configured as
Disabled, expression do not follow os starting and start;Customized process is configured as receiving os starting
Start after finishing notice.
In one embodiment, electronic equipment obtains the Memory Allocation letter of primary media services process by customized process
Several addresses, and by primary media services process suspension, thus according in the primary media services process of call by location of acquisition
Partition function storage allocation space is deposited, which belongs to the global address space of primary media services process.Electronic equipment
Custom code is copied in the memory headroom of distribution by customized process, and modifies the execution of primary media services process
The initial address of position custom code into the memory headroom of distribution, and then restore primary media services process.
S504 adds the media of extension by custom code in the global address space of primary media services process
Factory.
In one embodiment, primary media services process carries out custom code after restoring from pause.It should be certainly
Definition code when being executed, first saves media services state of a process, then loads specified code file, executes code text
Custom logic in part, to add the media factory of extension in the global address space of primary media services process, unloading
Code file, and restore the media services state of a process saved.
S506 monitors that primary media services process is closed, then after primary media services process is restarted, return step
S502。
Specifically, electronic equipment can be sent out by customized process snoop-operations system when primary media services process is closed
Process out closes notice.It closes and notifies in response to process, after primary media services process is restarted, return step S502.Its
In, primary media services process can restart the primary media services process by operating system after closing.Customized process is connecing
After receiving closing notice, after waiting operating system to restart primary media services process, return step S502 is continued through and is made by oneself
Adopted process injects definition code to primary media services process.
In the present embodiment, it can be realized by injecting custom code to primary media services process to operating system matchmaker
The extension of volume data processing capacity does not need to modify on the basis of operating system source code, can not get operating system
Also the extension to operating system media data processing capacity may be implemented in the case where source code.Moreover, primary matchmaker can be found automatically
The case where body service processes are closed, and custom code is refilled after primary media services process is restarted, it ensure that behaviour
Make the validity that system media data-handling capacity is extended.
As shown in fig. 6, in one embodiment, step S206 the following steps are included:
S602 is named as the self defined interface of standard media data playback interface by calling, calls the primary mark renamed
Quasi- media data playback interface.
Whether S604 detects primary media play mode by calling the primary standard media data playback interface renamed
It supports to play media data corresponding to media data address.
Wherein, self defined interface is named as title identical with standard media data playback interface, therefore marks calling
The self defined interface can be called when quasi- media data playback interface.The primary standard media data playback interface renamed, remains
The content of standard media data playback interface, title are changed to the name different from the title of standard media data playback interface script
Claim.
Further, electronic equipment can call the standard media data playback interface renamed by self defined interface, thus
The score function for calling each primary media factory obtains commenting the tenability of media data corresponding to media data address
Point.Electronic equipment can score according to the tenability, judge whether primary media factory supports to play media data address institute
Corresponding media data.
In the present embodiment, interface name, which is dexterously utilized, realizes expansion to operating system media data processing capacity
Exhibition handles the with low uncertainty of logic generation, reduces to the greatest extent primary to operating system when primary media factory supports media data
The intervention of logic can reduce the case where carrying out new defect because of the modification primary logical band of operating system.
In one embodiment, step S208 includes: to pass through the primary standard media renamed when detecting that support plays
Data playback interface matches primary media play mode for media data.Step S210 includes: that ought detect not support to play
When, by self defined interface, for the media play mode of media data matching extension.
Specifically, electronic equipment can detect primary matchmaker in the primary standard media data playback interface by renaming
Primary standard media data playback interface when body factory supports to play media data, directly by renaming.Electronic equipment is logical
The primary standard media data playback interface renamed is crossed, when detecting that primary media factory does not support to play media data, then
By being named as computer disposal logic defined in the self defined interface of standard media data playback interface, specify this customized
The media play mode extended defined in interface.
In the present embodiment, by the primary standard media data playback interface renamed, whether primary media factory is detected
It supports media data, is media data when detecting support still through the primary standard media data playback interface renamed
Match primary media play mode.And primary media are judged in the primary standard media data playback interface by renaming
When factory does not support media data, just by self defined interface, for the media play mode of media data matching extension.Subtract as far as possible
Few intervention to the primary logic of operating system can reduce the case where carrying out new defect because of the modification primary logical band of operating system.
In one embodiment, detect whether primary media play mode is supported to play corresponding to media data address
Media data includes: when meet it is following at least one when, determine that primary media play mode is not supported with playing media data
Media data corresponding to location:
1) function, is obtained by primary media parameter, gets the logical of media data corresponding to media data address
Road number is 0.
It specifically, can be by media play frame StagefrightPlayer in Android operation system
MediaExtractor function (a kind of function for extracting media information) obtains the number of active lanes of media data.General video has two
A channel, one is voice-grade channel, the other is video channel.If the media data that MediaExtractor function returns
Number of active lanes is 0, then illustrates that electronic equipment does not support the media data, that is, primary media factory not to support the media number
According to.
2) function, is obtained by primary media parameter, obtains the coding of media data corresponding to media data address
Format failure.
Specifically, in Android operation system, the coding lattice of media data can be obtained by MediaExtractor function
Formula specifically can be the coded format of audio and/or video.If MediaExtractor function, which returns, indicates to obtain coding lattice
The information of formula failure, then illustrate that electronic equipment does not support the media data, that is, primary media factory not to support the media
Data.
3) after the coded format for, getting media data corresponding to media data address, determine the coded format obtained
It is not supported by primary decoder.
Specifically, in Android operation system, can be judged by the function of OMX interface (one kind is used for decoded interface)
Whether the coded format of acquisition is supported by primary decoder, if it is not, then determining the coded format obtained not by primary decoder
It is supported.Terminal specifically can first Rule of judgment 1) and it is 2) whether true, in condition 1) and it is 2) invalid in the case where judge item again
Part 3) it is whether true.
Further, if above-mentioned condition 1), 2) and 3) invalid, can be determined that matchmaker corresponding to media data address
Volume data is supported by primary media factory.
In the present embodiment, providing multiple can quickly judge whether media data is sentenced by what primary media factory was supported
The efficient judgement whether supported by primary media factory media data may be implemented in broken strip part.
Illustrate the principle of above-mentioned media data playing method with a concrete application scene below.In this application scene with
Above-mentioned media data playing method is applied to Android operation system to be described in detail.Referring to Fig. 7, customized process to
MediaServer process injects custom code, and passes through custom code in the global address space of MediaServer process
The media factory of middle addition extension.If customized process listens to what operating system was issued when primary media services process is closed
Process close notice, in response to process close notify, after primary media services process is restarted, continue to MediaServer into
Journey injects custom code.
Further, referring to Fig. 8, when application program generates the demand for playing media data, Android operation system is called
MediaPlayer interface provided by SDK, through the MediaPlayer interface into MediaServer process
MediaPlayerService is passed to media data address.MediaPlayerService in MediaServer process is called
Media factor interface MediaPlayerFactory, by MediaPlayerFactory traversal media factory set respectively to media
Media data corresponding to data address is supported ability scoring.In traversal to primary media factory, if this is primary
Media factory supports to play the media data, then corresponds to tenability of the output greater than 0 and less than or equal to 1 and score.If this is primary
Media factory do not support to play the media data, then output be more than or equal to 0 and less than 1 tenability scoring.It is traversing extremely
When the media factory MyPlayerFactory of extension, if it is determined that primary media factory supports to play media data, then output valve
It scores for 0 tenability;If it is determined that primary media factory does not support to play media data, then the support energy that output valve is 1
Power scoring.The corresponding media factory creation player of the maximum tenability scoring of MediaPlayerFactory final choice is real
Example MediaplayerBase is exported by MediaServer process by the player example decoding media data and by SDK
To application program, exported by application program.
Fig. 9 is the structural block diagram of media data playing device 900 in one embodiment.Referring to Fig. 9, which is played
Device 900 includes: that address acquisition module 901, standard media data playback interface calling module 902, media play mode match
Module 903 and playing module 904.
Address acquisition module 901, for obtaining media data address.
Standard media data playback interface calling module 902, for calling standard using media data address as call parameters
Media data playback interface.
Media play mode matching module 903, for by calling standard media data playback interface, detection trigger to be primary
Media play mode whether support play media data address corresponding to media data;When detecting that support plays, it is
Media data matches primary media play mode;When detect do not support play when, for media data matching extension media
Broadcast mode.
Playing module 904, for playing media data according to matched media play mode.
Above-mentioned media data playing device 900 is supported to play or does not support to play for primary media play mode
The case where media data corresponding to media data address, can realize broadcasting, realize the extension of ability to play, improve
Compatibility.And primary media play mode is preferentially used when playing, it does not support to play in primary media play mode
When, just using the media play mode of extension, it can guarantee the stability played as far as possible.Furthermore it is unified to pass through calling standard matchmaker
Volume data playback interface, so that it may realize and primary media play mode is supported to play and do not support the media data played
Broadcasting, have play media data demand application program do not need to do additional improvement, improve versatility.
In one embodiment, primary media play mode uses primary media factory;The media play side of extension
Formula is using the media factory extended.
In the present embodiment, small change can be passed through using the primary broadcasting logic of system in operation using media factory
Realize the extension of operating system ability to play.
Media play mode matching module 903 is also used to call extension by calling standard media data playback interface
Media factory, to detect whether primary media factory supports to play media data corresponding to media data address.
In the present embodiment, by calling the media factory of extension, realize whether primary media factory supports to play media
The detection of media data corresponding to data address changes operating system small.
In one embodiment, the media play mode matching module 903 is also used to by calling the standard media
Data playback interface traverses the media factory in media factory set, is supported ability scoring to the media data;It is described
Media factory set includes the media factory of primary media factory and extension;According to branch corresponding to each media factory of traversal
Ability scoring is held, determines whether the primary media play mode is supported to play media corresponding to the media data address
Data.
In one embodiment, the media play mode matching module 903 is also used to the matchmaker by traversing extension extremely
Body factory, detects whether primary media factory supports to play media data corresponding to the media data address;Work as detection
It is corresponding with the media factory of extension to obtaining when supporting to play, and for primary media factory to be allocated to the matchmaker accordingly
The tenability of volume data scores;When detect do not support play when, obtain with extension media factory it is corresponding, and be used for accordingly
The media factory of extension is allocated to the tenability scoring of the media data.
In one embodiment, the media play mode matching module 903 is also used to when detecting that support plays, will
Minimum value in tenability scoring range, the tenability scoring as the media factory for corresponding to extension;When detecting not
When supporting to play, by the maximum value in tenability scoring range, the tenability as the media factory for corresponding to extension is commented
Point.
In one embodiment, the media play mode matching module 903 is also used to by traversing primary matchmaker extremely
Whether body factory, the primary media factory of detection traversal extremely itself support to play media corresponding to the media data address
Data;When detecting that support plays, acquisition is corresponding with the primary media factory of traversal extremely, and for that will traverse accordingly extremely
Primary media factory is allocated to the tenability scoring of the media data;When detecting that support plays, obtains and traverse
Primary media factory extremely is corresponding, and for the primary media factory of traversal extremely not being allocated to the media data accordingly
Tenability scoring.
In one embodiment, the media play mode matching module 903 is also used to each media factory pair from traversal
Maximum tenability scoring is filtered out in the tenability scoring answered;When the corresponding primary media of maximum tenability scoring
When factory, determine that the primary media play mode is supported to play media data corresponding to the media data address;When
When the media factory of the maximum corresponding extension of tenability scoring, determine that the primary media play mode is not supported to play institute
State media data corresponding to media data address.
In one embodiment, media play mode matching module 903 is also used to by calling standard media data playback
Interface, Xiang Yuansheng media services process are passed to media data address;By primary media services process, it is invoked at its global address
The media factory of added extension in space, to detect whether primary media factory supports broadcasting media data address institute right
The media data answered.
In the present embodiment, the media factory of extension is added in the global address space of primary media services process, with
It realizes the broadcasting supported primary media factory and do not support media data, reduces development amount, be to operation
Primary logic intervention of uniting is fewer, can reduce the case where carrying out new defect because of the modification primary logical band of operating system.
Figure 10 is the structural block diagram of media data playing device 900 in another embodiment.Referring to Fig.1 0, the media data
Playing device 900 further include: injection module 905, for injecting custom code to primary media services process;By customized
Code adds the media factory of extension in the global address space of primary media services process;Monitor primary media services
Process is closed, then after primary media services process is restarted, continues to inject custom code to primary media services process.
In the present embodiment, it can be realized by injecting custom code to primary media services process to operating system matchmaker
The extension of volume data processing capacity does not need to modify on the basis of operating system source code, can not get operating system
Also the extension to operating system media data processing capacity may be implemented in the case where source code.Moreover, primary matchmaker can be found automatically
The case where body service processes are closed, and custom code is refilled after primary media services process is restarted, it ensure that behaviour
Make the validity that system media data-handling capacity is extended.
In one embodiment, media play mode matching module 903 is also used to be named as standard media number by calling
According to the self defined interface of playback interface, the primary standard media data playback interface renamed is called;It is renamed by calling primary
Standard media data playback interface, detects whether primary media play mode is supported to play media corresponding to media data address
Data.
In the present embodiment, interface name, which is dexterously utilized, realizes expansion to operating system media data processing capacity
Exhibition handles the with low uncertainty of logic generation, reduces to the greatest extent primary to operating system when primary media factory supports media data
The intervention of logic can reduce the case where carrying out new defect because of the modification primary logical band of operating system.
In one embodiment, media play mode matching module 903 is also used to when detecting that support plays, by easy
The primary standard media data playback interface of name matches primary media play mode for media data;It is not supported when detecting
When broadcasting, for media data matching extension media play mode include: when detect do not support play when, connect by customized
Mouthful, for the media play mode of media data matching extension.
In the present embodiment, by the primary standard media data playback interface renamed, whether primary media factory is detected
It supports media data, is media data when detecting support still through the primary standard media data playback interface renamed
Match primary media play mode.And primary media are judged in the primary standard media data playback interface by renaming
When factory does not support media data, just by self defined interface, for the media play mode of media data matching extension.Subtract as far as possible
Few intervention to the primary logic of operating system can reduce the case where carrying out new defect because of the modification primary logical band of operating system.
In one embodiment, media play mode matching module 903 be also used to when meet it is following at least one when, determine
Primary media play mode is not supported to play media data corresponding to media data address;
1) function, is obtained by primary media parameter, gets the logical of media data corresponding to media data address
Road number is 0.
2) function, is obtained by primary media parameter, obtains the coding of media data corresponding to media data address
Format failure.
3) after the coded format for, getting media data corresponding to media data address, determine the coded format obtained
It is not supported by primary decoder.
In the present embodiment, providing multiple can quickly judge whether media data is sentenced by what primary media factory was supported
The efficient judgement whether supported by primary media factory media data may be implemented in broken strip part.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, which can be stored in a computer-readable storage and be situated between
In matter, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, storage medium above-mentioned can be
The non-volatile memory mediums such as magnetic disk, CD, read-only memory (Read-Only Memory, ROM) or random storage note
Recall body (Random Access Memory, RAM) etc..
Each technical characteristic of above embodiments can be combined arbitrarily, for simplicity of description, not to above-described embodiment
In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance
Shield all should be considered as described in this specification.
Only several embodiments of the present invention are expressed for above embodiments, and the description thereof is more specific and detailed, but can not
Therefore it is construed as limiting the scope of the patent.It should be pointed out that for those of ordinary skill in the art,
Under the premise of not departing from present inventive concept, various modifications and improvements can be made, and these are all within the scope of protection of the present invention.
Therefore, the scope of protection of the patent of the invention shall be subject to the appended claims.
Claims (24)
1. a kind of media data playing method, comprising:
Obtain media data address;
Using the media data address as call parameters, standard media data playback interface is called;
By calling the standard media data playback interface, the media factory of extension is called, to detect primary media factory
Whether support plays media data corresponding to the media data address;The media factory of the extension includes that detection is primary
Whether media factory supports to play the computer disposal logic of media data corresponding to media data address;
When detecting that support plays, primary media play mode is matched for the media data;
When detect do not support play when, for the media data matching extension media play mode;
The media data is played according to the matched media play mode.
2. the method according to claim 1, wherein described by calling the standard media data playback to connect
Mouthful, the media factory of extension is called, whether supports to play corresponding to the media data address with the media factory for detecting primary
Media data, comprising:
By calling the standard media data playback interface, the media factory in media factory set is traversed, to the media
Data are supported ability scoring;The media factory set includes the media factory of primary media factory and extension;
It is scored according to tenability corresponding to each media factory of traversal, determines whether the primary media play mode props up
It holds and plays media data corresponding to the media data address.
3. according to the method described in claim 2, it is characterized in that, support corresponding to each media factory according to traversal
Ability scoring, determines whether the primary media play mode is supported to play media number corresponding to the media data address
According to before, which comprises
By traversing the media factory of extension extremely, detect whether primary media factory supports to play the media data address
Corresponding media data;
When detecting that support plays, acquisition is corresponding with the media factory of extension, and for accordingly dividing primary media factory
It scores with the tenability for giving the media data;
When detect do not support play when, obtain with extension media factory it is corresponding, and be used for accordingly by the media factory of extension
It is allocated to the tenability scoring of the media data.
4. according to the method described in claim 3, it is characterized in that, described when detecting that support plays, acquisition and extension
Media factory is corresponding, and for the tenability that primary media factory is allocated to the media data to score accordingly, comprising:
When detecting that support plays, by the minimum value in tenability scoring range, as the media factory for corresponding to extension
Tenability scoring;
It is described when detect do not support play when, obtain with extension media factory it is corresponding, and be used for accordingly by the media of extension
Factory is allocated to the tenability scoring of the media data, comprising:
When detect do not support play when, by tenability score range in maximum value, as correspond to extension media work
The tenability of factory scores.
5. according to the method described in claim 2, it is characterized in that, support corresponding to each media factory according to traversal
Ability scoring, determines whether the primary media play mode is supported to play media number corresponding to the media data address
According to before, which comprises
By traversing primary media factory extremely, whether the primary media factory of detection traversal extremely itself is supported described in broadcasting
Media data corresponding to media data address;
When detecting that support plays, acquisition is corresponding with the primary media factory of traversal extremely, and for that will traverse accordingly extremely
Primary media factory is allocated to the tenability scoring of the media data;
When detecting that support plays, acquisition is corresponding with the primary media factory of traversal extremely, and for will not traverse extremely accordingly
Primary media factory be allocated to the media data tenability scoring.
6. the method according to any one of claim 2 to 5, which is characterized in that each media factory according to traversal
Corresponding tenability scoring, determines whether the primary media play mode is supported to play the media data address institute
Corresponding media data, comprising:
Maximum tenability scoring is filtered out from the corresponding tenability scoring of each media factory of traversal;
When the scoring of maximum tenability corresponds to primary media factory, determine that the primary media play mode is supported to broadcast
Put media data corresponding to the media data address;
When maximum tenability scores the media factory of corresponding extension, determine that the primary media play mode is not supported
Play media data corresponding to the media data address.
7. the method according to claim 1, wherein described by calling the standard media data playback to connect
Mouthful, the media factory of extension is called, whether supports to play corresponding to the media data address with the media factory for detecting primary
Media data, comprising:
By calling the standard media data playback interface, Xiang Yuansheng media services process is passed to the media data address;
The media factory of added extension in the global address space of the primary media services process is called, it is primary to detect
Media factory whether support to play media data corresponding to the media data address.
8. the method according to the description of claim 7 is characterized in that described call the primary media services process globally
Whether the media factory of added extension in the space of location is supported with playing the media data with the media factory for detecting primary
Before media data corresponding to location, which comprises
Custom code is injected to primary media services process;
By the custom code, the media work of extension is added in the global address space of the primary media services process
Factory;
Monitor that the primary media services process is closed, then after the primary media services process is restarted, return it is described to
The step of primary media services process injection custom code.
9. the method according to claim 1, wherein described by calling the standard media data playback to connect
Mouthful, whether the primary media play mode of detection trigger is supported to play media data corresponding to the media data address, wraps
It includes:
It is named as the self defined interface of standard media data playback interface by calling, calls the primary standard media data renamed
Playback interface;
By the primary standard media data playback interface renamed described in calling, detect whether primary media play mode is supported to broadcast
Put media data corresponding to the media data address.
10. according to the method described in claim 9, it is characterized in that, it is described when detect support play when, be the media number
According to the primary media play mode of matching, comprising:
It is the media data by the primary standard media data playback interface renamed when detecting that support plays
Match primary media play mode;
It is described when detect do not support play when, for the media data matching extension media play mode include:
When detect do not support to play when, by the self defined interface, for the media play of media data matching extension
Mode.
11. detecting whether primary media play mode is supported the method according to claim 1, wherein described
Play media data corresponding to the media data address, comprising:
When meet it is following at least one when, it is right to determine that primary media play mode is not supported to play the media data address institute
The media data answered;
Function is obtained by primary media parameter, gets the port number of media data corresponding to the media data address
Mesh is 0;
Function is obtained by primary media parameter, obtains the coded format of media data corresponding to the media data address
Failure;
After the coded format for getting media data corresponding to the media data address, determine obtain coded format not by
Primary decoder is supported.
12. a kind of media data playing device characterized by comprising
Address acquisition module, for obtaining media data address;
Standard media data playback interface calling module, for calling standard matchmaker using the media data address as call parameters
Volume data playback interface;
Media play mode matching module, for calling the media of extension by calling the standard media data playback interface
Whether factory supports to play media data corresponding to the media data address with the media factory for detecting primary;The expansion
The media factory of exhibition includes whether the primary media factory of detection supports to play media data corresponding to media data address
Computer disposal logic;When detecting that support plays, primary media play mode is matched for the media data;Work as detection
To media play mode when not supporting to play, extended for media data matching;
Playing module, for playing the media data according to the matched media play mode.
13. device according to claim 12, which is characterized in that the media play mode matching module is also used to pass through
The standard media data playback interface is called, the media factory in traversal media factory set carries out the media data
Tenability scoring;The media factory set includes the media factory of primary media factory and extension;According to each of traversal
The scoring of tenability corresponding to media factory, determines whether the primary media play mode is supported to play the media number
According to media data corresponding to address.
14. device according to claim 13, which is characterized in that the media play mode matching module is also used to pass through
The media factory of the extension of traversal extremely, detects whether primary media factory supports to play corresponding to the media data address
Media data;When detecting that support plays, acquisition is corresponding with the media factory of extension, and for accordingly by primary media work
Factory is allocated to the tenability scoring of the media data;When detect do not support play when, obtain with extension media factory
It is corresponding, and for the tenability that the media factory of extension is allocated to the media data to score accordingly.
15. device according to claim 14, which is characterized in that the media play mode matching module is also used to when inspection
Support energy when measuring support broadcasting, by the minimum value in tenability scoring range, as the media factory for corresponding to extension
Power scoring;When detect do not support play when, by tenability score range in maximum value, as correspond to extension media
The tenability of factory scores.
16. device according to claim 14, which is characterized in that the media play mode matching module is also used to pass through
Whether the primary media factory of traversal extremely, the primary media factory of detection traversal extremely itself support to play the media data
Media data corresponding to address;When detecting that support plays, acquisition is corresponding with the primary media factory of traversal extremely, and uses
In the tenability scoring that the primary media factory of traversal extremely is allocated to the media data accordingly;When detecting that support broadcasts
When putting, acquisition is corresponding with the primary media factory of traversal extremely, and for not dividing the primary media factory of traversal extremely accordingly
It scores with the tenability for giving the media data.
17. device described in any one of 3 to 16 according to claim 1, which is characterized in that the media play mode matches mould
Block is also used to filter out maximum tenability scoring from the corresponding tenability scoring of each media factory of traversal;Work as maximum
Tenability scoring corresponding primary media factory when, determine that the primary media play mode is supported to play the media
Media data corresponding to data address;When maximum tenability scores the media factory of corresponding extension, the original is determined
Raw media play mode is not supported to play media data corresponding to the media data address.
18. device according to claim 12, which is characterized in that the media play mode matching module is also used to pass through
The standard media data playback interface is called, Xiang Yuansheng media services process is passed to the media data address;Described in calling
The media factory of added extension in the global address space of primary media services process is to detect primary media factory
No support plays media data corresponding to the media data address.
19. device according to claim 18, which is characterized in that described device further include:
Injection module, for injecting custom code to primary media services process;By the custom code, in the original
The media factory of extension is added in the global address space of raw media services process;Monitor that the primary media services process is closed
It closes, then after the primary media services process is restarted, continues to inject custom code to primary media services process.
20. device according to claim 12, which is characterized in that the media play mode matching module is also used to pass through
The self defined interface for being named as standard media data playback interface is called, the primary standard media data playback renamed is called to connect
Mouthful;By the primary standard media data playback interface renamed described in calling, detect whether primary media play mode is supported to broadcast
Put media data corresponding to the media data address.
21. device according to claim 20, which is characterized in that the media play mode matching module is also used to when inspection
When measuring support broadcasting, by the primary standard media data playback interface renamed, matched for the media data primary
Media play mode;When detect do not support to play when, by the self defined interface, for media data matching extension
Media play mode.
22. device according to claim 12, which is characterized in that the media play mode matching module is also used to when full
When being enough to descend at least one, determine that primary media play mode is not supported to play media corresponding to the media data address
Data;
When meet it is following at least one when, it is right to determine that primary media play mode is not supported to play the media data address institute
The media data answered;
Function is obtained by primary media parameter, gets the port number of media data corresponding to the media data address
Mesh is 0;
Function is obtained by primary media parameter, obtains the coded format of media data corresponding to the media data address
Failure;
After the coded format for getting media data corresponding to the media data address, determine obtain coded format not by
Primary decoder is supported.
23. a kind of electronic equipment, including memory and processor, the memory is stored with computer program, the computer
When program is executed by the processor, so that the processor executes the step such as any one of claims 1 to 11 the method
Suddenly.
24. a kind of non-volatile computer readable storage medium, is stored with computer program, the computer program is processed
When device executes, so that the processor is executed such as the step of any one of claims 1 to 11 the method.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710005498.4A CN106791546B (en) | 2017-01-04 | 2017-01-04 | Media data playing method and device |
PCT/CN2017/115568 WO2018126852A1 (en) | 2017-01-04 | 2017-12-12 | Media data playback method, electronic device and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710005498.4A CN106791546B (en) | 2017-01-04 | 2017-01-04 | Media data playing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106791546A CN106791546A (en) | 2017-05-31 |
CN106791546B true CN106791546B (en) | 2019-08-23 |
Family
ID=58950047
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710005498.4A Active CN106791546B (en) | 2017-01-04 | 2017-01-04 | Media data playing method and device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN106791546B (en) |
WO (1) | WO2018126852A1 (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106791546B (en) * | 2017-01-04 | 2019-08-23 | 腾讯科技(深圳)有限公司 | Media data playing method and device |
CN110858918B (en) * | 2018-08-22 | 2021-11-23 | 深圳Tcl数字技术有限公司 | MDS data acquisition method, digital television and storage medium |
US10735806B2 (en) * | 2018-09-07 | 2020-08-04 | Disney Enterprises, Inc. | Configuration for detecting hardware-based or software-based decoding of video content |
CN109640192B (en) * | 2018-12-26 | 2021-07-20 | 深圳创维-Rgb电子有限公司 | Video player optimization method and device, playing terminal and storage medium |
CN116560879B (en) * | 2023-07-10 | 2024-04-09 | 深圳市慧为智能科技股份有限公司 | Method and device for calling face recognition service, terminal equipment and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005327349A (en) * | 2004-05-12 | 2005-11-24 | Funai Electric Co Ltd | Disk reproducing apparatus |
CN1716242A (en) * | 2004-06-28 | 2006-01-04 | 千乡万才科技(中国)有限公司 | Broadcasting method and system for computer multimedia files |
CN1749953A (en) * | 2005-06-30 | 2006-03-22 | 无敌科技(西安)有限公司 | Multimedia playing system with unlimit extension type format support capability |
CN103366780A (en) * | 2012-03-31 | 2013-10-23 | 盛乐信息技术(上海)有限公司 | Multimedia player engine system and use method thereof, and multimedia player |
CN104104972A (en) * | 2013-04-10 | 2014-10-15 | 深圳市快播科技有限公司 | Multimedia playing method, apparatus and system |
CN105407407A (en) * | 2014-06-26 | 2016-03-16 | 广州市动景计算机科技有限公司 | Video playing method and device |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101304433B (en) * | 2008-04-17 | 2011-02-02 | 北京大学 | Method and apparatus for providing data to player as well as multimedia play system |
CN106791546B (en) * | 2017-01-04 | 2019-08-23 | 腾讯科技(深圳)有限公司 | Media data playing method and device |
-
2017
- 2017-01-04 CN CN201710005498.4A patent/CN106791546B/en active Active
- 2017-12-12 WO PCT/CN2017/115568 patent/WO2018126852A1/en active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005327349A (en) * | 2004-05-12 | 2005-11-24 | Funai Electric Co Ltd | Disk reproducing apparatus |
CN1716242A (en) * | 2004-06-28 | 2006-01-04 | 千乡万才科技(中国)有限公司 | Broadcasting method and system for computer multimedia files |
CN1749953A (en) * | 2005-06-30 | 2006-03-22 | 无敌科技(西安)有限公司 | Multimedia playing system with unlimit extension type format support capability |
CN103366780A (en) * | 2012-03-31 | 2013-10-23 | 盛乐信息技术(上海)有限公司 | Multimedia player engine system and use method thereof, and multimedia player |
CN104104972A (en) * | 2013-04-10 | 2014-10-15 | 深圳市快播科技有限公司 | Multimedia playing method, apparatus and system |
CN105407407A (en) * | 2014-06-26 | 2016-03-16 | 广州市动景计算机科技有限公司 | Video playing method and device |
Also Published As
Publication number | Publication date |
---|---|
CN106791546A (en) | 2017-05-31 |
WO2018126852A1 (en) | 2018-07-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106791546B (en) | Media data playing method and device | |
CN108965397A (en) | Cloud video editing method and device, editing equipment and storage medium | |
CN103702171B (en) | Method for downloading video stream and electronic equipment | |
US20120102042A1 (en) | Temporal metadata track | |
CN103533399A (en) | Video-information display method and device | |
CN103517135B (en) | Method, system and television capable of playing MP4-format video files continuously | |
CN101729753B (en) | Method and device for loading pictures during java application | |
CN104679581B (en) | The method and device of running background program | |
CN106131646A (en) | A kind of start method for processing video frequency based on android system and system | |
CN109240833A (en) | Resource allocation method, device, terminal and storage medium | |
CN103064958A (en) | Method for automatic recognition and analysis of browser and based on hyper text makeup language (HTML) 5 video label | |
CN104601535B (en) | Method for processing video frequency and system | |
CN102904857A (en) | Client video playing system and method thereof | |
CN105099796B (en) | A kind of multimedia content change detection method, device and resource broadcasting system | |
CN103051953B (en) | One utilizes video player to carry out coding/decoding method to video file | |
CN105744348A (en) | Method and device for playing video by using web browser and electronic equipment | |
CN104376859B (en) | The method and online music player of a kind of playlist adjust automatically | |
CN103647761B (en) | Method and device for marking audio record, and terminal, server and system | |
CN102065174A (en) | Method and system for pushing multimedia resources of mobile terminal | |
CN102957971A (en) | Weather information transmission display system and method | |
CN103269450A (en) | Multimedia system for Android smart television set | |
CN108600813A (en) | a kind of media file playing method, device and media play system | |
CN103218283B (en) | Electronic device, recording medium management method and program | |
CN109213534A (en) | A kind of method and device of extension live streaming software function | |
WO2016169426A1 (en) | Video playing method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |