CN113038150A - Program switching method and device - Google Patents
Program switching method and device Download PDFInfo
- Publication number
- CN113038150A CN113038150A CN201911252282.3A CN201911252282A CN113038150A CN 113038150 A CN113038150 A CN 113038150A CN 201911252282 A CN201911252282 A CN 201911252282A CN 113038150 A CN113038150 A CN 113038150A
- Authority
- CN
- China
- Prior art keywords
- program
- switched
- video data
- audio data
- hardware decoder
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 64
- 238000007781 pre-processing Methods 0.000 claims description 64
- 238000001914 filtration Methods 0.000 claims description 12
- 230000001360 synchronised effect Effects 0.000 claims description 11
- 230000006870 function Effects 0.000 description 17
- 230000008569 process Effects 0.000 description 12
- 238000010586 diagram Methods 0.000 description 11
- 238000004590 computer program Methods 0.000 description 8
- 238000005516 engineering process Methods 0.000 description 4
- 230000006835 compression Effects 0.000 description 3
- 238000007906 compression Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 239000000872 buffer Substances 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/21—Server components or server architectures
- H04N21/218—Source of audio or video content, e.g. local disk arrays
- H04N21/2187—Live feed
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/4302—Content synchronisation processes, e.g. decoder synchronisation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/438—Interfacing the downstream path of the transmission network originating from a server, e.g. retrieving encoded video stream packets from an IP network
- H04N21/4383—Accessing a communication channel
- H04N21/4384—Accessing a communication channel involving operations to reduce the access time, e.g. fast-tuning for reducing channel switching latency
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/439—Processing of audio elementary streams
- H04N21/4398—Processing of audio elementary streams involving reformatting operations of audio signals
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/4402—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The application discloses a program switching method and device, which are used for realizing rapid program switching and reducing hardware cost and terminal power consumption required by program switching, thereby saving resources. The program switching method provided by the embodiment of the application comprises the following steps: determining a switched target program according to a user instruction; respectively sending the audio data and the video data of the target program which are stored in advance to an audio data hardware decoder and a video data hardware decoder; and outputting the image decoded by the video data hardware decoder and the sound decoded by the audio data hardware decoder.
Description
Technical Field
The present application relates to the field of electrical technologies, and in particular, to a program switching method and apparatus.
Background
The existing technology for realizing fast switching of live programs is realized by 3 hardware decoders (decoders) working in parallel, wherein 3-way hardware decoders work simultaneously, 1-way hardware decoder plays the previous program, 1-way hardware decoder plays the currently played program, and 1-way hardware decoder plays the next program. Wherein, the programs are, for example, center 1, center 2, center 3, center 4, etc. If on the program list of the television terminal, the display order is: central 1, central 2, central 3, central 4,. et al; and the user is currently watching center 3, then the "previous program" designation is center 2 and the "next program" designation is center 4.
When receiving a request of switching the next (or previous) program from the user, the television directly outputs the decoded output image of the next (or previous) hardware decoder. Thus, the fast switching over (FCC) function is realized by a method that a plurality of hardware decoders work in parallel. However, it is obvious that this implementation technique requires 3 hardware decoders to work simultaneously, which is high in hardware cost and relatively high in power consumption.
Disclosure of Invention
The embodiment of the application provides a program switching method and device, which are used for realizing rapid program switching and reducing hardware cost and terminal power consumption required by program switching, so that resources are saved.
The program switching method provided by the embodiment of the application comprises the following steps:
determining a switched target program according to a user instruction;
respectively sending the audio data and the video data of the target program which are stored in advance to an audio data hardware decoder and a video data hardware decoder;
and outputting the image decoded by the video data hardware decoder and the sound decoded by the audio data hardware decoder.
By the method, the pre-stored audio data and video data of the target program are respectively sent to an audio data hardware decoder and a video data hardware decoder; and outputting the image decoded by the video data hardware decoder and the sound decoded by the audio data hardware decoder, thereby realizing rapid program switching, reducing the hardware cost required by program switching and the power consumption of the terminal, and saving resources.
Optionally, the target program belongs to a program to be switched, and the method further includes the following steps of pre-storing audio data and video data of the program to be switched:
acquiring information of a program to be switched;
and filtering the program to be switched according to the information of the program to be switched to obtain the audio data and the video data of the program to be switched.
Optionally, the method further comprises:
and judging whether the frequency of the program to be switched needs to be locked or not according to the information of the program to be switched.
Thus, the time required for frequency locking can be saved.
Optionally, the program to be switched includes: the program management list is preset to show the program which is the last program and the next program of the program which is currently played.
Optionally, after obtaining the audio data and the video data of the program to be switched, the method further includes:
and sending the audio data and the video data of the program to be switched to a rapid switching and playing preprocessing module corresponding to the program to be switched, and setting the working state of the rapid switching and playing preprocessing module to be a rapid switching preprocessing state.
Optionally, the sending the pre-stored audio data and video data of the target program to an audio data hardware decoder and a video data hardware decoder respectively includes:
and respectively sending the audio data and the video data in the fast switching and playing preprocessing module corresponding to the target program to an audio data hardware decoder and a video data hardware decoder.
Optionally, after the audio data and the video data in the fast switching and playing preprocessing module corresponding to the target program are respectively sent to an audio data hardware decoder and a video data hardware decoder, the method further includes:
setting the working state of a fast switching and playing preprocessing module corresponding to the target program as a playing state;
and directly sending the video data and the audio data of the program corresponding to the fast switching and playing preprocessing module in the playing state to a video data hardware decoder and an audio data hardware decoder respectively for decoding and outputting.
Therefore, in the application, the fast switching and playing preprocessing module corresponding to each program to be switched has two working states, namely a fast switching preprocessing state and a playing state; in the playing state, all live broadcast real-time data are directly injected into the audio and video data decoder without preprocessing, so that the switching between the preprocessing working state and the playing working state is simple and easy.
In addition, it can be seen that, in the embodiment of the present application, based on the respective corresponding fast switching of each program to be switched and the switching of the working state of the play preprocessing module, each program can multiplex one audio/video data hardware decoder, so that the program switching can be realized only by a single audio/video data decoder. Therefore, the rapid switching pretreatment of a plurality of programs can be simply expanded, so that the programs can be rapidly switched by the program up-down switching key or the number key of the remote controller.
Alternatively,
the audio data of the program to be switched comprises audio data synchronous with the latest frame of image of the program to be switched;
the video data of the program to be switched comprises I frame data of the latest frame of image of the program to be switched, and B frame data and P frame data after the I frame data.
Since only one frame I frame and the B, P frames following it are stored as undecoded compressed frames, less storage space is required and storage space is saved.
And only one frame of audio packet (namely, the latest audio packet) data corresponding to the latest video frame synchronized with the program to be switched is stored, so that the latest and most real-time sound is ensured, the audio and video synchronization is also ensured, and the time required by the audio and video synchronization can be further saved.
Another embodiment of the present application provides a program switching apparatus, which includes a memory and a processor, wherein the memory is used for storing program instructions, and the processor is used for calling the program instructions stored in the memory and executing any one of the above methods according to the obtained program.
Another embodiment of the present application provides a computer storage medium having stored thereon computer-executable instructions for causing a computer to perform any one of the methods described above.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic diagram illustrating time required for each operation phase process of a switching station according to an embodiment of the present application;
fig. 2 is a schematic internal flow diagram of a program fast switching and playing preprocessing module according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a program switching method according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a program switching apparatus according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides a program switching method and device, which are used for reducing the hardware cost required by program switching, greatly reducing the power consumption of a terminal and saving resources.
The method and the device are based on the same application concept, and because the principles of solving the problems of the method and the device are similar, the implementation of the device and the method can be mutually referred, and repeated parts are not repeated.
Various embodiments of the present application will be described in detail below with reference to the accompanying drawings. It should be noted that the display sequence of the embodiment of the present application only represents the sequence of the embodiment, and does not represent the merits of the technical solutions provided by the embodiments.
The device provided by the embodiment of the application can be any type of terminal product, for example, a television, a set-top box, a mobile phone, a computer and the like.
For example, for set-top box products, the most common functional operation is for the user to press the program up-down key to switch stations. Typically, the handoff speed is controlled within 500ms, so that the user operational experience is at a premium. This can perform the handover function within 500ms, which we call fast handover (FCC) function.
The embodiment of the application aims at effectively realizing the function of the fast switching station (FCC) under the single-channel hardware decoder aiming at the live program, analyzes the time influence elements of each stage of the switching station, processes the time influence elements through a series of special technologies so as to reduce the hardware cost for realizing the function of the fast switching station (FCC), thereby realizing the purpose of reducing the working power consumption, providing efficiency, saving time and finally achieving the purpose of saving resources.
Specifically, the embodiment of the application aims at how to realize the effective fast switching station (FCC) function of a live program under a single-channel hardware decoder, analyzes time influence elements of each stage of the switching station, and effectively realizes the fast switching station (FCC) function under the single-channel hardware decoder through a series of technical steps of software identification, annular cache of latest I, B, P frame data of multiple channels of programs, audio and video pre-synchronization storage and discarding and the like. The hardware cost for realizing the fast switching station (FCC) function is reduced, and the working power consumption is reduced. The technology also has better platform applicability.
Firstly, analyzing time influence factors of each stage of switching station:
for example, referring to fig. 1, the action phase time course of a typical handover station includes the following:
1. finding out basic information of a switching target program, such as frequency, a Packet Identifier (PID) of an audio and video identification code, and the like;
the time spent for this process: in milliseconds, i.e., substantially without time consumption.
2. Judging whether the programs to be switched (namely the program before and the program after the program played currently) in the program list are at the same frequency as the program played currently, and if not, locking the frequency; if yes, the program to be switched and the currently played program are on the same frequency, and frequency locking is not needed again.
The time spent for this process: 200ms level;
for example, the frequency locking is exemplified by programs center 1, 2, 3, 4, 5 … …; frequency locking means locking a frequency so that a signal at that frequency can be transmitted in.
One frequency bandwidth is, for example, 8M, and generally includes 4 to 8 programs; for example, a frequency of 350Mhz, which means that the center frequency is 350Mhz, it may contain 1-4 programs in the center; the frequency of 358Mhz may include the programs of 5-8 stations in the center;
if the user is currently looking at center 1 station, then the frequency of machine lock must be 350 Mhz; if one wants to look at the center 6 stations, one must first lock in the frequency of 358 Mhz.
3. Setting audio and video PID parameters, filtering, and waiting for the arrival of the first I frame after switching the channel (namely switching the currently played program);
the time spent for this process: 400- > 1500ms, depending on the program I frame interval and the contingency of the switching station opportunity.
4. Audio and video synchronization;
the time spent for this process: 300-;
5. hardware decoding of audio and video data;
the time spent for this process: 20ms level;
6. finally outputting and presenting the decoded image and sound;
the time spent for this process: on the order of 10 ms.
In video coding, for efficient compression and transmission of data, a changing image is encoded and compressed into I, B, and P frame data. The different classes of frames are roughly case and distinct as follows:
the I frame is characterized in that the I frame is a full-frame compression coding frame. It carries on compression coding and transmission to the whole frame image information; when decoding, only the data of the I frame can be used for reconstructing a complete image;
p frame and B frame, I frame is used as reference frame to predict and code the dynamic change part different from I frame (background). In short, it only contains the image content that has changed with respect to the previous frame to be encoded. Are local and only the content of the changes is described.
From the above analysis, the time-consuming process mainly includes: locking frequency, filtering data, waiting for I frame arrival, and synchronizing audio and video.
Based on the above analysis, referring to fig. 2, the overall implementation flow of the technical solution provided by the embodiment of the present application includes the following steps:
1. a program management list is established.
Wherein the program sequence in the program management list is consistent with the program sequence seen by a user on a User Interface (UI);
2. when a user watches a program which is played currently, the background executes the following flow steps:
2-A: acquiring next program information and previous program information of a currently played program in a program management list;
wherein, the next program information comprises the frequency, audio and video PID and the like of the next program; the last program information comprises the frequency, audio and video PID and the like of the last program;
2-B: if the program to be switched (namely the next program and the last program) is not at the same frequency point as the currently played program, locking the frequency point of the program to be switched by using a Tuner (Tuner); the method specifically comprises the following steps:
the next program information of the currently played program is taken out, and whether the next program and the currently played program are at the same frequency point is judged; if not, the other tuner is used to lock the frequency point of the next program.
The last program information of the currently played program is taken out, and whether the last program and the currently played program are at the same frequency point is judged; if not, the other tuner is used to lock the frequency point of the 'last' program.
2-C: respectively carrying out continuous filtration of audio and video data on programs to be switched (namely the next program and the last program), respectively transmitting the filtered data of each program to a rapid switching and playing preprocessing module, and setting the working state of the rapid switching and playing preprocessing module to be a rapid switching preprocessing state;
wherein, the audio and video data of each program has different PID; the audio data and video data of each program can be filtered out by this PID. Filtering the obtained data, including audio data and video data of each program; a program contains a set of audio data and a set of video data. Step 2-C specifically includes:
continuously filtering audio and video data of the previous program, and transmitting the audio data and the video data obtained by filtering the previous program to a rapid switching and playing preprocessing module corresponding to the previous program; setting the working state of the fast switching and playing preprocessing module as a fast switching preprocessing state;
continuously filtering audio and video data of the next program, and transmitting the audio data and the video data obtained by filtering the next program to a rapid switching and playing preprocessing module corresponding to the next program; and setting the working state of the fast switching and playing preprocessing module as a fast switching preprocessing state.
Wherein each program contains its own set of audio data and its own set of video data. For a program, there is a separate fast switching and play pre-processing module to process the video and audio of the program.
As can be seen from the above steps 2-a and 2-B, 3 programs need to be processed simultaneously, so that there are 3 different fast switching and playing pre-processing modules corresponding to each program.
3. When the user presses the up-down key of the remote controller to switch the station, the program index of the switched target program (namely the previous program or the next program) is determined.
The switched target program is one of the programs to be switched.
4. And according to the program index of the target program, taking out the stored image I frame, each B frame and P frame and the audio frame packet synchronized with the last (or latest) frame image from the corresponding quick switching and playing preprocessing module of the target program.
5. And rapidly filling the image I frame and each B frame and P frame of the target program into a video data hardware decoder, and filling the audio frame data synchronized with the last frame image into an audio data hardware decoder.
Wherein since the audio frame synchronized with the last frame image is the last frame audio packet and new audio packets to come next thereto are temporally continuous, it is possible to make the sound continuous without skipping.
6. And outputting the image of the target program decoded by the video data hardware decoder and the sound of the target program decoded by the audio data hardware decoder.
At this time, the target program has been switched to the currently played program.
7. And switching the working state of the fast switching and playing preprocessing module of the currently played program to be a playing state, so that the image and sound data of the currently played program are not preprocessed any more, are continuously and directly sent to a video data hardware decoder and an audio data hardware decoder, and are directly decoded and output images and sounds.
Wherein the pretreatment, i.e., the step in the large outline in fig. 2, includes the above-mentioned steps 3 to 6.
To sum up, the technical solution provided in the embodiment of the present application includes the following contents:
1. and when watching the currently played program, the background locks the next and/or previous program frequency point in advance, and filters data and enters a program fast switching preprocessing module. This saves about 200ms of time required for frequency locking.
2. In the program fast switching preprocessing module of one path of program, under the working state of fast switching:
2-1), the video processing only buffers the latest I frame of one frame and the subsequent B and P frames; because, for live programs, what the user needs to see after switching stations is the latest and most real-time image. Therefore, the user can be guaranteed to see the latest real-time image after switching the channel. The function of storing B and P frames is to quickly send the I frame and each B and P frame to a video data hardware decoder after a user switches a station, so that the decoded images are overlapped, mosaic cannot appear, and the user sees the latest real-time image. And only one frame of I frame, followed by B, P frames of undecoded compressed video frames, requires a small amount of storage space.
This saves about 400-1500ms required to wait for an I frame.
2-2), the audio processing only stores one frame of audio packet data of the program to be switched (i.e. the next program which can be played, i.e. the program which is the last program or the next program of the currently played program in the program list). By continuously comparing the time stamps of the latest video frame of the program to be switched, only one frame of audio packet (namely the latest audio packet) data corresponding to the latest video frame synchronized with the program to be switched is stored, so that the latest and most real-time sound is ensured, and the audio and video synchronization is also ensured. And only one frame of the audio non-decoded compressed frame is stored, and only little storage space is needed.
Here, the time of about 300-800ms required for audio and video synchronization can be saved.
3. The fast switching and playing preprocessing module has two working states, namely a fast switching preprocessing state and a playing state; in the playing state, all live broadcast real-time data are directly injected into the corresponding audio/video data decoder without being preprocessed. This makes it easy and simple to switch between the pre-processing state and the play state quickly.
4. The video and audio preprocessing algorithm of one path of program is simple, the related data buffer area is few, and an audio and video data hardware decoder is multiplexed. Therefore, the rapid switching pretreatment of a plurality of programs can be simply expanded, so that the programs can be rapidly switched by the program up-down switching key or the number key of the remote controller.
In summary, referring to fig. 3, a program switching method provided in an embodiment of the present application includes:
s101, determining a switched target program according to a user instruction;
s102, respectively sending pre-stored audio data and video data of the target program to an audio data hardware decoder and a video data hardware decoder;
and S103, outputting the image decoded by the video data hardware decoder and the sound decoded by the audio data hardware decoder.
By the method, the pre-stored audio data and video data of the target program are respectively sent to an audio data hardware decoder and a video data hardware decoder; and outputting the image decoded by the video data hardware decoder and the sound decoded by the audio data hardware decoder, thereby realizing rapid program switching, reducing the hardware cost required by program switching and the power consumption of the terminal, and saving resources.
Optionally, the target program belongs to a program to be switched, and the method further includes the following steps of pre-storing audio data and video data of the program to be switched:
acquiring information of a program to be switched;
and filtering the program to be switched according to the information of the program to be switched to obtain the audio data and the video data of the program to be switched.
Optionally, the method further comprises:
and judging whether the frequency of the program to be switched needs to be locked or not according to the information of the program to be switched.
Thus, the time required for frequency locking can be saved.
Optionally, the program to be switched includes: the program management list is preset to show the program which is the last program and the next program of the program which is currently played.
Optionally, after obtaining the audio data and the video data of the program to be switched, the method further includes:
and sending the audio data and the video data of the program to be switched to a rapid switching and playing preprocessing module corresponding to the program to be switched, and setting the working state of the rapid switching and playing preprocessing module to be a rapid switching preprocessing state.
Optionally, the sending the pre-stored audio data and video data of the target program to an audio data hardware decoder and a video data hardware decoder respectively includes:
and respectively sending the audio data and the video data in the fast switching and playing preprocessing module corresponding to the target program to an audio data hardware decoder and a video data hardware decoder.
Optionally, after the audio data and the video data in the fast switching and playing preprocessing module corresponding to the target program are respectively sent to an audio data hardware decoder and a video data hardware decoder, the method further includes:
setting the working state of a fast switching and playing preprocessing module corresponding to the target program as a playing state;
and directly sending the video data and the audio data of the program corresponding to the fast switching and playing preprocessing module in the playing state to a video data hardware decoder and an audio data hardware decoder respectively for decoding and outputting.
Therefore, in the application, the fast switching and playing preprocessing module corresponding to each program to be switched has two working states, namely a fast switching preprocessing state and a playing state; in the playing state, all live broadcast real-time data are directly injected into the audio and video data decoder without preprocessing, so that the switching between the preprocessing working state and the playing working state is simple and easy.
In addition, it can be seen that, in the embodiment of the present application, based on the respective corresponding fast switching of each program to be switched and the switching of the working state of the play preprocessing module, each program can multiplex one audio/video data hardware decoder, so that the program switching can be realized only by a single audio/video data decoder. Therefore, the rapid switching pretreatment of a plurality of programs can be simply expanded, so that the programs can be rapidly switched by the program up-down switching key or the number key of the remote controller.
Alternatively,
the audio data of the program to be switched comprises audio data synchronous with the latest frame of image of the program to be switched;
the video data of the program to be switched comprises I frame data of the latest frame of image of the program to be switched, and B frame data and P frame data after the I frame data.
Since only one frame I frame and the B, P frames following it are stored as undecoded compressed frames, less storage space is required and storage space is saved.
And only one frame of audio packet (namely, the latest audio packet) data corresponding to the latest video frame synchronized with the program to be switched is stored, so that the latest and most real-time sound is ensured, the audio and video synchronization is also ensured, and the time required by the audio and video synchronization can be further saved.
Referring to fig. 4, another embodiment of the present application provides a program switching apparatus, which includes a memory 11 and a processor 12, where the memory 11 is configured to store program instructions, and the processor 12 is configured to call the program instructions stored in the memory 11, and execute, according to an obtained program:
determining a switched target program according to a user instruction;
respectively sending the audio data and the video data of the target program which are stored in advance to an audio data hardware decoder and a video data hardware decoder;
and outputting the image decoded by the video data hardware decoder and the sound decoded by the audio data hardware decoder.
Optionally, the target program belongs to a program to be switched, and the processor 12 is further configured to call a program instruction stored in the memory 11, and execute the following steps of pre-storing audio data and video data of the program to be switched according to the obtained program:
acquiring information of a program to be switched;
and filtering the program to be switched according to the information of the program to be switched to obtain the audio data and the video data of the program to be switched.
Optionally, the processor 12 is further configured to call the program instruction stored in the memory 11, and execute, according to the obtained program:
and judging whether the frequency of the program to be switched needs to be locked or not according to the information of the program to be switched.
Optionally, the program to be switched includes: the program management list is preset to show the program which is the last program and the next program of the program which is currently played.
Optionally, after obtaining the audio data and the video data of the program to be switched, the processor 12 is further configured to call the program instruction stored in the memory 11, and execute, according to the obtained program:
and sending the audio data and the video data of the program to be switched to a rapid switching and playing preprocessing module corresponding to the program to be switched, and setting the working state of the rapid switching and playing preprocessing module to be a rapid switching preprocessing state.
Optionally, the sending the pre-stored audio data and video data of the target program to an audio data hardware decoder and a video data hardware decoder respectively includes:
and respectively sending the audio data and the video data in the fast switching and playing preprocessing module corresponding to the target program to an audio data hardware decoder and a video data hardware decoder.
Optionally, after the audio data and the video data in the fast switching and playing preprocessing module corresponding to the target program are respectively sent to an audio data hardware decoder and a video data hardware decoder, the processor 12 is further configured to call the program instruction stored in the memory 11, and execute according to the obtained program:
setting the working state of a fast switching and playing preprocessing module corresponding to the target program as a playing state;
and directly sending the video data and the audio data of the program corresponding to the fast switching and playing preprocessing module in the playing state to a video data hardware decoder and an audio data hardware decoder respectively for decoding and outputting.
Alternatively,
the audio data of the program to be switched comprises audio data synchronous with the latest frame of image of the program to be switched;
the video data of the program to be switched comprises I frame data of the latest frame of image of the program to be switched, and B frame data and P frame data after the I frame data.
It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation. In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The device provided by the embodiment of the application can be a desktop computer, a portable computer, a smart phone, a tablet computer, a mobile phone, a television, a set-top box, a Personal Digital Assistant (PDA) and the like. The apparatus may include a Central Processing Unit (CPU), a memory, an input/output device, etc., the input device may include a keyboard, a mouse, a touch screen, a remote controller, etc., and the output device may include a Display device, such as a Liquid Crystal Display (LCD), a Cathode Ray Tube (CRT), etc.
The memory may include Read Only Memory (ROM) and Random Access Memory (RAM), and provides the processor with program instructions and data stored in the memory. In the embodiments of the present application, the memory may be used for storing a program of any one of the methods provided by the embodiments of the present application.
The processor is used for executing any one of the methods provided by the embodiment of the application according to the obtained program instructions by calling the program instructions stored in the memory.
Embodiments of the present application provide a computer storage medium for storing computer program instructions for an apparatus provided in the embodiments of the present application, which includes a program for executing any one of the methods provided in the embodiments of the present application.
The computer storage media may be any available media or data storage device that can be accessed by a computer, including, but not limited to, magnetic memory (e.g., floppy disks, hard disks, magnetic tape, magneto-optical disks (MOs), etc.), optical memory (e.g., CDs, DVDs, BDs, HVDs, etc.), and semiconductor memory (e.g., ROMs, EPROMs, EEPROMs, non-volatile memory (NAND FLASH), Solid State Disks (SSDs)), etc.
The above method process flow may be implemented by a software program, which may be stored in a storage medium, and when the stored software program is called, the above method steps are performed.
To sum up, the technical solution provided in the embodiment of the present application analyzes time-affecting elements at each stage of a handover stage for how to implement an FCC function under a single-channel hardware decoder, and implements the FCC function through the following procedures:
1. when watching the program played currently, the background pre-locks the frequency of a plurality of possible switching target programs (i.e. programs to be switched) so as to save the frequency locking time during switching.
2. Through the fast switching and playing preprocessing module, video data is not decoded, software is carried out to identify an I frame, a B frame and a P frame, and only the I frame of the latest frame image and the B frame and the P frame data after the I frame of the latest frame image are refreshed. Thus, the time required to wait for the I frame of the target program is saved.
3. Through the fast switching and playing preprocessing module, the audio data of the program to be switched are not decoded, and only one frame of audio data which is synchronous with the current latest video frame of the program to be switched is refreshed according to the timestamp continuously. Therefore, the time for waiting for the audio and video synchronization of the program to be switched is saved.
4. The fast switching preprocessing and the normal playing processing of the fast switching and playing preprocessing module are realized through two working states of fast switching preprocessing and normal playing.
Therefore, the embodiment of the application identifies the category and the characteristic of the audio and video data packet in advance by using software, and not only saves time, but also realizes the FCC function under a single-path hardware decoder by using a special rapid switching and playing preprocessing module. The method has the obvious advantages of low hardware cost, low power consumption, easy expansion, high efficiency and the like.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.
Claims (10)
1. A method for switching programs, the method comprising:
determining a switched target program according to a user instruction;
respectively sending the audio data and the video data of the target program which are stored in advance to an audio data hardware decoder and a video data hardware decoder;
and outputting the image decoded by the video data hardware decoder and the sound decoded by the audio data hardware decoder.
2. The method of claim 1, wherein the target program belongs to a program to be switched, the method further comprising the step of pre-storing audio data and video data of the program to be switched as follows:
acquiring information of a program to be switched;
and filtering the program to be switched according to the information of the program to be switched to obtain the audio data and the video data of the program to be switched.
3. The method of claim 2, further comprising:
and judging whether the frequency of the program to be switched needs to be locked or not according to the information of the program to be switched.
4. The method according to claim 2 or 3, wherein the program to be switched comprises: the program management list is preset to show the program which is the last program and the next program of the program which is currently played.
5. The method of claim 2, wherein after obtaining the audio data and the video data of the program to be switched, the method further comprises:
and sending the audio data and the video data of the program to be switched to a rapid switching and playing preprocessing module corresponding to the program to be switched, and setting the working state of the rapid switching and playing preprocessing module to be a rapid switching preprocessing state.
6. The method according to claim 5, wherein the sending the pre-stored audio data and video data of the target program to an audio data hardware decoder and a video data hardware decoder respectively comprises:
and respectively sending the audio data and the video data in the fast switching and playing preprocessing module corresponding to the target program to an audio data hardware decoder and a video data hardware decoder.
7. The method of claim 6, wherein after sending the audio data and the video data in the fast switch and play preprocessing module corresponding to the target program to the audio data hardware decoder and the video data hardware decoder, respectively, the method further comprises:
setting the working state of a fast switching and playing preprocessing module corresponding to the target program as a playing state;
and directly sending the video data and the audio data of the program corresponding to the fast switching and playing preprocessing module in the playing state to a video data hardware decoder and an audio data hardware decoder respectively for decoding and outputting.
8. The method according to claim 2 or 3,
the audio data of the program to be switched comprises audio data synchronous with the latest frame of image of the program to be switched;
the video data of the program to be switched comprises I frame data of the latest frame of image of the program to be switched, and B frame data and P frame data after the I frame data.
9. A program switching apparatus, comprising:
a memory for storing program instructions;
a processor for calling program instructions stored in said memory to execute the method of any one of claims 1 to 8 in accordance with the obtained program.
10. A computer storage medium having stored thereon computer-executable instructions for causing a computer to perform the method of any one of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911252282.3A CN113038150B (en) | 2019-12-09 | 2019-12-09 | Program switching method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911252282.3A CN113038150B (en) | 2019-12-09 | 2019-12-09 | Program switching method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113038150A true CN113038150A (en) | 2021-06-25 |
CN113038150B CN113038150B (en) | 2023-09-12 |
Family
ID=76452002
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911252282.3A Active CN113038150B (en) | 2019-12-09 | 2019-12-09 | Program switching method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113038150B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114866823A (en) * | 2022-04-02 | 2022-08-05 | 北京广播电视台 | Ultra-high-definition video broadcasting system and method with logic linkage function |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102883208A (en) * | 2012-09-27 | 2013-01-16 | 深圳市九洲电器有限公司 | Method and system for quickly changing programs |
WO2015116164A1 (en) * | 2014-01-31 | 2015-08-06 | Thomson Licensing | Method and apparatus for synchronizing playbacks at two electronic devices |
WO2016045209A1 (en) * | 2014-09-28 | 2016-03-31 | 深圳国微技术有限公司 | Program switching method, device and terminal |
CN105898552A (en) * | 2016-06-20 | 2016-08-24 | 深圳创维数字技术有限公司 | Method and device for playing video data |
CN106658162A (en) * | 2015-11-03 | 2017-05-10 | 中兴通讯股份有限公司 | Channel changing method, channel changing device and set-top box |
US20170374421A1 (en) * | 2016-06-22 | 2017-12-28 | Electronics And Telecommunications Research Institute | Apparatus for transmitting and receiving dynamic multi-mode service and method for providing the same |
CN107645671A (en) * | 2016-07-22 | 2018-01-30 | 南京中兴新软件有限责任公司 | Program switching method and device |
CN108289240A (en) * | 2018-01-30 | 2018-07-17 | 深圳创维数字技术有限公司 | Method, terminal and the computer-readable medium of DTV fast channel switching |
CN108566526A (en) * | 2018-04-16 | 2018-09-21 | 青岛海信宽带多媒体技术有限公司 | A kind of program broadcasting method, device and set-top box |
US20180332148A1 (en) * | 2014-12-05 | 2018-11-15 | Lg Electronics Inc. | Apparatus for transmitting broadcast signal, apparatus for receiving broadcast signal, method for transmitting broadcast signal and method for receiving broadcast signal |
-
2019
- 2019-12-09 CN CN201911252282.3A patent/CN113038150B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102883208A (en) * | 2012-09-27 | 2013-01-16 | 深圳市九洲电器有限公司 | Method and system for quickly changing programs |
WO2015116164A1 (en) * | 2014-01-31 | 2015-08-06 | Thomson Licensing | Method and apparatus for synchronizing playbacks at two electronic devices |
WO2016045209A1 (en) * | 2014-09-28 | 2016-03-31 | 深圳国微技术有限公司 | Program switching method, device and terminal |
US20180332148A1 (en) * | 2014-12-05 | 2018-11-15 | Lg Electronics Inc. | Apparatus for transmitting broadcast signal, apparatus for receiving broadcast signal, method for transmitting broadcast signal and method for receiving broadcast signal |
CN106658162A (en) * | 2015-11-03 | 2017-05-10 | 中兴通讯股份有限公司 | Channel changing method, channel changing device and set-top box |
CN105898552A (en) * | 2016-06-20 | 2016-08-24 | 深圳创维数字技术有限公司 | Method and device for playing video data |
WO2017219870A1 (en) * | 2016-06-20 | 2017-12-28 | 深圳创维数字技术有限公司 | Method and device for playing video data |
US20170374421A1 (en) * | 2016-06-22 | 2017-12-28 | Electronics And Telecommunications Research Institute | Apparatus for transmitting and receiving dynamic multi-mode service and method for providing the same |
CN107645671A (en) * | 2016-07-22 | 2018-01-30 | 南京中兴新软件有限责任公司 | Program switching method and device |
CN108289240A (en) * | 2018-01-30 | 2018-07-17 | 深圳创维数字技术有限公司 | Method, terminal and the computer-readable medium of DTV fast channel switching |
CN108566526A (en) * | 2018-04-16 | 2018-09-21 | 青岛海信宽带多媒体技术有限公司 | A kind of program broadcasting method, device and set-top box |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114866823A (en) * | 2022-04-02 | 2022-08-05 | 北京广播电视台 | Ultra-high-definition video broadcasting system and method with logic linkage function |
Also Published As
Publication number | Publication date |
---|---|
CN113038150B (en) | 2023-09-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109168078B (en) | Video definition switching method and device | |
US11930197B2 (en) | Video decoding method and apparatus, computer device, and storage medium | |
CN103347220B (en) | A kind of method and device reviewing live file | |
CN105979347A (en) | Video play method and device | |
CN107683605B (en) | Encoding device, decoding device, and transmission control method | |
EP3697088A1 (en) | Video sending and receiving method, device, and terminal | |
CN102685554A (en) | Method and device for processing video play | |
CN109379619B (en) | Sound and picture synchronization method and device | |
CN102006511A (en) | Method and device for looking back live program and terminal | |
CN111836076A (en) | Video resolution switching method and device and electronic equipment | |
CN109348285A (en) | Channel switching method and device | |
CN1223032A (en) | Program selection system for digital TV receiver | |
WO2021206814A1 (en) | Content-modification system with feature for detecting and responding to a content modification by a tuner device | |
CN106791994A (en) | A kind of low delay quickly starts broadcasting method and device | |
WO2019090658A1 (en) | Method and device for playing television programs | |
CN114567812A (en) | Audio playing method, device, system, electronic equipment and storage medium | |
CN113225585A (en) | Video definition switching method and device, electronic equipment and storage medium | |
CN113038150A (en) | Program switching method and device | |
WO2020247838A1 (en) | Content-modification system with technical characteristic-based selection feature | |
CN1960450A (en) | Method and device for switching channels of multimedia broadcast | |
US20140013362A1 (en) | Method for implementing digital television technology and wireless fidelity hot spot apparatus | |
CN103200458A (en) | Television program message display method and user equipment | |
CN113259729B (en) | Data switching method, server, system and storage medium | |
KR20120019754A (en) | Receiving system for digital braoadcasting using ultrea high definition module | |
CN113507639A (en) | Channel fast switching method, player and readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |