CN100538622C - A kind of method that improves incident transmission and processing in the apparatus of digital television receiving - Google Patents

A kind of method that improves incident transmission and processing in the apparatus of digital television receiving Download PDF

Info

Publication number
CN100538622C
CN100538622C CNB2004100181696A CN200410018169A CN100538622C CN 100538622 C CN100538622 C CN 100538622C CN B2004100181696 A CNB2004100181696 A CN B2004100181696A CN 200410018169 A CN200410018169 A CN 200410018169A CN 100538622 C CN100538622 C CN 100538622C
Authority
CN
China
Prior art keywords
incident
thread
call back
back function
transmission
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CNB2004100181696A
Other languages
Chinese (zh)
Other versions
CN1571483A (en
Inventor
孙军
廖洪涛
陈珊
王青
孙海生
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
STMicroelectronics NV
Original Assignee
STMicroelectronics NV
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 STMicroelectronics NV filed Critical STMicroelectronics NV
Priority to CNB2004100181696A priority Critical patent/CN100538622C/en
Publication of CN1571483A publication Critical patent/CN1571483A/en
Priority to PCT/CN2005/000624 priority patent/WO2005109185A1/en
Application granted granted Critical
Publication of CN100538622C publication Critical patent/CN100538622C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB

Abstract

Fundamental purpose of the present invention is to provide a kind of method that improves event information transmission and treatment effeciency in apparatus of digital television receiving.Label by the type to incident, regulation is carried the method for data, process that standard event registration and rope rise and agreement, pending times such as minimizing incident, thereby the communication speed between the raising disparate modules, the efficient of raising deal with data.The technological means that method of the present invention adopted is in incident of apparatus of digital television receiving design and message communicating mechanism, the mode of the type of regulation incident, the data layout that carries, Register Cancel and the strategy of processing, thus the incident that makes can effectively be carried out the transmission and the processing of information in different application and thread.The enforcement of the inventive method comprises the following steps: the registration and the cancellation of 1. event call-back functions; 2. the transmission of incident, reception and processing; 3. catching with cancellation of incident caught.

Description

A kind of method that improves incident transmission and processing in the apparatus of digital television receiving
Technical field
The present invention relates to the method that a kind of event information transmits, belong to the apparatus of digital television receiving technical field.
Background technology
Apparatus of digital television receiving general reference can receive, the hardware device of decoding and display digit TV signal, and it is applied to digital TV field, is the terminal (see figure 1) that the simulated television digitizing is achieved.What apparatus of digital television receiving received is digitized image and data message, therefore, be different from the reception and the processing of traditional anolog TV signals, apparatus of digital television receiving is to be undertaken by its inner CPU and coupled peripheral components to the reception and the processing of digitized image information and data.Receiving system is exactly to develop the application program that apparatus of digital television receiving is suitable on the basis of relevant hardware and operating system; Equally, some professional digital broadcast content service providers also need to go out corresponding service software according to the hardware performance and the functional development of different apparatus of digital television receiving.
In the broadcasting equipment of TV station or television operator, audio-video signal mixes with the multiplexer of data content through front end, forms transport stream (TS stream).Transport stream forms electromagnetic signal through ovennodulation and is sent in the apparatus of digital television receiving.Apparatus of digital television receiving (set-top box) work principle is as follows:
◆ tuning/selection module receives electromagnetic signal and selects the bandwidth of certain limit.
◆ demodulation module is conversion of signals data stream (Bitstreams).
◆ demultiplexing module is extracted expectation information out and it is offered different demoders with suitable manner from data stream (Bitstreams), it comprises the descrambler with the Conditional Access Module cooperation.
◆ the video bit stream in the image sequence that the video decode module converts shows.
◆ the audio bit stream in the audio decoder module converts simulated audio signal.
◆ graphics engine set up graph layer before sending with it with to the video mix in the simulating signal request of PAL/NTSC.
◆ the front control panel is partly explained by receiving the user command that telepilot, Wireless Keyboard or front panel send.
Video bit stream mixes with image through image processor mutually with audio bit stream, becomes the audio-video signal of simulation, outputs on the display screen (televisor).Data stream then flow among the CPU by demodulation multiplexer, is handled by the system program of going up operation at central processing unit (CPU).The result who handles can mix with audio/video flow, outputs on the display device.
In apparatus of digital television receiving, the resource module of various functions need carry out information interchange, and this information interchange can be adopted different forms.Application or thread can be synchronous or asynchronous to calling of resource module at every turn.Synchronization call is for blocking (Blocking) mode.When called function returned, the request that this function sent had been performed and has finished.Asynchronous call is unblock (No Blocking) mode, and when called function returned, the request that this function sent may not be performed, and caller can not obtain execution result immediately.After resource module had been carried out respective request, it can send an incident (Event) and give execution result and the relevant data of caller to return request.
In existing technology, generally adopt the mode of incident (event) or message (message) to carry out information interchange, each incident or message have a type identification (type), distinguish the character of incident successively, to reach the effect of identified event.At digital TV field, because the reception decoding device general utility functions of Digital Television are all very weak, the CPU processing speed is slow, if adopt traditional mode, will influence the visual effect of Digital Television, influences the performance of receiving equipment.
The problem of this classic method is:
1. incident can only be broadcast and receive singly;
2. the incident attached information is not clearly defined;
3. incident is received the process of handling and do not stipulate concrete method.
Method of the present invention is exactly the solution that proposes at the deficiency of conventional art.
Provide the needed several nominal definitions of this method below:
Thread: be meant program with certain running environment.Can carry out information interchange by the transmission incident between the thread.
Use: be meant and satisfy certain functional requirement and program purpose.Can adopt a plurality of threads in the application.
Resource: be meant the software or the hardware that are used to realize certain function in the apparatus of digital television receiving, as audio/video decoding, data loader etc. are provided.
Resource module: be meant the module of software and hardware that resource is provided.
Summary of the invention
The technical problem to be solved in the present invention provides a kind of method that improves event information transmission and treatment effeciency in apparatus of digital television receiving.Label by the type to incident, regulation is carried the method for data, process that standard event registration and rope rise and agreement, pending times such as minimizing incident, thereby the communication speed between the raising disparate modules, the efficient of raising deal with data.
The present invention is resolved above problem by following technical scheme.Task manager of design in apparatus of digital television receiving, the mode of the mode of the type of regulation incident (type, code), the data layout (data) that carries, Register Cancel and the strategy of processing, incident (event) queuing, thus the incident that makes can effectively be carried out the transmission and the processing of information in different application and thread.The described incident of this method has following feature:
Each incident (event) by a type and code (type, code) uniquely determine that the result who calls returns to event handler by the data pointer in the incident (data):
The content of incident consists of the following components:
● type: type
● code: code
● data pointer: data
The data data pointer can point to different data structures according to the difference of event type.If there is not the spy Do not indicate, when then sending incident, should point to the number of a dynamic assignment with the data data pointer of incident transmission According to space the address of static space (but not transmit), so that use when receiving this incident, can be by this number Obtain correct data message according to pointer, simultaneously, after using these data, the data data pointer can be by thing The sender of part discharges, and also can be discharged by the processor of incident.The communication mechanism of backbone incident principle also can use in other cases, sends information as a thread to other thread.
Describe technical scheme of the present invention below in detail.
The step of this method:
Method of the present invention is to realize a task manager in apparatus of digital television receiving, is used for transmitting and processing events, and it comprises following step.
One. the transmission of incident and processing:
Register of event and cancellation:
When using event communication mechanism, subject thread must provide the event type and its call back function (callback) address that need monitoring at first to task manager (Eventmanager) registration.In event comes, task manager calls call back function and passes to its data pointer, and the customer data (client data) of its storage is returned to call back function.Use or thread can be registered a plurality of incidents of monitoring simultaneously for one.The operating process of case mechanism is seen Fig. 2.
If thread or use and no longer need to handle certain incident, it can be by sending de-registration request to task manager (Event manager), and task manager can discharge untreated incident and data accordingly thereof.
Task manager is for effectively Admin Events and call back function thereof, can be by following data list:
● the thread tabulation
The data of EventManager record are together in series by the thread tabulation, and action listener thread will take a record in the thread tabulation.Except comprising information such as thread id, also comprise a callbakc tabulation and a list of thing in each thread record.
The tabulation of ■ call back function
The call back function tabulation is used to write down the call back function of watcher thread registration, when call back function of this thread registration, EventManager will add a call back function record in the callback tabulation, when the incident of transmission, EventManager can watch the callback that whether has in the callback record of this thread this incident, if have, then this incident is added in the list of thing of this thread. During the registration of cancellation call back function, then can be with this record deletion in the tabulation, such afterwards incident will can not be sent to this thread again.
The ■ list of thing
List of thing is used to write down the incident that sends to thread, when certain thread is attempted to send incident, whether EventManager will watch in the call back function tabulation of the thread that sends to has this register of event, if have, then this incident is added in the list of thing of this thread, afterwards, if watcher thread wants to obtain incident, then can from list of thing, find the events corresponding record.
Above-mentioned tabulation relation seen Fig. 3.
The processing of incident:
After processing request to certain incident had been registered in a thread or application, it can be in the state of this incident of wait.After incident produced or arrives, it will processing events.Call the processor (call back function) the one of incident, incident sends to task manager, and the processor (call back function) that is called incident by task manager is handled by the processor that the sender of incident directly calls incident.This dual mode all is the same from essence.
Under the situation that a plurality of threads can be carried out, the RTOS scheduler program is responsible for decision and is carried out which thread.
All threads (comprise that Drive Layer thread and application program threads all can use task manager.So each incident management function should be a thread-safe.
Two. the realization of task manager and the detailed method of use:
Figure C200410018169D0008081717QIETU
The registration of event call-back function and cancellation
The groundwork flow process of registered callbacks function is seen Fig. 4.
The de-registration procedure principle of work is similar, at first obtains the thread record, finds the record of this readjustment in the callback tabulation according to callbackId then, delete this record, if all call back functions of this thread are all deleted, then remove this thread record, comprise logout wherein etc.
Figure C200410018169D0008081717QIETU
The transmission of incident, reception and processing
The groundwork flow process of transmission incident is as follows
1. whether inspection incident is hunted down
If a) to be hunted down and to catch thread be not current thread to incident, then return error code
B) otherwise continue
2. all thread records are repeated below operation:
If a) thread id is identical with the thread id that sends to, or the thread id that sends to is 0, then
I. following operation done in all callback records of thread:
1. if the event type of callback record conforms to the transmission event type, then
A) list of thing to this thread adds logout
B) the callback record of related this incident
C) the condition friendship amount of release thread is so that the thread of waiting event is waken up
3. if do not find the thread of this incident of monitoring, then return error code
Otherwise return success sign
The groundwork flow process of obtaining incident is as follows
1. obtain the record of watcher thread in the thread tabulation
2. the list of thing to the thread record is repeated below operation:
If a) incident type, code with type, the code of incident to be processed identical, then
I. all callback records of thread are done as finishing drilling part:
If a) event type of callback record conforms to the transmission event type, then
I. copy event content,
Ii. jump to 3
3., then jump to 5 if what receive incident or use is the unblock mode
4., then wait for thread conditional-variable (can when the incident of transmission, discharge) if do not receive incident
5. if receive incident, then
A) revise thread current event sign
B) outgoing event information
C) return success sign
Otherwise, return error code
The groundwork flow process of processing events is as follows
1. obtain the record of watcher thread in the thread tabulation
2. if the current event and the processed incident of thread record are inequality, then return error code otherwise
A) call back function, data that obtains event correlation discharges function
B) deletion event record
C) call the event call-back function
D) whether check that all threads of monitoring this incident had all handled this incident, if then call event data and discharge function
E) return the rreturn value of callback function
Other explanations:
Because the processing speed of action listener processing threads might be unable to catch up with the transmission of incident, in order to guarantee that processing events can meet the principle that first inlet wire goes out, in thread structure, added the incident head pointer, simultaneously, added the next pointer in the event structure, point to next incident, and then the single linked list of formation incident, when going incident at every turn, it all is first incident of getting this chained list, then all add the chained list end during transmission incident to, so just can avoid the order confusion of watcher thread processing events.
Figure C200410018169D0008081717QIETU
Catch and the cancellation of incident are caught
Catch/cancel the capturing events function and catch list management by one, when certain thread attempts to catch certain incident, whether task manager (EventManager) incident of at first checking is monopolized by this thread, if, then do not do any operation, otherwise add a record to catching tabulation, this record always adds the head end of catching chained list to, and the type of record capturing events, code and catch thread id, like this when the transmission incident, at first in catching tabulation according to the record of from the beginning to the end this incident of sequential search, if have record and thread id different, then do not send incident to this thread with the thread id that will send to.Then in catching tabulation, search corresponding record during the cancellation capturing events, and deletion record.
Below in conjunction with accompanying drawing, method of the present invention is further described.
Description of drawings
Fig. 1 has described the main effect of apparatus of digital television receiving.
Fig. 2 has described the operating process of case mechanism.Thread provides the event type and its call back function (callback) address that need monitoring to task manager (Event manager) registration.In event comes, task manager calls call back function and passes to its data pointer, and the customer data (client data) of its storage is returned to call back function.Use or thread can be registered a plurality of incidents of monitoring simultaneously for one.
Fig. 3 has described event data and has handled the tabulation of function.
Fig. 4 describes the groundwork flow process of registered callbacks function.
The present invention is described in further detail below in conjunction with concrete embodiment.
Embodiment
Embodiment is as follows:
1. need to carry out initialization before task manager uses, the initialization function is such as being MBT_EvtInit (),
2. the basic use-pattern of case mechanism is
A) use of reception incident (top explanation about case mechanism is seen in detailed description):
I. registered events call back function
Ii. enter the event handling circulation
1. waiting event
2. when receiving incident aftertreatment incident
3. under certain condition, release circulation (perhaps never withdrawing from)
Iii. when no longer needing to monitor incident, cancel registration to call back function
B) use of transmission incident
I. incident can be sent to certain thread or send to the thread that all monitor this incident with broadcast mode
If sending the data data of incident when ii. sending incident is dynamic assignment, then should provides data and discharge function
C) monopolize the use of incident
I. when the needs capturing events, call the capturing events function, certain incident is monopolized for it, other threads can't be received this incident this moment, unless other threads are caught this incident once more afterwards
If ii. no longer wish to monopolize certain incident, then call cancellation capturing events function, decontrol monopolizing to incident.
It should be noted last that: the present invention is to provide a kind of method and design philosophy thereof that improves incident transmission and processing in the apparatus of digital television receiving, above embodiment is the unrestricted technical scheme of the present invention in order to explanation only, although the present invention is had been described in detail with reference to the foregoing description, those of ordinary skill in the art is to be understood that: still can make amendment or be equal to replacement the present invention, and not breaking away from any modification or partial replacement of the spirit and scope of the present invention, it all should be encompassed in the middle of the claim scope of the present invention.

