WO2012075804A1 - Method, device, system and terminal device for storing and locating frame data - Google Patents

Method, device, system and terminal device for storing and locating frame data Download PDF

Info

Publication number
WO2012075804A1
WO2012075804A1 PCT/CN2011/076368 CN2011076368W WO2012075804A1 WO 2012075804 A1 WO2012075804 A1 WO 2012075804A1 CN 2011076368 W CN2011076368 W CN 2011076368W WO 2012075804 A1 WO2012075804 A1 WO 2012075804A1
Authority
WO
WIPO (PCT)
Prior art keywords
frame
connector
address
current
frame data
Prior art date
Application number
PCT/CN2011/076368
Other languages
French (fr)
Chinese (zh)
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 WO2012075804A1 publication Critical patent/WO2012075804A1/en

Links

Images

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B27/00Editing; Indexing; Addressing; Timing or synchronising; Monitoring; Measuring tape travel
    • G11B27/02Editing, e.g. varying the order of information signals recorded on, or reproduced from, record carriers
    • G11B27/031Electronic editing of digitised analogue information signals, e.g. audio or video signals
    • G11B27/034Electronic editing of digitised analogue information signals, e.g. audio or video signals on discs
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B27/00Editing; Indexing; Addressing; Timing or synchronising; Monitoring; Measuring tape travel
    • G11B27/10Indexing; Addressing; Timing or synchronising; Measuring tape travel
    • G11B27/19Indexing; Addressing; Timing or synchronising; Measuring tape travel by using information detectable on the record carrier
    • G11B27/28Indexing; Addressing; Timing or synchronising; Measuring tape travel by using information detectable on the record carrier by using information signals recorded by the same method as the main recording
    • G11B27/30Indexing; Addressing; Timing or synchronising; Measuring tape travel by using information detectable on the record carrier by using information signals recorded by the same method as the main recording on the same track as the main recording
    • G11B27/3027Indexing; Addressing; Timing or synchronising; Measuring tape travel by using information detectable on the record carrier by using information signals recorded by the same method as the main recording on the same track as the main recording used signal is digitally coded
    • G11B27/3036Time code signal
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B27/00Editing; Indexing; Addressing; Timing or synchronising; Monitoring; Measuring tape travel
    • G11B27/10Indexing; Addressing; Timing or synchronising; Measuring tape travel
    • G11B27/19Indexing; Addressing; Timing or synchronising; Measuring tape travel by using information detectable on the record carrier
    • G11B27/28Indexing; Addressing; Timing or synchronising; Measuring tape travel by using information detectable on the record carrier by using information signals recorded by the same method as the main recording
    • G11B27/30Indexing; Addressing; Timing or synchronising; Measuring tape travel by using information detectable on the record carrier by using information signals recorded by the same method as the main recording on the same track as the main recording
    • G11B27/3081Indexing; Addressing; Timing or synchronising; Measuring tape travel by using information detectable on the record carrier by using information signals recorded by the same method as the main recording on the same track as the main recording used signal is a video-frame or a video-field (P.I.P)

