CN101211353A - Method for recognizing multi- format media file - Google Patents
Method for recognizing multi- format media file Download PDFInfo
- Publication number
- CN101211353A CN101211353A CNA2006101706648A CN200610170664A CN101211353A CN 101211353 A CN101211353 A CN 101211353A CN A2006101706648 A CNA2006101706648 A CN A2006101706648A CN 200610170664 A CN200610170664 A CN 200610170664A CN 101211353 A CN101211353 A CN 101211353A
- Authority
- CN
- China
- Prior art keywords
- media
- medium
- module
- control unit
- 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
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention proposes an accurate and high-efficiency method for identifying whether media files can be played; meanwhile, the method further proposes a system for preventing users from erroneously deleting media control unit programs so as to facilitate the version update of media control units. The invention includes a new media file, a new control unit, a master control program and a media control unit library; the master control program comprises a suffix name searching module, a file head determination module, a code calling module as well as a media control unit library register and loading module; the media control unit library is also composed of a media control unit corresponding to all kinds of media files. Through direct determination in the master control program for suffix names and media file heads in media files, the invention can improve the identification rate for media file formats; through specifications on file heads in the media control unit, the invention can lower calling times for the code calling module, so as to improve the efficiency of the media control unit program; by using the media control unit library register and loading module, the invention can effectively manage the media control unit, so that the media control unit has the functions of erroneous deletion prevention and convenient version updating.
Description
Technical field
The present invention relates to Play Technique for Multimedia, the especially a kind of method of multi-format media file and method that these media files are deciphered, play discerned.
Background technology
Along with the fast development of multimedia technology, memory technology, transmission technology, the kind of media file emerges in an endless stream.Plurality of picture form, audio format, picture format, network documentation form, animated format etc. continue to bring out, and, for specific application, the media file of comprehensive above-mentioned several forms can appear, increased the kind of media file format again greatly.
Traditional embedded device all is to design at specific media file generally, generally can only play the file of specific format, causes following three problems: the firstth, and the extensibility of system is bad, can't support other media file; The secondth, the format error before being difficult to correct in the version file, though can partly address the above problem by upgrading, software upgrading is for user's complicated operation, and the risk of program is lost in existence; The 3rd is that tempo of development is slow, if require the file layout of support more, need finish all codes before launch, often consumes a lot of times.
The method of traditional identification multi-format media file is to judge according to the suffix name of file whether this document can be play, but the different situation of kind of document for having identical suffix name, then can't handle, whether can play iff judge file according to the suffix name, the user is misunderstood in the time can not playing, simultaneously, calling playing program needs the regular hour, influences user's use.
In the disclosed at present technology, the method that also has some to discern at multi-format media file, these methods are when judging the file suffixes name, also judge the file header of media file, improved discrimination to media file format, these methods address the above problem by setting up translator storehouse or module often, but the problem that exists is: 1, can not effectively avoid the be not intended to destruction of user to translator; 2, translator storehouse of being set up or module upgrade difficulty; 3, call the playing efficiency that translator storehouse or module influence media file.
As having proposed a kind of multi-format media file recognition methods among the disclosed Chinese patent literature CN1749953, suffix name or file header by form recognition module judgement media file call corresponding translator by the translator calling module again media file are decoded.This method can partly solve the problem low to the media file discrimination, but can not solve all problems that exists in the above-mentioned prior art fully.
Summary of the invention
The objective of the invention is to present situation numerous and complicated at various media file formats and that the new media form continues to bring out, propose a kind of accurately, the efficient identification media file method that whether can be played, simultaneously, this method has proposed also to prevent that the user from missing the mechanism of deleting medium control program and being convenient to the edition upgrading of medium control.
Technical scheme of the present invention is as follows: a kind of method of discerning multi-format media file, comprise primary control program and medium widget library, wherein, primary control program comprises the suffix name and searches module, file header determination module, invoke code module and medium widget library registration load-on module, the medium control that comprises corresponding various media files in the medium widget library, after primary control program is found new media file and new control, search the identification that module and file header determination module are finished new media file and new control form by the suffix name; The storage directory attribute of medium widget library registration load-on module medium widget library is set to " system file " and " hidden file ", to avoid the be not intended to deletion of user to medium control program.Described medium widget library registration load-on module has been stipulated the form of medium controls, has increased the medium control version number and the adjustable length media file header of the media file suffix name of 8 bytes, 4 bytes in promptly the decode front of code of the new control head that obtains exactly.
Good effect of the present invention is: by directly judge the suffix name and the media file head of media file in primary control program, improve the discrimination to media file format, make the access times of invoke code module reduce, improve the efficient of medium control program; Use by medium widget library registration load-on module manages the medium control effectively, makes the medium control have anti-error deletion and reaches the function of carrying out version updating easily.
Description of drawings
Fig. 1 is a system construction drawing;
Fig. 2 is media file identification process figure;
Fig. 3 is control procedure stores bibliographic structure figure;
Fig. 4 is a play control form synoptic diagram;
Fig. 5 is a media file suffix name format synoptic diagram;
Fig. 6 is a media file head form synoptic diagram;
Fig. 7 is store data structure figure in the media file head.
Embodiment
The described a kind of method of discerning multi-format media file of present embodiment, comprise primary control program, medium widget library, see Fig. 1, wherein have the suffix name in the primary control program and search module, file header determination module, invoke code module and medium widget library registration load-on module; In the medium widget library the various media play controls that loaded.After primary control program is found new media file and new control, search the identification that module and file header determination module are finished new media file and new control form by the suffix name; The storage directory attribute of medium widget library registration load-on module medium widget library is set to " system file " and " hidden file ", to avoid the be not intended to deletion of user to medium control program.
As shown in Figure 2, when a new media file need be play, whether in module searches medium widget library have and unknown media file suffix name consistent medium control, if there is not corresponding medium control, then directly report can't broadcast information and withdrawed from by the suffix name if at first searching; If have the medium control corresponding in the medium widget library with the suffix name, the file header of judging media file again whether with the medium control of judging through the suffix name in the file header data consistent stored, if inconsistent, then report can't broadcast information and is withdrawed from; If consistent, suffix name and the on all four medium control of file header that suffix name and file header and media file to be played are arranged in the medium widget library are described, the code in the medium control is deciphered media file, then can realize the broadcast of media file.
For prevent that the user from use deleting the file in the medium widget library by mistake, present embodiment has been realized the file management facilities to the medium control.As shown in Figure 3, under the root directory of the storage medium of depositing the medium control, set up the catalogue System of an identity property for " system file " and " hidden file ", this catalogue is sightless in system, be used for the storage medium control, have only accreditation process and loading procedure could visit this catalogue, the attribute of this catalogue " system file " and " hidden file " makes play control can be not intended to destroy by the user.After new medium control occurred, the user at first needed this medium control is registered, and corresponding medium control is imported to the System catalogue.The suffix of medium control is called hll, comprises the broadcast information of media file, and it can derive from any external unit or network.
For improving efficient to media file identification, simultaneously for making things convenient for the upgrading of medium control, redefined the form of medium controls in the present embodiment, as shown in Figure 4, the medium control version number and the adjustable length media file header of the media file suffix name of 8 bytes, 4 bytes have been increased in the front of decoding code.
Media file suffix name is fixed as 8 bytes, with the Unicode sign indicating number storage of small end, can store maximum 4 characters.If the suffix name of medium is less than 4 characters, not enough part substitutes with 0x00,0x00.As shown in Figure 5, if the suffix of media file is called .hav, then be stored as the American Standard Code for Information Interchange of " .HAV ": 0x68,0x00,0x61,0x00,0x76,0x00,0x00,0x00.
Version number is 4 bytes, stores in 32 integer small end modes, and version number is used for when new media control more, judges whether the medium control needs to upgrade.When the medium control is registered, under suffix name in the medium control situation identical with the suffix name of media file, be higher than the version number of current media control if find the version number of new medium control, then accreditation process can cover original medium control with new medium control automatically.
Third part in the medium control form is the media file header, as shown in Figure 6, the media file head is made up of three parts, preceding four bytes indicate the length of media file head data, store in 32 shaping small end modes, and represent that with bit length rather than byte length when whole numerical value was not 8 integral multiple, the remainder of last byte was filled with 0; Second portion is media file head data; Third part is for mending 0.
Media file header role is to judge whether media file can be play.As shown in Figure 7, if a kind of file header of media file is 8 byte: 0x55,0xAA, XX, 0x00,0x00,0x0X, 0xXX, 0xFF, wherein X represents that the file header of this media file is uncertain on this position, with behind the binary expansion being exactly: 01010101 10101010XXXXXXXX, 00,000,000 00000000 0000XXXX XXXXXXXX 11111111, for so a kind of file header, we represent 0 with Binary Zero 0, binary one 1 expression 1, Binary Zero 1 expression X, then Shang Mian file header has just become 0,011,001,100,110,011 1,100,110,011,001,100 0,101,010,101,010,101 00,000,000,000,000,000,000,000,000,000,000 0,000,000,001,010,101 0,101,010,101,010,101 1111111111111111, is the storage data of media file header.
Last part in the medium control form is the decoding code, is the core of decoding.The decoding code is all inequality for every kind of media formats, just media file is decoded to specific buffer zone, and is finished the audio frequency and video output of decoded media file by master routine.
Claims (2)
1. method of discerning multi-format media file, comprise primary control program and medium widget library, wherein, primary control program comprises the suffix name and searches module, file header determination module, invoke code module and medium widget library registration load-on module, the medium control that comprises corresponding various media files in the medium widget library, it is characterized in that: after described primary control program is found new media file and new control, search the identification that module and file header determination module are finished new media file and new control form by the suffix name; The storage directory attribute of medium widget library registration load-on module medium widget library is set to " system file " and " hidden file ", to avoid the be not intended to deletion of user to medium control program.
2. a kind of method of discerning multi-format media file according to claim 1, it is characterized in that: described medium widget library registration load-on module has been stipulated the form of medium controls, has increased the medium control version number and the adjustable length media file header of the media file suffix name of 8 bytes, 4 bytes in promptly the decode front of code of the new control head that obtains exactly.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA2006101706648A CN101211353A (en) | 2006-12-27 | 2006-12-27 | Method for recognizing multi- format media file |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA2006101706648A CN101211353A (en) | 2006-12-27 | 2006-12-27 | Method for recognizing multi- format media file |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101211353A true CN101211353A (en) | 2008-07-02 |
Family
ID=39611385
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNA2006101706648A Pending CN101211353A (en) | 2006-12-27 | 2006-12-27 | Method for recognizing multi- format media file |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101211353A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2010075661A1 (en) * | 2008-12-31 | 2010-07-08 | 中国银联股份有限公司 | File type recognition analysis method and system |
CN101859329A (en) * | 2010-06-14 | 2010-10-13 | 深圳市同洲电子股份有限公司 | Method, system and player for automatically recognizing media files |
CN102541569A (en) * | 2012-01-31 | 2012-07-04 | 上海量明科技发展有限公司 | Method and system for achieving transmitting of document-corresponding program and customer side |
CN102768676A (en) * | 2012-06-14 | 2012-11-07 | 腾讯科技(深圳)有限公司 | Method and device for processing file with unknown format |
CN102799468A (en) * | 2011-05-27 | 2012-11-28 | 腾讯科技(深圳)有限公司 | Method and device for opening unknown file |
CN102799630A (en) * | 2012-06-26 | 2012-11-28 | 深圳Tcl新技术有限公司 | Method and device for automatically identifying multimedia format and multimedia equipment |
CN103377052A (en) * | 2012-04-12 | 2013-10-30 | 金蝶软件(中国)有限公司 | Method and system for automatically downloading adaptive application programs on basis of file synchronization service |
CN105160267A (en) * | 2015-07-20 | 2015-12-16 | 天脉聚源(北京)科技有限公司 | File security detection method and apparatus |
CN107766505A (en) * | 2017-10-20 | 2018-03-06 | 维沃移动通信有限公司 | A kind of file management method and terminal |
-
2006
- 2006-12-27 CN CNA2006101706648A patent/CN101211353A/en active Pending
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2010075661A1 (en) * | 2008-12-31 | 2010-07-08 | 中国银联股份有限公司 | File type recognition analysis method and system |
US9690788B2 (en) | 2008-12-31 | 2017-06-27 | China Unionpay Co., Ltd. | File type recognition analysis method and system |
CN101770470B (en) * | 2008-12-31 | 2012-11-28 | 中国银联股份有限公司 | File type identifying and analyzing method and system |
CN101859329A (en) * | 2010-06-14 | 2010-10-13 | 深圳市同洲电子股份有限公司 | Method, system and player for automatically recognizing media files |
CN102799468B (en) * | 2011-05-27 | 2016-08-03 | 腾讯科技(深圳)有限公司 | The method and apparatus opening unknown file |
CN102799468A (en) * | 2011-05-27 | 2012-11-28 | 腾讯科技(深圳)有限公司 | Method and device for opening unknown file |
CN102541569A (en) * | 2012-01-31 | 2012-07-04 | 上海量明科技发展有限公司 | Method and system for achieving transmitting of document-corresponding program and customer side |
CN103377052A (en) * | 2012-04-12 | 2013-10-30 | 金蝶软件(中国)有限公司 | Method and system for automatically downloading adaptive application programs on basis of file synchronization service |
CN103377052B (en) * | 2012-04-12 | 2016-11-23 | 金蝶软件(中国)有限公司 | The method and system automatically downloading adaptation application program based on file synchronization services |
CN102768676A (en) * | 2012-06-14 | 2012-11-07 | 腾讯科技(深圳)有限公司 | Method and device for processing file with unknown format |
WO2013185561A1 (en) * | 2012-06-14 | 2013-12-19 | 腾讯科技(深圳)有限公司 | Method and device for processing file having unknown format |
CN102799630B (en) * | 2012-06-26 | 2016-06-22 | 深圳Tcl新技术有限公司 | Automatically the method for multimedia form, device and multimedia equipment are identified |
CN102799630A (en) * | 2012-06-26 | 2012-11-28 | 深圳Tcl新技术有限公司 | Method and device for automatically identifying multimedia format and multimedia equipment |
CN105160267A (en) * | 2015-07-20 | 2015-12-16 | 天脉聚源(北京)科技有限公司 | File security detection method and apparatus |
CN107766505A (en) * | 2017-10-20 | 2018-03-06 | 维沃移动通信有限公司 | A kind of file management method and terminal |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101211353A (en) | Method for recognizing multi- format media file | |
CN101069181B (en) | Storage device and recording medium | |
US8464231B2 (en) | Method and apparatus for accessing a production forming a set of rules for constructing hierarchical data of a structured document | |
US20010051954A1 (en) | Data updating apparatus that performs quick restoration processing | |
CN1326008C (en) | License creation apparatus, license creation method, and computer program | |
WO2008004181A2 (en) | Methods and devices for managing a play-list of digital content | |
CN112307138B (en) | Method, system and medium for storing and inquiring regional information | |
US11747983B2 (en) | Techniques for generating snapshots of datasets | |
CN101470710A (en) | Method for positioning content of multimedia file | |
CN100527131C (en) | Interdynamic access method and tool of IMS data base | |
US8655463B2 (en) | Method for avoiding refreshing a database of metadata associated with digital media content | |
WO2015055062A1 (en) | Data file writing method and system, and data file reading method and system | |
US20080288099A1 (en) | Digital media player with improved user experience | |
CN101295312B (en) | Method for presenting data by table | |
CN109976754B (en) | Information display method and terminal thereof | |
CN105578297A (en) | Audio and radio file fragment type repeat play method and system at WEB end | |
CN109254774A (en) | The management method and device of code in software development system | |
US20080168306A1 (en) | Method, apparatus and software for providing recovery data for program code | |
US20090083267A1 (en) | Method and System for Compressing Data | |
US20080288096A1 (en) | Digital media player with circuitry for avoiding refreshing a database of metadata associated with digital media content | |
CN102522088A (en) | Decoding method and device of audio frequency | |
US8204917B2 (en) | Apparatus, method, and computer program product thereof for storing a data and data storage system comprising the same | |
EP2149096A2 (en) | Digital media player and method for avoiding refreshing a database of metadata associated with digital media content and for providing an improved user experience | |
US20080288097A1 (en) | Method for improving a digital media player experience | |
JP2005018811A (en) | Character string retrieval device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Open date: 20080702 |