CN106792118A - The player method and device of multimedia file - Google Patents

The player method and device of multimedia file Download PDF

Info

Publication number
CN106792118A
CN106792118A CN201611184438.5A CN201611184438A CN106792118A CN 106792118 A CN106792118 A CN 106792118A CN 201611184438 A CN201611184438 A CN 201611184438A CN 106792118 A CN106792118 A CN 106792118A
Authority
CN
China
Prior art keywords
multimedia
framework
medium data
party
multimedia file
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.)
Pending
Application number
CN201611184438.5A
Other languages
Chinese (zh)
Inventor
吴桂洲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201611184438.5A priority Critical patent/CN106792118A/en
Publication of CN106792118A publication Critical patent/CN106792118A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing 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/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4331Caching operations, e.g. of an advertisement for later insertion during playback
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing 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/439Processing of audio elementary streams
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing 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/439Processing of audio elementary streams
    • H04N21/4394Processing of audio elementary streams involving operations for analysing the audio stream, e.g. detecting features or characteristics in audio streams
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing 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/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing 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/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44008Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics in the video stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/81Monomedia components thereof
    • H04N21/8166Monomedia components thereof involving executable data, e.g. software
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/81Monomedia components thereof
    • H04N21/8166Monomedia components thereof involving executable data, e.g. software
    • H04N21/8193Monomedia components thereof involving executable data, e.g. software dedicated tools, e.g. video decoder software or IPMP tool

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The disclosure is directed to the player method and device of a kind of multimedia file, belong to field of terminal technology.Methods described includes:When multimedia instruction is received, determine destination multimedia file, the destination multimedia file is multimedia file to be played, by the analytical capabilities in third party's multimedia framework, the destination multimedia file is parsed, obtain multi-medium data, by the decoding function in third party's multimedia framework, the multi-medium data is decoded, and store to the play buffer of preset multimedia framework the decoded multi-medium data, the play buffer is used to store the decoded multi-medium data, by the preset multimedia framework, obtained from the play buffer and the multi-medium data after broadcast decoder, to play the destination multimedia file.The disclosure improves the result of broadcast and success rate for playing multimedia file.

Description

