WO2017185807A1 - 一种获取数据的装置和方法 - Google Patents

一种获取数据的装置和方法 Download PDF

Info

Publication number
WO2017185807A1
WO2017185807A1 PCT/CN2016/113744 CN2016113744W WO2017185807A1 WO 2017185807 A1 WO2017185807 A1 WO 2017185807A1 CN 2016113744 W CN2016113744 W CN 2016113744W WO 2017185807 A1 WO2017185807 A1 WO 2017185807A1
Authority
WO
WIPO (PCT)
Prior art keywords
check value
multimedia information
length
video file
module
Prior art date
Application number
PCT/CN2016/113744
Other languages
English (en)
French (fr)
Inventor
岳磊
Original Assignee
努比亚技术有限公司
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 努比亚技术有限公司 filed Critical 努比亚技术有限公司
Publication of WO2017185807A1 publication Critical patent/WO2017185807A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders

Definitions

  • Embodiments of the present invention relate to, but are not limited to, smart terminal technologies, and in particular, to an apparatus and method for acquiring data.
  • Mobile terminal systems (such as Android (Android) system, Windows system, Apple system, and Nokia (Lumia) system) will perform all video files in the memory when the mobile terminal is powered on or when a secure digital memory (SD) card is inserted or removed. A full scan to get the multimedia information for each video file.
  • SD secure digital memory
  • Each video file contains multimedia information such as the length and width of the video, duration, average frame rate, and bit rate.
  • a part of the multimedia information can be obtained by directly reading a few bytes of the corresponding position of the video file, but another part of the multimedia information, such as the average frame rate and the code rate, needs to be obtained through calculation.
  • the average frame rate needs to continuously read the timestamps of multiple frames, and then calculate the average value, for example, to continuously read 30 frames, if the timestamp of the 30th frame minus the timestamp of the first frame is For t microseconds, the average frame rate is 1000000/(t/30) fps (frames per second).
  • the method of calculating multimedia information as above is a relatively time consuming process, which affects the loading speed of video playback, and each time the loading is recalculated to obtain multimedia information, the user experience is extremely poor.
  • the present application provides an apparatus and method for acquiring data, which can acquire multimedia information more quickly and improve user experience.
  • An embodiment of the present invention provides an apparatus for acquiring data, including: a determining module (40), and obtaining a module (41), a verification module (42), and a reading module (43); wherein
  • the determining module (40) is configured to: when the multimedia information is obtained, determine whether there is a custom structure in the video file; when it is determined that there is a custom structure in the video file, notify the obtaining module (41);
  • An obtaining module (41) configured to receive a notification from the determining module (40) to obtain a field of the customized structure
  • the verification module (42) is configured to check the obtained field of the customized structure; when the obtained field of the custom structure is verified correctly, the reading module is notified (43);
  • the reading module (43) is arranged to receive a notification from the verification module (42) to read the multimedia information of the video file from the customized structure.
  • the customized structure includes the following fields: a length, an identity ID, the multimedia information, and a check value.
  • the apparatus further includes a processing module (44) configured to:
  • the custom structure after the addition process is added to the video file.
  • the verification module (42) is configured to:
  • the obtained location is determined.
  • the field of the custom structure is verified correctly;
  • the verification module (42) verifies the obtained field of the customized structure by using a cyclic redundancy check code CRC check method.
  • the processing module (44) calculates a first check value of the length, a first check value of the ID, and a first check value of the multimedia information by using a cyclic redundancy check code CRC check method.
  • the device further includes a processing module (44);
  • the verification module (42) is further configured to notify the processing module (44) when the field verification of the obtained custom structure is incorrect;
  • the processing module (44) is configured to: when receiving the notification from the verification module (42), calculate multimedia information of the video file; and send the calculated multimedia information to the reading module (43);
  • the reading module (43) is further arranged to receive multimedia information transmitted from the processing module (44).
  • the processing module (44) is further configured to calculate a first check value of the length, a first check value of the ID, and a first check value of the multimedia information;
  • the multimedia information of the video file and the calculated first check value of the length, the first check value of the ID, and the second check value of the multimedia information are added to the custom structure And adding the customized structure after the addition processing to the video file.
  • the device further includes a processing module (44);
  • the determining module (40) is further configured to notify the processing module (44) when it is determined that there is no custom structure in the video file;
  • the processing module (44) is configured to: when receiving the notification from the determining module (40), calculate the multimedia information of the video file; and send the calculated multimedia information to the reading module (43);
  • the reading module (43) is further arranged to receive multimedia information transmitted from the processing module (44).
  • the processing module (44) is further configured to calculate a first check value of the length, a first check value of the ID, and a first check value of the multimedia information;
  • the multimedia information of the video file and the calculated first check value of the length, the first check value of the ID, and the second check value of the multimedia information are added to the custom structure And adding the customized structure after the addition processing to the video file.
  • the embodiment of the invention further provides a method for acquiring data, including:
  • the multimedia information of the video file is read from the customized structure (504).
  • the customized structure includes the following fields: a length, an identity ID, the multimedia information, and a check value.
  • the method further includes:
  • the custom structure that is subjected to the addition process is added to the video file (708).
  • the verifying the obtained fields of the customized structure includes:
  • the obtained field of the customized structure is verified by using a cyclic redundancy check code CRC check method.
  • the first check value of the length, the first check value of the ID, and the first check value of the multimedia information are calculated by using a cyclic redundancy check code CRC check method.
  • the method further includes:
  • the multimedia information of the video file is calculated (705) when the field verification of the obtained custom structure is incorrect.
  • the method further includes:
  • the method further includes:
  • the multimedia information of the video file is calculated (705).
  • the method further includes:
  • the embodiment of the invention includes: a determining module, an obtaining module, a verifying module and a reading module; wherein the determining module is configured to determine whether there is a custom structure in the video file when acquiring the multimedia information; when the video file is determined When a custom structure exists, the acquisition module is notified; the acquisition module is configured to receive a notification from the determination module, obtain a field of the customized structure; and the verification module is set to obtain the customized structure. The field is verified; when the field of the obtained custom structure is verified correctly, the reading module is notified; the reading module is set to receive the notification from the checking module, and read from the customized structure The multimedia information of the video file.
  • the embodiment of the invention achieves faster acquisition of multimedia information and improves user experience.
  • FIG. 1 is a schematic structural diagram of hardware of an optional mobile terminal embodying various embodiments of the present invention
  • FIG. 2 is a schematic diagram of a communication system supporting communication between mobile terminals according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of an organization structure of a video file before processing according to an embodiment of the present invention
  • FIG. 4 is a schematic structural diagram of an apparatus for acquiring data according to an embodiment of the present invention.
  • FIG. 5 is a flowchart of a method for acquiring data according to an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of an organization structure of a video file after processing according to an embodiment of the present invention.
  • FIG. 7 is a flowchart of an embodiment of a method for acquiring data according to an embodiment of the present invention.
  • module A mobile terminal embodying various embodiments of the present invention will now be described with reference to the accompanying drawings.
  • suffixes such as “module,” “component,” or “unit” used to denote an element are merely illustrative of the embodiments of the present invention, and do not have a specific meaning per se. Therefore, “module” and “component” can be used in combination.
  • the mobile terminal can be implemented in various forms.
  • the terminal described in the embodiments of the present invention may include, for example, a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a PDA (Personal Digital Assistant), a PAD (Tablet), a PMP (Portable Multimedia Player), a navigation device Mobile terminals of the like and fixed terminals such as digital TVs, desktop computers, and the like.
  • PDA Personal Digital Assistant
  • PAD Tablett
  • PMP Portable Multimedia Player
  • FIG. 1 is a schematic structural diagram of hardware of an optional mobile terminal according to an embodiment of the present invention.
  • the mobile terminal 100 may include a wireless communication unit 110, an A/V (Audio/Video) input unit 120 output unit 150, a memory 160, an interface unit 170, a controller 180, a power supply unit 190, and the like.
  • Figure 1 illustrates a mobile terminal having various components, but it should be understood that not all illustrated components are required to be implemented. More or fewer components can be implemented instead. The elements of the mobile terminal will be described in detail below.
  • Wireless communication unit 110 typically includes one or more components that permit radio communication between mobile terminal 100 and a wireless communication system or network.
  • the wireless communication unit may include at least one of a broadcast receiving module 111, a mobile communication module 112, and a wireless internet module 113.
  • the broadcast receiving module 111 receives a broadcast signal and/or broadcast associated information from an external broadcast management server via a broadcast channel.
  • the broadcast channel can include a satellite channel and/or a terrestrial channel.
  • the broadcast management server may be a server that generates and transmits a broadcast signal and/or broadcast associated information or a server that receives a previously generated broadcast signal and/or broadcast associated information and transmits it to the terminal.
  • the broadcast signal may include a TV broadcast signal, a radio broadcast signal, a data broadcast signal, and the like.
  • the broadcast signal may further include a broadcast signal combined with a TV or radio broadcast signal. Broadcast related letter
  • the information may also be provided via a mobile communication network, and in this case, the broadcast associated information may be received by the mobile communication module 112.
  • the broadcast signal may exist in various forms, for example, it may exist in the form of Digital Multimedia Broadcasting (DMB) Electronic Program Guide (EPG), Digital Video Broadcasting Handheld (DVB-H) Electronic Service Guide (ESG), and the like.
  • the broadcast receiving module 111 can receive a signal broadcast by using various types of broadcast systems.
  • the broadcast receiving module 111 can use forward link media (MediaFLO) by using, for example, multimedia broadcast-terrestrial (DMB-T), digital multimedia broadcast-satellite (DMB-S), digital video broadcast-handheld (DVB-H)
  • MediaFLO forward link media
  • the digital broadcasting system of the @) data broadcasting system, the terrestrial digital broadcasting integrated service (ISDB-T), and the like receives digital broadcasting.
  • the broadcast receiving module 111 can be constructed as various broadcast systems suitable for providing broadcast signals as well as the above-described digital broadcast system.
  • the broadcast signal and/or broadcast associated information received via the broadcast receiving module 111 may be stored in the memory 160 (or other type of storage
  • the mobile communication module 112 transmits the radio signals to and/or receives radio signals from at least one of a base station (e.g., an access point, a Node B, etc.), an external terminal, and a server.
  • a base station e.g., an access point, a Node B, etc.
  • Such radio signals may include voice call signals, video call signals, or various types of data transmitted and/or received in accordance with text and/or multimedia messages.
  • the wireless internet module 113 supports wireless internet access of the mobile terminal.
  • the module can be internally or externally coupled to the terminal.
  • the wireless Internet access technologies involved in the module may include WLAN (Wireless LAN) (Wi-Fi), Wibro (Wireless Broadband), Wimax (Worldwide Interoperability for Microwave Access), HSDPA (High Speed Downlink Packet Access), etc. .
  • the A/V input unit 120 is for receiving an audio or video signal.
  • the A/V input unit 120 may include a camera 121 and a microphone 122 that processes image data of still pictures or video obtained by the image capturing device in a video capturing mode or an image capturing mode.
  • the processed image frame can be displayed on the display unit 151.
  • the image frames processed by the camera 121 may be stored in the memory 160 (or other storage medium) or transmitted via the wireless communication unit 110, and two or more cameras 121 may be provided according to the configuration of the mobile terminal.
  • the microphone 122 can receive sound (audio data) via a microphone in an operation mode of a telephone call mode, a recording mode, a voice recognition mode, and the like, and can process such sound as audio data.
  • the processed audio (voice) data can be converted to a format output that can be transmitted to the mobile communication base station via the mobile communication module 112 in the case of a telephone call mode.
  • the microphone 122 can implement various types of noise cancellation (or suppression) algorithms to eliminate In addition to (or suppressing) noise or interference generated during the process of receiving and transmitting audio signals.
  • the interface unit 170 serves as an interface through which at least one external device can connect with the mobile terminal 100.
  • the external device may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, and an audio input/output. (I/O) port, video I/O port, headphone port, and more.
  • the identification module may be stored to verify various information used by the user using the mobile terminal 100 and may include a User Identification Module (UIM), a Customer Identification Module (SIM), a Universal Customer Identity Module (USIM), and the like.
  • the device having the identification module may take the form of a smart card, and thus the identification device may be connected to the mobile terminal 100 via a port or other connection device.
  • the interface unit 170 can be configured to receive input from an external device (eg, data information, power, etc.) and transmit the received input to one or more components within the mobile terminal 100 or can be used at the mobile terminal and external device Transfer data between.
  • the interface unit 170 may function as a path through which power is supplied from the base to the mobile terminal 100 or may be used as a transmission of various command signals allowing input from the base to the mobile terminal 100 The path to the terminal.
  • Various command signals or power input from the base can be used as signals for identifying whether the mobile terminal is accurately mounted on the base.
  • Output unit 150 is configured to provide an output signal (eg, an audio signal, a video signal, an alarm signal, a vibration signal, etc.) in a visual, audio, and/or tactile manner.
  • the output unit 150 may include a display unit 151, an audio output module 152, and the like.
  • the display unit 151 can display information processed in the mobile terminal 100. For example, when the mobile terminal 100 is in a phone call mode, the display unit 151 can display a user interface (UI) or a graphical user interface (GUI) related to a call or other communication (eg, text messaging, multimedia file download, etc.). When the mobile terminal 100 is in a video call mode or an image capturing mode, the display unit 151 may display a captured image and/or a received image, a UI or GUI showing a video or image and related functions, and the like.
  • UI user interface
  • GUI graphical user interface
  • the display unit 151 can function as an input device and an output device.
  • the display unit 151 may include at least one of a liquid crystal display (LCD), a thin film transistor LCD (TFT-LCD), an organic light emitting diode (OLED) display, a flexible display, a three-dimensional (3D) display, and the like.
  • LCD liquid crystal display
  • TFT-LCD thin film transistor LCD
  • OLED organic light emitting diode
  • the portion may be configured to be transparent to allow the user to view from the outside, which may be referred to as a transparent display, and a typical transparent display may be, for example, a TOLED (Transparent Organic Light Emitting Diode) display or the like.
  • TOLED Transparent Organic Light Emitting Diode
  • the mobile terminal 100 may include two or more display units (or other display devices), for example, the mobile terminal may include an external display unit (not shown) and an internal display unit (not shown) .
  • the touch screen can be used to detect touch input pressure as well as touch input position and touch input area.
  • the audio output module 152 may convert audio data received by the wireless communication unit 110 or stored in the memory 160 when the mobile terminal is in a call signal receiving mode, a call mode, a recording mode, a voice recognition mode, a broadcast receiving mode, and the like.
  • the audio signal is output as sound.
  • the audio output module 152 can provide audio output (eg, call signal reception sound, message reception sound, etc.) associated with a particular function performed by the mobile terminal 100.
  • the audio output module 152 can include a speaker, a buzzer, and the like.
  • the memory 160 may store a software program or the like for processing and control operations performed by the controller 180, or may temporarily store data (for example, a phone book, a message, a still image, a video, etc.) that has been output or is to be output. Moreover, the memory 160 can store data regarding vibrations and audio signals of various manners that are output when a touch is applied to the touch screen.
  • the memory 160 may include at least one type of storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (eg, SD or DX memory, etc.), a random access memory (RAM), a static random access memory ( SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disk, optical disk, and the like.
  • the mobile terminal 100 can cooperate with a network storage device that performs a storage function of the memory 160 through a network connection.
  • the controller 180 typically controls the overall operation of the mobile terminal. For example, the controller 180 performs the control and processing associated with voice calls, data communications, video calls, and the like.
  • the controller 180 may include a multimedia module 181 for reproducing (or playing back) multimedia data, which may be constructed within the controller 180 or may be configured to be separate from the controller 180.
  • the controller 180 may perform a pattern recognition process to recognize a handwriting input or a picture drawing input performed on the touch screen as a character or an image.
  • the power supply unit 190 receives external power or internal power under the control of the controller 180 and provides Operate the appropriate power required for each component and component.
  • the various embodiments described herein can be implemented in a computer readable medium using, for example, computer software, hardware, or any combination thereof.
  • the embodiments described herein may be through the use of application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays ( An FPGA, a processor, a controller, a microcontroller, a microprocessor, at least one of the electronic units designed to perform the functions described herein, in some cases, such an embodiment may be at the controller 180 Implemented in the middle.
  • implementations such as procedures or functions may be implemented with separate software modules that permit the execution of at least one function or operation.
  • the software code can be implemented by a software application (or program) written in any suitable programming language, which can be stored in memory 160 and executed by
  • the mobile terminal has been described in terms of its function.
  • a slide type mobile terminal among various types of mobile terminals such as a folding type, a bar type, a swing type, a slide type mobile terminal, and the like will be described as an example. Therefore, the embodiment of the present invention can be applied to any type of mobile terminal, and is not limited to a slide type mobile terminal.
  • the mobile terminal 100 as shown in FIG. 1 may be configured to operate using a communication system such as a wired and wireless communication system and a satellite-based communication system that transmits data via frames or packets.
  • a communication system such as a wired and wireless communication system and a satellite-based communication system that transmits data via frames or packets.
  • a communication system in which a mobile terminal is operable according to an embodiment of the present invention will now be described with reference to FIG.
  • Such communication systems may use different air interfaces and/or physical layers.
  • air interfaces used by communication systems include, for example, Frequency Division Multiple Access (FDMA), Time Division Multiple Access (TDMA), Code Division Multiple Access (CDMA), and Universal Mobile Telecommunications System (UMTS) (in particular, Long Term Evolution (LTE)). ), Global System for Mobile Communications (GSM), etc.
  • FDMA Frequency Division Multiple Access
  • TDMA Time Division Multiple Access
  • CDMA Code Division Multiple Access
  • UMTS Universal Mobile Telecommunications System
  • LTE Long Term Evolution
  • GSM Global System for Mobile Communications
  • the following description relates to a CDMA communication system, but such teachings are equally applicable to other types of systems.
  • a CDMA wireless communication system can include a plurality of mobile terminals 100, a plurality of base stations (BS) 270, a base station controller (BSC) 275, and a mobile switching center (MSC) 280.
  • the MSC 280 is configured to interface with a public switched telephone network (PSTN) 290.
  • PSTN public switched telephone network
  • the MSC 280 is also configured to interface with a BSC 275 that can be coupled to the base station 270 via a backhaul line.
  • the backhaul line can be constructed in accordance with any of the known interfaces including, for example, E1/T1, ATM, IP, PPP, Frame Relay, HDSL, ADSL or xDSL. It will be appreciated that the system as shown in FIG. 2 may include multiple BSC 2750s.
  • Each BS 270 can serve one or more partitions (or regions), each of which is covered by a multi-directional antenna or an antenna directed to a particular direction radially away from the BS 270. Alternatively, each partition may be covered by two or more antennas for diversity reception. Each BS 270 can be configured to support multiple frequency allocations, and each frequency allocation has a particular frequency spectrum (eg, 1.25 MHz, 5 MHz, etc.).
  • BS 270 may also be referred to as a Base Transceiver Subsystem (BTS) or other equivalent terminology.
  • BTS Base Transceiver Subsystem
  • the term "base station” can be used to generally refer to a single BSC 275 and at least one BS 270.
  • a base station can also be referred to as a "cell station.”
  • each partition of a particular BS 270 may be referred to as a plurality of cellular stations.
  • a broadcast transmitter (BT) 295 transmits a broadcast signal to the mobile terminal 100 operating within the system.
  • a broadcast receiving module 111 as shown in FIG. 1 is provided at the mobile terminal 100 to receive a broadcast signal transmitted by the BT 295.
  • GPS Global Positioning System
  • the satellite 300 helps locate at least one of the plurality of mobile terminals 100.
  • a plurality of satellites 300 are depicted, but it is understood that useful positioning information can be obtained using any number of satellites.
  • the GPS module 115 as shown in Figure 1 is typically configured to cooperate with the satellite 300 to obtain desired positioning information. Instead of GPS tracking technology or in addition to GPS tracking technology, other techniques that can track the location of the mobile terminal can be used. Additionally, at least one GPS satellite 300 can selectively or additionally process satellite DMB transmissions.
  • BS 270 receives reverse link signals from various mobile terminals 100.
  • Mobile terminal 100 typically participates in calls, messaging, and other types of communications.
  • Each reverse link signal received by a particular base station 270 is processed within a particular BS 270.
  • the obtained data is forwarded to the relevant BSC 275.
  • the BSC provides call resource allocation and coordinated mobility management functions including a soft handoff procedure between the BSs 270.
  • the BSC 275 also routes the received data to the MSC 280, which provides additional routing services for interfacing with the PSTN 290.
  • PSTN 290 interfaces with MSC 280, which forms an interface with BSC 275, and BSC 275 controls BS 270 accordingly to transmit forward link signals to mobile terminal 100.
  • the currently used video container formats (such as mp4, avi, mkv, etc.) organize the video stream information and data in the video file in the form of a box, and the forms of these structures are unified.
  • the format standard, and the data outside the structure is not used as a video parsing object.
  • mp4 its video files mainly consist of ftyp, moov, mdat and other boxes, as shown in Figure 3.
  • the Applicant defines a box for storing multimedia information of a video file, etc., which will be explained below by way of specific embodiments.
  • FIG. 4 is a schematic structural diagram of an apparatus for acquiring data according to an embodiment of the present invention. As shown in FIG. 4, the method includes: a determining module 40, an obtaining module 41, a checking module 42, and a reading module 43. among them,
  • the determining module 40 is configured to determine whether there is a custom structure in the video file when acquiring the multimedia information, and notify the obtaining module 41 when it is determined that the customized structure exists in the video file.
  • the customized structure includes the following fields: length, identity ID, multimedia information, and check value.
  • the obtaining module 41 is configured to receive the notification from the determining module 40 and obtain a field of the customized structure.
  • the verification module 42 is configured to check the obtained field of the customized structure; and when the field of the obtained customized structure is verified correctly, the reading module 43 is notified.
  • the verification module 42 is set to:
  • the verification module 42 can verify the obtained field of the customized structure by using a Cyclic Redundancy Check (CRC) verification method.
  • CRC Cyclic Redundancy Check
  • the reading module 43 is configured to receive the notification from the verification module 42 to read the multimedia information of the video file from the customized structure.
  • the device further includes a processing module 44, configured to:
  • the processing module 44 may calculate the first check value of the length, the first check value of the ID, and the first check value of the multimedia information by using a CRC check method. It should be noted that the method for calculating the check value by using the CRC check method is a conventional technical means well known to those skilled in the art, and is not described herein again, and is not intended to limit the application. In addition, in addition to the CRC check method, other verification methods are also within the scope of the present application, and are not described herein again.
  • the verification module 42 is further configured to notify the processing module 44 when the field verification of the obtained custom structure is incorrect.
  • the determining module 40 is further configured to notify the processing module 44 when it is determined that there is no custom structure in the video file.
  • the processing module 44 is further configured to calculate multimedia information of the video file when receiving the notification from the determining module 40 or the verification module 42; and send the calculated multimedia information to the reading module 43.
  • the reading module 43 is further arranged to receive multimedia information transmitted from the processing module 44.
  • the processing module 44 is further configured to calculate a first check value of the length, a first check value of the ID, and a first check value of the multimedia information; the multimedia information of the obtained video file and the calculated length
  • the first check value, the first check value of the ID, and the second check value of the multimedia information are added to the custom structure; the added structure is added to the video file. .
  • the above device may be provided in the mobile terminal.
  • the determining module 40, the obtaining module 41, and the checking module 42 may be disposed in the controller 180 in FIG. 1; the reading module 43 may be disposed in the memory 160 in FIG. 1; the processing module 44 may be disposed in In the controller 180 in FIG.
  • the apparatus in the optional embodiment includes: a processing module 44, a determining module 40, an obtaining module 41, a checking module 42, and a reading module 43. among them,
  • the processing module 44 is configured to calculate multimedia information of the video file, calculate a first check value of the length, a first check value of the ID, and a first check value of the multimedia information, and calculate the multimedia information of the obtained video file.
  • the first check value of the length, the first check value of the ID, and the second check value of the multimedia information are added to the custom structure; the added structure is added to the video after the addition process In the file.
  • the processing module 44 may calculate the first check value of the length, the first check value of the ID, and the first check value of the multimedia information by using a CRC check method. It should be noted that the method for calculating the check value by using the CRC check method is a conventional technical means well known to those skilled in the art, and is not described herein again, and is not intended to limit the application. In addition, in addition to the CRC check method, other verification methods are also within the scope of the present application, and are not described herein again.
  • the determining module 40 is configured to determine whether there is a custom structure in the video file when acquiring the multimedia information, and notify the obtaining module 41 when it is determined that the customized structure exists in the video file.
  • the customized structure includes the following fields: length, identity ID, multimedia information, and check value.
  • the obtaining module 41 is configured to receive the notification from the determining module 40 and obtain a field of the customized structure.
  • the verification module 42 is configured to check the obtained field of the customized structure; and when the field of the obtained customized structure is verified correctly, the reading module 43 is notified.
  • the verification module 42 is set to:
  • the verification module 42 verifies the obtained field of the customized structure by using a Cyclic Redundancy Check (CRC) verification method.
  • CRC Cyclic Redundancy Check
  • the reading module 43 is configured to receive the notification from the verification module 42 to read the multimedia information of the video file from the customized structure.
  • the verification module 42 is further configured to notify the processing module 44 when the field verification of the obtained custom structure is incorrect.
  • the determining module 40 is further configured to notify the processing module 44 when it is determined that there is no custom structure in the video file.
  • the processing module 44 is further configured to calculate multimedia information of the video file when receiving the notification from the determining module 40 or the verification module 42; and send the calculated multimedia information to the reading module 43.
  • the reading module 43 is further arranged to receive multimedia information transmitted from the processing module 44.
  • the processing module 44 is further configured to calculate a first check value of the length, a first check value of the ID, and a first check value of the multimedia information; the multimedia information of the obtained video file and the calculated length
  • the first check value, the first check value of the ID, and the second check value of the multimedia information are added to the custom structure; the added structure is added to the video file. .
  • the above device may be provided in the mobile terminal.
  • FIG. 5 is a flowchart of a method for acquiring data according to an embodiment of the present invention. As shown in FIG. 5, the method includes:
  • Step 501 When acquiring the multimedia information, determine whether there is a custom structure in the video file.
  • the customized structure includes the following fields: length, identity ID, multimedia information, and check value.
  • length is as follows:
  • the unsigned int(n)xmlContent stores the multimedia information in the xml format.
  • the ID of the body such as the ID of the structure defined in the present application, may be 0xf1faa38f.
  • Step 502 When it is determined that there is a custom structure in the video file, obtain a field of the customized structure.
  • Step 503 Verify the obtained field of the customized structure.
  • the method further includes:
  • FIG. 6 is a schematic diagram of the organization structure of the video file of the present application.
  • the multimedia information about how to obtain (calculate) the video file belongs to the conventional technical means well known to those skilled in the art, and is not described herein again, and is not intended to limit the application.
  • the check value of the length, the check value of the ID, and the check value of the multimedia information may be calculated by using a Cyclic Redundancy Check (CRC) check method.
  • CRC Cyclic Redundancy Check
  • the method for calculating the check value by using the CRC check method is a conventional technical means well known to those skilled in the art, and is not described herein again, and is not intended to limit the application.
  • other verification methods are also within the scope of the present application, and are not described herein again.
  • the field of the obtained customized structure is verified by using a cyclic redundancy check code CRC check method.
  • step 503 can include:
  • the method further includes: performing “calculating multimedia information of the video file; calculating a first check value of the length, a first check value of the ID, and a first check value of the multimedia information; the multimedia information of the obtained video file and the first check value of the calculated length, the first school of the ID.
  • Step 504 When the obtained field of the customized structure is verified correctly, the multimedia information of the video file is read from the customized structure.
  • the multimedia information of the file enables faster access to multimedia information and enhances the user experience. Since the multimedia information of acquiring (calculating) a video file is computationally intensive and takes a long time, if the multimedia information of the video file is obtained every time, the multimedia information of the video file is recalculated, which may result in the video file. The scanning speed and the loading speed during playback are very slow, affecting the user experience.
  • FIG. 7 is a flowchart of an embodiment of a method for acquiring data according to an embodiment of the present invention. As shown in FIG. 7, the method includes:
  • Step 700 Pre-process the video file.
  • This step can include:
  • FIG. 6 is a schematic diagram of the organization structure of the video file of the present application.
  • the first check value of the length, the first check value of the ID, and the first check value of the multimedia information may be calculated by using a Cyclic Redundancy Check (CRC) check method.
  • CRC Cyclic Redundancy Check
  • the method for calculating the check value by using the CRC check method is a conventional technical means well known to those skilled in the art, and is not described herein again, and is not intended to limit the application.
  • other verification methods are also within the scope of the present application, and are not described herein again.
  • Step 701 When acquiring the multimedia information, determine whether there is a custom structure in the video file. When it is determined that there is a custom structure in the video file, the process proceeds to step 702; when it is determined that there is no custom structure in the video file, the process proceeds to step 705.
  • the unsigned int(n)xmlContent stores the multimedia information in the xml format.
  • the ID of the body such as the ID of the structure defined in the present application, may be 0xf1faa38f.
  • Step 702 Obtain a field of a customized structure.
  • the customized structure includes the following fields: length, identity ID, multimedia information, and check value.
  • Step 703 Verify the obtained field of the customized structure. When the field verification of the obtained custom structure is correct, the process proceeds to step 704; when the field verification error of the obtained custom structure is wrong, the process proceeds to step 705.
  • the field of the obtained customized structure is verified by using a cyclic redundancy check code CRC check method.
  • step 703 can include:
  • Step 704 Read multimedia information of the video file from the customized structure.
  • Step 705 Calculate multimedia information of the video file.
  • Step 706 Calculate a first check value of the length, a first check value of the ID, and a first check value of the multimedia information.
  • Step 707 Add the multimedia information of the obtained video file and the first check value of the calculated length, the first check value of the ID, and the second check value of the multimedia information to the customized structure.
  • Step 708 Add the customized structure after the addition processing to the video file.
  • the embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the method described in the foregoing embodiments.
  • computer storage medium includes volatile and nonvolatile implemented in any method or technique for storing information, such as computer readable instructions, data structures, program modules or other data. Sex, removable and non-removable media.
  • Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridge, magnetic tape, magnetic disk storage or other magnetic storage device, or may Any other medium used to store the desired information and that can be accessed by the computer.
  • communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal, such as a carrier wave or other transport mechanism, and can include any information delivery media.
  • the above technical solution can be applied to a system of a mobile terminal (such as an Android system, a Windows system, an Apple system, and a Nokia (Lumia) system), thereby realizing faster acquisition of multimedia information and speeding up the speed of playing multimedia by the mobile terminal. Improve the user experience.
  • a system of a mobile terminal such as an Android system, a Windows system, an Apple system, and a Nokia (Lumia) system

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Security & Cryptography (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

一种获取数据的装置和方法,该装置包括:判断模块(40)、获取模块(41)、校验模块(42)和读取模块(43);其中,判断模块(40),设置为当获取多媒体信息时,判断视频文件中是否有自定义的结构体;当判断出视频文件中存在自定义的结构体时,通知获取模块(41);获取模块(41),设置为接收到来自判断模块(40)的通知,获取自定义的结构体的字段;校验模块(42),设置为对获得的自定义的结构体的字段进行校验;当获得的自定义的结构体的字段校验正确时,通知读取模块(43);读取模块(43),设置为接收到来自校验模块(42)的通知,从该自定义的结构体中读取该视频文件的多媒体信息。

Description

一种获取数据的装置和方法 技术领域
本发明实施例涉及但不限于智能终端技术,尤指一种获取数据的装置和方法。
背景技术
移动终端的系统(如安卓(Android)系统、Windows系统、苹果系统和诺基亚(Lumia)系统)会在移动终端开机时或插拔安全数字记忆(SD)卡时,对存储器内的所有视频文件进行一次全面扫描以获取每个视频文件的多媒体信息。
每个视频文件都包含多媒体信息,如视频的长宽、时长、平均帧率和码率等。其中,一部分多媒体信息可以直接通过读取视频文件的对应位置的几个字节进而获取,但另一部分多媒体信息,如平均帧率、码率等,需要通过计算才能够获取。例如,平均帧率需要连续读取多个帧的时间戳,然后计算出平均值,以连续读取30帧为例,若第30帧的时间戳减去第一帧的时间戳的差值是t微秒,则平均帧率为1000000/(t/30)fps(frames per second,帧每秒)。如上计算多媒体信息的方法是一个比较耗时的过程,会影响视频播放的加载速度,且每次加载都要重新进行计算以获取多媒体信息,用户体验极其不好。
发明内容
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
本申请提供了一种获取数据的装置和方法,能够更加快速的获取多媒体信息,提升用户体验。
本发明实施例提供了一种获取数据的装置,包括:判断模块(40)、获取 模块(41)、校验模块(42)和读取模块(43);其中,
判断模块(40),设置为当获取多媒体信息时,判断视频文件中是否有自定义的结构体;当判断出视频文件中存在自定义的结构体时,通知获取模块(41);
获取模块(41),设置为接收到来自判断模块(40)的通知,获取自定义的结构体的字段;
校验模块(42),设置为对获得的自定义的结构体的字段进行校验;当获得的自定义的结构体的字段校验正确时,通知读取模块(43);
读取模块(43),设置为接收到来自校验模块(42)的通知,从该自定义的结构体中读取该视频文件的多媒体信息。
可选地,所述自定义的结构体包括以下字段:长度、身份标识ID、所述多媒体信息和校验值。
可选地,该装置还包括处理模块(44),设置为:
计算视频文件的多媒体信息;
计算所述长度的第一校验值、所述ID的第一校验值和所述多媒体信息的第一校验值;
将获得的所述视频文件的多媒体信息以及计算出的所述长度的第一校验值、所述ID的第一校验值和所述多媒体信息的第二校验值对应的添加至所述自定义的结构体中;
将进行添加处理后的所述自定义的结构体添加至所述视频文件中。
可选地,所述校验模块(42),是设置为:
计算获得的所述长度的第二校验值、所述ID的第二校验值、所述多媒体信息的第二校验值;
判断所述长度的第一校验值和所述长度的第二校验值是否相同;判断所述ID的第一校验值和所述ID的第二校验值是否相同;判断所述多媒体信息的第一校验值和所述多媒体信息的第二校验值是否相同;
当判断出所述长度的第一校验值和所述长度的第二校验值相同,并且所 述ID的第一校验值和所述ID的第二校验值相同,并且所述多媒体信息的第一校验值和所述多媒体信息的第二校验值相同时,判断出获得的所述自定义的结构体的字段校验正确;
当判断出所述长度的第一校验值和所述长度的第二校验值不同,或者所述ID的第一校验值和所述ID的第二校验值不同,或者所述多媒体信息的第一校验值和所述多媒体信息的第二校验值不同时,判断出获得的所述自定义的结构体的字段校验不正确。
可选地,所述校验模块(42)采用循环冗余校验码CRC校验方法对获得的所述自定义的结构体的字段进行校验。
可选地,处理模块(44)采用循环冗余校验码CRC校验方法计算长度的第一校验值、ID的第一校验值和多媒体信息的第一校验值。
可选地,该装置还包括处理模块(44);
校验模块(42),还设置为当获得的自定义的结构体的字段校验不正确时,通知处理模块(44);
处理模块(44),设置为接收到来自校验模块(42)的通知时,计算视频文件的多媒体信息;将计算出的多媒体信息发送给读取模块(43);
读取模块(43),还设置为接收来自处理模块(44)发送的多媒体信息。
可选地,处理模块(44),还设置为计算所述长度的第一校验值、所述ID的第一校验值和所述多媒体信息的第一校验值;将获得的所述视频文件的多媒体信息以及计算出的所述长度的第一校验值、所述ID的第一校验值和所述多媒体信息的第二校验值对应的添加至所述自定义的结构体中;将进行添加处理后的所述自定义的结构体添加至所述视频文件中。
可选地,该装置还包括处理模块(44);
判断模块(40),还设置为判断出视频文件中不存在自定义的结构体时,通知处理模块(44);
处理模块(44),设置为接收到来自判断模块(40)的通知时,计算视频文件的多媒体信息;将计算出的多媒体信息发送给读取模块(43);
读取模块(43),还设置为接收来自处理模块(44)发送的多媒体信息。
可选地,处理模块(44),还设置为计算所述长度的第一校验值、所述ID的第一校验值和所述多媒体信息的第一校验值;将获得的所述视频文件的多媒体信息以及计算出的所述长度的第一校验值、所述ID的第一校验值和所述多媒体信息的第二校验值对应的添加至所述自定义的结构体中;将进行添加处理后的所述自定义的结构体添加至所述视频文件中。
本发明实施例还提供了一种获取数据的方法,包括:
当获取多媒体信息时,判断视频文件中是否有自定义的结构体(501);
当判断出视频文件中存在自定义的结构体时,获取自定义的结构体的字段(502);
对获得的自定义的结构体的字段进行校验(503);
当获得的自定义的结构体的字段校验正确时,从该自定义的结构体中读取该视频文件的多媒体信息(504)。
可选地,所述自定义的结构体包括以下字段:长度、身份标识ID、所述多媒体信息和校验值。
可选地,该方法之前还包括:
计算视频文件的多媒体信息(705);
计算所述长度的第一校验值、所述ID的第一校验值和所述多媒体信息的第一校验值(706);
将获得的所述视频文件的多媒体信息以及计算出的所述长度的第一校验值、所述ID的第一校验值和所述多媒体信息的第二校验值对应的添加至所述自定义的结构体中(707);
将进行添处理加后的所述自定义的结构体添加至所述视频文件中(708)。
可选地,所述对获得的自定义的结构体的字段进行校验包括:
计算获得的所述长度的第二校验值、所述ID的第二校验值、所述多媒体信息的第二校验值;
判断所述长度的第一校验值和所述长度的第二校验值是否相同;判断所述ID的第一校验值和所述ID的第二校验值是否相同;判断所述多媒体信息的第一校验值和所述多媒体信息的第二校验值是否相同;
当判断出所述长度的第一校验值和所述长度的第二校验值相同,并且所述ID的第一校验值和所述ID的第二校验值相同,并且所述多媒体信息的第一校验值和所述多媒体信息的第二校验值相同时,判断出获得的所述自定义的结构体的字段校验正确;
当判断出所述长度的第一校验值和所述长度的第二校验值不同,或者所述ID的第一校验值和所述ID的第二校验值不同,或者所述多媒体信息的第一校验值和所述多媒体信息的第二校验值不同时,判断出获得的所述自定义的结构体的字段校验不正确。
可选地,采用循环冗余校验码CRC校验方法对获得的所述自定义的结构体的字段进行校验。
可选地,采用循环冗余校验码CRC校验方法计算所述长度的第一校验值、所述ID的第一校验值和所述多媒体信息的第一校验值。
可选地,所述方法还包括:
为当获得的自定义的结构体的字段校验不正确时,计算视频文件的多媒体信息(705)。
可选地,所述方法还包括:
计算长度的第一校验值、ID的第一校验值和多媒体信息的第一校验值(706);
将获得的视频文件的多媒体信息以及计算出的长度的第一校验值、ID的第一校验值和多媒体信息的第二校验值对应的添加至自定义的结构体中(707);
将进行添处理加后的自定义的结构体添加至视频文件中(708)。
可选地,所述方法还包括:
判断出视频文件中不存在自定义的结构体时,计算视频文件的多媒体信息(705)。
可选地,所述方法还包括:
计算长度的第一校验值、ID的第一校验值和多媒体信息的第一校验值(706);
将获得的视频文件的多媒体信息以及计算出的长度的第一校验值、ID的第一校验值和多媒体信息的第二校验值对应的添加至自定义的结构体中(707);
将进行添处理加后的自定义的结构体添加至视频文件中(708)。
本发明实施例包括:判断模块、获取模块、校验模块和读取模块;其中,判断模块,设置为当获取多媒体信息时,判断视频文件中是否有自定义的结构体;当判断出视频文件中存在自定义的结构体时,通知获取模块;获取模块,设置为接收到来自判断模块的通知,获取自定义的结构体的字段;校验模块,设置为对获得的自定义的结构体的字段进行校验;当获得的自定义的结构体的字段校验正确时,通知读取模块;读取模块,设置为接收到来自校验模块的通知,从该自定义的结构体中读取该视频文件的多媒体信息。本发明实施例实现了更加快速的获取多媒体信息,提升了用户的体验。
在阅读并理解了附图和详细描述后,可以明白其他方面。
附图概述
图1为实现本发明各个实施例一个可选的移动终端的硬件结构示意图;
图2为支持本发明实施例移动终端之间进行通信的通信系统的示意图;
图3为本发明实施例处理前的视频文件组织结构的示意图;
图4为本发明实施例获取数据的装置的结构示意图;
图5为本发明实施例获取数据的方法的流程图;
图6为本发明实施例处理后的视频文件组织结构的示意图;
图7为本发明实施例获取数据的方法的实施例的流程图。
本发明的实施方式
下面将结合附图及实施例对本发明的技术方案进行更详细的说明。
现在将参考附图描述实现本发明各个实施例的移动终端。在后续的描述中,使用用于表示元件的诸如“模块”、“部件”或“单元”的后缀仅为了有利于本发明实施例的说明,其本身并没有特定的意义。因此,"模块"与"部件"可以混合地使用。
移动终端可以以各种形式来实施。例如,本发明实施例中描述的终端可以包括诸如移动电话、智能电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、导航装置等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。下面,假设终端是移动终端。然而,本领域技术人员将理解的是,除了特别用于移动目的的元件之外,根据本发明的实施方式的构造也能够应用于固定类型的终端。
图1为实现本发明实施例提供的一个可选的移动终端的硬件结构示意图。
移动终端100可以包括无线通信单元110、A/V(音频/视频)输入单元120输出单元150、存储器160、接口单元170、控制器180和电源单元190等等。图1示出了具有各种组件的移动终端,但是应理解的是,并不要求实施所有示出的组件。可以替代地实施更多或更少的组件。将在下面详细描述移动终端的元件。
无线通信单元110通常包括一个或多个组件,其允许移动终端100与无线通信系统或网络之间的无线电通信。例如,无线通信单元可以包括广播接收模块111、移动通信模块112和无线互联网模块113中的至少一个。
广播接收模块111经由广播信道从外部广播管理服务器接收广播信号和/或广播相关信息。广播信道可以包括卫星信道和/或地面信道。广播管理服务器可以是生成并发送广播信号和/或广播相关信息的服务器或者接收之前生成的广播信号和/或广播相关信息并且将其发送给终端的服务器。广播信号可以包括TV广播信号、无线电广播信号、数据广播信号等等。而且,广播信号可以进一步包括与TV或无线电广播信号组合的广播信号。广播相关信 息也可以经由移动通信网络提供,并且在该情况下,广播相关信息可以由移动通信模块112来接收。广播信号可以以各种形式存在,例如,其可以以数字多媒体广播(DMB)的电子节目指南(EPG)、数字视频广播手持(DVB-H)的电子服务指南(ESG)等等的形式而存在。广播接收模块111可以通过使用各种类型的广播系统接收信号广播。特别地,广播接收模块111可以通过使用诸如多媒体广播-地面(DMB-T)、数字多媒体广播-卫星(DMB-S)、数字视频广播-手持(DVB-H),前向链路媒体(MediaFLO@)的数据广播系统、地面数字广播综合服务(ISDB-T)等等的数字广播系统接收数字广播。广播接收模块111可以被构造为适合提供广播信号的各种广播系统以及上述数字广播系统。经由广播接收模块111接收的广播信号和/或广播相关信息可以存储在存储器160(或者其它类型的存储介质)中。
移动通信模块112将无线电信号发送到基站(例如,接入点、节点B等等)、外部终端以及服务器中的至少一个和/或从其接收无线电信号。这样的无线电信号可以包括语音通话信号、视频通话信号、或者根据文本和/或多媒体消息发送和/或接收的各种类型的数据。
无线互联网模块113支持移动终端的无线互联网接入。该模块可以内部或外部地耦接到终端。该模块所涉及的无线互联网接入技术可以包括WLAN(无线LAN)(Wi-Fi)、Wibro(无线宽带)、Wimax(全球微波互联接入)、HSDPA(高速下行链路分组接入)等等。
A/V输入单元120用于接收音频或视频信号。A/V输入单元120可以包括相机121和麦克风122,相机121对在视频捕获模式或图像捕获模式中由图像捕获装置获得的静态图片或视频的图像数据进行处理。处理后的图像帧可以显示在显示单元151上。经相机121处理后的图像帧可以存储在存储器160(或其它存储介质)中或者经由无线通信单元110进行发送,可以根据移动终端的构造提供两个或更多相机121。麦克风122可以在电话通话模式、记录模式、语音识别模式等等运行模式中经由麦克风接收声音(音频数据),并且能够将这样的声音处理为音频数据。处理后的音频(语音)数据可以在电话通话模式的情况下转换为可经由移动通信模块112发送到移动通信基站的格式输出。麦克风122可以实施各种类型的噪声消除(或抑制)算法以消 除(或抑制)在接收和发送音频信号的过程中产生的噪声或者干扰。
接口单元170用作至少一个外部装置与移动终端100连接可以通过的接口。例如,外部装置可以包括有线或无线头戴式耳机端口、外部电源(或电池充电器)端口、有线或无线数据端口、存储卡端口、用于连接具有识别模块的装置的端口、音频输入/输出(I/O)端口、视频I/O端口、耳机端口等等。识别模块可以是存储用于验证用户使用移动终端100的各种信息并且可以包括用户识别模块(UIM)、客户识别模块(SIM)、通用客户识别模块(USIM)等等。另外,具有识别模块的装置(下面称为"识别装置")可以采取智能卡的形式,因此,识别装置可以经由端口或其它连接装置与移动终端100连接。接口单元170可以用于接收来自外部装置的输入(例如,数据信息、电力等等)并且将接收到的输入传输到移动终端100内的一个或多个元件或者可以用于在移动终端和外部装置之间传输数据。
另外,当移动终端100与外部底座连接时,接口单元170可以用作允许通过其将电力从底座提供到移动终端100的路径或者可以用作允许从底座输入的各种命令信号通过其传输到移动终端的路径。从底座输入的各种命令信号或电力可以用作用于识别移动终端是否准确地安装在底座上的信号。输出单元150被构造为以视觉、音频和/或触觉方式提供输出信号(例如,音频信号、视频信号、警报信号、振动信号等等)。输出单元150可以包括显示单元151、音频输出模块152等等。
显示单元151可以显示在移动终端100中处理的信息。例如,当移动终端100处于电话通话模式时,显示单元151可以显示与通话或其它通信(例如,文本消息收发、多媒体文件下载等等)相关的用户界面(UI)或图形用户界面(GUI)。当移动终端100处于视频通话模式或者图像捕获模式时,显示单元151可以显示捕获的图像和/或接收的图像、示出视频或图像以及相关功能的UI或GUI等等。
同时,当显示单元151和触摸板以层的形式彼此叠加以形成触摸屏时,显示单元151可以用作输入装置和输出装置。显示单元151可以包括液晶显示器(LCD)、薄膜晶体管LCD(TFT-LCD)、有机发光二极管(OLED)显示器、柔性显示器、三维(3D)显示器等等中的至少一种。这些显示器中 的部分可以被构造为透明状以允许用户从外部观看,这可以称为透明显示器,典型的透明显示器可以例如为TOLED(透明有机发光二极管)显示器等等。根据特定想要的实施方式,移动终端100可以包括两个或更多显示单元(或其它显示装置),例如,移动终端可以包括外部显示单元(未示出)和内部显示单元(未示出)。触摸屏可用于检测触摸输入压力以及触摸输入位置和触摸输入面积。
音频输出模块152可以在移动终端处于呼叫信号接收模式、通话模式、记录模式、语音识别模式、广播接收模式等等模式下时,将无线通信单元110接收的或者在存储器160中存储的音频数据转换音频信号并且输出为声音。而且,音频输出模块152可以提供与移动终端100执行的特定功能相关的音频输出(例如,呼叫信号接收声音、消息接收声音等等)。音频输出模块152可以包括扬声器、蜂鸣器等等。
存储器160可以存储由控制器180执行的处理和控制操作的软件程序等等,或者可以暂时地存储己经输出或将要输出的数据(例如,电话簿、消息、静态图像、视频等等)。而且,存储器160可以存储关于当触摸施加到触摸屏时输出的各种方式的振动和音频信号的数据。
存储器160可以包括至少一种类型的存储介质,所述存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等等。而且,移动终端100可以与通过网络连接执行存储器160的存储功能的网络存储装置协作。
控制器180通常控制移动终端的总体操作。例如,控制器180执行与语音通话、数据通信、视频通话等等相关的控制和处理。另外,控制器180可以包括用于再现(或回放)多媒体数据的多媒体模块181,多媒体模块181可以构造在控制器180内,或者可以构造为与控制器180分离。控制器180可以执行模式识别处理,以将在触摸屏上执行的手写输入或者图片绘制输入识别为字符或图像。
电源单元190在控制器180的控制下接收外部电力或内部电力并且提供 操作各元件和组件所需的适当的电力。
这里描述的各种实施方式可以以使用例如计算机软件、硬件或其任何组合的计算机可读介质来实施。对于硬件实施,这里描述的实施方式可以通过使用特定用途集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理装置(DSPD)、可编程逻辑装置(PLD)、现场可编程门阵列(FPGA)、处理器、控制器、微控制器、微处理器、被设计为执行这里描述的功能的电子单元中的至少一种来实施,在部分情况下,这样的实施方式可以在控制器180中实施。对于软件实施,诸如过程或功能的实施方式可以与允许执行至少一种功能或操作的单独的软件模块来实施。软件代码可以由以任何适当的编程语言编写的软件应用程序(或程序)来实施,软件代码可以存储在存储器160中并且由控制器180执行。
至此,己经按照其功能描述了移动终端。下面,为了简要起见,将描述诸如折叠型、直板型、摆动型、滑动型移动终端等等的各种类型的移动终端中的滑动型移动终端作为示例。因此,本发明实施例能够应用于任何类型的移动终端,并且不限于滑动型移动终端。
如图1中所示的移动终端100可以被构造为利用经由帧或分组发送数据的诸如有线和无线通信系统以及基于卫星的通信系统来操作。
现在将参考图2描述其中根据本发明实施例的移动终端能够操作的通信系统。
这样的通信系统可以使用不同的空中接口和/或物理层。例如,由通信系统使用的空中接口包括例如频分多址(FDMA)、时分多址(TDMA)、码分多址(CDMA)和通用移动通信系统(UMTS)(特别地,长期演进(LTE))、全球移动通信系统(GSM)等等。作为非限制性示例,下面的描述涉及CDMA通信系统,但是这样的教导同样适用于其它类型的系统。
参考图2,CDMA无线通信系统可以包括多个移动终端100、多个基站(BS)270、基站控制器(BSC)275和移动交换中心(MSC)280。MSC280被构造为与公共电话交换网络(PSTN)290形成接口。MSC280还被构造为与可以经由回程线路耦接到基站270的BSC275形成接口。回程线路可以根据己知的接口中的任一种来构造,所述接口包括例如E1/T1、ATM,IP、PPP、 帧中继、HDSL、ADSL或xDSL。将理解的是,如图2中所示的系统可以包括多个BSC2750。
每个BS270可以服务一个或多个分区(或区域),由多向天线或指向特定方向的天线覆盖的每个分区放射状地远离BS270。或者,每个分区可以由用于分集接收的两个或更多天线覆盖。每个BS270可以被构造为支持多个频率分配,并且每个频率分配具有特定频谱(例如,1.25MHz,5MHz等等)。
分区与频率分配的交叉可以被称为CDMA信道。BS270也可以被称为基站收发器子系统(BTS)或者其它等效术语。在这样的情况下,术语“基站”可以用于笼统地表示单个BSC275和至少一个BS270。基站也可以被称为“蜂窝站”。或者,特定BS270的各分区可以被称为多个蜂窝站。
如图2中所示,广播发射器(BT)295将广播信号发送给在系统内操作的移动终端100。如图1中所示的广播接收模块111被设置在移动终端100处以接收由BT295发送的广播信号。在图2中,示出了几个全球定位系统(GPS)卫星300。卫星300帮助定位多个移动终端100中的至少一个。
在图2中,描绘了多个卫星300,但是理解的是,可以利用任何数目的卫星获得有用的定位信息。如图1中所示的GPS模块115通常被构造为与卫星300配合以获得想要的定位信息。替代GPS跟踪技术或者在GPS跟踪技术之外,可以使用可以跟踪移动终端的位置的其它技术。另外,至少一个GPS卫星300可以选择性地或者额外地处理卫星DMB传输。
作为无线通信系统的一个典型操作,BS270接收来自各种移动终端100的反向链路信号。移动终端100通常参与通话、消息收发和其它类型的通信。特定基站270接收的每个反向链路信号被在特定BS270内进行处理。获得的数据被转发给相关的BSC275。BSC提供通话资源分配和包括BS270之间的软切换过程的协调的移动管理功能。BSC275还将接收到的数据路由到MSC280,其提供用于与PSTN290形成接口的额外的路由服务。类似地,PSTN290与MSC280形成接口,MSC与BSC275形成接口,并且BSC275相应地控制BS270以将正向链路信号发送到移动终端100。
基于上述移动终端硬件结构以及通信系统,提出本发明方法各个实施例。
申请人发现,目前常用的视频容器格式(如mp4、avi、mkv等)都以结构体(box)的形式对视频文件中视频流信息和数据进行组织,并且这些结构体的形式都有统一的格式标准,并且结构体外的数据不作为视频解析对象。如mp4,其视频文件主要有ftyp、moov、mdat等box组成,如图3所示。在此基础上,申请人定义了一个用于存储视频文件的多媒体信息等的box,下面将通过具体的实施例进行阐述。
图4为本发明实施例获取数据的装置的结构示意图,如图4所示,包括:判断模块40、获取模块41、校验模块42和读取模块43。其中,
判断模块40,设置为当获取多媒体信息时,判断视频文件中是否有自定义的结构体;当判断出视频文件中存在自定义的结构体时,通知获取模块41。
其中,自定义的结构体包括以下字段:长度、身份标识ID、多媒体信息和校验值。
获取模块41,设置为接收到来自判断模块40的通知,获取自定义的结构体的字段。
校验模块42,设置为对获得的自定义的结构体的字段进行校验;当获得的自定义的结构体的字段校验正确时,通知读取模块43。
其中,校验模块42,是设置为:
计算获得的长度的第二校验值、ID的第二校验值、多媒体信息的第二校验值;
判断长度的第一校验值和长度的第二校验值是否相同;判断ID的第一校验值和ID的第二校验值是否相同;判断多媒体信息的第一校验值和多媒体信息的第二校验值是否相同;
当判断出长度的第一校验值和长度的第二校验值相同,并且ID的第一校验值和ID的第二校验值相同,并且多媒体信息的第一校验值和多媒体信息的第二校验值相同时,判断出获得的自定义的结构体的字段校验正确;
当判断出长度的第一校验值和长度的第二校验值不同,或者ID的第一校验值和ID的第二校验值不同,或者多媒体信息的第一校验值和多媒体信 息的第二校验值不同时,判断出获得的自定义的结构体的字段校验不正确。
其中,校验模块42可采用循环冗余校验码(CRC,Cyclic Redundancy Check)校验方法对获得的自定义的结构体的字段进行校验。
读取模块43,设置为接收到来自校验模块42的通知,从该自定义的结构体中读取该视频文件的多媒体信息。
可选地,该装置还包括处理模块44,设置为:
计算视频文件的多媒体信息;
计算长度的第一校验值、ID的第一校验值和多媒体信息的第一校验值;
将获得的视频文件的多媒体信息以及计算出的长度的第一校验值、ID的第一校验值和多媒体信息的第二校验值对应的添加至自定义的结构体中;
将进行添加处理后的自定义的结构体添加至视频文件中。
其中,处理模块44可以采用CRC校验方法计算长度的第一校验值、ID的第一校验值和多媒体信息的第一校验值。需要说明的是,关于如何采用CRC校验方法计算校验值,属于本领域技术人员所熟知的惯用技术手段,此处不再赘述,并不用来限制本申请。另外,除了采用CRC校验方法,其它校验方法也在本申请的保护范围之内,此处不再赘述。
可选地,校验模块42,还设置为当获得的自定义的结构体的字段校验不正确时,通知处理模块44。
可选地,判断模块40,还设置为判断出视频文件中不存在自定义的结构体时,通知处理模块44。相应地,
处理模块44,还设置为接收到来自判断模块40或校验模块42的通知时,计算视频文件的多媒体信息;将计算出的多媒体信息发送给读取模块43。相应地,读取模块43,还设置为接收来自处理模块44发送的多媒体信息。可选地,处理模块44,还设置为计算长度的第一校验值、ID的第一校验值和多媒体信息的第一校验值;将获得的视频文件的多媒体信息以及计算出的长度的第一校验值、ID的第一校验值和多媒体信息的第二校验值对应的添加至自定义的结构体中;将进行添加处理后的自定义的结构体添加至视频文件中。
可选地,上述装置可以设置在移动终端中。
其中,可以将判断模块40、获取模块41、校验模块42设置在图1中的控制器180中;可以将读取模块43设置在图1中的存储器160中;可以将处理模块44设置在图1中的控制器180中。
可选实施例,该可选实施例中的装置包括:处理模块44、判断模块40、获取模块41、校验模块42和读取模块43。其中,
处理模块44,设置为计算视频文件的多媒体信息;计算长度的第一校验值、ID的第一校验值和多媒体信息的第一校验值;将获得的视频文件的多媒体信息以及计算出的长度的第一校验值、ID的第一校验值和多媒体信息的第二校验值对应的添加至自定义的结构体中;将进行添加处理后的自定义的结构体添加至视频文件中。
其中,处理模块44可以采用CRC校验方法计算长度的第一校验值、ID的第一校验值和多媒体信息的第一校验值。需要说明的是,关于如何采用CRC校验方法计算校验值,属于本领域技术人员所熟知的惯用技术手段,此处不再赘述,并不用来限制本申请。另外,除了采用CRC校验方法,其它校验方法也在本申请的保护范围之内,此处不再赘述。
判断模块40,设置为当获取多媒体信息时,判断视频文件中是否有自定义的结构体;当判断出视频文件中存在自定义的结构体时,通知获取模块41。
其中,自定义的结构体包括以下字段:长度、身份标识ID、多媒体信息和校验值。
获取模块41,设置为接收到来自判断模块40的通知,获取自定义的结构体的字段。
校验模块42,设置为对获得的自定义的结构体的字段进行校验;当获得的自定义的结构体的字段校验正确时,通知读取模块43。
其中,校验模块42,是设置为:
计算获得的长度的第二校验值、ID的第二校验值、多媒体信息的第二校验值;
判断长度的第一校验值和长度的第二校验值是否相同;判断ID的第一 校验值和ID的第二校验值是否相同;判断多媒体信息的第一校验值和多媒体信息的第二校验值是否相同;
当判断出长度的第一校验值和长度的第二校验值相同,并且ID的第一校验值和ID的第二校验值相同,并且多媒体信息的第一校验值和多媒体信息的第二校验值相同时,判断出获得的自定义的结构体的字段校验正确;
当判断出长度的第一校验值和长度的第二校验值不同,或者ID的第一校验值和ID的第二校验值不同,或者多媒体信息的第一校验值和多媒体信息的第二校验值不同时,判断出获得的自定义的结构体的字段校验不正确。
其中,校验模块42采用循环冗余校验码(CRC,Cyclic Redundancy Check)校验方法对获得的自定义的结构体的字段进行校验。
读取模块43,设置为接收到来自校验模块42的通知,从该自定义的结构体中读取该视频文件的多媒体信息。
可选地,校验模块42,还设置为当获得的自定义的结构体的字段校验不正确时,通知处理模块44。
可选地,判断模块40,还设置为判断出视频文件中不存在自定义的结构体时,通知处理模块44。相应地,
处理模块44,还设置为接收到来自判断模块40或校验模块42的通知时,计算视频文件的多媒体信息;将计算出的多媒体信息发送给读取模块43。相应地,读取模块43,还设置为接收来自处理模块44发送的多媒体信息。可选地,处理模块44,还设置为计算长度的第一校验值、ID的第一校验值和多媒体信息的第一校验值;将获得的视频文件的多媒体信息以及计算出的长度的第一校验值、ID的第一校验值和多媒体信息的第二校验值对应的添加至自定义的结构体中;将进行添加处理后的自定义的结构体添加至视频文件中。
可选地,上述装置可以设置在移动终端中。
图5为本发明实施例获取数据的方法的流程图,如图5所示,包括:
步骤501:当获取多媒体信息时,判断视频文件中是否有自定义的结构体。
其中,自定义的结构体(box)包括以下字段:长度、身份标识ID、多媒体信息和校验值。其中,本申请中自定义的结构体的结构如下所示:
mifo_Box  //结构体的名称
{
unsigned int(32)length;  //结构体的长度
unsigned int(32)mifo;  //结构体的ID
unsigned int(n)xmlContent;  //多媒体信息
unsigned int(n)CRC check;  //校验值。
}
其中,unsigned int(n)xmlContent中存储的是xml格式的多媒体信息。其中,为了不与结构体的ID冲突(因为ID的格式有标准规范,标准规范定义了已经使用的ID),可以使用四个字节都不是ASIC码的任意数值作为本申请中自定义的结构体的ID,如本申请中自定义的结构体的ID可以是0xf1faa38f。如图6所示,是本发明实施例处理后的视频文件组织结构的示意图,其中,ID=0xf1faa38f表示的是上述自定义的结构体在视频文件中的位置。
步骤502:当判断出视频文件中存在自定义的结构体时,获取自定义的结构体的字段。
步骤503:对获得的自定义的结构体的字段进行校验。
可选地,该方法之前还包括:
计算视频文件的多媒体信息;
计算长度的第一校验值、ID的第一校验值和多媒体信息的第一校验值;
将获得的视频文件的多媒体信息以及计算出的长度的第一校验值、ID的第一校验值和多媒体信息的第二校验值对应的添加至自定义的结构体中;
将进行添处理加后的自定义的结构体添加至视频文件中。如图6所示即为本申请视频文件组织结构的示意图。
需要说明的是,关于如何获取(计算)视频文件的多媒体信息属于本领域技术人员所熟知的惯用技术手段,此处不再赘述,并不用来限制本申请。
其中,可以采用循环冗余校验码(CRC,Cyclic Redundancy Check)校验方法计算长度的校验值、ID的校验值和多媒体信息的校验值。需要说明的是,关于如何采用CRC校验方法计算校验值,属于本领域技术人员所熟知的惯用技术手段,此处不再赘述,并不用来限制本申请。另外,除了采用CRC校验方法,其它校验方法也在本申请的保护范围之内,此处不再赘述。
其中,采用循环冗余校验码CRC校验方法对获得的自定义的结构体的字段进行校验。
其中,步骤503可包括:
计算获得的长度的第二校验值、ID的第二校验值、多媒体信息的第二校验值;
判断长度的第一校验值和长度的第二校验值是否相同;判断ID的第一校验值和ID的第二校验值是否相同;判断多媒体信息的第一校验值和多媒体信息的第二校验值是否相同;
当判断出长度的第一校验值和长度的第二校验值相同,并且ID的第一校验值和ID的第二校验值相同,并且多媒体信息的第一校验值和多媒体信息的第二校验值相同时,判断出获得的自定义的结构体的字段校验正确;
当判断出长度的第一校验值和长度的第二校验值不同,或者ID的第一校验值和ID的第二校验值不同,或者多媒体信息的第一校验值和多媒体信息的第二校验值不同时,判断出获得的自定义的结构体的字段校验不正确。
可选地,当获得的自定义的结构体的字段校验不正确,或者,判断出视频文件中不存在自定义的结构体时,该方法还包括:执行“计算视频文件的多媒体信息;计算长度的第一校验值、ID的第一校验值和多媒体信息的第一校验值;将获得的视频文件的多媒体信息以及计算出的长度的第一校验值、ID的第一校验值和多媒体信息的第二校验值对应的添加至自定义的结构体中;将进行添处理加后的自定义的结构体添加至视频文件中”的步骤。
步骤504:当获得的自定义的结构体的字段校验正确时,从该自定义的结构体中读取该视频文件的多媒体信息。
本发明实施方式中,通过当判断出视频文件中存在自定义的结构体时, 获取自定义的结构体的字段并对获得的自定义的结构体的字段进行校验,当获得的自定义的结构体的字段校验正确时,从该自定义的结构体中读取该视频文件的多媒体信息,从而实现了更加快速的获取多媒体信息,提升了用户的体验。由于获取(计算)一次视频文件的多媒体信息的计算量很大以及需要很长的时间,如果每次获得视频文件的多媒体信息时,都要重新计算该视频文件的多媒体信息,会导致视频文件的扫描速度以及播放时的加载速度非常慢,影响用户体验。而本申请中仅需在一开始只获取(计算)一次视频文件的多媒体信息将获得的多媒体信息添加至自定义的结构体中,通过校验后,只需从自定义的结构体读取多媒体信息即可,避免了重复计算的弊端,提升了用户体验。
图7为本发明实施例获取数据的方法的实施例的流程图,如图7所示,包括:
步骤700:预先处理视频文件。
本步骤可包括:
计算视频文件的多媒体信息;
计算长度的第一校验值、ID的第一校验值和多媒体信息的第一校验值;
将获得的视频文件的多媒体信息以及计算出的长度的第一校验值、ID的第一校验值和多媒体信息的第二校验值对应的添加至自定义的结构体中;
将进行添处理加后的自定义的结构体添加至视频文件中。如图6所示即为本申请视频文件组织结构的示意图。
需要说明的是,关于如何计算视频文件的多媒体信息属于本领域技术人员所熟知的惯用技术手段,此处不再赘述,并不用来限制本申请。
其中,可以采用循环冗余校验码(CRC,Cyclic Redundancy Check)校验方法计算长度的第一校验值、ID的第一校验值和多媒体信息的第一校验值。需要说明的是,关于如何采用CRC校验方法计算校验值,属于本领域技术人员所熟知的惯用技术手段,此处不再赘述,并不用来限制本申请。另外,除了采用CRC校验方法,其它校验方法也在本申请的保护范围之内,此处不再赘述。
步骤701:当获取多媒体信息时,判断视频文件中是否有自定义的结构体。当判断出视频文件中存在自定义的结构体时,转入步骤702;当判断出视频文件中不存在自定义的结构体时,转入步骤705。
其中,本申请中自定义的结构体的结构如下所示:
mifo_Box  //结构体的名称
{
unsigned int(32)length;  //结构体的长度
unsigned int(32)mifo;  //结构体的ID
unsigned int(n)xmlContent;  //多媒体信息
unsigned int(n)CRC check;  //校验值。
}
其中,unsigned int(n)xmlContent中存储的是xml格式的多媒体信息。其中,为了不与结构体的ID冲突(因为ID的格式有标准规范,标准规范定义了已经使用的ID),可以使用四个字节都不是ASIC码的任意数值作为本申请中自定义的结构体的ID,如本申请中自定义的结构体的ID可以是0xf1faa38f。如图6所示,是本发明实施例处理后的视频文件组织结构的示意图,其中,ID=0xf1faa38f表示的是上述自定义的结构体在视频文件中的位置。
步骤702:获取自定义的结构体的字段。
其中,自定义的结构体(box)包括以下字段:长度、身份标识ID、多媒体信息和校验值。
步骤703:对获得的自定义的结构体的字段进行校验。当获得的自定义的结构体的字段校验正确时,转入步骤704;当获得的自定义的结构体的字段校验错误时,转入步骤705。
其中,采用循环冗余校验码CRC校验方法对获得的自定义的结构体的字段进行校验。
其中,步骤703可包括:
计算获得的长度的第二校验值、ID的第二校验值、多媒体信息的第二校验值;
判断长度的第一校验值和长度的第二校验值是否相同;判断ID的第一校验值和ID的第二校验值是否相同;判断多媒体信息的第一校验值和多媒体信息的第二校验值是否相同;
当判断出长度的第一校验值和长度的第二校验值相同,并且ID的第一校验值和ID的第二校验值相同,并且多媒体信息的第一校验值和多媒体信息的第二校验值相同时,判断出获得的自定义的结构体的字段校验正确;
当判断出长度的第一校验值和长度的第二校验值不同,或者ID的第一校验值和ID的第二校验值不同,或者多媒体信息的第一校验值和多媒体信息的第二校验值不同时,判断出获得的自定义的结构体的字段校验不正确。
步骤704:从该自定义的结构体中读取该视频文件的多媒体信息。
步骤705:计算该视频文件的多媒体信息。
步骤706:计算长度的第一校验值、ID的第一校验值和多媒体信息的第一校验值。
步骤707:将获得的视频文件的多媒体信息以及计算出的长度的第一校验值、ID的第一校验值和多媒体信息的第二校验值对应的添加至自定义的结构体中。
步骤708:将进行添处理加后的自定义的结构体添加至视频文件中。
本发明实施例还提供了一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行上述实施例所述的方法。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品 或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理单元的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些组件或所有组件可以被实施为由处理器,如数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何话方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。
以上仅为本申请的可选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。
工业实用性
上述技术方案可应用于移动终端的系统(如安卓(Android)系统、Windows系统、苹果系统和诺基亚(Lumia)系统)中,实现了更加快速的获取多媒体信息,加快了移动终端播放多媒体的速度,提升了用户的体验。

Claims (20)

  1. 一种获取数据的装置,包括:判断模块(40)、获取模块(41)、校验模块(42)和读取模块(43);其中,
    判断模块(40),设置为当获取多媒体信息时,判断视频文件中是否有自定义的结构体;当判断出视频文件中存在自定义的结构体时,通知获取模块(41);
    获取模块(41),设置为接收到来自判断模块(40)的通知,获取自定义的结构体的字段;
    校验模块(42),设置为对获得的自定义的结构体的字段进行校验;当获得的自定义的结构体的字段校验正确时,通知读取模块(43);
    读取模块(43),设置为接收到来自校验模块(42)的通知,从该自定义的结构体中读取该视频文件的多媒体信息。
  2. 根据权利要求1所述的装置,其中,
    所述自定义的结构体包括以下字段:长度、身份标识ID、所述多媒体信息和校验值。
  3. 根据权利要求2所述的装置,该装置还包括:
    处理模块(44),设置为计算视频文件的多媒体信息;计算所述长度的第一校验值、所述ID的第一校验值和所述多媒体信息的第一校验值;将获得的所述视频文件的多媒体信息以及计算出的所述长度的第一校验值、所述ID的第一校验值和所述多媒体信息的第二校验值对应的添加至所述自定义的结构体中;将进行添加处理后的所述自定义的结构体添加至所述视频文件中。
  4. 根据权利要求3所述的装置,其中,
    所述校验模块(42),是设置为计算获得的所述长度的第二校验值、所述ID的第二校验值、所述多媒体信息的第二校验值;
    判断所述长度的第一校验值和所述长度的第二校验值是否相同;判断所述ID的第一校验值和所述ID的第二校验值是否相同;判断所述多媒体信息 的第一校验值和所述多媒体信息的第二校验值是否相同;
    当判断出所述长度的第一校验值和所述长度的第二校验值相同,并且所述ID的第一校验值和所述ID的第二校验值相同,并且所述多媒体信息的第一校验值和所述多媒体信息的第二校验值相同时,判断出获得的所述自定义的结构体的字段校验正确;
    当判断出所述长度的第一校验值和所述长度的第二校验值不同,或者所述ID的第一校验值和所述ID的第二校验值不同,或者所述多媒体信息的第一校验值和所述多媒体信息的第二校验值不同时,判断出获得的所述自定义的结构体的字段校验不正确。
  5. 根据权利要求1所述的装置,其中,
    所述校验模块(42)采用循环冗余校验码CRC校验方法对获得的所述自定义的结构体的字段进行校验。
  6. 根据权利要求3所述的装置,其中,
    处理模块(44)采用循环冗余校验码CRC校验方法计算长度的第一校验值、ID的第一校验值和多媒体信息的第一校验值。
  7. 根据权利要求2所述的装置,该装置还包括处理模块(44);
    校验模块(42),还设置为当获得的自定义的结构体的字段校验不正确时,通知处理模块(44);
    处理模块(44),设置为接收到来自校验模块(42)的通知时,计算视频文件的多媒体信息;将计算出的多媒体信息发送给读取模块(43);
    读取模块(43),还设置为接收来自处理模块(44)发送的多媒体信息。
  8. 根据权利要求7所述的装置,
    处理模块(44),还设置为计算所述长度的第一校验值、所述ID的第一校验值和所述多媒体信息的第一校验值;
    将获得的所述视频文件的多媒体信息以及计算出的所述长度的第一校验值、所述ID的第一校验值和所述多媒体信息的第二校验值对应的添加至所述自定义的结构体中;
    将进行添加处理后的所述自定义的结构体添加至所述视频文件中。
  9. 根据权利要求2所述的装置,该装置还包括处理模块(44);
    判断模块(40),还设置为判断出视频文件中不存在自定义的结构体时,通知处理模块(44);
    处理模块(44),设置为接收到来自判断模块(40)的通知时,计算视频文件的多媒体信息;将计算出的多媒体信息发送给读取模块(43);
    读取模块(43),还设置为接收来自处理模块(44)发送的多媒体信息。
  10. 根据权利要求9所述的装置,
    处理模块(44),还设置为计算所述长度的第一校验值、所述ID的第一校验值和所述多媒体信息的第一校验值;
    将获得的所述视频文件的多媒体信息以及计算出的所述长度的第一校验值、所述ID的第一校验值和所述多媒体信息的第二校验值对应的添加至所述自定义的结构体中;
    将进行添加处理后的所述自定义的结构体添加至所述视频文件中。
  11. 一种获取数据的方法,包括:
    当获取多媒体信息时,判断视频文件中是否有自定义的结构体(501);
    当判断出视频文件中存在自定义的结构体时,获取自定义的结构体的字段(502);
    对获得的自定义的结构体的字段进行校验(503);
    当获得的自定义的结构体的字段校验正确时,从该自定义的结构体中读取该视频文件的多媒体信息(504)。
  12. 根据权利要求11所述的方法,其中,
    所述自定义的结构体包括以下字段:长度、身份标识ID、所述多媒体信息和校验值。
  13. 根据权利要求12所述的方法,该方法之前还包括:
    计算视频文件的多媒体信息(705);
    计算所述长度的第一校验值、所述ID的第一校验值和所述多媒体信息 的第一校验值(706);
    将获得的所述视频文件的多媒体信息以及计算出的所述长度的第一校验值、所述ID的第一校验值和所述多媒体信息的第二校验值对应的添加至所述自定义的结构体中(707);
    将进行添处理加后的所述自定义的结构体添加至所述视频文件中(708)。
  14. 根据权利要求13所述的方法,其中,所述对获得的自定义的结构体的字段进行校验包括:
    计算获得的所述长度的第二校验值、所述ID的第二校验值、所述多媒体信息的第二校验值;
    判断所述长度的第一校验值和所述长度的第二校验值是否相同;判断所述ID的第一校验值和所述ID的第二校验值是否相同;判断所述多媒体信息的第一校验值和所述多媒体信息的第二校验值是否相同;
    当判断出所述长度的第一校验值和所述长度的第二校验值相同,并且所述ID的第一校验值和所述ID的第二校验值相同,并且所述多媒体信息的第一校验值和所述多媒体信息的第二校验值相同时,判断出获得的所述自定义的结构体的字段校验正确;
    当判断出所述长度的第一校验值和所述长度的第二校验值不同,或者所述ID的第一校验值和所述ID的第二校验值不同,或者所述多媒体信息的第一校验值和所述多媒体信息的第二校验值不同时,判断出获得的所述自定义的结构体的字段校验不正确。
  15. 根据权利要求11所述的方法,其中,
    采用循环冗余校验码CRC校验方法对获得的所述自定义的结构体的字段进行校验。
  16. 根据权利要求13所述的方法,其中,
    采用循环冗余校验码CRC校验方法计算所述长度的第一校验值、所述ID的第一校验值和所述多媒体信息的第一校验值。
  17. 根据权利要求12所述的方法,所述方法还包括:
    为当获得的自定义的结构体的字段校验不正确时,计算视频文件的多媒体信息(705)。
  18. 根据权利要求17所述的方法,所述方法还包括:
    计算长度的第一校验值、ID的第一校验值和多媒体信息的第一校验值(706);
    将获得的视频文件的多媒体信息以及计算出的长度的第一校验值、ID的第一校验值和多媒体信息的第二校验值对应的添加至自定义的结构体中(707);
    将进行添处理加后的自定义的结构体添加至视频文件中(708)。
  19. 根据权利要求12所述的方法,所述方法还包括:
    判断出视频文件中不存在自定义的结构体时,计算视频文件的多媒体信息(705)。
  20. 根据权利要求19所述的方法,所述方法还包括:
    计算长度的第一校验值、ID的第一校验值和多媒体信息的第一校验值(706);
    将获得的视频文件的多媒体信息以及计算出的长度的第一校验值、ID的第一校验值和多媒体信息的第二校验值对应的添加至自定义的结构体中(707);
    将进行添处理加后的自定义的结构体添加至视频文件中(708)。
PCT/CN2016/113744 2016-04-29 2016-12-30 一种获取数据的装置和方法 WO2017185807A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610281232.8 2016-04-29
CN201610281232.8A CN106027488A (zh) 2016-04-29 2016-04-29 一种获取数据的装置和方法

Publications (1)

Publication Number Publication Date
WO2017185807A1 true WO2017185807A1 (zh) 2017-11-02

Family

ID=57081588

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/113744 WO2017185807A1 (zh) 2016-04-29 2016-12-30 一种获取数据的装置和方法

Country Status (2)

Country Link
CN (1) CN106027488A (zh)
WO (1) WO2017185807A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112667431A (zh) * 2020-12-23 2021-04-16 江西兴泰科技有限公司 一种电子价签波形数据的校对方法

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106027488A (zh) * 2016-04-29 2016-10-12 努比亚技术有限公司 一种获取数据的装置和方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101547360A (zh) * 2009-05-08 2009-09-30 南京师范大学 可定位视频文件格式及该格式文件数据的采集方法
WO2011132879A2 (ko) * 2010-04-19 2011-10-27 엘지전자 주식회사 인터넷 기반 컨텐츠 송수신 방법 및 그를 이용한 송수신 장치
CN103001964A (zh) * 2012-12-04 2013-03-27 杭州顺网科技股份有限公司 一种局域网环境下的缓存加速方法
CN103501469A (zh) * 2013-09-25 2014-01-08 深圳先进技术研究院 在视频文件尾部添加地理位置信息的方法
CN106027488A (zh) * 2016-04-29 2016-10-12 努比亚技术有限公司 一种获取数据的装置和方法

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9819949B2 (en) * 2011-12-16 2017-11-14 Microsoft Technology Licensing, Llc Hardware-accelerated decoding of scalable video bitstreams
CN103116500A (zh) * 2013-03-11 2013-05-22 北京首钢自动化信息技术有限公司 一种结构体定义和结构输出的方法及装置
CN104681033A (zh) * 2013-12-02 2015-06-03 联想(北京)有限公司 一种信息编码、解码方法及电子设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101547360A (zh) * 2009-05-08 2009-09-30 南京师范大学 可定位视频文件格式及该格式文件数据的采集方法
WO2011132879A2 (ko) * 2010-04-19 2011-10-27 엘지전자 주식회사 인터넷 기반 컨텐츠 송수신 방법 및 그를 이용한 송수신 장치
CN103001964A (zh) * 2012-12-04 2013-03-27 杭州顺网科技股份有限公司 一种局域网环境下的缓存加速方法
CN103501469A (zh) * 2013-09-25 2014-01-08 深圳先进技术研究院 在视频文件尾部添加地理位置信息的方法
CN106027488A (zh) * 2016-04-29 2016-10-12 努比亚技术有限公司 一种获取数据的装置和方法

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112667431A (zh) * 2020-12-23 2021-04-16 江西兴泰科技有限公司 一种电子价签波形数据的校对方法

Also Published As

Publication number Publication date
CN106027488A (zh) 2016-10-12

Similar Documents

Publication Publication Date Title
WO2017071481A1 (zh) 一种移动终端及其实现分屏的方法
WO2017143854A1 (zh) 一种移动终端及控制音量的方法、计算机可读存储介质
WO2016173468A1 (zh) 组合操作方法和装置、触摸屏操作方法及电子设备
WO2017071310A1 (zh) 视频通话系统、装置和方法
WO2017071500A1 (zh) 一种天线和移动终端
CN104811865B (zh) 音频输出方法、装置和系统
CN106453939B (zh) 一种流媒体接入方法及装置
WO2016173395A1 (zh) 启动音效的方法、终端设备及计算机存储介质
CN105262819B (zh) 一种移动终端及其实现推送的方法
WO2017054616A1 (zh) 一种视频图片显示方法、装置及一种图片显示方法
WO2018019128A1 (zh) 一种夜景图像的处理方法和移动终端
WO2017041714A1 (zh) 一种获取rgb数据的方法和装置
CN106375840A (zh) 一种屏幕投影设备、移动终端及屏幕投影连接方法
WO2017113893A1 (zh) 一种搜网的方法及装置
WO2017113961A1 (zh) 数据加密装置及方法、存储介质
WO2016155425A1 (zh) 数据发送操作撤销方法、装置及计算机存储介质
CN106254439A (zh) 一种推送方法、装置以及一种移动设备管理系统
WO2017071471A1 (zh) 一种移动终端及其控制拍摄的方法
CN105872997A (zh) 一种短信合并方法及终端设备
WO2017185807A1 (zh) 一种获取数据的装置和方法
CN105049582A (zh) 一种通话录音的保存装置、方法和显示方法
CN105261054A (zh) 一种合成有声gif图片的装置和方法
CN105302899A (zh) 一种移动终端和实现图片处理的方法
WO2017113884A1 (zh) 一种视频播放方法、装置及计算机存储介质
WO2017071582A1 (zh) 移动终端及其无线网络连接方法、存储介质

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16900311

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 16900311

Country of ref document: EP

Kind code of ref document: A1