Definitions

  • the present invention relates to the field of video broadcasting, and in particular, to a method, an apparatus, a system, and a terminal device for storing and locating frame data.
  • the streaming media system especially the streaming program source on the embedded platform, while downloading and playing, it is necessary to efficiently manage the stored data stream, and it is necessary to simplify the later operation processing to ensure that the embedded resources are not wasted at the same time.
  • the most important resources for embedded are CPU and memory.
  • the frame data to be stored includes a pointer, a frame type, a frame length, a timestamp, and a data.
  • the pointer is stored.
  • frame type, frame length, timestamp, data, the probability of occurrence of B and P frames in the streaming media file is 90-95%, and the pointers of B and P frames often do not have much effect in the application process. This wastes resources on the CPU, hard disk, or memory. In positioning, the B and P frame pointers reduce the efficiency of positioning and waste CPU and memory resources.
  • the purpose of the embodiment of the present invention is to provide a method for storing frame data, which aims to solve the problem that the streaming media file in the prior art has a large number of redundant pointers, frame types, frame lengths, and time stamps when being stored, which wastes CPU and hard disk. Or memory resources, and the problem of less efficient retrieval or positioning.
  • a method for storing frame data includes the following steps:
  • the connector data structure including three address members: a current I frame address, a previous I frame address, and a next I frame address;
  • the identification information is stored in the first space after the frame data; the identification information includes: a current I frame address, a previous I frame address, and a next I frame address.
  • Another object of the embodiments of the present invention is to provide an apparatus for storing frame data, the apparatus comprising:
  • a first initial module configured to pre-create a connector data structure, where the connector data structure includes three address members: a current I frame address, a previous I frame address, and a next I frame address;
  • a storage module configured to receive and store frame data
  • An identifier module configured to determine whether the frame data is I frame data, and if yes, store the identification information in the first space after the frame data; the identifier information includes: a current I frame address, a previous I frame address, and the following I frame address.
  • Another object of the embodiments of the present invention is to provide a method for positioning frame data, the method comprising the following steps:
  • the timestamp of the I frame is the time point at which the positioning needs to be located.
  • Another object of the embodiments of the present invention is to provide a frame data locating device, the device comprising:
  • An information acquisition module configured to acquire a time point that needs to be located
  • a second initial module configured to pre-create a second temporary pointer variable of the connector data structure, and the second temporary pointer variable points to the pre-created global connector pointer variable;
  • a positioning module configured to obtain a timestamp of the I frame according to the current I frame address member pointed to by the second temporary pointer variable; determine whether the time point to be located is smaller than the timestamp of the I frame, and if not, the timestamp of the I frame is required The point in time of positioning.
  • Another object of the embodiments of the present invention is to provide a frame data storage and positioning system, the system comprising: a frame data storage device and a frame data positioning device;
  • the frame data storage device is configured to:
  • the connector data structure including three address members: a current I frame address, a previous I frame address, and a next I frame address;
  • the identification information is stored in the first space after the frame data; the identification information includes: a current I frame address, a previous I frame address, and a next I frame address;
  • the frame data locating device is configured to:
  • the timestamp of the I frame is the time point at which the positioning needs to be located.
  • Another object of embodiments of the present invention is to provide a terminal device including the frame data storage and positioning system.
  • the identification information is stored after the I frame data, and the acquired time point of the positioning and the frame recorded in the frame data storage device are obtained.
  • the timestamps are compared to determine the time point at which the positioning needs to be located; only the I frame data is stored in the stored process, and the corresponding identification information is stored, and the B frames and P frames that appear in the frame data need not store the identification information, which greatly saves
  • the storage efficiency and storage space reduce the memory consumption, and since only the identification information of the I frame is stored, in the positioning process, only the association relationship of the members in the connector data structure is required to achieve the purpose of quickly hopping and locating the I frame. Reduced memory consumption.
  • FIG. 1 is a general flowchart of a frame data storage method according to an embodiment of the present invention
  • FIG. 2 is a specific flowchart of a method for storing frame data according to an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of a frame data storage device according to an embodiment of the present invention.
  • FIG. 4 is a general flowchart of a method for positioning a frame data according to an embodiment of the present invention
  • FIG. 5 is a specific flowchart of a method for positioning a frame data according to an embodiment of the present invention
  • FIG. 6 is a schematic structural diagram of a frame data positioning apparatus according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of a frame data storage and positioning system according to an embodiment of the present invention.
  • the invention stores the frame data, the frame length corresponding to the frame data, the frame timestamp and the start address of the frame, and determines the I frame, stores the identification information after the I frame data, and determines the acquired time point and the required positioning.
  • the frame timestamps recorded in the frame data storage device are compared to determine a time point that needs to be located; only the I frame data stores the corresponding identification information in the storage process, and the B frames and P frames that appear in the frame data in a large amount are not Need to store the identification information, which greatly improves the storage efficiency, saves the storage space and reduces the memory consumption, and achieves the purpose of fast storage and jump positioning through the association relationship of the members in the connector data structure, thereby reducing the memory consumption.
  • FIG. 1 is a general flowchart of a method for storing frame data according to an embodiment of the present invention. The method includes the following steps:
  • S101 Receive and store frame data, and record a start address of the frame data.
  • the frame data stores a frame length, a frame timestamp I_ms, and frame data when stored;
  • the identifier information includes: a current I frame address, a previous I frame address, and a next I frame address;
  • the first space is a space reserved for the memory occupied by the connector, and is used for storing the identification information
  • the identifier information is information of a connector data structure, and is used to identify that the received and stored frame data is I frame data, and the identifier information associates the I frame in the frame data;
  • the frame data by determining whether the frame data is an I frame, only the received I frame will store the identification information after the frame data, and only the I frame increases the appropriate memory consumption.
  • I The probability of occurrence of a frame is very small, so that no processing is performed on B frames and P frames with high probability of occurrence, a large amount of storage space and storage efficiency are saved, and memory consumption is reduced.
  • FIG. 2 is a specific flowchart of a method for storing frame data according to an embodiment of the present invention. The method includes the following steps:
  • the connector data structure creation process is specifically as follows:
  • the cur represents the current I frame address saved by the connector
  • the last represents the last I frame address saved by the connector
  • the next represents the next I frame address saved by the connector
  • the creation process of the global connector pointer variable is struct I_linker* m_g_v_w;
  • S203 Receive and store frame data, and record a start address of the frame data.
  • the frame data stores a frame length, a frame timestamp I_ms, and frame data when stored;
  • step S204 it is determined whether it is an I frame, if not, then returns to step S203, and if yes, proceeds to step S205;
  • the first space creation process is a space for reserving the memory size occupied by the connector, and is used for storing the identifier information, where the identifier information is information of the connector data structure, specifically sizeof (struct I_linker);
  • the identification information is stored after the frame data only when the frame is I.
  • the process of storing the identification information is based on the global connector pointer variable of the pre-created connector data structure and the first A temporary pointer variable and the interaction of the two variables and their members are completed. Only for the I frame, the appropriate memory consumption is increased. In the entire frame data storage process, the probability of occurrence of the I frame is very small, so that the probability of occurrence is high. B frames and P frames do not do any processing, which saves a lot of storage space and storage efficiency and reduces memory consumption.
  • FIG. 3 is a schematic structural diagram of a frame data storage apparatus according to an embodiment of the present invention.
  • the frame data storage device includes: a first initial module, a storage module, and an identification module;
  • a first initial module connected to the storage module, for creating a connector data structure, the connector data structure comprising three members: a current I frame address, a previous I frame address, and a next I frame address;
  • the connector data structure creation process is as follows:
  • the cur represents the current I frame address saved by the connector
  • the last represents the last I frame address saved by the connector
  • the next represents the next I frame address saved by the connector
  • a storage module which is respectively connected to the first initial module and the identifier module, configured to receive and store frame data, and record a start address of the frame data;
  • the frame data stores a frame length, a frame timestamp I_ms, and frame data when stored;
  • the identification module is connected to the storage module, and is configured to determine whether the received and stored frame data is an I frame, and if yes, store the identification information after the frame data;
  • the identification information is information of a connector data structure, and the identifier information storage process is:
  • the first space A of the memory occupied by the reserved connector is used to store the identification information, specifically sizeof(struct I_linker);
  • the connector data structure and its members are created by the first initial module.
  • the frame data received by the storage module is an I frame
  • the start address of the frame data is recorded, and the identifier module determines whether the received and stored data is In the case of an I frame, if yes, the identity module stores the identification information after the frame data; only the I frame increases the appropriate memory consumption.
  • the probability of occurrence of the I frame is very small, so that the probability of occurrence is high. B frames and P frames do not do any processing, which saves a lot of storage space and storage efficiency and reduces memory consumption.
  • FIG. 4 is a general flowchart of a method for positioning a frame data according to an embodiment of the present invention. The method includes the following steps:
  • the unit of the time point seek_ms to be positioned is milliseconds, which is the relative display time point corresponding to the I frame, which is the time offset starting from 0 ms, and the display start time is recorded in 0 ms at the start of display;
  • a second temporary pointer variable of the connector data structure is created in advance, and the second temporary pointer variable points to the pre-created global connector pointer variable; and the timestamp of the I frame is obtained according to the current I frame address member pointed to by the second temporary pointer variable;
  • the timestamp of the I frame is a time point that needs to be located
  • the timestamp I_ms of the I frame is a timestamp saved when the frame data is stored
  • the obtained time point of the required positioning is compared with the timestamp of the I frame. If the time point of the positioning is not less than the timestamp of the I frame, the timestamp of the I frame is the time point to be located. During the locating process, only the timestamp of the I frame needs to be determined.
  • the I frame data is followed by the identification information, and the front and rear I frame data are associated by the identification information, so that the identification information can be traced back to the required location.
  • the time point of the I frame and the start address of the I frame corresponding to the time point that needs to be located avoid the process of jumping from the I frame data to the B frame or the P frame data, thereby improving the positioning speed and reducing the memory consumption.
  • FIG. 5 is a specific flowchart of a method for positioning a frame data according to an embodiment of the present invention. The method includes the following steps:
  • the global connector pointer variable is created before the time point at which the positioning needs to be acquired, and the current connector pointer is saved;
  • I_linker* seek m_g_v_w
  • the timestamp I_ms of the I frame is a timestamp saved when the frame data is stored
  • step S504 determining whether the time point seek_ms to be located is smaller than the timestamp I_ms of the I frame, if not, proceeding to step S505, and if yes, proceeding to step S506;
  • the timestamp I_ms of the I frame is a time point that needs to be located
  • the second temporary pointer variable is created, the current connector pointer is obtained by the second temporary pointer variable and the global connector pointer variable, and the current I frame address member of the second temporary pointer variable is obtained.
  • the timestamp of the I frame is obtained by comparing the timestamp of the I frame with the time point to be located, and obtains the time point at which the positioning needs to be located.
  • the second temporary pointer variable is passed.
  • the last I frame address member obtains the identification information stored after the previous frame data, and saves it to the second temporary pointer variable, and so on to obtain the time point that needs to be finally positioned, and only needs to locate the identification information of the I frame.
  • the three member associations of the connector data structure quickly jump to the time point that needs to be located, thereby avoiding the process of jumping from the I frame data to the B frame or the P frame data, thereby improving the positioning efficiency and reducing the efficiency. Memory consumption.
  • FIG. 6 is a schematic structural diagram of a frame data positioning apparatus according to an embodiment of the present invention.
  • the frame data locating device includes: an information acquiring module, a second initial module, and a positioning module;
  • the information acquisition module is connected to the second initial module, and is used to obtain a time point seek_ms that needs to be located;
  • the second initial module is respectively connected to the information obtaining module and the positioning module, and is configured to create a second temporary pointer variable seek of the connector data structure, and the second temporary pointer variable seek points to the global connector pointer variable m_g_v_w; according to the second temporary pointer variable
  • the current I frame address member obtains the timestamp I_ms of the I frame;
  • the global connector pointer variable is created before the time point at which the positioning needs to be acquired, and the current connector pointer is saved;
  • I_linker* seek m_g_v_w
  • the positioning module is connected to the second initial module, and is used to determine whether the time point seek_ms to be located is smaller than the timestamp I_ms of the I frame. If not, the timestamp I_ms of the I frame is the time point to be located; if yes, the The last I frame address member of the second temporary pointer variable seek->last obtains the identification information stored after the previous frame data, and saves it to the second temporary pointer variable seek, and notifies the second initial module to again according to the second temporary The current I frame address member of the pointer variable obtains the timestamp I_ms of the I frame.
  • a second temporary pointer variable is created by the second initial module, and the current connector pointer is obtained by the second temporary pointer variable and the global connector pointer variable, according to the current I of the second temporary pointer variable.
  • the frame address member obtains the timestamp of the I frame; the locating module compares the timestamp of the I frame with the time point to be located, and obtains a time point that needs to be located.
  • FIG. 7 is a schematic structural diagram of a frame data storage and positioning system according to an embodiment of the present invention.
  • the frame data storage and positioning system includes: the frame data storage device according to the third embodiment, and the frame data positioning device according to the sixth embodiment, wherein the frame data storage device is connected to the frame data positioning device.
  • the system described includes:
  • a first initial module connected to the storage module, for creating a connector data structure, the connector data structure comprising three members: a current I frame address, a previous I frame address, and a next I frame address;
  • a storage module connected to the first initial module and the identifier module, configured to receive and store frame data, and record a starting address of the frame data;
  • the identification module is connected to the storage module, and is configured to determine whether the received and stored frame data is an I frame, and if yes, store the identification information after the frame data;
  • An information acquiring module is connected to the second initial module, and is used to obtain a time point that needs to be located;
  • a second initial module connected to the information acquisition module and the positioning module, configured to create a second temporary pointer variable of the connector data structure, and the second temporary pointer variable points to the pre-created global connector pointer variable; according to the second temporary pointer variable
  • the current I frame address member obtains the timestamp of the I frame
  • the positioning module is connected to the second initial module, and is used to determine whether the time point to be located is smaller than the timestamp of the I frame. If not, the timestamp of the I frame is the time point to be located; if yes, the second temporary The last I frame address member of the pointer variable obtains the identification information stored after the previous frame data, and saves it to the second temporary pointer variable, and notifies the second initial module to again according to the current I frame address member of the second temporary pointer variable. Get the timestamp of the I frame.
  • the working process of the frame data storage and positioning system is as follows:
  • the first initial module creates a connector data structure and three members thereof;
  • the storage module receives and stores the frame data, the frame data includes a frame length, a frame timestamp, and frame data, and simultaneously records a start address of the frame data;
  • the identification module determines the frame data.
  • the identification information is stored after the frame data; the storage of the identification information is completed by the global connector pointer variable of the connector data structure and the first temporary pointer variable; the information acquisition module Obtaining the point in time at which the positioning needs to be located, the second initial module creates a second temporary pointer variable of the connector data structure, and the second temporary pointer variable points to the pre-created global connector pointer variable; the current I frame address member according to the second temporary pointer variable Obtaining a timestamp of the I frame; the positioning module determines whether the time point to be located is smaller than the timestamp of the I frame, and if not, the timestamp of the I frame is the time point to be located; if yes, the second temporary pointer variable The last I frame address member obtains the identification information stored after the previous frame of data, and saves to the second Time pointer variable, and inform the second initial module to obtain the timestamp of the I frame according to the current I frame address member of the second temporary pointer variable; in the
  • the identification information stored after the I frame data is passed in the frame data locating device. Determining the acquired time point that needs to be located is compared with the frame timestamp recorded in the frame data storage device to determine a time point that needs to be located; only the I frame data is stored in the storage process, and the corresponding identification information is stored in the frame data.
  • a large number of B frames and P frames do not need to store identification information, which greatly saves storage efficiency and storage space, reduces memory consumption, and avoids the process of jumping from I frame data to B frame or P frame data during positioning. Improves the efficiency of positioning and reduces memory consumption.
  • the frame data storage and positioning system provided by the present invention can be applied to a terminal device that needs to store and locate frame data, such as a mobile phone or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Position Fixing By Use Of Radio Waves (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

A method, device, system and terminal device for storing and locating frame data are provided. The identification information is stored after I frame data by storing the frame data and the frame length, frame timestamp and frame starting address corresponding to the frame data. A time point needed to be located is confirmed by comparing the acquired time point needed to be located and the frame timestamp recorded in a frame data storage device; the corresponding identification information is stored by only the I frame data during a storing process, while the identification information is not needed to be stored in B frames and P frames massively appeared in the frame data. Thus, the storage efficiency and storage space are greatly saved and the memory consumption is reduced; the purpose of rapid storage and skip location is accomplished though the association relation of members in a connector data structure, thus the memory consumption is reduced.

Description

一种帧数据存储和定位的方法、装置、系统和终端设备  Method, device, system and terminal device for storing and locating frame data 技术领域Technical field
本发明涉及视频播放领域,尤其涉及一种帧数据存储和定位的方法、装置、系统和终端设备。The present invention relates to the field of video broadcasting, and in particular, to a method, an apparatus, a system, and a terminal device for storing and locating frame data.
背景技术 Background technique
目前针对流媒体系统,尤其是嵌入式平台上的流式节目源的边下载边播放,需要对存储的数据流进行高效的管理,则需要简化后期的操作处理,以保证不浪费嵌入式资源同时得到更高效的操作,嵌入式最为重要的资源是CPU和内存。 At present, for the streaming media system, especially the streaming program source on the embedded platform, while downloading and playing, it is necessary to efficiently manage the stored data stream, and it is necessary to simplify the later operation processing to ensure that the embedded resources are not wasted at the same time. For more efficient operation, the most important resources for embedded are CPU and memory.
现有技术中,流媒体文件在存储过程中,需要存储的帧数据包括指针、帧类型、帧长度、时间戳、数据,针对帧数据无论是I帧、B帧还是P帧,都要存储指针、帧类型、帧长度、时间戳、数据,流媒体文件中的B帧和P帧出现的概率为90-95%,而B帧和P帧的指针在应用过程中往往是没有太大作用的,这样就浪费了CPU、硬盘或内存的资源,而在定位时,B帧和P帧的指针会降低定位的效率,并且浪费CPU和内存资源。 In the prior art, in the storage process, the frame data to be stored includes a pointer, a frame type, a frame length, a timestamp, and a data. For the frame data, whether it is an I frame, a B frame, or a P frame, the pointer is stored. , frame type, frame length, timestamp, data, the probability of occurrence of B and P frames in the streaming media file is 90-95%, and the pointers of B and P frames often do not have much effect in the application process. This wastes resources on the CPU, hard disk, or memory. In positioning, the B and P frame pointers reduce the efficiency of positioning and waste CPU and memory resources.
发明内容Summary of the invention
本发明实施例的目的在于提出一种帧数据存储的方法,旨在解决现有技术中流媒体文件在存储时存有大量冗余的指针、帧类型、帧长度、时间戳,浪费了CPU、硬盘或内存的资源,并且检索或定位的效率较低的问题。The purpose of the embodiment of the present invention is to provide a method for storing frame data, which aims to solve the problem that the streaming media file in the prior art has a large number of redundant pointers, frame types, frame lengths, and time stamps when being stored, which wastes CPU and hard disk. Or memory resources, and the problem of less efficient retrieval or positioning.
本发明实施例是这样实现的,一种帧数据存储的方法,包括以下步骤:The embodiment of the present invention is implemented as follows. A method for storing frame data includes the following steps:
预先创建连接器数据结构,所述连接器数据结构包括三个地址成员:当前I帧地址、上一个I帧地址、以及下一个I帧地址;Pre-creating a connector data structure, the connector data structure including three address members: a current I frame address, a previous I frame address, and a next I frame address;
接收并存储帧数据,记录帧数据的起始地址;Receiving and storing frame data, recording a start address of the frame data;
如果所述帧数据为I帧数据,则在帧数据之后将标识信息存入第一空间;所述标识信息包括:当前I帧地址、上一个I帧地址、以及下一个I帧地址。If the frame data is I frame data, the identification information is stored in the first space after the frame data; the identification information includes: a current I frame address, a previous I frame address, and a next I frame address.
本发明实施例的另一目的在于提出一种帧数据存储的装置,所述装置包括:Another object of the embodiments of the present invention is to provide an apparatus for storing frame data, the apparatus comprising:
第一初始模块,用于预先创建连接器数据结构,所述连接器数据结构包括三个地址成员:当前I帧地址、上一个I帧地址、以及下一个I帧地址;a first initial module, configured to pre-create a connector data structure, where the connector data structure includes three address members: a current I frame address, a previous I frame address, and a next I frame address;
存储模块,用于接收并存储帧数据;a storage module, configured to receive and store frame data;
标识模块,用于判断帧数据是否为I帧数据,如果是,则在帧数据之后将标识信息存入第一空间;所述标识信息包括:当前I帧地址、上一个I帧地址、以下一个I帧地址。An identifier module, configured to determine whether the frame data is I frame data, and if yes, store the identification information in the first space after the frame data; the identifier information includes: a current I frame address, a previous I frame address, and the following I frame address.
本发明实施例的另一目的在于提出一种帧数据定位的方法,所述方法包括以下步骤:Another object of the embodiments of the present invention is to provide a method for positioning frame data, the method comprising the following steps:
获取需要定位的时间点;Get the point in time at which you need to locate;
预先创建连接器数据结构第二临时指针变量,且第二临时指针变量指向预先创建的全局连接器指针变量;根据第二临时指针变量指向的当前I帧地址成员获取I帧的时间戳;Pre-creating a second temporary pointer variable of the connector data structure, and the second temporary pointer variable points to the pre-created global connector pointer variable; obtaining a timestamp of the I frame according to the current I-frame address member pointed to by the second temporary pointer variable;
定位的时间点如果不小于I帧的时间戳,I帧的时间戳为需要定位的时间点。If the time point of the positioning is not less than the timestamp of the I frame, the timestamp of the I frame is the time point at which the positioning needs to be located.
本发明实施例的另一目的在于提出一种帧数据定位装置,所述装置包括:Another object of the embodiments of the present invention is to provide a frame data locating device, the device comprising:
信息获取模块,用于获取需要定位的时间点;An information acquisition module, configured to acquire a time point that needs to be located;
第二初始模块,用于预先创建连接器数据结构第二临时指针变量,且第二临时指针变量指向预先创建的全局连接器指针变量; a second initial module, configured to pre-create a second temporary pointer variable of the connector data structure, and the second temporary pointer variable points to the pre-created global connector pointer variable;
定位模块,用于根据第二临时指针变量指向的当前I帧地址成员获取I帧的时间戳;判断需要定位的时间点是否小于I帧的时间戳,如果否,则I帧的时间戳为需要定位的时间点。a positioning module, configured to obtain a timestamp of the I frame according to the current I frame address member pointed to by the second temporary pointer variable; determine whether the time point to be located is smaller than the timestamp of the I frame, and if not, the timestamp of the I frame is required The point in time of positioning.
本发明实施例的另一目的在于提出帧数据存储和定位系统,所述系统包括:帧数据存储装置和帧数据定位装置;Another object of the embodiments of the present invention is to provide a frame data storage and positioning system, the system comprising: a frame data storage device and a frame data positioning device;
所述的帧数据存储装置,用于:The frame data storage device is configured to:
预先创建连接器数据结构,所述连接器数据结构包括三个地址成员:当前I帧地址、上一个I帧地址、以及下一个I帧地址;Pre-creating a connector data structure, the connector data structure including three address members: a current I frame address, a previous I frame address, and a next I frame address;
接收并存储帧数据,记录帧数据的起始地址;Receiving and storing frame data, recording a start address of the frame data;
如果为I帧数据,则在帧数据之后将标识信息存入第一空间;所述标识信息包括:当前I帧地址、上一个I帧地址、以及下一个I帧地址;If it is I frame data, the identification information is stored in the first space after the frame data; the identification information includes: a current I frame address, a previous I frame address, and a next I frame address;
所述的帧数据定位装置,用于:The frame data locating device is configured to:
获取需要定位的时间点;Get the point in time at which you need to locate;
预先创建连接器数据结构第二临时指针变量,且第二临时指针变量指向预先创建的全局连接器指针变量;根据第二临时指针变量指向的当前I帧地址成员获取I帧的时间戳;Pre-creating a second temporary pointer variable of the connector data structure, and the second temporary pointer variable points to the pre-created global connector pointer variable; obtaining a timestamp of the I frame according to the current I-frame address member pointed to by the second temporary pointer variable;
定位的时间点如果不小于I帧的时间戳,I帧的时间戳为需要定位的时间点。If the time point of the positioning is not less than the timestamp of the I frame, the timestamp of the I frame is the time point at which the positioning needs to be located.
本发明实施例的另一目的在于提出一种包括所述帧数据存储和定位系统的终端设备。Another object of embodiments of the present invention is to provide a terminal device including the frame data storage and positioning system.
本发明的有益效果:The beneficial effects of the invention:
通过存储帧数据以及帧数据对应的帧长度、帧时间戳和帧的起始地址,在I帧数据之后存储标识信息,通过对获取到的需要定位的时间点与帧数据存储装置中记录的帧时间戳进行比较来确定需要定位的时间点;在存储过程中只有I帧数据才会存储对应的标识信息,而在帧数据中大量出现的B帧、P帧不需要存储标识信息,这样大大节省了存储的效率和存储空间降低了内存消耗,并由于只存储了I帧的标识信息,那么在定位过程中,只需要通过连接器数据结构中成员的关联关系达到快速跳跃定位I帧的目的,减低了内存消耗。By storing the frame data and the frame length corresponding to the frame data, the frame timestamp, and the start address of the frame, the identification information is stored after the I frame data, and the acquired time point of the positioning and the frame recorded in the frame data storage device are obtained. The timestamps are compared to determine the time point at which the positioning needs to be located; only the I frame data is stored in the stored process, and the corresponding identification information is stored, and the B frames and P frames that appear in the frame data need not store the identification information, which greatly saves The storage efficiency and storage space reduce the memory consumption, and since only the identification information of the I frame is stored, in the positioning process, only the association relationship of the members in the connector data structure is required to achieve the purpose of quickly hopping and locating the I frame. Reduced memory consumption.
附图说明DRAWINGS
图1是本发明实施例一种帧数据存储方法的总体流程图;1 is a general flowchart of a frame data storage method according to an embodiment of the present invention;
图2是本发明实施例一种帧数据存储方法的具体流程图;2 is a specific flowchart of a method for storing frame data according to an embodiment of the present invention;
图3是本发明实施例一种帧数据存储装置的结构示意图; 3 is a schematic structural diagram of a frame data storage device according to an embodiment of the present invention;
图4是本发明实施例一种帧数据定位方法的总体流程图;4 is a general flowchart of a method for positioning a frame data according to an embodiment of the present invention;
图5是本发明实施例一种帧数据定位方法的具体流程图;FIG. 5 is a specific flowchart of a method for positioning a frame data according to an embodiment of the present invention; FIG.
图6是本发明实施例一种帧数据定位装置的结构示意图;6 is a schematic structural diagram of a frame data positioning apparatus according to an embodiment of the present invention;
图7是本发明实施例一种帧数据存储和定位系统的结构示意图。FIG. 7 is a schematic structural diagram of a frame data storage and positioning system according to an embodiment of the present invention.
具体实施方式detailed description
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图和实施例,对本发明进行进一步详细说明,为了便于说明,仅示出了与本发明实施例相关的部分。应当理解,此处所描写的具体实施例,仅仅用于解释本发明,并不用以限制本发明。The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. For the convenience of description, only the parts related to the embodiments of the present invention are shown. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
本发明通过存储帧数据以及帧数据对应的帧长度、帧时间戳和帧的起始地址,判断为I帧时,在I帧数据之后存储标识信息,通过判断获取到的需要定位的时间点与帧数据存储装置中记录的帧时间戳进行比较来确定需要定位的时间点;在存储过程中只有I帧数据才会存储对应的标识信息,而在帧数据中大量出现的B帧、P帧不需要存储标识信息,这样大大提高了了存储的效率、节省了存储空间并降低了内存消耗,再通过连接器数据结构中成员的关联关系达到快速存储和跳跃定位的目的,减低了内存消耗。The invention stores the frame data, the frame length corresponding to the frame data, the frame timestamp and the start address of the frame, and determines the I frame, stores the identification information after the I frame data, and determines the acquired time point and the required positioning. The frame timestamps recorded in the frame data storage device are compared to determine a time point that needs to be located; only the I frame data stores the corresponding identification information in the storage process, and the B frames and P frames that appear in the frame data in a large amount are not Need to store the identification information, which greatly improves the storage efficiency, saves the storage space and reduces the memory consumption, and achieves the purpose of fast storage and jump positioning through the association relationship of the members in the connector data structure, thereby reducing the memory consumption.
实施例一 Embodiment 1
图1是本发明实施例一种帧数据存储方法的总体流程图。所述方法包括以下步骤:FIG. 1 is a general flowchart of a method for storing frame data according to an embodiment of the present invention. The method includes the following steps:
S101,预先创建连接器数据结构,所述连接器数据结构包括三个地址成员:当前I帧地址、上一个I帧地址、下一个I帧地址;S101. Create a connector data structure in advance, where the connector data structure includes three address members: a current I frame address, a previous I frame address, and a next I frame address.
S101,接收并存储帧数据,记录帧数据的起始地址;S101. Receive and store frame data, and record a start address of the frame data.
所述的帧数据在存储时保存有帧长度、帧时间戳I_ms、以及帧数据;The frame data stores a frame length, a frame timestamp I_ms, and frame data when stored;
S102,如果为I帧数据,则在帧数据之后将标识信息存入第一空间;所述标识信息包括:当前I帧地址、上一个I帧地址、以及下一个I帧地址;S102, if it is I frame data, storing the identification information in the first space after the frame data; the identifier information includes: a current I frame address, a previous I frame address, and a next I frame address;
所述的第一空间为预留连接器所占内存大小的空间,用于存放标识信息;The first space is a space reserved for the memory occupied by the connector, and is used for storing the identification information;
所述的标识信息是连接器数据结构的信息,用于标识接收并存储的帧数据为I帧数据,所述的标识信息把帧数据中的I帧进行关联;The identifier information is information of a connector data structure, and is used to identify that the received and stored frame data is I frame data, and the identifier information associates the I frame in the frame data;
本实施例中通过判断帧数据是否为I帧,只有接收到的为I帧时才会在帧数据之后存放标识信息,只有I帧才增加合适的内存消耗,在整个帧数据存储过程中,I帧的出现概率非常少,这样针对出现概率较高的B帧、P帧不做任何处理,大量节省存储空间和存储的效率,降低了内存消耗。In this embodiment, by determining whether the frame data is an I frame, only the received I frame will store the identification information after the frame data, and only the I frame increases the appropriate memory consumption. In the entire frame data storage process, I The probability of occurrence of a frame is very small, so that no processing is performed on B frames and P frames with high probability of occurrence, a large amount of storage space and storage efficiency are saved, and memory consumption is reduced.
实施例二 Embodiment 2
图2是本发明实施例一种帧数据存储方法的具体流程图。所述方法包括以下步骤:FIG. 2 is a specific flowchart of a method for storing frame data according to an embodiment of the present invention. The method includes the following steps:
S201,预先创建连接器数据结构,所述的连接器数据结构包括三个成员:当前I帧地址、上一个I帧地址、以及下一个I帧地址;S201. Create a connector data structure in advance, where the connector data structure includes three members: a current I frame address, a previous I frame address, and a next I frame address.
所述的连接器数据结构创建过程具体为:The connector data structure creation process is specifically as follows:
Struct I_linker{Struct I_linker{
Unsigned int cur;  Unsigned int cur;
Unsigned int last; Unsigned int last;
Unsigned int next; Unsigned int next;
};};
所述的cur表示连接器保存的当前I帧地址;The cur represents the current I frame address saved by the connector;
所述的last表示连接器保存的上一个I帧地址;The last represents the last I frame address saved by the connector;
所述的next表示连接器保存的下一个I帧地址;The next represents the next I frame address saved by the connector;
S202,预先创建连接器数据结构的全局连接器指针变量;S202, pre-creating a global connector pointer variable of the connector data structure;
所述全局连接器指针变量的创建过程为struct I_linker* m_g_v_w;The creation process of the global connector pointer variable is struct I_linker* m_g_v_w;
S203,接收并存储帧数据,记录帧数据的起始地址;S203. Receive and store frame data, and record a start address of the frame data.
所述的帧数据在存储时保存有帧长度、帧时间戳I_ms、以及帧数据;The frame data stores a frame length, a frame timestamp I_ms, and frame data when stored;
S204,判断是否为I帧,如果否,则返回步骤S203,如果是,则进入步骤S205;S204, it is determined whether it is an I frame, if not, then returns to step S203, and if yes, proceeds to step S205;
S205,在帧数据之后创建容纳一个连接器数据结构的第一空间;S205. Create a first space that accommodates a connector data structure after the frame data.
所述的第一空间创建过程为预留连接器所占内存大小的空间,用于存放标识信息,所述的标识信息是连接器数据结构的信息,具体为sizeof(struct I_linker);The first space creation process is a space for reserving the memory size occupied by the connector, and is used for storing the identifier information, where the identifier information is information of the connector data structure, specifically sizeof (struct I_linker);
S206,创建连接器数据结构的第一临时指针变量linker,且第一临时指针变量linker指向第一空间A的起始地址,第一临时指针变量linker作为当前帧数据连接器,具体为struct I_linker* linker=&A;S206, creating a first temporary pointer variable linker of the connector data structure, and the first temporary pointer variable linker points to a starting address of the first space A, and the first temporary pointer variable linker is used as a current frame data connector, specifically a struct I_linker* linker=&A;
当前帧数据连接器的当前I帧地址成员中保存当前I帧起始地址;Saving the current I frame start address in the current I frame address member of the current frame data connector;
当前帧数据连接器的上一个I帧地址成员中保存全局连接器关联的当前I帧地址,具体为linker->last=m_g_v_w->cur;The current I frame address associated with the global connector is saved in the last I frame address member of the current frame data connector, specifically linker->last=m_g_v_w->cur;
当前帧数据连接器的下一个I帧地址成员中保存为0,具体为linker->next=0;The next I frame address member of the current frame data connector is saved as 0, specifically linker->next=0;
全局连接器指针变量的下一个I帧地址成员中保存当前连接器所关联的当前I帧中所保存的地址,具体为m_g_v_w->next=linker->cur;The address of the current I frame associated with the current connector is saved in the next I frame address member of the global connector pointer variable, specifically m_g_v_w->next=linker->cur;
S207,全局连接器指针变量保存当前连接器指针,具体为m_g_v_w=linker,返回步骤S203。S207. The global connector pointer variable saves the current connector pointer, specifically m_g_v_w=linker, and returns to step S203.
本实施例中通过判断帧数据是否为I帧,只有为I帧时才会在帧数据之后存放标识信息,存放标识信息的过程是根据预先创建的连接器数据结构的全局连接器指针变量和第一临时指针变量这两个变量及其成员的交互来完成,只有针对I帧才增加合适的内存消耗,在整个帧数据存储过程中,I帧的出现概率非常少,这样针对出现概率较高的B帧、P帧不做任何处理,大量节省存储空间和存储的效率,降低了内存消耗。In this embodiment, by determining whether the frame data is an I frame, the identification information is stored after the frame data only when the frame is I. The process of storing the identification information is based on the global connector pointer variable of the pre-created connector data structure and the first A temporary pointer variable and the interaction of the two variables and their members are completed. Only for the I frame, the appropriate memory consumption is increased. In the entire frame data storage process, the probability of occurrence of the I frame is very small, so that the probability of occurrence is high. B frames and P frames do not do any processing, which saves a lot of storage space and storage efficiency and reduces memory consumption.
实施例三 Embodiment 3
图3是本发明实施例一种帧数据存储装置的结构示意图。FIG. 3 is a schematic structural diagram of a frame data storage apparatus according to an embodiment of the present invention.
所述帧数据存储装置包括:第一初始模块、存储模块、以及标识模块;The frame data storage device includes: a first initial module, a storage module, and an identification module;
第一初始模块,与存储模块相连,用于创建连接器数据结构,所述的连接器数据结构包括三个成员:当前I帧地址、上一个I帧地址、以及下一个I帧地址;a first initial module, connected to the storage module, for creating a connector data structure, the connector data structure comprising three members: a current I frame address, a previous I frame address, and a next I frame address;
所述的连接器数据结构创建过程为:The connector data structure creation process is as follows:
Struct I_linker{Struct I_linker{
Unsigned int cur;  Unsigned int cur;
Unsigned int last; Unsigned int last;
Unsigned int next; Unsigned int next;
};};
所述的cur表示连接器保存的当前I帧地址;The cur represents the current I frame address saved by the connector;
所述的last表示连接器保存的上一个I帧地址;The last represents the last I frame address saved by the connector;
所述的next表示连接器保存的下一个I帧地址;The next represents the next I frame address saved by the connector;
存储模块,分别与第一初始模块和标识模块相连,用于接收并存储帧数据,记录帧数据的起始地址;a storage module, which is respectively connected to the first initial module and the identifier module, configured to receive and store frame data, and record a start address of the frame data;
所述的帧数据在存储时保存帧长度、帧时间戳I_ms、以及帧数据;The frame data stores a frame length, a frame timestamp I_ms, and frame data when stored;
标识模块,与存储模块相连,用于判断接收并存储的帧数据是否为I帧,如果是,则在帧数据之后存放标识信息;The identification module is connected to the storage module, and is configured to determine whether the received and stored frame data is an I frame, and if yes, store the identification information after the frame data;
所述的标识信息是连接器数据结构的信息,所述的标识信息存放过程为:The identification information is information of a connector data structure, and the identifier information storage process is:
创建连接器数据结构的全局连接器指针变量,具体为:struct I_linker* m_g_v_w;Create a global connector pointer variable for the connector data structure, specifically: struct I_linker* m_g_v_w;
预留连接器所占内存大小的第一空间A,用于存放标识信息,具体为sizeof(struct I_linker);The first space A of the memory occupied by the reserved connector is used to store the identification information, specifically sizeof(struct I_linker);
创建连接器数据结构的第一临时指针变量linker,且第一临时指针变量linker指向第一空间A的起始地址,第一临时指针变量linker作为当前帧数据连接器,具体为struct I_linker* linker=&A;Creating a first temporary pointer variable linker of the connector data structure, and the first temporary pointer variable linker points to the start address of the first space A, and the first temporary pointer variable linker is used as the current frame data connector, specifically a struct I_linker* linker=&A;
当前帧数据连接器的当前I帧地址成员中保存当前I帧起始地址;Saving the current I frame start address in the current I frame address member of the current frame data connector;
当前帧数据连接器的上一个I帧地址成员中保存全局连接器关联的当前I帧地址,具体为linker->last=m_g_v_w->cur;The current I frame address associated with the global connector is saved in the last I frame address member of the current frame data connector, specifically linker->last=m_g_v_w->cur;
当前帧数据连接器的下一个I帧地址成员中保存为0,具体为linker->next=0;The next I frame address member of the current frame data connector is saved as 0, specifically linker->next=0;
全局连接器指针变量的下一个I帧地址成员中保存当前连接器所关联的当前I帧的地址,具体为m_g_v_w->next=linker->cur;The address of the current I frame associated with the current connector is stored in the next I frame address member of the global connector pointer variable, specifically m_g_v_w->next=linker->cur;
全局连接器指针变量保存当前连接器指针,具体为m_g_v_w=linker。The global connector pointer variable holds the current connector pointer, specifically m_g_v_w=linker.
本实施例中通过第一初始模块创建连接器数据结构及其成员,当存储模块接收到的帧数据为I帧时,记录帧数据的起始地址,标识模块判断所接收并存储的数据是否为I帧时,如果是,标识模块在帧数据之后存放标识信息;只有I帧才增加合适的内存消耗,在整个帧数据存储过程中,I帧的出现概率非常少,这样针对出现概率较高的B帧、P帧不做任何处理,大量节省存储空间和存储的效率,降低了内存消耗。In this embodiment, the connector data structure and its members are created by the first initial module. When the frame data received by the storage module is an I frame, the start address of the frame data is recorded, and the identifier module determines whether the received and stored data is In the case of an I frame, if yes, the identity module stores the identification information after the frame data; only the I frame increases the appropriate memory consumption. In the entire frame data storage process, the probability of occurrence of the I frame is very small, so that the probability of occurrence is high. B frames and P frames do not do any processing, which saves a lot of storage space and storage efficiency and reduces memory consumption.
实施例四 Embodiment 4
图4是本发明实施例一种帧数据定位方法的总体流程图。所述方法包括以下步骤:FIG. 4 is a general flowchart of a method for positioning a frame data according to an embodiment of the present invention. The method includes the following steps:
S401,获取需要定位的时间点seek_ms;S401, obtaining a time point seek_ms that needs to be located;
所述需要定位的时间点seek_ms的单位为毫秒,为I帧所对应的相对显示时间点,是以0ms开始的时间偏移量,在开始显示时以0ms记录显示起点时间;The unit of the time point seek_ms to be positioned is milliseconds, which is the relative display time point corresponding to the I frame, which is the time offset starting from 0 ms, and the display start time is recorded in 0 ms at the start of display;
S402,预先创建连接器数据结构第二临时指针变量,且第二临时指针变量指向预先创建的全局连接器指针变量;根据第二临时指针变量指向的当前I帧地址成员获取I帧的时间戳;S402, a second temporary pointer variable of the connector data structure is created in advance, and the second temporary pointer variable points to the pre-created global connector pointer variable; and the timestamp of the I frame is obtained according to the current I frame address member pointed to by the second temporary pointer variable;
S403,需要定位的时间点如果不小于I帧的时间戳,I帧的时间戳为需要定位的时间点;S403, if the time point of the positioning is not less than the timestamp of the I frame, the timestamp of the I frame is a time point that needs to be located;
所述的I帧的时间戳I_ms是在帧数据存储时保存的时间戳;The timestamp I_ms of the I frame is a timestamp saved when the frame data is stored;
本实施例中通过获取到的需要定位的时间点与I帧的时间戳进行比较,如果需要定位的时间点不小于I帧的时间戳,则I帧的时间戳为需要定位的时间点,在定位过程中只需要判断I帧的时间戳即可,I帧数据之后存储有标识信息,通过所述的标识信息把前后I帧数据做了关联,从而根据所述的标识信息可以追溯到需要定位的时间点以及所述的需要定位的时间点对应的I帧起始地址,避免了由I帧数据跳跃到B帧或者P帧数据的过程,从而提高了定位的速度,降低了内存消耗。In this embodiment, the obtained time point of the required positioning is compared with the timestamp of the I frame. If the time point of the positioning is not less than the timestamp of the I frame, the timestamp of the I frame is the time point to be located. During the locating process, only the timestamp of the I frame needs to be determined. The I frame data is followed by the identification information, and the front and rear I frame data are associated by the identification information, so that the identification information can be traced back to the required location. The time point of the I frame and the start address of the I frame corresponding to the time point that needs to be located avoid the process of jumping from the I frame data to the B frame or the P frame data, thereby improving the positioning speed and reducing the memory consumption.
实施例五 Embodiment 5
图5是本发明实施例一种帧数据定位方法的具体流程图。所述方法包括以下步骤:FIG. 5 is a specific flowchart of a method for positioning a frame data according to an embodiment of the present invention. The method includes the following steps:
S501,获取需要定位的时间点seek_ms;S501: Obtain a time point seek_ms that needs to be located;
S502,创建连接器数据结构第二临时指针变量seek,且第二临时指针变量seek指向全局连接器指针变量m_g_v_w;S502, creating a connector data structure second temporary pointer variable seek, and the second temporary pointer variable seek points to the global connector pointer variable m_g_v_w;
所述的全局连接器指针变量在获取需要定位的时间点之前已经创建,且保存有当前连接器指针;The global connector pointer variable is created before the time point at which the positioning needs to be acquired, and the current connector pointer is saved;
具体为struct I_linker* seek=m_g_v_w;Specifically struct I_linker* seek=m_g_v_w;
S503,根据第二临时指针变量的当前I帧地址成员获取I帧的时间戳I_ms;S503. Acquire a timestamp I_ms of the I frame according to the current I frame address member of the second temporary pointer variable.
所述的I帧的时间戳I_ms是在帧数据存储时保存的时间戳;The timestamp I_ms of the I frame is a timestamp saved when the frame data is stored;
S504,判断需要定位的时间点seek_ms是否小于I帧的时间戳I_ms,如果否,则进入步骤S505,如果是,则进入步骤S506;S504, determining whether the time point seek_ms to be located is smaller than the timestamp I_ms of the I frame, if not, proceeding to step S505, and if yes, proceeding to step S506;
S505,I帧的时间戳I_ms为需要定位的时间点;S505, the timestamp I_ms of the I frame is a time point that needs to be located;
S506,通过第二临时指针变量的上一个I帧地址成员seek->last获取上一个帧数据之后所存储的标识信息,并保存到第二临时指针变量seek中,返回步骤S503。S506. Acquire the identification information stored after the previous frame data by the last I frame address member seek->last of the second temporary pointer variable, and save the identifier information in the second temporary pointer variable seek, and return to step S503.
本发明实施例中通过创建第二临时指针变量,通过所述的第二临时指针变量和所述的全局连接器指针变量获得当前连接器指针,根据第二临时指针变量的当前I帧地址成员获取I帧的时间戳,通过比较I帧的时间戳与需要定位的时间点的关系,获得需要定位的时间点,当需要定位的时间点小于I帧的时间戳时,则通过第二临时指针变量的上一个I帧地址成员获取上一个帧数据之后所存储的标识信息,并保存到第二临时指针变量中,以此类推得到最终需要定位的时间点,只需要对I帧的标识信息进行定位,而且定位过程中通过连接器数据结构的三个成员关联关系快速跳跃到需要定位的时间点,避免了由I帧数据跳跃到B帧或者P帧数据的过程,提高了定位的效率,减低了内存消耗。In the embodiment of the present invention, the second temporary pointer variable is created, the current connector pointer is obtained by the second temporary pointer variable and the global connector pointer variable, and the current I frame address member of the second temporary pointer variable is obtained. The timestamp of the I frame is obtained by comparing the timestamp of the I frame with the time point to be located, and obtains the time point at which the positioning needs to be located. When the time point to be located is smaller than the timestamp of the I frame, the second temporary pointer variable is passed. The last I frame address member obtains the identification information stored after the previous frame data, and saves it to the second temporary pointer variable, and so on to obtain the time point that needs to be finally positioned, and only needs to locate the identification information of the I frame. And during the positioning process, the three member associations of the connector data structure quickly jump to the time point that needs to be located, thereby avoiding the process of jumping from the I frame data to the B frame or the P frame data, thereby improving the positioning efficiency and reducing the efficiency. Memory consumption.
实施例六Embodiment 6
图6是本发明实施例一种帧数据定位装置的结构示意图。FIG. 6 is a schematic structural diagram of a frame data positioning apparatus according to an embodiment of the present invention.
所述帧数据定位装置包括:信息获取模块、第二初始模块、以及定位模块;The frame data locating device includes: an information acquiring module, a second initial module, and a positioning module;
信息获取模块,与第二初始模块相连,用于获取需要定位的时间点seek_ms;The information acquisition module is connected to the second initial module, and is used to obtain a time point seek_ms that needs to be located;
第二初始模块,分别与信息获取模块和定位模块相连,用于创建连接器数据结构第二临时指针变量seek,且第二临时指针变量seek指向全局连接器指针变量m_g_v_w;根据第二临时指针变量的当前I帧地址成员获取I帧的时间戳I_ms;The second initial module is respectively connected to the information obtaining module and the positioning module, and is configured to create a second temporary pointer variable seek of the connector data structure, and the second temporary pointer variable seek points to the global connector pointer variable m_g_v_w; according to the second temporary pointer variable The current I frame address member obtains the timestamp I_ms of the I frame;
所述的全局连接器指针变量在获取需要定位的时间点之前已经创建,且保存有当前连接器指针;The global connector pointer variable is created before the time point at which the positioning needs to be acquired, and the current connector pointer is saved;
具体为struct I_linker* seek=m_g_v_w;Specifically struct I_linker* seek=m_g_v_w;
定位模块,与第二初始模块相连,用于判断需要定位的时间点seek_ms是否小于I帧的时间戳I_ms,如果否,则I帧的时间戳I_ms为需要定位的时间点;如果是,则通过第二临时指针变量的上一个I帧地址成员seek->last获取上一个帧数据之后所存储的标识信息,并保存到第二临时指针变量seek中,并通知第二初始模块再次根据第二临时指针变量的当前I帧地址成员获取I帧的时间戳I_ms。The positioning module is connected to the second initial module, and is used to determine whether the time point seek_ms to be located is smaller than the timestamp I_ms of the I frame. If not, the timestamp I_ms of the I frame is the time point to be located; if yes, the The last I frame address member of the second temporary pointer variable seek->last obtains the identification information stored after the previous frame data, and saves it to the second temporary pointer variable seek, and notifies the second initial module to again according to the second temporary The current I frame address member of the pointer variable obtains the timestamp I_ms of the I frame.
本发明实施例中通过第二初始模块创建第二临时指针变量,通过所述的第二临时指针变量和所述的全局连接器指针变量获得当前连接器指针,根据第二临时指针变量的当前I帧地址成员获取I帧的时间戳;通过定位模块比较I帧的时间戳与需要定位的时间点的关系,获得需要定位的时间点,当需要定位的时间点小于I帧的时间戳时,则通过第二临时指针变量的上一个I帧地址成员获取在上一个帧数据之后所存储的标识信息,并保存到第二临时指针变量中,以此类推得到最终需要定位的时间点,只需要对I帧的标识信息进行定位,而且定位过程中通过连接器数据结构的三个成员关联关系快速跳跃到需要定位的时间点,避免了由I帧数据跳跃到B帧或者P帧数据的过程,提高了定位的效率,减低了内存消耗。In the embodiment of the present invention, a second temporary pointer variable is created by the second initial module, and the current connector pointer is obtained by the second temporary pointer variable and the global connector pointer variable, according to the current I of the second temporary pointer variable. The frame address member obtains the timestamp of the I frame; the locating module compares the timestamp of the I frame with the time point to be located, and obtains a time point that needs to be located. When the time point to be located is smaller than the timestamp of the I frame, Obtaining the identification information stored after the previous frame data by the last I frame address member of the second temporary pointer variable, and saving the information to the second temporary pointer variable, and so on, to obtain the time point that needs to be finally positioned, only need to The identification information of the I frame is located, and the three member associations of the connector data structure quickly jump to the time point that needs to be located during the positioning process, thereby avoiding the process of jumping from the I frame data to the B frame or the P frame data, thereby improving The efficiency of positioning reduces memory consumption.
实施例七Example 7
图7是本发明实施例一种帧数据存储和定位系统的结构示意图。FIG. 7 is a schematic structural diagram of a frame data storage and positioning system according to an embodiment of the present invention.
所述的帧数据存储和定位系统包括:如实施例三所述的帧数据存储装置和如实施例六所述的帧数据定位装置,所述的帧数据存储装置与帧数据定位装置相连,所述的系统包括:The frame data storage and positioning system includes: the frame data storage device according to the third embodiment, and the frame data positioning device according to the sixth embodiment, wherein the frame data storage device is connected to the frame data positioning device. The system described includes:
第一初始模块,与存储模块相连,用于创建连接器数据结构,所述的连接器数据结构包括三个成员:当前I帧地址、上一个I帧地址、以及下一个I帧地址;a first initial module, connected to the storage module, for creating a connector data structure, the connector data structure comprising three members: a current I frame address, a previous I frame address, and a next I frame address;
存储模块,与第一初始模块和标识模块相连,用于接收并存储帧数据,记录帧数据的起始地址;a storage module, connected to the first initial module and the identifier module, configured to receive and store frame data, and record a starting address of the frame data;
标识模块,与存储模块相连,用于判断接收并存储的帧数据是否为I帧,如果是,则在帧数据之后存放标识信息;The identification module is connected to the storage module, and is configured to determine whether the received and stored frame data is an I frame, and if yes, store the identification information after the frame data;
信息获取模块,与第二初始模块相连,用于获取需要定位的时间点;An information acquiring module is connected to the second initial module, and is used to obtain a time point that needs to be located;
第二初始模块,与信息获取模块和定位模块相连,用于创建连接器数据结构第二临时指针变量,且第二临时指针变量指向预先创建的全局连接器指针变量;根据第二临时指针变量的当前I帧地址成员获取I帧的时间戳;a second initial module, connected to the information acquisition module and the positioning module, configured to create a second temporary pointer variable of the connector data structure, and the second temporary pointer variable points to the pre-created global connector pointer variable; according to the second temporary pointer variable The current I frame address member obtains the timestamp of the I frame;
定位模块,与第二初始模块相连,用于判断需要定位的时间点是否小于I帧的时间戳,如果否,则I帧的时间戳为需要定位的时间点;如果是,则通过第二临时指针变量的上一个I帧地址成员获取上一帧数据之后所存储的标识信息,并保存到第二临时指针变量中,并通知第二初始模块再次根据第二临时指针变量的当前I帧地址成员获取I帧的时间戳。The positioning module is connected to the second initial module, and is used to determine whether the time point to be located is smaller than the timestamp of the I frame. If not, the timestamp of the I frame is the time point to be located; if yes, the second temporary The last I frame address member of the pointer variable obtains the identification information stored after the previous frame data, and saves it to the second temporary pointer variable, and notifies the second initial module to again according to the current I frame address member of the second temporary pointer variable. Get the timestamp of the I frame.
所述的帧数据存储和定位系统的工作过程如下:The working process of the frame data storage and positioning system is as follows:
第一初始模块创建连接器数据结构及其三个成员;存储模块接收并存储帧数据,帧数据包括帧长度、帧时间戳和帧数据,同时记录帧数据的起始地址;标识模块判断帧数据是否为I帧,如果是,则帧数据之后存放标识信息;所述的标识信息的存放是通过连接器数据结构的全局连接器指针变量和第一临时指针变量来完成存储标识信息;信息获取模块获取需要定位的时间点,第二初始模块创建连接器数据结构第二临时指针变量,且第二临时指针变量指向预先创建的全局连接器指针变量;根据第二临时指针变量的当前I帧地址成员获取I帧的时间戳;定位模块判断需要定位的时间点是否小于I帧的时间戳,如果否,则I帧的时间戳为需要定位的时间点;如果是,则通过第二临时指针变量的上一个I帧地址成员获取上一帧数据之后所存储的标识信息,并保存到第二临时指针变量中,并通知第二初始模块再次根据第二临时指针变量的当前I帧地址成员获取I帧的时间戳;在帧数据定位过程中,是通过连接器数据结构的全局连接器指针变量和第二临时指针变量来完成定位标识信息。The first initial module creates a connector data structure and three members thereof; the storage module receives and stores the frame data, the frame data includes a frame length, a frame timestamp, and frame data, and simultaneously records a start address of the frame data; the identification module determines the frame data. Whether it is an I frame, if yes, the identification information is stored after the frame data; the storage of the identification information is completed by the global connector pointer variable of the connector data structure and the first temporary pointer variable; the information acquisition module Obtaining the point in time at which the positioning needs to be located, the second initial module creates a second temporary pointer variable of the connector data structure, and the second temporary pointer variable points to the pre-created global connector pointer variable; the current I frame address member according to the second temporary pointer variable Obtaining a timestamp of the I frame; the positioning module determines whether the time point to be located is smaller than the timestamp of the I frame, and if not, the timestamp of the I frame is the time point to be located; if yes, the second temporary pointer variable The last I frame address member obtains the identification information stored after the previous frame of data, and saves to the second Time pointer variable, and inform the second initial module to obtain the timestamp of the I frame according to the current I frame address member of the second temporary pointer variable; in the frame data positioning process, the global connector pointer variable through the connector data structure And the second temporary pointer variable to complete the positioning identification information.
本发明实施例中通过在帧数据存储装置中存储帧数据以及帧数据对应的帧长度、帧时间戳和帧的起始地址,在I帧数据之后存储的标识信息,在帧数据定位装置中通过判断获取到的需要定位的时间点与帧数据存储装置中记录的帧时间戳进行比较来确定需要定位的时间点;在存储过程中只有I帧数据才会存储对应的标识信息,而在帧数据中大量出现的B帧、P帧不需要存储标识信息,这样大大节省了存储的效率和存储空间降低了内存消耗,在定位时避免了由I帧数据跳跃到B帧或者P帧数据的过程,提高了定位的效率,也降低了内存消耗。In the embodiment of the present invention, by storing the frame data and the frame length corresponding to the frame data, the frame timestamp, and the start address of the frame in the frame data storage device, the identification information stored after the I frame data is passed in the frame data locating device. Determining the acquired time point that needs to be located is compared with the frame timestamp recorded in the frame data storage device to determine a time point that needs to be located; only the I frame data is stored in the storage process, and the corresponding identification information is stored in the frame data. A large number of B frames and P frames do not need to store identification information, which greatly saves storage efficiency and storage space, reduces memory consumption, and avoids the process of jumping from I frame data to B frame or P frame data during positioning. Improves the efficiency of positioning and reduces memory consumption.
本发明提供的帧数据存储和定位系统可以应用于需要存储和定位帧数据的终端设备上,例如手机等。The frame data storage and positioning system provided by the present invention can be applied to a terminal device that needs to store and locate frame data, such as a mobile phone or the like.
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。The above is only the preferred embodiment of the present invention, and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection of the present invention. Within the scope.

Claims (11)

1、 一种帧数据存储的方法,其特征在于,所述方法包括以下步骤:A method for storing frame data, characterized in that the method comprises the following steps:
预先创建连接器数据结构,所述连接器数据结构包括三个地址成员:当前I帧地址、上一个I帧地址以及下一个I帧地址;Pre-creating a connector data structure, the connector data structure including three address members: a current I frame address, a previous I frame address, and a next I frame address;
接收并存储帧数据,记录帧数据的起始地址;Receiving and storing frame data, recording a start address of the frame data;
如果所述帧数据为I帧数据,则在帧数据之后将标识信息存入第一空间;所述标识信息包括:当前I帧地址、上一个I帧地址以及下一个I帧地址。If the frame data is I frame data, the identification information is stored in the first space after the frame data; the identification information includes: a current I frame address, a previous I frame address, and a next I frame address.
2、 如权利要求1所述的帧数据存储的方法,其特征在于,2. A method of frame data storage according to claim 1 wherein:
在所述步骤“接收并存储帧数据,记录帧数据的起始地址”之前还包括步骤:预先创建连接器数据结构的全局连接器指针变量;Before the step of "receiving and storing frame data, recording start address of frame data", the method further includes the steps of: pre-creating a global connector pointer variable of the connector data structure;
所述步骤“如果所述帧数据为I帧数据,则在帧数据之后将标识信息存入第一空间”具体为:The step "if the frame data is I frame data, the identification information is stored in the first space after the frame data" is specifically:
预留连接器所占内存大小的第一空间以用于存放标识信息;Reserving the first space of the memory occupied by the connector for storing the identification information;
创建连接器数据结构的第一临时指针变量,且第一临时指针变量指向第一空间的起始地址,第一临时指针变量作为当前帧数据连接器;Creating a first temporary pointer variable of the connector data structure, and the first temporary pointer variable points to a start address of the first space, and the first temporary pointer variable is used as a current frame data connector;
当前帧数据连接器的当前I帧地址成员中保存当前I帧起始地址;Saving the current I frame start address in the current I frame address member of the current frame data connector;
当前帧数据连接器的上一个I帧地址成员中保存全局连接器关联的当前I帧地址;The current I frame address associated with the global connector is saved in the last I frame address member of the current frame data connector;
当前帧数据连接器的下一个I帧地址成员中的保存为0;The current I frame address member of the current frame data connector is saved as 0;
全局连接器指针变量的下一个I帧地址成员中保存当前连接器所关联的当前I帧中所保存的地址;The address of the current I frame associated with the current connector is saved in the next I frame address member of the global connector pointer variable;
全局连接器指针变量的当前I帧地址成员中保存当前连接器指针,其中全局连接器指针变量的下一个I帧地址成员中保存当前连接器所关联的当前I帧中所保存的地址。The current connector pointer is stored in the current I frame address member of the global connector pointer variable, wherein the address of the current I frame associated with the current connector is stored in the next I frame address member of the global connector pointer variable.
3、 一种帧数据存储装置,其特征在于,所述帧数据存储装置包括:第一初始模块、存储模块以及标识模块;3, A frame data storage device, wherein the frame data storage device comprises: a first initial module, a storage module, and an identification module;
第一初始模块用于预先创建连接器数据结构,所述连接器数据结构包括三个地址成员:当前I帧地址、上一个I帧地址以及下一个I帧地址;The first initial module is configured to pre-create a connector data structure, where the connector data structure includes three address members: a current I frame address, a previous I frame address, and a next I frame address;
存储模块用于接收并存储帧数据;The storage module is configured to receive and store frame data;
标识模块用于判断帧数据是否为I帧数据,如果是,则在帧数据之后将标识信息存入第一空间;所述标识信息包括:当前I帧地址、上一个I帧地址以及下一个I帧地址。The identifier module is configured to determine whether the frame data is I frame data, and if yes, store the identifier information in the first space after the frame data; the identifier information includes: a current I frame address, a previous I frame address, and a next I Frame address.
4、 如权利要求3所述的帧数据存储装置,其特征在于,所述帧数据存储装置中的标识模块还用于:4. The frame data storage device of claim 3, wherein the identification module in the frame data storage device is further configured to:
预先创建连接器数据结构的全局连接器指针变量; Pre-create a global connector pointer variable for the connector data structure;
预留连接器所占内存大小的第一空间以用于存放标识信息;Reserving the first space of the memory occupied by the connector for storing the identification information;
创建连接器数据结构的第一临时指针变量,且第一临时指针变量指向第一空间的起始地址,第一临时指针变量作为当前帧数据连接器;Creating a first temporary pointer variable of the connector data structure, and the first temporary pointer variable points to a start address of the first space, and the first temporary pointer variable is used as a current frame data connector;
当前帧数据连接器的当前I帧地址成员中保存当前I帧起始地址;Saving the current I frame start address in the current I frame address member of the current frame data connector;
当前帧数据连接器的上一个I帧地址成员中保存全局连接器关联的当前I帧地址;The current I frame address associated with the global connector is saved in the last I frame address member of the current frame data connector;
当前帧数据连接器的下一个I帧地址成员中的保存为0;The current I frame address member of the current frame data connector is saved as 0;
全局连接器指针变量的下一个I帧地址成员中保存当前连接器所关联的当前I帧中所保存的地址;The address of the current I frame associated with the current connector is saved in the next I frame address member of the global connector pointer variable;
全局连接器指针变量的当前帧地址成员中保存当前连接器指针,其中全局连接器指针变量的下一帧地址成员中保存当前连接器所关联的当前I帧中所保存的地址。The current connector pointer is saved in the current frame address member of the global connector pointer variable, wherein the address of the next frame address of the global connector pointer variable holds the address saved in the current I frame associated with the current connector.
5、 一种帧数据定位的方法,其特征在于,所述方法包括以下步骤:A method for locating frame data, characterized in that the method comprises the following steps:
获取需要定位的时间点;Get the point in time at which you need to locate;
预先创建连接器数据结构第二临时指针变量,且第二临时指针变量指向预先创建的全局连接器指针变量;根据第二临时指针变量指向的当前I帧地址成员获取I帧的时间戳;Pre-creating a second temporary pointer variable of the connector data structure, and the second temporary pointer variable points to the pre-created global connector pointer variable; obtaining a timestamp of the I frame according to the current I-frame address member pointed to by the second temporary pointer variable;
定位的时间点如果不小于I帧的时间戳,I帧的时间戳为需要定位的时间点。If the time point of the positioning is not less than the timestamp of the I frame, the timestamp of the I frame is the time point at which the positioning needs to be located.
6、 如权利要求5所述的帧数据定位的方法,其特征在于,在所述步骤“定位的时间点如果不小于I帧的时间戳,I帧的时间戳为需要定位的时间点”之后还包括步骤:6, The method for locating frame data according to claim 5, further comprising, after the step of "the time point of the positioning is not less than the timestamp of the I frame, the timestamp of the I frame is the time point at which the positioning needs to be located" step:
定位的时间点如果小于I帧的时间戳,则通过第二临时指针变量指向的上一个I帧地址成员获取在上一个帧数据之后所存储的标识信息,并保存到第二临时指针变量中。If the time point of the positioning is less than the timestamp of the I frame, the identification information stored after the previous frame data is obtained by the last I frame address member pointed to by the second temporary pointer variable, and saved in the second temporary pointer variable.
7、 一种帧数据定位装置,其特征在于,所述帧数据定位装置包括:信息获取模块、第二初始模块以及定位模块;其中:7, A frame data locating device, wherein the frame data locating device comprises: an information acquiring module, a second initial module, and a positioning module; wherein:
信息获取模块用于获取需要定位的时间点;The information acquisition module is configured to acquire a time point that needs to be located;
第二初始模块用于预先创建连接器数据结构第二临时指针变量,且第二临时指针变量指向预先创建的全局连接器指针变量; The second initial module is configured to pre-create a second temporary pointer variable of the connector data structure, and the second temporary pointer variable points to the pre-created global connector pointer variable;
定位模块用于根据第二临时指针变量指向的当前I帧地址成员获取I帧的时间戳;判断需要定位的时间点是否小于I帧的时间戳,如果否,则I帧的时间戳为需要定位的时间点。The positioning module is configured to obtain a timestamp of the I frame according to the current I frame address member pointed to by the second temporary pointer variable; determine whether the time point to be located is smaller than the timestamp of the I frame, and if not, the timestamp of the I frame needs to be located. Time point.
8、 如权利要求7所述的一种帧数据定位装置,其特征在于,所述帧数据定位装置中的定位模块还用于:判断定位的时间点如果小于I帧的时间戳,则通过第二临时指针变量指向的上一个I帧地址成员获取在上一个帧数据之后所存储的标识信息,并保存到第二临时指针变量中。8, The frame data locating device according to claim 7, wherein the positioning module in the frame data locating device is further configured to: determine that the time point of the positioning is less than the time stamp of the I frame, and pass the second temporary The last I frame address member pointed to by the pointer variable acquires the identification information stored after the previous frame data and stores it in the second temporary pointer variable.
9、 一种帧数据存储和定位系统,其特征在于,所述帧数据存储和定位系统包括权利要求4所述的帧数据存储装置和权利要求7所述的帧数据定位装置;9, A frame data storage and positioning system, characterized in that the frame data storage and positioning system comprises the frame data storage device of claim 4 and the frame data positioning device of claim 7;
所述帧数据存储装置用于:The frame data storage device is used to:
预先创建连接器数据结构,所述连接器数据结构包括三个地址成员:当前I帧地址、上一个I帧地址以及下一个I帧地址;Pre-creating a connector data structure, the connector data structure including three address members: a current I frame address, a previous I frame address, and a next I frame address;
接收并存储帧数据,记录帧数据的起始地址;Receiving and storing frame data, recording a start address of the frame data;
如果所述帧数据为I帧数据,则在帧数据之后将标识信息存入第一空间;所述标识信息包括:当前I帧地址、上一个I帧地址以及下一个I帧地址;If the frame data is I frame data, storing the identification information in the first space after the frame data; the identification information includes: a current I frame address, a previous I frame address, and a next I frame address;
所述帧数据定位装置,用于:The frame data locating device is configured to:
获取需要定位的时间点;Get the point in time at which you need to locate;
预先创建连接器数据结构第二临时指针变量,且第二临时指针变量指向预先创建的全局连接器指针变量;根据第二临时指针变量指向的当前I帧地址成员获取I帧的时间戳;Pre-creating a second temporary pointer variable of the connector data structure, and the second temporary pointer variable points to the pre-created global connector pointer variable; obtaining a timestamp of the I frame according to the current I-frame address member pointed to by the second temporary pointer variable;
定位的时间点如果不小于I帧的时间戳,I帧的时间戳为需要定位的时间点。If the time point of the positioning is not less than the timestamp of the I frame, the timestamp of the I frame is the time point at which the positioning needs to be located.
10、 如权利要求9所述的一种帧数据存储和定位系统,其特征在于,所述帧数据存储和定位系统中的帧数据存储装置还用于:10. A frame data storage and positioning system according to claim 9, wherein the frame data storage device in the frame data storage and positioning system is further configured to:
预先创建连接器数据结构的全局连接器指针变量; Pre-create a global connector pointer variable for the connector data structure;
预留连接器所占内存大小的第一空间以用于存放标识信息;Reserving the first space of the memory occupied by the connector for storing the identification information;
创建连接器数据结构的第一临时指针变量,且第一临时指针变量指向第一空间的起始地址,第一临时指针变量作为当前帧数据连接器;Creating a first temporary pointer variable of the connector data structure, and the first temporary pointer variable points to a start address of the first space, and the first temporary pointer variable is used as a current frame data connector;
当前帧数据连接器的当前I帧地址成员中保存当前I帧起始地址;Saving the current I frame start address in the current I frame address member of the current frame data connector;
当前帧数据连接器的上一个I帧地址成员中保存全局连接器关联的当前I帧地址;The current I frame address associated with the global connector is saved in the last I frame address member of the current frame data connector;
当前帧数据连接器的下一个I帧地址成员中的保存为0;The current I frame address member of the current frame data connector is saved as 0;
全局连接器指针变量的下一个I帧地址成员中保存当前连接器所关联的当前I帧中所保存的地址;The address of the current I frame associated with the current connector is saved in the next I frame address member of the global connector pointer variable;
全局连接器指针变量的当前I帧地址成员中保存当前连接器指针,其中全局连接器指针变量的下一个I帧地址成员中保存当前连接器所关联的当前I帧中所保存的地址;The current connector pointer is saved in the current I frame address member of the global connector pointer variable, wherein the next I frame address member of the global connector pointer variable stores the address saved in the current I frame associated with the current connector;
所述的帧数据定位装置还用于:The frame data locating device is further configured to:
判断定位的时间点如果小于I帧的时间戳,则通过第二临时指针变量指向的上一个I帧地址成员获取在上一个帧数据之后所存储的标识信息,并保存到第二临时指针变量中。 If the time point of the positioning is less than the timestamp of the I frame, the identification information stored after the previous frame data is obtained by the last I frame address member pointed to by the second temporary pointer variable, and saved in the second temporary pointer variable. .
11、 一种帧数据存储和定位的终端设备,其特征在于,包括权利要求9或10所述的帧数据存储和定位系统。11, A terminal device for storing and locating frame data, comprising the frame data storage and positioning system of claim 9 or 10.
PCT/CN2011/076368 2010-12-08 2011-06-27 Method, device, system and terminal device for storing and locating frame data WO2012075804A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2010105797464A CN102169709A (en) 2010-12-08 2010-12-08 Method and system for storing and positioning frame data, and terminal device
CN201010579746.4 2010-12-08

Publications (1)

Publication Number Publication Date
WO2012075804A1 true WO2012075804A1 (en) 2012-06-14

Family

ID=44490840

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/076368 WO2012075804A1 (en) 2010-12-08 2011-06-27 Method, device, system and terminal device for storing and locating frame data

Country Status (2)

Country Link
CN (1) CN102169709A (en)
WO (1) WO2012075804A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3334165A4 (en) * 2015-08-04 2019-03-20 Hangzhou Hikvision Digital Technology Co., Ltd. Video stream storage method, reading method and device

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102868930B (en) * 2012-09-06 2015-04-08 珠海全志科技股份有限公司 Method and device for decoding transport-stream data packets
CN111093090A (en) * 2018-10-24 2020-05-01 玲珑视界科技(北京)有限公司 TCP-based multicast channel fast switching system and method
CN111436004B (en) * 2019-01-11 2023-02-21 腾讯科技(深圳)有限公司 Video playing method, device and equipment and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1980390A (en) * 2005-12-07 2007-06-13 联合信源数字音视频技术(北京)有限公司 Audio-video frequency media data organization realizing method of supporting precision positioning
CN101009825A (en) * 2006-01-27 2007-08-01 中国科学院声学研究所 The method for IPTV STB/unicast seamless switching based on RTP protocol
CN101193299A (en) * 2006-11-30 2008-06-04 三洋电机株式会社 Decoding circuit
US20090303867A1 (en) * 2007-09-18 2009-12-10 Hwang-Soo Lee Apparatus and method for preventing data read error for orthogonal frequency division multiplexing symbol demodulation

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101202873B (en) * 2006-12-13 2012-07-25 株式会社日立制作所 Method and device for information record reproduction

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1980390A (en) * 2005-12-07 2007-06-13 联合信源数字音视频技术(北京)有限公司 Audio-video frequency media data organization realizing method of supporting precision positioning
CN101009825A (en) * 2006-01-27 2007-08-01 中国科学院声学研究所 The method for IPTV STB/unicast seamless switching based on RTP protocol
CN101193299A (en) * 2006-11-30 2008-06-04 三洋电机株式会社 Decoding circuit
US20090303867A1 (en) * 2007-09-18 2009-12-10 Hwang-Soo Lee Apparatus and method for preventing data read error for orthogonal frequency division multiplexing symbol demodulation

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3334165A4 (en) * 2015-08-04 2019-03-20 Hangzhou Hikvision Digital Technology Co., Ltd. Video stream storage method, reading method and device
US10332565B2 (en) 2015-08-04 2019-06-25 Hangzhou Hikvision Digital Technology Co., Ltd. Video stream storage method, reading method and device

Also Published As

Publication number Publication date
CN102169709A (en) 2011-08-31

Similar Documents

Publication Publication Date Title
WO2016192254A1 (en) Method and device for online playback of network video
WO2012075804A1 (en) Method, device, system and terminal device for storing and locating frame data
WO2016023148A1 (en) Packet control method, switch and controller
WO2015085765A1 (en) Information pushing method and intelligent terminal
WO2017092268A1 (en) Terminal failure processing method, device and system
WO2010021493A2 (en) Method and apparatus for transmitting broadcast data, and method and apparatus for receiving broadcast data
WO2017181506A1 (en) Display terminal information source switching method and device
WO2013004030A1 (en) Liquid crystal display, and driving method and device thereof
WO2017084311A1 (en) Method and device for accelerating playing of single-fragment video
WO2017201913A1 (en) Precise voice control method and device
WO2017036218A1 (en) Multimedia file reading method and device
WO2016065705A1 (en) Channel list updating method and apparatus, and terminal device
WO2017152603A1 (en) Display method and apparatus
WO2018028121A1 (en) Method and device for managing storage space of data partition
WO2017063368A1 (en) Method and device for intercutting video advertisement
WO2017016310A1 (en) Method and apparatus for dynamically configuring remote control function data
WO2017036204A1 (en) Focus positioning method and device for application switching
WO2017215233A1 (en) Terminal power button control method and system
WO2018076453A1 (en) Associated application display method, device and mobile terminal
WO2020114333A1 (en) Video-based ar education method, smart television, storage medium, and device
WO2012028080A1 (en) Method and device for backing up data information of mobile terminal
WO2017045418A1 (en) Memory remaining capacity-based method and system for adjusting camera frame rate
WO2019080401A1 (en) Method and apparatus for converting script statement, and computer-readable storage medium
WO2017032060A1 (en) Interface operation method and apparatus, and smart watch
WO2018010277A1 (en) Smart tv configuration method and device

Legal Events

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

Ref document number: 11847540

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 24/10/13)

122 Ep: pct application non-entry in european phase

Ref document number: 11847540

Country of ref document: EP

Kind code of ref document: A1