CN103455328B - The player method of the controlling media play device based on multi-level state machine - Google Patents
The player method of the controlling media play device based on multi-level state machine Download PDFInfo
- Publication number
- CN103455328B CN103455328B CN201310358023.5A CN201310358023A CN103455328B CN 103455328 B CN103455328 B CN 103455328B CN 201310358023 A CN201310358023 A CN 201310358023A CN 103455328 B CN103455328 B CN 103455328B
- Authority
- CN
- China
- Prior art keywords
- state
- video
- player
- panel controller
- media play
- 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.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 23
- 230000009471 action Effects 0.000 claims abstract description 4
- 238000012423 maintenance Methods 0.000 claims abstract description 4
- 230000005611 electricity Effects 0.000 claims description 5
- 238000012545 processing Methods 0.000 abstract description 24
- 230000007547 defect Effects 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 12
- 230000008569 process Effects 0.000 description 9
- 230000007704 transition Effects 0.000 description 8
- 230000006870 function Effects 0.000 description 7
- 230000008447 perception Effects 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000013459 approach Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 230000002452 interceptive effect Effects 0.000 description 2
- 238000013508 migration Methods 0.000 description 2
- 230000005012 migration Effects 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 230000008901 benefit Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 230000004069 differentiation Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000000873 masking effect Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000013517 stratification Methods 0.000 description 1
- 239000000126 substance Substances 0.000 description 1
- 230000033772 system development Effects 0.000 description 1
- 230000009897 systematic effect Effects 0.000 description 1
- 230000001052 transient effect Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Landscapes
- Selective Calling Equipment (AREA)
Abstract
The invention discloses a kind of controlling media play device based on multi-level state machine, player and its player method, the controlling media play device mainly includes:Panel controller proxy module, video player proxy module or/and audio player proxy module and secondary control device proxy module are a hierarchical states machine, a kind of corresponding abstract control device of each hierarchical states machine correspondence, institute for the corresponding control device of maintenance and management is stateful, message and data are received by the processing module, and by hierarchical states machine internal state and action described in event-driven;Processing module, for receiving and processing message and data, and for master controller by sending messages to all hierarchical states machines being managed to realize management and control to sub- proxy for equipment state machine.Using the present invention, can solve the problem that and expend a large amount of codes and take more memory space and be difficult the defect of extension, improve the resource utilization ratio of controlling media play device and player.
Description
Technical field
The interactive system theoretical the present invention relates to be based on software state machine, more particularly to the matchmaker based on multi-level state machine
Body playing controller, player and its player method.
Background technology
After David Hare propose that state machine theory is used to describe the interactive system of complexity, state machine is theoretical quickly just
Widely received, and be introduced in many software systems.Theoretical according to state machine, most important state machine is broadly divided into
Finite state machine(FSM, Finite-State Machine)With hierarchical states machine(HSM)Two kinds.Wherein:
Finite state machine(FSM)System, refers to the system that can show different running statuses in different phase, these shapes
State is limited, nonoverlapping.Such system be at a time bound in its it is stateful in a state, now
It receives the input that a part is allowed, and produces a part of possible response, and move to a part of possible state.Limited shape
State machine be widely used in modelling application behavior, ware circuit design, soft project, compiler, procotol and calculate with
The research of language.Wherein, in digital circuit, FSM can also use programmable logic device, programmable logic controller (PLC), logic
Door is realized with trigger or relay.
And hierarchical states machine(HSM)Belong to one kind of FSM, but use hierarchical states machine(HSM)State can effectively be reduced
Quantity, make have succession effect between state, can to otherness programming provide well support.Therefore can be widely used in one
In a little embedded systems or in the equipment of scarcity of resources.Additionally, with hierarchical states machine(HSM)Management equipment, additionally it is possible to efficiently
It is with good expansibility using the logic realization logical multiplexing developed on ground.When an equipment is increased, this only need to be designed
The running status of individual equipment and the handoff relation between them simultaneously design corresponding state machine, process in the status under this state
Physical device communications message, increase in state machine manager this agent equipment by message mechanism i.e. be capable of achieving to this
The management of equipment.This unified model is easy to increase new equipment, is system is provided with excellent scalability.
State machine approach has specific requirement to event handling handle and method, that is, they must be RTC(Run To
Complete)The treatment function of type, if it is not, then state block can be caused, system cannot respective handling be follow-up disappears
Breath and state handover request, so state machine approach, requirement higher is designed with to the message processing function in state.
It can be seen that, use finite state machine(FSM)Management equipment, can make the number of states in state machine be difficult to control, state
Switching becomes difficult, and uses hierarchical states machine(HSM)Method then can effectively reduce number of states, become the switching of state
Must be easily handled, and take less system resource, therefore be especially suitable for applying as media controller, media player
In embedded device.
The content of the invention
In view of this, it is a primary object of the present invention to provide a kind of controlling media play based on multi-level state machine
Device, player and its player method, to solve, existing hierarchical states machine operationally needs to expend a large amount of codes and occupancy is more
Memory space and be difficult the defect of extension, controlling media play device and player is taken less situation in system resource
Under, remain able to control multiple media resources to be played in multiple regions, and improve the utilization rate of system resource.
To reach above-mentioned purpose, the technical proposal of the invention is realized in this way:
A kind of controlling media play device based on multi-level state machine, mainly includes panel controller proxy module, video
Player proxy module or/and audio player proxy module, secondary control device proxy module and processing module;Wherein:
The panel controller proxy module, video player proxy module or/and audio player proxy module and secondary
Controller proxy module is a hierarchical states machine, and a kind of corresponding abstract control of each hierarchical states machine correspondence sets
Standby, the institute for the corresponding control device of maintenance and management is stateful, and message and data are received by the processing module,
And by hierarchical states machine internal state and action described in event-driven;
The processing module, for receiving and processing message and data, and owns by sending messages to for master controller
The hierarchical states machine being managed is realizing management and control to sub- proxy for equipment state machine.
Wherein, the panel controller proxy module, comprising broadcast source selection submodule, played file selection submodule,
Volume control submodule and broadcasting control submodule, for processing control instruction and control message that control panel sends.
The processing module, comprising message sink submodule, call treatment submodule and addressing treatment submodule, for connecing
Control message and control instruction are received, and sends result by messaging bus after being processed accordingly.
The event is defined in the way of message, mainly including following two parts:Event flag ID, the parameter of event and
Message content.
A kind of media player including the controlling media play device based on multi-level state machine described in claim 1, also
Including panel controller, secondary control device, video player or/and audio player and messaging bus;Wherein:
The controlling media play device, for managing and coordinates the operation of each equipment room and communicates;
The panel controller, is mainly used in playing video and audio media files;
The video player and audio player, the video player corresponded to respectively in controlling media play device act on behalf of mould
Block and audio player proxy module, for being selected according to the instruction sent by panel controller proxy module and playing video
File and audio file;And
The controlling media play device transmits message, realizes the interconnection of equipment room and lead to secondary control device by messaging bus
Letter.
Wherein, the messaging bus use RNET Data Transport Protocols.The controlling media play device can mount multiple
Control device and playback equipment.
A kind of media playing method of the controlling media play device based on multi-level state machine, it is characterised in that including:
A, make on media player electricity, it is controlling media play that master controller state supervisor is generated in Play System
Device;
B, the controlling media play device find control panel and audio player simultaneously according to the link situation of Play System
The Play System is connected into, corresponding controller panel proxy module and video or/and audio player proxy module is generated, with
Realize the management to the equipment;
The described equipment of C, controlling media play device initialization, and it is each entered running status;
D, system resource is enumerated in run mode by panel controller, including on panel, and shown on panel
The resource of current system mounting, including show the media player;
E, on the panel controller select media player as broadcast source, panel controller is by sending messages to
Controlling media play device, ID of the controlling media play device then in message posts messages to media player proxy module;
F, the panel controller obtain all playlists by sending messages to the media player;Will be described
Playlist shows on the control panel, for user's selection broadcasting media file;
G, select on panel controller to intend the audio played or/and video media file is played, and by corresponding message
Media player is transmitted to by controlling media play device with data;
The institute that H, audio or video playing controller proxy module then track corresponding player is stateful, including plays shape
State, the size state of sound;
I, panel controller timing send messages to the controlling media play device to obtain newest broadcast state
And progress.
Wherein, the equipment described in step B is by corresponding ID unique marks.
Controlling media play device based on multi-level state machine provided by the present invention, player and its player method, lead to
Cross using multi-level state machine to manage and control multiple media controllers and media player, making the management of equipment has theory
Foundation, controller has succession between good scalability, state and has been multiplexed higher level's state logic and message processing function,
Otherness is set to be programmed in system development and the bigger effect of extension performance.Meanwhile, have further the advantage that:
1)It is the unified implementation model that equipment is provided, using hierarchical states machine is abstract and the specific equipment of agency and then reality
The management to entity device is showed.
2)Big media play system can be constituted by the cascade between controlling media play device.
3)The application level state machine in controlling media play device, can easily support that the switching and broadcasting of broadcast source set
Standby switching.
4)The area identification (ZoneID) included in message, in that context it may be convenient to the packet of holding equipment, such as multizone, many
Broadcast source different in room plays the control of music.
5)Support is provided to systematic unity broadcast source, such as all of playback equipment automatically switches to system under call state
The broadcast source specified.
Brief description of the drawings
Fig. 1 is the system architecture schematic diagram of controlling media play device and player of the present invention based on multi-level state machine;
Fig. 2 is the media play process schematic diagram of system;
Fig. 3 is the schematic diagram of hierarchical states machine shown in Fig. 1;
Fig. 4 is the data structure of hierarchical states machine corresponding with Fig. 3 and the hierarchical relationship figure of state;
State and its state transition event schematic diagram that Fig. 5 is included by the master controller of present system;
Fig. 6 is main controller state and handoff procedure schematic diagram;
Fig. 7 is the hierarchical relationship schematic diagram between main controller state.
Specific embodiment
Below in conjunction with the accompanying drawings and embodiments of the invention are to controlling media play device of the invention, player and player method
It is described in further detail.
Core concept of the invention is:Realized to playback equipment and the pipe of playback control device using multi-level state machine
Reason, utilization state machine manager administration simultaneously coordinates the operation and communication of equipment room.Management of the controller to sub- equipment, by level
State machine controller is completed, and every sub- equipment is allocated unique mark (device id), and in master controller or secondary control
An agent equipment is abstracted into device, and the management of the equipment of each agency is then completed by hierarchical states machine, certain sets
After standby agency's generation, will be added in hierarchical states machine manager, and all of agent equipment in manager administration.
Equipment of each agency is inherited from identical hierarchical states machine, therefore treatment to message and be to use to the transfer control of state
Unified implementation model.
Fig. 1 is the system architecture schematic diagram of controlling media play device and player of the present invention based on multi-level state machine.
The present invention uses hierarchical states machine manager administration many levels state machine(HSM), described each hierarchical states
Machine(HSM)It is that, to a kind of the abstract of control device, for maintenance and management, the institute of certain corresponding control device is stateful.And layer
State inside next state machine is presented stratification, can effectively reduce the quantity of state, so as to can make the equipment control become simple
Understand, program code also has good maintainability.
Here, the internal state of described hierarchical states machine and action are, by event driven, can so to reduce state
Coupling and state between.The event is defined in the way of message(Refer to aftermentioned).Hierarchical states machine manager can
By sending broadcast message to all of state machine being managed, so as to realize the management and control to sub- equipment.
The proxy module of each equipment shown in Fig. 1(As panel controller proxy module 11, video player acts on behalf of mould
Block 12 etc.)Be correspondence physical equipment an abstract control device, this abstract control device be also by hierarchical states machine come
Realize.Master controller hierarchical states machine manager(It is in the present embodiment " controlling media play device "), for realizing antithetical phrase
The management and control of proxy for equipment state machine, are realized to it by sending message to the master controller hierarchical states machine manager
The management and control of auxiliary device, each equipment are also abstracted into hierarchical states machine in itself, with the theoretical of hierarchical states machine and
Method, realizes the management and control to whole equipment collection.Such as, panel controller 3 can be by messaging bus 2 and master controller chain
Connect and upper electricity after, system can generate the abstract agent of the corresponding panel controller in the host controller(That is panel controller generation
Reason module 11), for processing instruction and the message that the control panel sends, master controller hierarchical states machine manager 1(By place
Reason module 15)Then the species according to the instruction and message is processed accordingly.
Controlling media play device 1, managed by multi-level state machine coordination between media player and controller and
Switching between its state.Controller is divided into main controller(Main control device corresponding with the controlling media play device)With secondary control device
5, master controller is " nerve center " for coordinating secondary control device 5, and each controlling media play device can mount multiple control devices
And playback equipment.
Here, controlling media play device 1, is mainly realized to playback control device and playback equipment using multi-level state machine
Management, by using state machine manager administration and coordinate the operation of each equipment room and communicate;And realized by messaging bus
Interconnection and communication between equipment.The controlling media play device(Master controller hierarchical states machine manager)1 control for sending
Message and control instruction pass through RNET bus transfers.RNET Data Transport Protocols, are phase intercommunications between various parts of the invention
The basis of letter.
Here, the RNET Data Transport Protocols, are that equipment can for the specific message format communicated between system equipment
The most basic supporting assembly of extension, the form definition of RNET protocol packages is as shown in table 1:
Table 1:
Reference table 1 a, message can be divided into protocol header, message body and agreement tail.Wherein:
Message header defines promoter's source device ID, the receiving terminal target device ID of message and the class of message of message transmission
Type.Each equipment in system can have corresponding ID to identify this equipment.Such as, target device ID is represented if 0x7F
All of face equipment, if 0x7E then represents all of controller, if 0x7D then represents all of equipment.These are special
The definition of different device id is mainly used in broadcast message.
The type definition of message is as shown in table 2:
Table 2:
The process of interconnection and the communication of equipment room is illustrated to be realized using messaging bus to the present invention below.
As shown in figure 1, the message queue being defined in the hierarchical states machine manager, when proxied equipment has message
During generation, it is medium pending into the message queue that the message begins to queuing.As it was previously stated, the substance of message includes
The source of message and target(Device id), message parameter(Such as d1, d2, sData)Deng, the occurrence of d1 and d2 and the class of message
Type is relevant, for example, plays song message, can be comprising information such as song titles in sData.Its basic Message Processing flow is as follows:
Step 11:Equipment produces message and issues the message by messaging bus;
Step 12:The message queue that the message is put into hierarchical states machine manager is medium pending;
Step 13:By message distributor corresponding proxy for equipment module is given by the message distribution;
Step 14:Using proxy for equipment module(I.e. corresponding hierarchical states machine)Message processing facility treatment described in disappear
Breath;
Step 15:If state transition message is then by hierarchical states machine transition state, if common message, then by correspondence
State processing function processed;
Step 16:According to the corresponding different Message Processing result of step 15, the described message processing state of mark.
So, above-mentioned master controller(Main control device corresponding with the controlling media play device, accordingly, can correspond to and lead
Controller layer next state machine manager)Interconnected by messaging bus 2 with secondary control device 5, with the device id that includes in message
(Correspondence distinct device)A bigger cascading effect can be realized, i.e. composition cascade media play system, each can be broken through
The number limitation of controller connection media player.
As shown in figure 1, the media player system based on multi-level state machine in specific embodiment of the invention, main bag
Include controlling media play device(Master controller hierarchical states machine manager)1st, messaging bus 2, panel controller 3, video player
4th, secondary control device 5 and audio player 6.Wherein:
The video player 4 or/and audio player 6 respectively with secondary control device 5, messaging bus 2 and media play
Controller 1 is combined, just can form the complete media player of One function.Such as, the media play control of the media player
Device processed 1 just can form a matchmaker that is bigger, can cascading together with passing through the transmission message interconnection of messaging bus 2 with secondary control device 5
Body Play System, can break through the quantity limitation of each controller connection media player.
Here, described controlling media play device 1, mainly includes panel controller proxy module 11, video player generation
Reason module 12 or/and audio player proxy module 14, secondary control device proxy module 13 and processing module 15.
The panel controller proxy module 11, mainly includes broadcast source selection submodule 111, played file selection submodule
Block 112, volume control submodule 113 and broadcasting control submodule 114, for processing the control sent by panel controller 3
Instruction and control message.
The processing module 15, mainly includes message sink submodule 151, call treatment submodule 152 and addressing treatment
Submodule 153.Here, the message sink submodule 151, for receiving control message and control instruction;The call treatment
Submodule 152, for processing request instruction;The addressing treatment submodule 153 be then used to realizing corresponding instruction and
The address distribution of data and addressing function.
Agency of corresponding its generation of the panel controller 3 is panel controller proxy module 11, is mainly used in broadcasting and regards
The multimedia file such as frequency and audio.
The video player 4 and audio player 5, correspond to video player proxy module 12 and audio player respectively
Proxy module 14, the instruction selection sent from panel controller proxy module 11 for basis and playing video file and audio text
Part.
Fig. 2 is the process flow diagram flow chart that media play is carried out using controlling media play device of the invention.With reference to Fig. 1, it is assumed that
Controlling media play device 1 is connected with panel controller 3 and the video player 4 of audio player 6/, and one simple audio of composition/
Audio/video player system.The controlling media play device 1 can parallel be broadcast with multiple audio players and multiple video players
Put.Illustrated by taking audio/video playback process as an example below, the media play process includes:
Step 201:Electricity on media play system, master controller generates master controller state supervisor i.e. in the system
Controlling media play device.
Step 202:Master controller finds control panel according to the link situation of system and audio/video player is connected into institute
Play System is stated, and generates corresponding controller panel proxy module audio/video player proxy module, so as to realize to right
This 2 management of equipment answered.
Here, in media play system, the two equipment can all have corresponding ID to carry out unique mark.
Step 203:Master controller initializes the two equipment by the corresponding proxy module of the two equipment, and each enters
Enter running status.
Step 204:Panel controller can enumerate system resource in run mode, be displayed on panel, and display is worked as on panel
The resource of preceding system mounting, including show the media player.
Step 205:Select media player as broadcast source on panel controller, panel controller is by sending message
To master controller, the ID that master controller can be in message transmits the information to media player proxy module.
Step 206:Panel controller obtains all playlists by sending messages to media player;The broadcasting
List may be displayed on control panel, so that media file is played in user's selection.
Step 207:User can select the audio/video media file to be played to play on panel controller, these
Message and data are all to be transmitted to the media player by master controller.
Step 208:Institute using controller proxy module tracking player is stateful, such as broadcast state, the size of sound
State etc..
Step 209:Panel controller timing sends messages to master controller to obtain newest broadcast state and progress.
Fig. 3 for hierarchical states machine shown in Fig. 1 schematic diagram, Fig. 4 be hierarchical states machine corresponding with Fig. 3 data structure and
The hierarchical relationship figure of state.
State in hierarchical states machine of the invention is the most basic unit of hierarchical states machine management, the shape defined in program
State include stateful name Name_, point to higher level's state pointer Super_, and this state Message Processing handle
Hndlr_.It is transmitted to this stateful example and is used to process this state institute by Message Processing handle when structural regime example
The message of care.
Super_ pointers defined in state machine are the keys that hierarchical states machine forms hierarchical states father and son's state relation
Place, these hierarchical relationships are generated when state machine is defined.Each proxy for equipment is in systems one independent
State machine, they can realize oneself different conditions and state transition so as to realize to equipment according to the characteristic of physical equipment
Management.
As shown in figure 3, state s2 is higher level's state of state s21 and state s22, and state s1 and s2 are higher level's states
(Top)Subordinate's state, it can be seen that a kind of hierarchical states are presented between state, it will be understood that if system be in s22 shapes
State, then system also simultaneously be in s2 and Top states, that is, s2 be s22 higher level's state and Top states be s2 higher level's shape
State.
Switching between state is event driven, such as e1 events are that system has been switched to s21 by state s1, and e4 is
State has been switched to s22 by s21.
As shown in figure 4, the data structure of five kinds of states in Fig. 3 forms an one-way tree, each state is corresponding
Super pointers point to Last status, and so as to form a hierarchical structure, the state Super of such as S21 points to s2 states, and
The Super of s1 points to Top states, and Top states are top level status, and its Super points to Null.
Here, system event is divided into two kinds:Common event and state transition event.Wherein:
Common event will not cause the migration of state, and state transition event switches between then triggering state, such as
PageTriggerSense(d1=0)It is exactly common event, it is the internal event for calling perception state.And system wake-up event
System_Wake events can then trigger system by holding state(StandBy)To the switching of home theater idle condition.
The event is defined in the way of message, mainly includes 2 parts:
1)Event flag ID;
2)The parameter and message content of event.
State machine would generally manage simultaneously multiple states, the migration of controlled state, be responsible for transmission system message to state at
Function is managed, is responsible for the entrance of state and is exited treatment etc..Hierarchical states machine(HSM)It is the base class of device abstract class, that is, it is fixed
The basic act and Active Interface of all devices abstract class in justice system.This class can be with the addition of management state machine, deletion
Broadcast the message to all of state machine to realize the management to whole system.It is also the key point of the system expandability, master control
Device processed is realized to all of media device of locking equipment proxy management by master controller hierarchical states machine manager, it is easy to expanded
Exhibition.
State and its state transition event schematic diagram that Fig. 5 is included by the master controller of present system.Such as Fig. 5 institutes
Show that described controlling media play device 1 there are 11 states, be respectively top state(Top), open state(Startup), fortune
Row state(On), idle condition(Idle), home theater circulation idle condition(HomeTheatreWhileIdle), holding state
(standby), produce init state(FactoryInit), off-mode(Shutdown), call state(Page), calling
Triggering state(TriggeredPage)With calling perception state etc..Wherein:
Running status:The operation of media play, fast forwarding and fast rewinding, Xia Yiqu, a upper song, and data source switching etc. is carried out,
Sound size adjustment to data source etc..
Idle condition:" occupied with nothing " where system, now system can typically run the work of garbage reclamation etc..
Home theater circulates idle condition:Under this home theater idle condition, controller typically does a little and broadcasting sound
The unrelated operation of happy video playback.
Holding state:It is that system enters battery saving mode, power consumption is preferably minimized, removing necessary circuit needs power supply to maintain,
Other circuits are closed, and waiting system is exchanged for again.
Dispatch from the factory and just enter init state:Under this state, setting is returned to factory state by controller, and all users set
Putting can all be capped.
Off-mode:Just in off-mode, under this state, system can prepare shutdown, under off-mode, system to system
Can process such as preserving the operations such as setting process data.
Call state:Controller supports cascade, can constitute a media system for cascade, all of under call state
The broadcasting stream of media player device is suspended then playing calling information.
Calling triggering state:It is the sub- state of call state, being need to be to be processed for processing system after calling is triggered,
Media Stream, such as turns to audio and flows to call audio stream.
Calling perception state:It is also the sub- state of a call state, is an of short duration state.
Switching between described these states is by corresponding event driven, such as from starting state(Startup)To sky
Not busy state(Idle)Switching be after the completion of event " device address distribution "(Addr AssignComplete)Carry out.Again
Such as player is from running status(On)To calling triggering state(TriggerPage)With calling perception state(sensedPage)
It is respectively in event call perceptual signal(PageSigalSense)With calling triggering perception events(PageTiggeredSense)
The switching of completion.
Fig. 6 is main controller state and handoff procedure schematic diagram.As shown in fig. 6, controlling media play device state switched
Journey is as follows:
1)Electricity enters open state on controlling media play device, and controlling media play device starts as this main control device distributively
Location, until address completes to distribute(Addr_Assign_Complete).
2)System enters running status (On) and idle condition(Idle).
3)In an idle state, if receiving event " more new system commencing signal "(Update_System_On), system
By the free time(Idle)To system operation(On)Migrate, and the renewal of completion system is operated.
4)If system receives system waiting signal(SYSTEM_STANDBY)System can be by the free time(Idle)State is to being
System holding state conversion(Standby).
5)If in system running state(On)Receive the initializing signal that dispatches from the factory(FactoryInit), system is then by system
Running status(On)To system initialization state(FactoryInit)Switching.
6)If in system running state(On)Receiving " system update starts " signal(D1=0 in signal)After enter
" idle condition ".
7)Completion is dispatched from the factory after init state(Factory_Init_Complete)System is accurate to system closedown state transition
Standby shutdown.
8)From system standby state(Standby)Home theater trigger signal is received, system can be from holding state to family
Movie theatre state switches.
9)System is in holding state(Standby)Receive system wake-up(SYSTEM_WAKE)After signal, can switch to
Idle condition(Idle).
10)System running state(On)Calling perceptual signal is received, system has system running state and cut to call state
Change(Page).
Hierarchical relationship between state is the basis of logical multiplexing, is to realize that otherness is programmed(Programming By
Difference)Key point, if such as system is under home theater idle condition simultaneously, then system also exists:It is top
State, system running state and idle condition, this has been multiplexed top state, system running state equal to home theater idle pulley
With the treatment logic under idle condition, realize the succession and multiplexing of state and then realize differentiation programming in logic.
Fig. 7 is the hierarchical relationship schematic diagram between main controller state.As shown in fig. 7, the level between master controller state is closed
System, this relation is a kind of unidirectional tree hierarchy relation.Such as broadcast calls, system can be made by broadcast calls trigger signal
System enters call state, and under call state, the signal of other media devices of system can be turned in temporary transient masking
And broadcast calls audio stream is played so as to be to play call audio on each playback equipment.
The above, only presently preferred embodiments of the present invention is not intended to limit the scope of the present invention.
Claims (1)
1. a kind of media playing method of the controlling media play device based on multi-level state machine, it is characterised in that including:
A, make on video or/and audio player electricity, it is media play that master controller state supervisor is generated in Play System
Controller;
B, the controlling media play device find panel controller and video according to the link situation of Play System or/and audio is broadcast
Put device and be connected into the Play System, generate corresponding panel controller proxy module and video or/and audio player agency
Module, to realize the management to the panel controller and video or/and audio player;
C, controlling media play device initialization described panel controller and video or/and audio player, and make its each
From entering running status;
D, system resource is enumerated in run mode by panel controller, including on panel, and shown on panel current
The resource of system mounting, including show the video or/and audio player;
E, on the panel controller select media player as broadcast source, panel controller is by sending messages to media
Playing controller, ID of the controlling media play device then in message posts messages to video or/and audio player agency
Module;
F, the panel controller obtain all playlists by sending messages to the video or/and audio player;Will
The playlist is displayed on panel controller, and media file is played for user's selection;
G, select on panel controller to intend the audio played or/and video media file is played, and by corresponding message sum
Video or/and audio player are transmitted to according to by controlling media play device;
H, video or/and audio player proxy module then track corresponding video or/and the institute of audio player is stateful, bag
Include the size state of broadcast state, sound;
I, panel controller timing send messages to the controlling media play device to obtain newest broadcast state and enter
Degree;
The panel controller proxy module, video player proxy module or/and audio player proxy module are one
A kind of hierarchical states machine, corresponding abstract control device of each hierarchical states machine correspondence is right therewith for maintenance and management
The institute of the control device answered is stateful, by hierarchical states machine internal state and action described in event-driven;
Panel controller and video or/and audio player described in step B is by corresponding ID unique marks.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201310358023.5A CN103455328B (en) | 2013-08-16 | 2013-08-16 | The player method of the controlling media play device based on multi-level state machine |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201310358023.5A CN103455328B (en) | 2013-08-16 | 2013-08-16 | The player method of the controlling media play device based on multi-level state machine |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN103455328A CN103455328A (en) | 2013-12-18 |
| CN103455328B true CN103455328B (en) | 2017-06-06 |
Family
ID=49737735
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201310358023.5A Expired - Fee Related CN103455328B (en) | 2013-08-16 | 2013-08-16 | The player method of the controlling media play device based on multi-level state machine |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN103455328B (en) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109814726B (en) * | 2019-02-28 | 2022-07-01 | 亮风台(上海)信息科技有限公司 | Method and equipment for executing intelligent interactive processing module |
| CN111988667B (en) * | 2020-08-18 | 2022-06-21 | 视若飞信息科技(上海)有限公司 | Intelligent terminal media player management method and system |
| CN112910556A (en) * | 2021-03-05 | 2021-06-04 | 深圳市达特文化科技股份有限公司 | Optical communication method and system |
| CN113821279A (en) * | 2021-11-24 | 2021-12-21 | 深圳市永联科技股份有限公司 | State transition method and device and embedded equipment |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6233611B1 (en) * | 1998-05-08 | 2001-05-15 | Sony Corporation | Media manager for controlling autonomous media devices within a network environment and managing the flow and format of data between the devices |
| US7797672B2 (en) * | 2006-05-30 | 2010-09-14 | Motorola, Inc. | Statechart generation using frames |
| US7877727B2 (en) * | 2006-08-18 | 2011-01-25 | Bitrouter | Hierarchical state programming with a markup language |
| CN102929697A (en) * | 2012-10-09 | 2013-02-13 | Tcl集团股份有限公司 | State machine, scheduling method and device and universal serial bus (USB) media play control device |
| CN104581365B (en) * | 2014-12-29 | 2017-10-13 | 广东欧珀移动通信有限公司 | Method, slave unit, main equipment and the system for controlling multimedia file to push |
-
2013
- 2013-08-16 CN CN201310358023.5A patent/CN103455328B/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| CN103455328A (en) | 2013-12-18 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN103455328B (en) | The player method of the controlling media play device based on multi-level state machine | |
| Tooms et al. | The Evolution of a Comprehensive Computer Support System for the Television Operation | |
| CN100483351C (en) | Information processing apparatus, process control method, and computer program | |
| CN100549964C (en) | Messaging device, Interrupt Process control method | |
| CN109376197B (en) | Data synchronization method, server and computer storage medium | |
| CN113656195B (en) | Service message channel management method and device and electronic equipment | |
| CN102427465B (en) | Voice service proxy method and device and system for integrating voice application through proxy | |
| CN101599971B (en) | Communication management equipment of cascade compensation device and management method thereof | |
| CN102375759B (en) | Utilize the method that finite state machine prevents code rewriting | |
| CN106878927B (en) | Multifunctional Bluetooth equipment and attaching method thereof | |
| CN105323643A (en) | Control device for realizing fast switching of television channels and television applications | |
| CN101018355A (en) | Automatic conversion system and method of the mobile phone video/audio and MMS format | |
| CN100525352C (en) | Multimedia transmission and playing method and system in mobile phone network | |
| CN114422336A (en) | Control plane debugging method, device, node and storage medium | |
| CN110032472A (en) | A kind of method for restarting and device of application program | |
| CN104298636A (en) | Embedded communication service system | |
| CN101266582A (en) | Embedded equipment audio frequency controller and method | |
| JPH056320A (en) | Telecomputer package switching device | |
| CN118101757A (en) | A distributed distribution system deployment, distribution method, system, device and medium | |
| CN102004667A (en) | SOPC (system on programmable chip) software and hardware cooperative system based on Linux | |
| CN111130895B (en) | Method for realizing REN protocol master station based on DSP | |
| CN102724442B (en) | A kind of film titler timing material broadcast control method and system | |
| CN202443741U (en) | Intrinsically safe network voice controller for mine | |
| CN109522110A (en) | A kind of multiple task management system and method based on view networking | |
| CN101771574A (en) | Network operation and maintenance method and network |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20170606 |
|
| CF01 | Termination of patent right due to non-payment of annual fee |