The player method and device of multimedia file
Technical field
This disclosure relates to field of terminal technology, more particularly to a kind of multimedia file player method and device.
Background technology
With the development of terminal technology, the application of the terminal such as mobile phone, panel computer is more and more extensive.In order to be brought to user More preferable Consumer's Experience, terminal can generally play the multimedia files such as music, film.In correlation technique, terminal is generally included Manufacturer is the multimedia framework of the terminal preset, and the terminal can play multimedia text by the multimedia framework Part.That is to say, it is many to target to be played by the multimedia framework when the terminal receives multimedia to be instructed Media file is parsed, and obtains at least one of voice data and video data, afterwards, can be by the multimedia Framework is decoded and played to the voice data or video data, so as to play destination multimedia file.
The content of the invention
To overcome problem present in correlation technique, the disclosure to provide a kind of player method and device of multimedia file.
According to the first aspect of the embodiment of the present disclosure, there is provided a kind of player method of multimedia file, methods described includes:
When multimedia instruction is received, destination multimedia file is determined, the destination multimedia file is to wait to broadcast The multimedia file put;
By the analytical capabilities in third party's multimedia framework, the destination multimedia file is parsed, obtained To multi-medium data, the multi-medium data includes at least one of voice data and video data;
By the decoding function in third party's multimedia framework, the multi-medium data is decoded, and The decoded multi-medium data is stored to the play buffer of preset multimedia framework, the play buffer For storing the decoded multi-medium data;
By the preset multimedia framework, obtained from the play buffer and described in after broadcast decoder Multi-medium data, to play the destination multimedia file.
Alternatively, the analytical capabilities in the multimedia framework by third party, to the destination multimedia file Parsed, before obtaining multi-medium data, also included:
Determine the type of the destination multimedia file;
Based on the type of the destination multimedia file, judge that the preset multimedia framework supports the target The parsing of multimedia file or third party's media play framework support the parsing of the destination multimedia file;
When third party's multimedia framework supports the parsing of the destination multimedia file, pass through described in execution Analytical capabilities in third party's multimedia framework, parse to the destination multimedia file, obtain multi-medium data The step of.
Alternatively, the decoding function by third party's multimedia framework, to the multi-medium data Before being decoded, also include:
Determine the form of the multi-medium data;
Based on the form of the multi-medium data, judge that the preset multimedia framework supports the multimedia number According to decoding or third party's media play framework support the decoding of the multi-medium data;
When third party's multimedia framework supports the decoding of the multi-medium data, pass through described in execution Decoding function in third party's multimedia framework, the step of decoding to the multi-medium data.
Alternatively, the play buffer includes at least one of audio play buffer and video playback buffering area, The audio play buffer is used to store the decoded voice data, and the video playback buffering area is used to store decoding The video data afterwards;
Correspondingly, it is described by the preset multimedia framework, obtain and play from the play buffer The decoded multi-medium data, including:
It is defeated by the audio in the preset multimedia framework when the multi-medium data includes voice data Go out to service AudioFlinger, the voice data of simultaneously broadcast decoder is obtained from the audio play buffer;
It is defeated by the video in the preset multimedia framework when the multi-medium data includes video data Go out to service SurfaceFlinger, obtained from the video playback buffering area and the video data after broadcast decoder.
Alternatively, third party's multimedia framework is FFmpeg (Fast Forward moving picture Experts group, fast dynamic image expert group).
According to the second aspect of the embodiment of the present disclosure, there is provided a kind of playing device of multimedia file, described device includes:
First determining module, for when multimedia instruction is received, determining destination multimedia file, the target Multimedia file is multimedia file to be played;
Parsing module, for by the analytical capabilities in third party's multimedia framework, to destination multimedia text Part is parsed, and obtains multi-medium data, and the multi-medium data includes at least one of voice data and video data;
Decoder module, for by the decoding function in third party's multimedia framework, to the multimedia number According to being decoded, and the decoded multi-medium data is stored to the play buffer of preset multimedia framework, The play buffer is used to store the decoded multi-medium data;
Playing module, for by the preset multimedia framework, obtaining and broadcasting from the play buffer The decoded multi-medium data is put, to play the destination multimedia file.
Alternatively, described device also includes:
Second determining module, the type for determining the destination multimedia file;
First judge module, for the type based on the destination multimedia file, judges that the preset multimedia is broadcast Put framework and support that the parsing of the destination multimedia file or third party's media play framework support many matchmakers of target The parsing of body file;
First trigger module, the solution for supporting the destination multimedia file when third party's multimedia framework During analysis, the parsing module is triggered by the analytical capabilities in third party's multimedia framework, to destination multimedia text Part is parsed, and obtains multi-medium data.
Alternatively, described device also includes:
3rd determining module, the form for determining the multi-medium data;
Second judge module, for the form based on the multi-medium data, judges the preset multimedia frame Frame supports that the decoding of the multi-medium data or third party's media play framework support the decoding of the multi-medium data;
Second trigger module, the solution for supporting the multi-medium data when third party's multimedia framework During code, the decoder module is triggered by the decoding function in third party's multimedia framework, to the multimedia number According to being decoded.
Alternatively, the play buffer includes at least one of audio play buffer and video playback buffering area, The audio play buffer is used to store the decoded voice data, and the video playback buffering area is used to store decoding The video data afterwards;
Correspondingly, the playing module includes:
First plays submodule, for when the multi-medium data includes voice data, by preset many matchmakers Audio output service AudioFlinger in body playing frame, the institute of simultaneously broadcast decoder is obtained from the audio play buffer State voice data;
Second plays submodule, for when the multi-medium data includes video data, by preset many matchmakers Video frequency output service SurfaceFlinger in body playing frame, obtains and after broadcast decoder from the video playback buffering area The video data.
Alternatively, third party's multimedia framework is FFmpeg.
According to the third aspect of the embodiment of the present disclosure, there is provided a kind of playing device of multimedia file, described device includes:
Processor;
Memory for storing processor-executable instruction;
Wherein, the processor is configured as:
When multimedia instruction is received, destination multimedia file is determined, the destination multimedia file is to wait to broadcast The multimedia file put;
By the analytical capabilities in third party's multimedia framework, the destination multimedia file is parsed, obtained To multi-medium data, the multi-medium data includes at least one of voice data and video data;
By the decoding function in third party's multimedia framework, the multi-medium data is decoded, and The decoded multi-medium data is stored to the play buffer of preset multimedia framework, the play buffer For storing the decoded multi-medium data;
By the preset multimedia framework, obtained from the play buffer and described in after broadcast decoder Multi-medium data, to play the destination multimedia file.
The technical scheme provided by this disclosed embodiment can include the following benefits:In embodiments of the present invention, by It is generally excellent in analytic ability of third party's multimedia framework to multimedia file and the decoding capability to multi-medium data In preset multimedia framework, and the ability of the multi-medium data after preset multimedia framework broadcast decoder is usual Better than third party's multimedia framework, therefore, the terminal can be by third party's multimedia framework to many matchmakers of the target Body file is parsed, and the multi-medium data that parsing is obtained is decoded by third party's multimedia framework, is passed through Preset multimedia framework is played out to the multi-medium data for decoding, and the broadcasting of multimedia file is played so as to improve Effect and success rate.
It should be appreciated that the general description of the above and detailed description hereinafter are only exemplary and explanatory, not The disclosure can be limited.
Brief description of the drawings
Accompanying drawing herein is merged in specification and constitutes the part of this specification, shows and meets implementation of the invention Example, and be used to explain principle of the invention together with specification.
Fig. 1 is a kind of flow chart of the player method of the multimedia file according to an exemplary embodiment.
Fig. 2 is the flow chart of the player method of another multimedia file according to an exemplary embodiment.
Fig. 3 is a kind of block diagram of the playing device of the multimedia file according to an exemplary embodiment.
Fig. 4 is the block diagram of the playing device of another multimedia file according to an exemplary embodiment.
Specific embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following description is related to During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.Following exemplary embodiment Described in implementation method do not represent and the consistent all implementation methods of the present invention.Conversely, they be only with it is such as appended The example of the consistent apparatus and method of some aspects being described in detail in claims, of the invention.
Before detailed explanation is carried out to the embodiment of the present disclosure, first the application scenarios to the embodiment of the present disclosure give Introduce.The terminals such as mobile phone, panel computer can generally play multimedia file.In correlation technique, the terminal generally includes production The preset multimedia framework of business.When multimedia instruction is received, the terminal can be by the preset multimedia Playing frame is parsed and decoded to destination multimedia file to be played, and decoded data are played out.But by Have a many kinds in the type of multimedia file, and the analytic ability and decoding capability of the preset multimedia framework generally compared with Difference, therefore, the multimedia framework of the threshold value is likely difficult to that the destination multimedia file is parsed and decoded, and plays many The success rate of media file is relatively low, so, the embodiment of the present disclosure provides a kind of player method of multimedia file.
Fig. 1 is a kind of flow chart of the player method of the multimedia file according to an exemplary embodiment, reference picture 1, the player method of the multimedia file is used in terminal, comprises the following steps.
In a step 101, when multimedia instruction is received, destination multimedia file is determined, the destination multimedia File is multimedia file to be played.
In a step 102, by the analytical capabilities in third party's multimedia framework, the destination multimedia file is entered Row parsing, obtains multi-medium data, and the multi-medium data includes at least one of voice data and video data.
In step 103, by the decoding function in third party's multimedia framework, the multi-medium data is carried out Decoding, and the decoded multi-medium data is stored to the play buffer of preset multimedia framework, the broadcasting is delayed Area is rushed for storing the decoded multi-medium data.
At step 104, by the preset multimedia framework, obtained and broadcast decoder from the play buffer Multi-medium data afterwards, to play the destination multimedia file.
In the disclosed embodiments, because third party's multimedia framework is to the analytic ability of multimedia file and right The decoding capability of multi-medium data is typically superior to preset multimedia framework, and preset multimedia framework plays solution The ability of the multi-medium data after code is typically superior to third party's multimedia framework, therefore, the terminal can be by third party Multimedia framework is parsed to the destination multimedia file, and parsing is obtained by third party's multimedia framework Multi-medium data decoded, by preset multimedia framework to decode multi-medium data play out so that Improve the result of broadcast and success rate for playing multimedia file.
Alternatively, by the analytical capabilities in third party's multimedia framework, the destination multimedia file is solved Analysis, before obtaining multi-medium data, also includes:
Determine the type of the destination multimedia file;
Based on the type of the destination multimedia file, judge that the preset multimedia framework supports the destination multimedia The parsing of file or third party's media play framework support the parsing of the destination multimedia file;
When third party's multimedia framework supports the parsing of the destination multimedia file, performing should pass through third party Analytical capabilities in multimedia framework, parse to the destination multimedia file, the step of obtain multi-medium data.
Alternatively, by the decoding function in third party's multimedia framework, the multi-medium data is decoded Before, also include:
Determine the form of the multi-medium data;
Form based on the multi-medium data, judges that the preset multimedia framework supports the solution of the multi-medium data Code or third party's media play framework support the decoding of the multi-medium data;
When third party's multimedia framework supports the decoding of the multi-medium data, performing should pass through the 3rd Decoding function in square multimedia framework, the step of decoding to the multi-medium data.
Alternatively, the play buffer includes at least one of audio play buffer and video playback buffering area, should Audio play buffer is used to store the decoded voice data, and the video playback buffering area is regarded for storing decoded this Frequency evidence;
Correspondingly, should be obtained from the play buffer and after broadcast decoder by the preset multimedia framework The multi-medium data, including:
When the multi-medium data includes voice data, taken by the audio output in the preset multimedia framework Business AudioFlinger, the voice data of simultaneously broadcast decoder is obtained from the audio play buffer;
When the multi-medium data includes video data, taken by the video frequency output in the preset multimedia framework Business SurfaceFlinger, obtains and the video data after broadcast decoder from the video playback buffering area.
Alternatively, third party's multimedia framework is FFmpeg.
Above-mentioned all optional technical schemes, can form the alternative embodiment of the disclosure, disclosure reality according to any combination Example is applied no longer to repeat this one by one.
Fig. 2 is a kind of flow chart of the player method of the multimedia file according to an exemplary embodiment, reference picture 2, the player method of the multimedia file is used in terminal, comprises the following steps.
In step 201, when multimedia instruction is received, terminal determines destination multimedia file, and the target is more Media file is multimedia file to be played.
Because the terminal may currently exist multiple multimedia files that can be played, therefore, when receiving the multimedia During play instruction, the terminal can determine destination multimedia file to be played.
Wherein, the terminal can be the terminals such as mobile phone, panel computer, intelligent television, certainly, in actual applications, the end End can also be that other can play the terminal of multimedia file.
It should be noted that the multimedia is instructed for indicating the terminal plays multimedia file, the multimedia is broadcast Putting instruction can be triggered by user by performing predetermined registration operation, and the predetermined registration operation can be click on operation, touch operation, slide behaviour Work, button operation etc. are operated, and certainly, in actual applications, the predetermined registration operation can also be that other are operated.
Also, it should be noted that the destination multimedia file can be that the multimedia file that is locally stored or Streaming Media are more Media file.
Further, the terminal can receive multimedia instruction based on any multimedia file, and connect When receiving multimedia instruction, the multimedia file is defined as destination multimedia file;Or, alternatively possible In implementation, the terminal shows multimedia file menu, the multimedia file dish when multimedia instruction is received List includes the file identification of at least one multimedia file, when selection instruction is received based on any file identification, by this The corresponding multimedia file of file identification is defined as the destination multimedia file.
Wherein, file identification is used to identify a multimedia file in the terminal, and file identification can be the multimedia Title, ID (Identification, identity card) of file etc., certainly, in actual applications, this document mark can also be it It can be identified for that a mark for multimedia file.
It should be noted that the selection instruction is used to select one in the file identification of at least one multimedia file File identification, so that it is determined that the destination multimedia file, the selection instruction can be by user by performing predetermined registration operation triggering.
In step 202., the terminal is based on the type of the destination multimedia file, selects third party's multimedia framework Or preset multimedia framework, the destination multimedia file is parsed, obtain multi-medium data.
Because the multi-medium data of multimedia file generally potentially includes voice data and video data, many matchmakers are being played , it is necessary to difference playing audio-fequency data and video data, therefore, it can parse the destination multimedia file during body file, At least one of voice data and video data for including so as to the multi-medium data for obtaining the destination multimedia file.And Because for different types of multimedia file, required analysis mode may be different, and the preset multimedia frame Frame is generally poor to the analytic ability of multimedia file, therefore, in order to improve the efficiency parsed to the multimedia file, can With the type based on the destination multimedia file, in third party's multimedia framework and the preset multimedia framework One multimedia framework of selection, and multimedia framework by selection parses to the destination multimedia file.
It should be noted that third party's multimedia framework can be FFmpeg.Certainly, in actual applications, should Third party's multimedia framework can also be other multimedia frameworks.
Further, third party's multimedia framework can be integrated in the default multimedia in the form of plug-in unit and be broadcast In putting framework.
Wherein, the terminal can determine the type of the destination multimedia file, based on the type of the destination multimedia file, Judge that the preset multimedia framework supports parsing or third party's media play framework of the destination multimedia file The parsing of the destination multimedia file is supported, when third party's multimedia framework supports the parsing of the destination multimedia file When, by the analytical capabilities in third party's multimedia framework, the destination multimedia file is parsed, obtain multimedia Data.When third party's multimedia framework is not supported to the destination multimedia document analysis, and the preset multimedia is broadcast When putting framework the destination multimedia file can be parsed, by the parsing work(in the preset multimedia framework Can, the destination multimedia file is parsed.That is to say, supported to many matchmakers of the target in third party's multimedia framework When body file is parsed, prioritizing selection third party's multimedia framework is parsed to the destination multimedia file, and Because third party's multimedia framework is typically superior to the preset multimedia framework to the analytic ability of multimedia file, Therefore this mode can improve the success rate to destination multimedia document analysis.Certainly, in actual applications, the terminal also may be used With prioritizing selection, the preset multimedia framework is parsed to the destination multimedia file.
It should be noted that the type of the destination multimedia file can be carried in destination multimedia file, therefore should Terminal can obtain the type of the multi-media objects file from the destination multimedia file.
Further, in order to improve the parsing for judging that the preset multimedia framework supports the destination multimedia file Or third party's media play framework supports the efficiency of the parsing of the destination multimedia file, and then improves broadcasting multimedia text The efficiency of part, the terminal can be according to the type of the destination multimedia file, from the type and multimedia of multimedia file In corresponding relation between framework, it is determined that multimedia framework corresponding with the file fingerprint.
For example, the type of the destination multimedia file is AVI (Audio Video Interleaved, Audio Video Interleaved Form), the terminal according to the type of the destination multimedia file be AVI, the type of the multimedia file described in table 1 below with it is many In corresponding relation between media play framework, determine that the corresponding multimedia frameworks of AVI are third party's multimedia frame Frame, therefore, the terminal determines that third party's multimedia framework can be parsed to the destination multimedia file.
Table 1
The type of multimedia file Multimedia framework
AVI Third party's multimedia framework, preset multimedia framework
FLV Third party's multimedia framework
MP4 Preset multimedia framework
…… ……
It should be noted that the embodiment of the present disclosure is only broadcast with the type of the multimedia file shown in above-mentioned table 1 and multimedia Put and illustrate as a example by the corresponding relation between framework, above-mentioned table 1 is not constituted to the embodiment of the present disclosure and limited.
Also, it should be noted that the terminal can be in the type according to the destination multimedia file, from multimedia file In corresponding relation between type and multimedia framework, it is determined that multimedia frame corresponding with the file fingerprint Before frame, the multimedia text that the preset multimedia framework and third party's multimedia framework are parsed is determined respectively The type of part, and by the type of each multimedia file and the multimedia framework of the multimedia file that can parse the type In corresponding relation of the storage between the type and multimedia framework of multimedia file.
Also, it should be noted that the terminal can be previously stored different types of multimedia file sample, and pass through respectively The preset multimedia framework and third party's multimedia framework enter to the different types of multimedia file sample Row parsing, so as to determine whether the preset multimedia framework and third party's multimedia framework can be to these respectively The multimedia file of each type is parsed in different type.Certainly, in actual applications, the terminal can also be by other Mode determines whether the preset multimedia framework and third party's multimedia framework can be to the differences respectively The multimedia file of each type is parsed in type.
Further, from the foregoing it will be appreciated that third party's multimedia framework is typically superior to the analytic ability of multimedia file The multimedia framework of the terminal preset, therefore in order to improve the efficiency parsed to the destination multimedia file, so that The efficiency for playing the multimedia file is improved, the terminal can not also judge execution that the preset multimedia framework is supported The parsing of the destination multimedia file or third party's media play framework support the step of the parsing of the destination multimedia file Suddenly, so as to directly select third party's multimedia framework, by the analytical capabilities in third party's multimedia framework, The destination multimedia file is parsed, multi-medium data is obtained.
Wherein, because the mode that the carrying out to different types of multimedia file parses is likely to difference, therefore, for standard Really the destination multimedia file is parsed, the analytical capabilities of third party's multimedia framework can include multiple solution Parser function, each resolver function can be used for parsing a type of multimedia file.
For example, when third party's multimedia framework is FFmpeg, the terminal can be called by the FFmpeg Open_input_file functions open the destination multimedia file, call av_read_frame functions to read the destination multimedia The data that file includes, are analyzed by the data for calling sniffer function pairs to read, so that it is determined that one can parse The resolver function that the destination multimedia file data for reading are parsed, and the resolver function pair by determining The data of reading are parsed, so as to parse the destination multimedia file.
It should be noted that the open_input_file functions are used to open multimedia file, the av_read_frame Function is used to read the data in multimedia file, and certainly, in actual applications, the terminal is by calling other functions to open Data in multimedia file or reading multimedia file.
Also, it should be noted that the sniffer functions are used for the data analysis included to multimedia, so that it is determined that an energy Enough parse the resolver function of the multimedia file.Certainly, in actual applications, the terminal can also be by calling other functions The data that multimedia file includes are analyzed, and determine a resolver function that can parse the multimedia file.
In step 203, the terminal is based on the form of the multi-medium data, selection third party's multimedia framework or pre- The multimedia framework put, decodes to the multi-medium data.
Because the multi-medium data includes being typically with the data after different coded systems are compressed, namely It is that the multi-medium data that parsing is obtained may have different forms, the terminal is difficult to directly carry out the multi-medium data Play, therefore, in order to play the multimedia file, it is necessary to be decoded to the multi-medium data.And due to preset multimedia The decoding capability of playing frame is limited, therefore, in order to improve the success rate decoded to multi-medium data, in many matchmakers of third party A multimedia framework, and multimedia by selection is selected to broadcast in body playing frame and preset multimedia framework Framework is put to decode the multi-medium data.
Wherein, the terminal can determine the form of the multi-medium data, the form based on the multi-medium data, judge that this is pre- The multimedia framework put supports that the decoding of the multi-medium data or third party's media play framework support the multimedia The decoding of data, it is many by the third party when third party's multimedia framework supports the decoding to the multi-medium data Decoding function in media play framework, decodes to the multi-medium data.When third party's multimedia framework is not propped up Hold the decoding to the multi-medium data.It is preset by this and the preset multimedia is when supporting the decoding to the multi-medium data Multimedia framework in decoding function, the multi-medium data is decoded.That is to say, broadcast in third party's multimedia Put framework to support when decoding the multi-medium data, prioritizing selection third party's multimedia framework is to the multimedia number According to being parsed.And because the decoding capability of third party's multimedia framework is typically due to the preset multimedia frame Frame, therefore, this mode can improve the success rate to multi-medium data parsing.Certainly, in actual applications, the terminal also may be used The multi-medium data is decoded with the multimedia framework of the prioritizing selection threshold value.
It should be noted that the form of multi-medium data can be carried in the multi-medium data, therefore, the terminal can be with The form of the multi-medium data is obtained from the multi-medium data.
Also, it should be noted that the terminal judges preset multimedia frameworks supports the decoding of the multi-medium data Or third party's media play framework support the multi-medium data decoding mode, can with judge the preset multimedia Playing frame supports that the parsing of the destination multimedia file or third party's media play framework support destination multimedia text The mode of the parsing of part is similar, and the embodiment of the present disclosure is no longer repeated one by one.
Further, in order to improve the efficiency decoded to the multi-medium data, and then the broadcasting many matchmakers of the target are improved The efficiency of body file, therefore, the terminal can not also be performed and judge that the preset multimedia framework supports the multimedia number According to decoding or third party's media play framework support the decoding of the multi-medium data the step of, so as to directly select this Tripartite's multimedia framework, by the decoding function in third party's multimedia framework, is carried out to the multi-medium data Decoding.
It should be noted that the terminal can be in the multimedia decoded to the multi-medium data by selection Framework with the destination multimedia file is decoded after, the multi-medium data is stored to for entering to the multi-medium data In the decoding buffer zone of the multimedia framework of row decoding, the decoding buffer zone is used to store to enter the destination multimedia file Multi-medium data obtained by row parsing.Afterwards, the terminal can be broadcast by the multimedia that the multi-medium data is decoded Framework is put, the multi-medium data is obtained from the decoding buffer zone, and the multi-medium data is decoded.
Also, it should be noted that because the multi-medium data potentially includes voice data and video data, therefore, the decoding Buffering area can also include at least one of audio decoder buffer and video frequency decoding buffer zone, wherein, the audio decoder delays Rush area to can be used for storing the voice data, the video frequency decoding buffer zone can be used for storing the video data.
For example, when the multimedia framework that the terminal selects this preset is decoded to the multi-medium data, can be with The voice data that the multi-medium data includes is stored the audio MediaBuffer included to the preset multimedia framework In (media buffering), the video data that the multi-medium data includes is stored the video included to the preset multimedia frame In MediaBuffer, MediaBuffer is that a kind of in the preset multimedia framework can be used for the number of data storage According to structure.When the terminal selects third party's multimedia framework to decode the multi-medium data, and the third party When multimedia framework is FFmpeg, the voice data that the multimedia includes can be stored the audio included to the FFmpeg In avpacket, during the video data that the multimedia includes stored into the video avpacket included to the FFmpeg, Avpacket is that a kind of in the FFmpeg can be used for the structure of data transfer.
Further, the efficiency of the destination multimedia file is played to improve, the terminal can be by the multi-medium data Store into shared buffer, the shared buffer can be that the terminal is set up in advance.And the preset multimedia framework With third party's multimedia framework share decoding buffer zone, the shared buffer can include audio shared buffer and At least one of video shared buffer.
In sum, the terminal can be solved by following four kinds of possible implementations to the destination multimedia file Analysis, and the multi-medium data that parsing is obtained is decoded:
The first possible implementation, the terminal can be by third party's multimedia framework to many matchmakers of the target Body file is parsed, and the multi-medium data is decoded by third party's multimedia framework.
Second possible implementation, the terminal can be by third party's multimedia framework to many matchmakers of the target Body file is parsed, and the multi-medium data is decoded by the preset multimedia framework.
The third possible implementation, the terminal can be by the preset multimedia framework to many matchmakers of the target Body file is parsed, and the multi-medium data is decoded by third party's multimedia framework.
4th kind of possible implementation, the terminal can be by the preset multimedia framework to many matchmakers of the target Body file is parsed, and the multi-medium data is decoded by the preset multimedia framework.
Further, after being decoded to the multi-medium data, the decoded multi-medium data can be stored To the play buffer of preset multimedia framework, the play buffer is used to store the decoded multi-medium data.
Wherein, the play buffer includes at least one of audio play buffer and video playback buffering area, the sound Frequency play buffer is used to store the decoded voice data, and the video playback buffering area is used to store the decoded video Data.The terminal can be stored into audio play buffer the decoded voice data, by the decoded video counts According to storage in the video playback buffering area.
In step 204, the terminal is entered by the preset multimedia framework to the decoded multi-medium data Row is played, to play the destination multimedia file.
Due to being decoded to the multi-medium data, therefore, it can directly by many matchmakers after broadcast decoder Volume data, so as to play the destination multimedia file.And because the preset multimedia framework is simultaneous generally with the terminal Capacitive is higher, therefore, when the terminal plays the multimedia file by the preset multimedia framework, can be preferably sharp With the hardware resource of the terminal such that it is able to reduce play the destination multimedia file when occur sound draw it is asynchronous the problems such as, It is that can improve the result of broadcast and success rate of broadcasting the destination multimedia file
Wherein, the terminal can be obtained and broadcast by the preset multimedia framework from the play buffer Putting the operation of the decoded multi-medium data can be:It is preset by this when the multi-medium data includes voice data Audio output service AudioFlinger in multimedia framework, obtains and broadcast decoder from the audio play buffer The voice data, it is defeated by the video in the preset multimedia framework when the multi-medium data includes video data Go out to service SurfaceFlinger, obtained from the video playback buffering area and the video data after broadcast decoder.
It should be noted that the AudioFlinger is for playing audio-fequency data in the preset multimedia framework Audio output service, the SurfaceFlinger is regarding for playing video data in the preset multimedia framework Frequency output service.
Further, during the destination multimedia file is played, the terminal may need should to currently playing Destination multimedia file carries out the skip operations such as F.F., rewind, that is to say, it may be necessary to obtain the destination multimedia document The data put of positioning, and data to getting are parsed and are decoded, therefore, when the terminal is more to the target by FFmpeg Media file is parsed, or when being decoded to multi-medium data by FFmpeg, can be by avformat_seek_ File functions obtain the data of specified location in the multimedia file.
Wherein, avformat_seek_file functions are for obtaining the number of specified location in multimedia file in FFmpeg According to function.Certainly, in actual applications, the terminal can also obtain specified location in multimedia file by other functions Data.
In addition, during the destination multimedia file is played, the terminal can also be by third party's multimedia Framework realizes other functions, such as, show thumbnail of the destination multimedia file etc..
In the disclosed embodiments, firstly, since third party's multimedia framework is to the analytic ability of multimedia file And it is typically superior to preset multimedia framework to the decoding capability of multi-medium data, and preset multimedia framework The ability of the multi-medium data after broadcast decoder is typically superior to third party's multimedia framework, therefore, the terminal can pass through Third party's multimedia framework is parsed to the destination multimedia file, and by third party's multimedia framework to solution The multi-medium data that analysis is obtained is decoded, and the multi-medium data for decoding is broadcast by preset multimedia framework Put, the result of broadcast and success rate of multimedia file are played so as to improve.Secondly, solved when to the destination multimedia file When analysing or the multi-medium data being decoded, the terminal can be in the preset multimedia framework and many matchmakers of the third party A multimedia framework is selected between body playing frame such that it is able to neatly select multimedia framework to the target Flexibility that multimedia file is decoded or the flexibility parsed to the multi-medium data, so that ensure exactly can be right The destination multimedia file is parsed, and the multi-medium data that parsing is obtained is decoded, and further increases broadcasting many The result of broadcast and success rate of media file.
Fig. 3 is a kind of playing device block diagram of the multimedia file according to an exemplary embodiment.Reference picture 3, should Device includes the first determining module 301, parsing module 302, decoder module 303 and playing module 304.
First determining module 301, for when multimedia instruction is received, determining destination multimedia file, the mesh Mark multimedia file is multimedia file to be played;
Parsing module 302, for by the analytical capabilities in third party's multimedia framework, to destination multimedia text Part is parsed, and obtains multi-medium data, and the multi-medium data includes at least one of voice data and video data;
Decoder module 303, for by the decoding function in third party's multimedia framework, to the multi-medium data Decoded, and the decoded multi-medium data is stored to the play buffer of preset multimedia framework, this is broadcast Buffering area is put for storing the decoded multi-medium data;
Playing module 304, for by the preset multimedia framework, obtaining and playing from the play buffer Decoded multi-medium data, to play the destination multimedia file.
Alternatively, the device also includes:
Second determining module, the type for determining the destination multimedia file;
First judge module, for the type based on the destination multimedia file, judges the preset multimedia frame Frame supports that the parsing of the destination multimedia file or third party's media play framework support the solution of the destination multimedia file Analysis;
First trigger module, the parsing for supporting the destination multimedia file when third party's multimedia framework When, the parsing module is triggered by the analytical capabilities in third party's multimedia framework, the destination multimedia file is carried out Parsing, obtains multi-medium data.
Alternatively, the device also includes:
3rd determining module, the form for determining the multi-medium data;
Second judge module, for the form based on the multi-medium data, judges the preset multimedia framework branch The decoding of the multi-medium data is supported in the decoding or third party's media play framework of holding the multi-medium data;
Second trigger module, the decoding for supporting the multi-medium data when third party's multimedia framework When, the decoder module is triggered by the decoding function in third party's multimedia framework, the multi-medium data is solved Code.
Alternatively, the play buffer includes at least one of audio play buffer and video playback buffering area, should Audio play buffer is used to store the decoded voice data, and the video playback buffering area is regarded for storing decoded this Frequency evidence;
Correspondingly, the playing module 304 includes:
First plays submodule, for when the multi-medium data includes voice data, being broadcast by the preset multimedia The audio output service AudioFlinger in framework is put, the audio number of simultaneously broadcast decoder is obtained from the audio play buffer According to;
Second plays submodule, for when the multi-medium data includes video data, being broadcast by the preset multimedia The video frequency output service SurfaceFlinger in framework is put, this from after video playback buffering area acquisition and broadcast decoder is regarded Frequency evidence.
Alternatively, third party's multimedia framework is FFmpeg.
In the disclosed embodiments, because third party's multimedia framework is to the analytic ability of multimedia file and right The decoding capability of multi-medium data is typically superior to preset multimedia framework, and preset multimedia framework plays solution The ability of the multi-medium data after code is typically superior to third party's multimedia framework, therefore, the terminal can be by third party Multimedia framework is parsed to the destination multimedia file, and parsing is obtained by third party's multimedia framework Multi-medium data decoded, by preset multimedia framework to decode multi-medium data play out so that Improve the result of broadcast and success rate for playing multimedia file.
On the device in above-described embodiment, wherein modules perform the concrete mode of operation in relevant the method Embodiment in be described in detail, explanation will be not set forth in detail herein.
Fig. 4 is a kind of block diagram of the playing device 400 of the multimedia file according to an exemplary embodiment.For example, Device 400 can be mobile phone, computer, digital broadcast terminal, messaging devices, game console, tablet device, doctor Treatment equipment, body-building equipment, personal digital assistant etc..
Reference picture 4, device 400 can include following one or more assemblies:Processing assembly 402, memory 404, power supply Component 406, multimedia groupware 408, audio-frequency assembly 410, the interface 412 of input/output (I/O), sensor cluster 414, and Communication component 416.
The integrated operation of the usual control device 400 of processing assembly 402, such as with display, call, data communication, phase Machine is operated and the associated operation of record operation.Processing assembly 402 can refer to including one or more processors 420 to perform Order, to complete all or part of step of above-mentioned method.Additionally, processing assembly 402 can include one or more modules, just Interaction between processing assembly 402 and other assemblies.For example, processing assembly 402 can include multi-media module, it is many to facilitate Interaction between media component 408 and processing assembly 402.
Memory 404 is configured as storing various types of data supporting the operation in device 400.These data are shown Example includes the instruction for any application program or method operated on device 400, and contact data, telephone book data disappears Breath, picture, video etc..Memory 404 can be by any kind of volatibility or non-volatile memory device or their group Close and realize, such as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM) is erasable to compile Journey read-only storage (EPROM), programmable read only memory (PROM), read-only storage (ROM), magnetic memory, flash Device, disk or CD.
Power supply module 406 provides power supply for the various assemblies of device 400.Power supply module 406 can include power management system System, one or more power supplys, and other generate, manage and distribute the component that power supply is associated with for device 400.
Multimedia groupware 408 is included in one screen of output interface of offer between described device 400 and user.One In a little embodiments, screen can include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen Curtain may be implemented as touch-screen, to receive the input signal from user.Touch panel includes one or more touch sensings Device is with the gesture on sensing touch, slip and touch panel.The touch sensor can not only sensing touch or sliding action Border, but also detection and the touch or slide related duration and pressure.In certain embodiments, many matchmakers Body component 408 includes a front camera and/or rear camera.When device 400 be in operator scheme, such as screening-mode or During video mode, front camera and/or rear camera can receive outside multi-medium data.Each front camera and Rear camera can be a fixed optical lens system or with focusing and optical zoom capabilities.
Audio-frequency assembly 410 is configured as output and/or input audio signal.For example, audio-frequency assembly 410 includes a Mike Wind (MIC), when device 400 is in operator scheme, such as call model, logging mode and speech recognition mode, microphone is matched somebody with somebody It is set to reception external audio signal.The audio signal for being received can be further stored in memory 404 or via communication set Part 416 sends.In certain embodiments, audio-frequency assembly 410 also includes a loudspeaker, for exports audio signal.
, to provide interface between processing assembly 402 and peripheral interface module, above-mentioned peripheral interface module can for I/O interfaces 412 To be keyboard, click wheel, button etc..These buttons may include but be not limited to:Home button, volume button, start button and lock Determine button.
Sensor cluster 414 includes one or more sensors, and the state for providing various aspects for device 400 is commented Estimate.For example, sensor cluster 414 can detect the opening/closed mode of device 400, the relative positioning of component is for example described Component is the display and keypad of device 400, and sensor cluster 414 can be with 400 1 components of detection means 400 or device Position change, user is presence or absence of with what device 400 was contacted, the orientation of device 400 or acceleration/deceleration and device 400 Temperature change.Sensor cluster 414 can include proximity transducer, be configured to be detected when without any physical contact The presence of neighbouring object.Sensor cluster 414 can also include optical sensor, such as CMOS or ccd image sensor, for into As being used in application.In certain embodiments, the sensor cluster 414 can also include acceleration transducer, gyro sensors Device, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 416 is configured to facilitate the communication of wired or wireless way between device 400 and other equipment.Device 400 can access the wireless network based on communication standard, such as WiFi, 2G or 3G, or combinations thereof.In an exemplary implementation In example, communication component 416 receives broadcast singal or broadcast related information from external broadcasting management system via broadcast channel. In one exemplary embodiment, the communication component 416 also includes near-field communication (NFC) module, to promote junction service.Example Such as, NFC module can be based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB) technology, Bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 400 can be by one or more application specific integrated circuits (ASIC), numeral letter Number processor (DSP), digital signal processing appts (DSPD), PLD (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components realization, for performing the above method.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instructing, example are additionally provided Such as include the memory 404 of instruction, above-mentioned instruction can be performed to complete the above method by the processor 420 of device 400.For example, The non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk With optical data storage devices etc..
A kind of non-transitorycomputer readable storage medium, when the instruction in the storage medium is by the treatment of mobile terminal When device is performed so that mobile terminal is able to carry out a kind of player method of multimedia file, and methods described includes:
When multimedia instruction is received, destination multimedia file is determined, the destination multimedia file is to be played Multimedia file;
By the analytical capabilities in third party's multimedia framework, the destination multimedia file is parsed, obtained Multi-medium data, the multi-medium data includes at least one of voice data and video data;
By the decoding function in third party's multimedia framework, the multi-medium data is decoded, and will solution The multi-medium data after code is stored to the play buffer of preset multimedia framework, and the play buffer is used to store The decoded multi-medium data;
By the preset multimedia framework, obtained from the play buffer and the multimedia after broadcast decoder Data, to play the destination multimedia file.
Alternatively, by the analytical capabilities in third party's multimedia framework, the destination multimedia file is solved Analysis, before obtaining multi-medium data, also includes:
Determine the type of the destination multimedia file;
Based on the type of the destination multimedia file, judge that the preset multimedia framework supports the destination multimedia The parsing of file or third party's media play framework support the parsing of the destination multimedia file;
When third party's multimedia framework supports the parsing of the destination multimedia file, performing should pass through third party Analytical capabilities in multimedia framework, parse to the destination multimedia file, the step of obtain multi-medium data.
Alternatively, by the decoding function in third party's multimedia framework, the multi-medium data is decoded Before, also include:
Determine the form of the multi-medium data;
Form based on the multi-medium data, judges that the preset multimedia framework supports the solution of the multi-medium data Code or third party's media play framework support the decoding of the multi-medium data;
When third party's multimedia framework supports the decoding of the multi-medium data, performing should pass through the 3rd Decoding function in square multimedia framework, the step of decoding to the multi-medium data.
Alternatively, the play buffer includes at least one of audio play buffer and video playback buffering area, should Audio play buffer is used to store the decoded voice data, and the video playback buffering area is regarded for storing decoded this Frequency evidence;
Correspondingly, should be obtained from the play buffer and after broadcast decoder by the preset multimedia framework The multi-medium data, including:
When the multi-medium data includes voice data, taken by the audio output in the preset multimedia framework Business AudioFlinger, the voice data of simultaneously broadcast decoder is obtained from the audio play buffer;
When the multi-medium data includes video data, taken by the video frequency output in the preset multimedia framework Business SurfaceFlinger, obtains and the video data after broadcast decoder from the video playback buffering area.
Alternatively, third party's multimedia framework is FFmpeg.
In the disclosed embodiments, because third party's multimedia framework is to the analytic ability of multimedia file and right The decoding capability of multi-medium data is typically superior to preset multimedia framework, and preset multimedia framework plays solution The ability of the multi-medium data after code is typically superior to third party's multimedia framework, therefore, the terminal can be by third party Multimedia framework is parsed to the destination multimedia file, and parsing is obtained by third party's multimedia framework Multi-medium data decoded, by preset multimedia framework to decode multi-medium data play out so that Improve the result of broadcast and success rate for playing multimedia file.
Those skilled in the art considering specification and after putting into practice invention disclosed herein, will readily occur to it is of the invention its Its embodiment.The application is intended to any modification of the invention, purposes or adaptations, these modifications, purposes or Person's adaptations follow general principle of the invention and including the undocumented common knowledge in the art of the disclosure Or conventional techniques.Description and embodiments are considered only as exemplary, and true scope and spirit of the invention are by following Claim is pointed out.
It should be appreciated that the invention is not limited in the precision architecture being described above and be shown in the drawings, and And can without departing from the scope carry out various modifications and changes.The scope of the present invention is only limited by appended claim.

Claims (11)

1. a kind of player method of multimedia file, it is characterised in that methods described includes:
When multimedia instruction is received, destination multimedia file is determined, the destination multimedia file is to be played Multimedia file;
By the analytical capabilities in third party's multimedia framework, the destination multimedia file is parsed, obtain many Media data, the multi-medium data includes at least one of voice data and video data;
By the decoding function in third party's multimedia framework, the multi-medium data is decoded, and will solution The multi-medium data after code is stored to the play buffer of preset multimedia framework, and the play buffer is used for Store the decoded multi-medium data;
By the preset multimedia framework, obtained from the play buffer and the described many matchmakers after broadcast decoder Volume data, to play the destination multimedia file.
2. the method for claim 1, it is characterised in that the parsing work(in the multimedia framework by third party Can, the destination multimedia file is parsed, before obtaining multi-medium data, also include:
Determine the type of the destination multimedia file;
Based on the type of the destination multimedia file, judge that the preset multimedia framework supports many matchmakers of target The parsing of body file or third party's media play framework support the parsing of the destination multimedia file;
When third party's multimedia framework supports the parsing of the destination multimedia file, perform described by the 3rd Analytical capabilities in square multimedia framework, parse to the destination multimedia file, obtain the step of multi-medium data Suddenly.
3. the method for claim 1, it is characterised in that the solution by third party's multimedia framework Code function, before being decoded to the multi-medium data, also includes:
Determine the form of the multi-medium data;
Based on the form of the multi-medium data, judge that the preset multimedia framework supports the multi-medium data Decoding or third party's media play framework support the decoding of the multi-medium data;
When third party's multimedia framework supports the decoding of the multi-medium data, perform described by described Decoding function in third party's multimedia framework, the step of decoding to the multi-medium data.
4. the method for claim 1, it is characterised in that the play buffer includes audio play buffer and video At least one of play buffer, the audio play buffer is used to store the decoded voice data, described to regard Frequency play buffer is used to store the decoded video data;
Correspondingly, it is described by the preset multimedia framework, obtained and broadcast decoder from the play buffer The multi-medium data afterwards, including:
When the multi-medium data includes voice data, taken by the audio output in the preset multimedia framework Business AudioFlinger, the voice data of simultaneously broadcast decoder is obtained from the audio play buffer;
When the multi-medium data includes video data, taken by the video frequency output in the preset multimedia framework Business SurfaceFlinger, obtains and the video data after broadcast decoder from the video playback buffering area.
5. the method for claim 1, it is characterised in that third party's multimedia framework is fast dynamic image Expert group FFmpeg.
6. a kind of playing device of multimedia file, it is characterised in that described device includes:
First determining module, for when multimedia instruction is received, determining destination multimedia file, many matchmakers of target Body file is multimedia file to be played;
Parsing module, for by the analytical capabilities in third party's multimedia framework, entering to the destination multimedia file Row parsing, obtains multi-medium data, and the multi-medium data includes at least one of voice data and video data;
Decoder module, for by the decoding function in third party's multimedia framework, entering to the multi-medium data Row decoding, and the decoded multi-medium data is stored to the play buffer of preset multimedia framework, it is described Play buffer is used to store the decoded multi-medium data;
Playing module, for by the preset multimedia framework, obtains from the play buffer and plays solution The multi-medium data after code, to play the destination multimedia file.
7. device as claimed in claim 6, it is characterised in that described device also includes:
Second determining module, the type for determining the destination multimedia file;
First judge module, for the type based on the destination multimedia file, judges the preset multimedia frame Frame supports that the parsing of the destination multimedia file or third party's media play framework support the destination multimedia text The parsing of part;
First trigger module, the parsing for supporting the destination multimedia file when third party's multimedia framework When, the parsing module is triggered by the analytical capabilities in third party's multimedia framework, to the destination multimedia file Parsed, obtained multi-medium data.
8. device as claimed in claim 6, it is characterised in that described device also includes:
3rd determining module, the form for determining the multi-medium data;
Second judge module, for the form based on the multi-medium data, judges the preset multimedia framework branch The decoding of the multi-medium data is supported in the decoding or third party's media play framework of holding the multi-medium data;
Second trigger module, the decoding for supporting the multi-medium data when third party's multimedia framework When, the decoder module is triggered by the decoding function in third party's multimedia framework, to the multi-medium data Decoded.
9. installation method as claimed in claim 6, it is characterised in that the play buffer includes audio play buffer and regards At least one of frequency play buffer, the audio play buffer is used to store the decoded voice data, described Video playback buffering area is used to store the decoded video data;
Correspondingly, the playing module includes:
First plays submodule, for when the multi-medium data includes voice data, being broadcast by the preset multimedia The audio output service AudioFlinger in framework is put, the sound of simultaneously broadcast decoder is obtained from the audio play buffer Frequency evidence;
Second plays submodule, for when the multi-medium data includes video data, being broadcast by the preset multimedia The video frequency output service SurfaceFlinger in framework is put, is obtained from the video playback buffering area and the institute after broadcast decoder State video data.
10. device as claimed in claim 6, it is characterised in that third party's multimedia framework is quick Dynamic Graph As expert group FFmpeg.
11. a kind of playing devices of multimedia file, it is characterised in that described device includes:
Processor;
Memory for storing processor-executable instruction;
Wherein, the processor is configured as:
When multimedia instruction is received, destination multimedia file is determined, the destination multimedia file is to be played Multimedia file;
By the analytical capabilities in third party's multimedia framework, the destination multimedia file is parsed, obtain many Media data, the multi-medium data includes at least one of voice data and video data;
By the decoding function in third party's multimedia framework, the multi-medium data is decoded, and will solution The multi-medium data after code is stored to the play buffer of preset multimedia framework, and the play buffer is used for Store the decoded multi-medium data;
By the preset multimedia framework, obtained from the play buffer and the described many matchmakers after broadcast decoder Volume data, to play the destination multimedia file.
CN201611184438.5A 2016-12-20 2016-12-20 The player method and device of multimedia file Pending CN106792118A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611184438.5A CN106792118A (en) 2016-12-20 2016-12-20 The player method and device of multimedia file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611184438.5A CN106792118A (en) 2016-12-20 2016-12-20 The player method and device of multimedia file

Publications (1)

Publication Number Publication Date
CN106792118A true CN106792118A (en) 2017-05-31

Family

ID=58896041

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611184438.5A Pending CN106792118A (en) 2016-12-20 2016-12-20 The player method and device of multimedia file

Country Status (1)

Country Link
CN (1) CN106792118A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107995522A (en) * 2017-12-19 2018-05-04 深圳市沃特沃德股份有限公司 Onboard system plays the method and device of video
CN110858923A (en) * 2018-08-24 2020-03-03 北京字节跳动网络技术有限公司 Method and device for generating segmented media file and storage medium
CN112788421A (en) * 2019-11-08 2021-05-11 京东方科技集团股份有限公司 Multimedia playing method, main control board, multimedia playing equipment and system
CN113225495A (en) * 2021-04-23 2021-08-06 深圳创维-Rgb电子有限公司 Method and device for eliminating video playing noise
WO2023077866A1 (en) * 2021-11-02 2023-05-11 北京字节跳动网络技术有限公司 Multimedia data processing method and apparatus, electronic device, and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102306103A (en) * 2011-08-25 2012-01-04 华南理工大学 Software development kit (SDK) module for Android real time streaming protocol (RTSP) player
CN103077003A (en) * 2012-12-27 2013-05-01 中兴通讯股份有限公司 Method, device and system for outputting HiFi (High Fidelity) audio frequency
CN104754349A (en) * 2013-12-25 2015-07-01 炫一下(北京)科技有限公司 Method and device for hardware decoding of audio/video
CN104837052A (en) * 2014-06-10 2015-08-12 腾讯科技(北京)有限公司 Playing method of multimedia data and device
CN106131319A (en) * 2016-06-29 2016-11-16 努比亚技术有限公司 A kind of information processing method and device, terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102306103A (en) * 2011-08-25 2012-01-04 华南理工大学 Software development kit (SDK) module for Android real time streaming protocol (RTSP) player
CN103077003A (en) * 2012-12-27 2013-05-01 中兴通讯股份有限公司 Method, device and system for outputting HiFi (High Fidelity) audio frequency
CN104754349A (en) * 2013-12-25 2015-07-01 炫一下(北京)科技有限公司 Method and device for hardware decoding of audio/video
CN104837052A (en) * 2014-06-10 2015-08-12 腾讯科技(北京)有限公司 Playing method of multimedia data and device
CN106131319A (en) * 2016-06-29 2016-11-16 努比亚技术有限公司 A kind of information processing method and device, terminal

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107995522A (en) * 2017-12-19 2018-05-04 深圳市沃特沃德股份有限公司 Onboard system plays the method and device of video
CN110858923A (en) * 2018-08-24 2020-03-03 北京字节跳动网络技术有限公司 Method and device for generating segmented media file and storage medium
CN112788421A (en) * 2019-11-08 2021-05-11 京东方科技集团股份有限公司 Multimedia playing method, main control board, multimedia playing equipment and system
CN112788421B (en) * 2019-11-08 2023-05-26 京东方科技集团股份有限公司 Multimedia playing method, main control board, multimedia playing device and system
CN113225495A (en) * 2021-04-23 2021-08-06 深圳创维-Rgb电子有限公司 Method and device for eliminating video playing noise
CN113225495B (en) * 2021-04-23 2022-09-02 深圳创维-Rgb电子有限公司 Method and device for eliminating video playing noise
WO2023077866A1 (en) * 2021-11-02 2023-05-11 北京字节跳动网络技术有限公司 Multimedia data processing method and apparatus, electronic device, and storage medium

Similar Documents

Publication Publication Date Title
CN104159275B (en) Method for connecting network and device
CN106792118A (en) The player method and device of multimedia file
CN104731688B (en) Point out the method and device of reading progress
CN104391711B (en) A kind of method and device that screen protection is set
US20170126801A1 (en) Method, apparatus, and storage medium for performing media synchronization
CN106210757A (en) Live broadcasting method, live broadcast device and live broadcast system
CN103916711A (en) Method and device for playing video signals
CN104933170A (en) Information exhibition method and device
CN105845124A (en) Audio processing method and device
CN107608561A (en) Touch-screen control method and device
CN105354017B (en) Information processing method and device
CN106559712A (en) Video playback processing method, device and terminal device
CN106790043A (en) The method and device of message is sent in live application
CN105068976A (en) Ticket information exhibition method and device
CN106020634A (en) Screen capture method and device
CN106658215A (en) Method and device for pushing live file
CN112543368A (en) Video processing method, video playing method, video processing device, video playing device and storage medium
CN107277628A (en) Video preview display methods and device
CN107147957A (en) Video broadcasting method and device
KR101834269B1 (en) Method, device, program and recording medium for playing audio
CN107122430A (en) Search result display methods and device
EP3291508A1 (en) Message pushing method and device, and terminal equipment
CN105451056A (en) Audio and video synchronization method and device
CN105872573A (en) Video playing method and apparatus
CN104679386A (en) Method and device for carrying out sound recording processing

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170531