Claims (9)

1, a kind of method that improves the efficient of incident transmission and processing in the apparatus of digital television receiving, it is characterized in that, type to the incident that will transmit in apparatus of digital television receiving is labelled, regulation is carried the method for data, process that standard event registration and rope rise and agreement, and described method is by taking the thread as storage of preface organizing events and processing queue, the its corresponding thread of call back function formation of event handling is connected, task manager of design in described apparatus of digital television receiving, wherein the content of incident comprises type, code and data pointer, each incident is unique definite by type and code, the data that incident is carried pass to event handler by data pointer, the data of described task manager record are together in series by the thread tabulation, each action listener thread occupies a record in the thread tabulation, each thread record also comprises a call back function tabulation and a list of thing, described call back function tabulation is used to write down the call back function of watcher thread registration, and described list of thing is used to write down the incident that sends to watcher thread.
2, a kind of method that improves incident transmission and treatment effeciency according to claim 1 is characterized in that, described method is by sending, delete, catch and cancelling capturing events and transmit event information.
3, a kind of method that improves incident transmission and treatment effeciency according to claim 1 is characterized in that, it is processed that described method is able to incident by the call back function of registering, nullify and revise event handling.
According to claim 2 or 3 described a kind of methods that improve incident transmission and treatment effeciency, it is characterized in that 4, described method allows the sender of incident directly to call the call back function of event handling, the incident that makes can directly be handled.
5, the method for incident transmission and treatment effeciency in the raising apparatus of digital television receiving according to claim 1, it is characterized in that, by task manager transmission and processing events the time, watcher thread is at first registered to task manager, provide event type and its call back function address of needing monitoring, when event comes, task manager calls call back function and gives call back function by the data transfer that data pointer carries incident.
6, the method for incident transmission and treatment effeciency in the raising apparatus of digital television receiving according to claim 5, it is characterized in that, when call back function of described watcher thread registration, described task manager adds a call back function record in the call back function tabulation of described watcher thread; When described watcher thread cancellation call back function was registered, described task manager was with corresponding call back function record deletion in the call back function tabulation of described watcher thread.
7, the method for incident transmission and treatment effeciency in the raising apparatus of digital television receiving according to claim 6, it is characterized in that, when watcher thread sends incident, described task manager is checked the call back function whether corresponding described incident is arranged in the call back function tabulation of described watcher thread, if have, then described incident is added in the list of thing of described watcher thread; And when watcher thread obtains incident, then from the list of thing of described watcher thread, find the events corresponding record.
8, the method for incident transmission and treatment effeciency in the raising apparatus of digital television receiving according to claim 7, it is characterized in that, when processing events, task manager is deleted events corresponding record in the described list of thing, and check whether all watcher threads had all been handled described incident, if the data of then calling described incident discharge function.
9, the method for incident transmission and treatment effeciency in the raising apparatus of digital television receiving according to claim 8, it is characterized in that, described task manager also comprises catches tabulation, describedly catch tabulation and be used to write down watcher thread monopolizing incident, when the incident of transmission, at first in catching tabulation, search the record of described incident, if having record and thread id different with the thread id that will send to, the thread transmission incident that then will not send to described; During the cancellation capturing events, then in catching tabulation, search corresponding record, and deletion record.
CNB2004100181696A 2004-05-09 2004-05-09 A kind of method that improves incident transmission and processing in the apparatus of digital television receiving Active CN100538622C (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CNB2004100181696A CN100538622C (en) 2004-05-09 2004-05-09 A kind of method that improves incident transmission and processing in the apparatus of digital television receiving
PCT/CN2005/000624 WO2005109185A1 (en) 2004-05-09 2005-05-08 A method for improving efficiency of events transmission and processing in digital television receiving device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2004100181696A CN100538622C (en) 2004-05-09 2004-05-09 A kind of method that improves incident transmission and processing in the apparatus of digital television receiving

Publications (2)

Publication Number Publication Date
CN1571483A CN1571483A (en) 2005-01-26
CN100538622C true CN100538622C (en) 2009-09-09

Family

ID=34479380

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2004100181696A Active CN100538622C (en) 2004-05-09 2004-05-09 A kind of method that improves incident transmission and processing in the apparatus of digital television receiving

Country Status (2)

Country Link
CN (1) CN100538622C (en)
WO (1) WO2005109185A1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011029039A1 (en) 2009-09-03 2011-03-10 Opentv, Inc. System and method to provide gift media
CN102402457A (en) * 2010-09-17 2012-04-04 希姆通信息技术(上海)有限公司 Method for processing mobile phone application program alterative events
CN104185096B (en) * 2014-09-12 2019-07-02 上海斐讯数据通信技术有限公司 A kind of ONU registed authorization method and system
CN104618432B (en) * 2014-12-30 2019-03-08 北京红马传媒文化发展有限公司 A kind of processing method and processing system that event sends and receives
CN106162166B (en) * 2015-03-23 2018-04-17 Tcl集团股份有限公司 A kind of factory's remote controller key event-handling method and device
CN112040317B (en) * 2020-08-21 2022-08-09 海信视像科技股份有限公司 Event response method and display device
CN112749024A (en) * 2020-12-28 2021-05-04 深兰人工智能(深圳)有限公司 Data distribution method and device for multiple sensors

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE69227664T2 (en) * 1991-10-15 1999-04-22 Hewlett Packard Co Hardware-configured operating system core for a multitask processor
US5566337A (en) * 1994-05-13 1996-10-15 Apple Computer, Inc. Method and apparatus for distributing events in an operating system
WO1997024671A1 (en) * 1995-12-29 1997-07-10 Powertv, Inc. Event filtering feature for a computer operating system in a home communications terminal
US5974541A (en) * 1997-07-22 1999-10-26 National Instruments Corporation GPIB system and method which provides asynchronous event notification

Also Published As

Publication number Publication date
WO2005109185A1 (en) 2005-11-17
CN1571483A (en) 2005-01-26

Similar Documents

Publication Publication Date Title
CN1227588C (en) Methods and apparatus for managing application according to application lifecycle
CN111917988A (en) Remote camera application method, system and medium of cloud mobile phone
US6584587B1 (en) Watchdog method and apparatus
CN103677848A (en) Camera control method based on Android
JP2007519103A (en) Resource management in multiprocessor systems
CN1925577A (en) Method and apparatus for constructing dynamic menu for user interface
CN1203002A (en) Method and device for loading a user interface
CN103888619A (en) Message processing method and system thereof
JPWO2009113381A1 (en) Multiprocessor system and method for sharing device between OS of multiprocessor system
CN100538622C (en) A kind of method that improves incident transmission and processing in the apparatus of digital television receiving
KR20060008896A (en) Resource management method and apparatus
CN106227492A (en) Combination and mobile intelligent terminal interconnected method and device
CN108496198A (en) A kind of image processing method and equipment
CN111010603A (en) Video caching and forwarding processing method and device
US20120090012A1 (en) Event booking mechanism
KR20060117931A (en) An enhanced method for handling preemption points
WO2021238259A1 (en) Data transmission method, apparatus and device, and computer-readable storage medium
CN1571501A (en) A method for implementing embedded digital television service platform
KR100662167B1 (en) Method and system for transmitting a chain of messages for database
CN110198481A (en) A kind of program updating method, device, electronic equipment and storage medium
JP2002314965A (en) Video conference reservation system and its method
CN108400977A (en) Video data transfers method and device
CN103686336A (en) Video playing control method and device
CN1349350A (en) TV top box with single processor for completing multitask
JP2008048089A (en) Call center system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C57 Notification of unclear or unknown address
DD01 Delivery of document by public notice

Addressee: Liao Hongtao

Document name: Deemed not to advise

C57 Notification of unclear or unknown address
DD01 Delivery of document by public notice

Addressee: Wang Zhaolin

Document name: Notice of conformity

C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant