Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be described below with reference to the drawings in the embodiment of the present invention.
First, terms of embodiments of the present invention are explained.
Code stream (Data Rate): the video coding method refers to the data flow used by the content expressed in unit time of the coded video, also called code rate, and the larger the code stream is, the better the picture quality of the video is. The code stream type is a type obtained by dividing the code stream according to the size difference of the code stream.
The following describes a video screen projection playing method according to an embodiment of the present invention.
The video screen projection playing method provided by the embodiment of the invention can be applied to first equipment with a video projection function. The first device may specifically be the electronic device itself, or may be a client installed in the electronic device and related to the screen projection playing. And, the client regarding the screen-cast play may be various. For example, video APP (Application), live APP, social APP, and the like, which enable screen-casting play, may be used. For convenience of description, the first device is used for description in the following. In addition, the electronic device serving as the first device may specifically include a desktop computer, a portable computer, an internet television, an intelligent mobile terminal, a wearable intelligent terminal, a server, and the like. Without limitation, any electronic device that can implement the embodiments of the present invention falls within the scope of the embodiments of the present invention.
As shown in fig. 1, a flow of a video screen projection playing method according to an embodiment of the present invention may include:
s101, acquiring designated equipment parameters of second equipment serving as a screen projection receiver; and the specified device parameter is a device parameter which influences the code stream type supported by the second device.
Different second devices have different device parameters, and the specified device parameter of the second device is a device parameter that affects the code stream type supported by the second device. Therefore, in order to be able to acquire the codestream types supported by the second device in the subsequent step S102, it is necessary to acquire the specified device parameters of the second device as the screen projection receiver. In a specific application, at least one of a hardware performance of the second device and an operating system of the second device may generally affect a code stream type supported by the second device, and for this reason, in an optional implementation, the specified device parameter of the second device serving as the screen projection receiver may include:
device model, and/or version information of the operating system.
The device model of the second device is a device parameter which influences the hardware performance of the second device; the version information of the operating system of the second device is a device parameter that affects the operating system of the second device.
Furthermore, the designated device parameter of the second device may be acquired in various manners. For example, when the first device locally stores the specified device parameters of the second device as the screen projection receiver, the first device may directly read the stored specified device parameters. Or, for example, when the first device does not locally store the specified device parameters of the second device as the screen projection receiver, the first device may request the specified device parameters of the second device from the second device as the screen projection receiver according to a digital living network alliance DLNA protocol; and further receiving the designated device parameters returned by the second device according to the DLNA protocol. In addition, the DLNA protocol may also be used to transmit and project the video to be projected in the subsequent step S104. Any method for acquiring the specified device parameter of the second device may be used in the present invention, which is not limited in this embodiment.
S102, acquiring a mapping relation between a designated device parameter and an alternative code stream type; the alternative code stream type is a code stream type supported by the device with the specified device parameter.
In a specific application, the code stream types supported by the device with the specified device parameters are as follows: the number of the alternative code stream types can be one or more. When the number of the candidate code stream types is multiple, the candidate code stream types may be a code stream list. The mapping relationship between the specified device parameter and the candidate code stream type may be specifically a corresponding relationship table between the specified device parameter and the candidate code stream type, or a pointer relationship between the specified device parameter and the candidate code stream type, or the like. Any mapping relation between the specified device parameter and the candidate code stream type can be used in the present invention, and this embodiment does not limit this.
Moreover, the obtaining manner of the mapping relationship between the specified device parameter and the candidate code stream type may be various. For example, when the first device locally stores the mapping relationship between the specified device parameter and the candidate codestream type, the first device may locally read the mapping relationship from the first device. Or, for example, the first device may send a data request to the server, so that the server returns a mapping relationship corresponding to the data request; the data request is used for requesting the mapping relation between the specified equipment parameter and the alternative code stream type. For the sake of reasonable layout and easy understanding, the following description of the second exemplary embodiment of the present invention is specifically provided in fig. 2 and fig. 3.
And S103, selecting the code stream type from the acquired mapping relation as a target code stream type.
In a specific application, the code stream type is selected from the obtained mapping relationship, and the mode of the code stream type as the target code stream type can be various. Illustratively, when the number of the candidate code stream types in the obtained mapping relationship is one, the candidate code stream type may be selected as the target code stream type. Or, for example, when the number of the candidate code stream types in the obtained mapping relationship is multiple, the code stream type meeting the preset selection rule may be selected from the obtained mapping relationship as the target code stream type. The preset selection rule may be various. For example, the preset selection rule may be to select any one of the alternative code stream types as the target code stream type; or, the preset selection rule can be a code stream type established by a popularization strategy; or, the preset selection rule may be to select a code stream type with the highest code stream level in the obtained mapping relationship. The code stream level is obtained by dividing according to the difference of video definition indicated by the code stream type, and the higher the indicated video definition is, the higher the code stream level is. And the code stream type with the highest code stream level is used as the target code stream type, so that the video definition can be improved.
Also, the codestream types may specifically include 360P, 480P, 720P, 1080P, 4K,1080PHDR, 4KHDR, and the like. On this basis, different alternative code stream types can exist in the mapping relation between the designated device parameters and the alternative code stream types to which the different designated device parameters belong. For example, in the mapping relationship between the specified device parameter S1 and the candidate code stream types, the candidate code stream types may include 360P, 480P, 720P, and 1080P; in the mapping relationship between the specified device parameter S1 and the candidate code stream types, the candidate code stream types may include 360P, 480P, 720P, 1080P, 4K, and the like.
And S104, providing the video to be projected belonging to the target code stream type to the second equipment.
In a specific application, the specific manner of providing the video to be projected belonging to the target code stream type to the second device may be various. For example, when the video to be projected belonging to the target code stream type is a video file stored locally on the first device, the first device may transmit the video to be projected stored locally on the first device to the second device. Or, for example, when the video to be projected belonging to the target code stream type is not stored locally in the first device, the first device may send a video acquisition request for acquiring the video to be projected belonging to the target code stream type to the server, so that the server returns the video to be projected itself or an acquisition address of the video to be projected, for example, an address such as a uniform resource locator of the video to be projected; and then the first device provides the received video to be projected or the acquired address of the video to be projected to the second device.
And when the first device provides the video to be projected belonging to the target code stream type to the second device, if the first device provides the video to be projected, the second device can play the received video to be projected, or if the first device provides the acquisition address of the video to be projected, the second device can acquire the video to be projected according to the acquisition address, and then play the acquired video to be projected.
In addition, the second device may be various. By way of example, the second device may be an internet television, a portable computer, a mobile terminal, a projector, a wearable device, and so forth. Any electronic device having a video projection function may be used as the second device of the present invention, and this embodiment is not limited thereto.
In the scheme provided by the embodiment of the invention, the mapping relation is the mapping relation between the specified equipment parameter and the alternative code stream type, and the alternative code stream type is the code stream type supported by the equipment with the specified equipment parameter. Therefore, after the mapping relationship is obtained, the code stream type is selected from the obtained mapping relationship and is used as the target code stream type, and the video to be projected belonging to the target code stream type is provided for the second device, so that when the video to be projected provided by the second device is projected and played on the screen of the first device, the code stream type of the video to be projected is the code stream type supported by the second device. Therefore, the situation that the first device provides the video to be projected belonging to the code stream type which is not supported by the second device can be relatively reduced, and the failure times of video screen projection playing caused by the fact that the second device does not support the code stream type can be reduced. Therefore, the failure rate of video screen projection playing can be reduced through the scheme.
In an optional implementation manner, the video screen-projection playing method provided in the embodiment of the present invention may further include the following steps:
when the obtaining mode of the mapping relation is a mode obtained from the first equipment locally and the mapping relation stored locally in the first equipment meets a preset expiration condition, sending a data request to a server; the data request is used for requesting a mapping relation between a designated device parameter and an alternative code stream type;
receiving a mapping relation fed back by a server;
and updating the mapping relation locally stored by the first equipment by using the received mapping relation.
In a specific application, there may be an upgrade of at least one of hardware and an operating system of the second device, and/or an upgrade of a coding technique and the like related to the code stream type, so that the code stream type that can be supported by the second device is changed. In this regard, in order to ensure that the target bitstream type selected from the obtained mapping relationship is applicable to the upgrade situation regarding the bitstream type, the mapping relationship may be periodically updated. Specifically, when the obtaining manner of the mapping relationship is a manner obtained locally from the first device and the mapping relationship stored locally by the first device meets a preset expiration condition, the first device may update the mapping relationship stored locally by the first device.
The preset expiration condition may be various. For example, the preset expiration condition may be a preset update period, and when the first device detects that the storage duration of the locally stored mapping relationship obtains the preset update period, it may be determined that the mapping relationship meets the preset expiration condition. Alternatively, the preset expiration condition may be that the first device receives a notification about upgrading of at least one of hardware and an operating system of the second device, and/or that the first device receives a notification about upgrading of a code stream type, such as upgrading of a coding technology, and it may be determined that the mapping relationship satisfies the preset expiration condition.
As shown in fig. 2, a flow of a video screen projection playing method according to another embodiment of the present invention may include:
s201, acquiring designated equipment parameters of second equipment serving as a screen projection receiver; and the specified device parameter is a device parameter which influences the code stream type supported by the second device.
S202, acquiring a mapping relation between the designated equipment parameter and the alternative code stream type; the alternative code stream type is a code stream type supported by the equipment with the specified equipment parameter.
S203, selecting the code stream type from the acquired mapping relation as the target code stream type.
And S204, providing the video to be projected belonging to the target code stream type to the second equipment.
The above steps S201 to S204 are the same as steps S101 to S104 in the embodiment of fig. 1 of the present invention, and are not repeated herein, for details, see the description of the embodiment of fig. 1 of the present invention.
S205, when detecting that the screen-projecting playing of the video to be screen-projected is abnormal, sending a data request to a server, wherein the data request is used for requesting the mapping relation between the designated equipment parameter and the alternative code stream type.
And S206, receiving the mapping relation fed back by the server.
S207, selecting an alternative code stream type from the received mapping relation, and providing the video to be projected belonging to the selected alternative code stream type to the second device.
In a specific application, there may be a case that a code stream type which can be supported by the second device is updated, but a mapping relation between a parameter of the specified device and an alternative code stream type cannot be updated in time according to the update, so that when a video to be screen-projected which belongs to a target code stream type is provided to the second device, a screen-projected playing of the video to be screen-projected is abnormal. In order to further reduce the failure rate of video screen projection playing, when detecting that the screen projection playing of the video to be screen projected is abnormal, the first device may send a data request for requesting a mapping relationship between a specified device parameter and an alternative code stream type to the server, and further receive the mapping relationship fed back by the server. At this time, the received mapping relationship corresponds to the data request sent by the first device, and is a mapping relationship between the specified device parameter and the candidate code stream type. Therefore, the first device selects an alternative code stream type from the received mapping relation, provides the video to be screen-projected belonging to the selected alternative code stream type to the second device, and can reduce screen-projection playing failure by using the newly requested mapping relation.
For example, when the first device is a video playing application, the server may be a management server of the video playing application, and when the first device is a live broadcasting application, the server may be a management server of a live broadcasting system. Any server corresponding to the first device can be used in the present invention, and this embodiment does not limit this.
As shown in fig. 3, a flow of a video screen projection playing method according to another embodiment of the present invention may include:
s301, acquiring designated equipment parameters of second equipment serving as a screen projection receiver; and the specified device parameter is a device parameter which influences the code stream type supported by the second device.
S302, acquiring a mapping relation between the specified equipment parameters and the alternative code stream types; the alternative code stream type is a code stream type supported by the equipment with the specified equipment parameter.
S303, selecting the code stream type from the acquired mapping relation as the target code stream type.
S304, the video to be projected belonging to the target code stream type is provided for the second device.
The above steps S301 to S304 are the same as steps S101 to S104 in the embodiment of fig. 1 of the present invention, and are not repeated herein, for details, see the description of the embodiment of fig. 1 of the present invention.
S305, when the obtaining mode of the mapping relation is a mode obtained from the first device locally and the mapping relation is not obtained from the first device locally, sending a data request to a server, wherein the data request is used for requesting the mapping relation between the specified device parameter and the alternative code stream type.
In a specific application, when the obtaining manner of the mapping relationship is a manner of obtaining from the first device locally, if the first device does not store the mapping relationship locally, or if the second device with the specified device parameter is in communication connection with the first device for the first time, the first device does not store the mapping relationship corresponding to the second device locally, which may result in that the first device does not obtain the mapping relationship from the local. At this time, in order to acquire the mapping relationship, the first device may send a data request to the server. And the data request is used for requesting the mapping relation between the specified device parameter and the alternative code stream type.
S306, receiving the mapping relation fed back by the server.
S307, selecting an alternative code stream type from the received mapping relation, and providing the video to be projected belonging to the selected alternative code stream type to the second device.
S306 to S307 are the same steps as S206 to S207 in the embodiment of fig. 2 of the present invention, and are not repeated herein, for details, see the description of the embodiment of fig. 2 of the present invention.
The embodiment of fig. 3 is similar to the embodiment of fig. 2 of the present invention, and is different in that the embodiment of fig. 3 sends a data request to a server when the first device fails to obtain the mapping relationship from the local, so that the success rate of obtaining the mapping relationship is improved, and the success rate of video screen projection playing is further improved.
Optionally, when the obtaining manner of the mapping relationship is a manner of obtaining from the first device locally and the mapping relationship is not obtained from the first device locally, before the step of sending the data request to the server in the embodiment of fig. 2 or fig. 3 of the present invention, the video screen projection playing method provided in the embodiment of the present invention may further include the following steps:
providing a video to be screen-projected, which belongs to a code stream type selected by a user or a preset code stream type, to second equipment, and detecting whether screen-projection playing of the provided video to be screen-projected in the second equipment is abnormal;
and when detecting that the screen projection playing of the provided video to be projected is abnormal, executing a step of sending a data request to the server.
In a specific application, in order to reduce the delay of video screen projection playing caused by the delay of waiting for the first device to acquire the mapping relationship and improve the success rate of the video screen projection playing, when the acquisition mode of the mapping relationship is a mode locally acquired from the first device and the mapping relationship is not locally acquired, the first device may provide the video to be screen projected, which belongs to a code stream type selected by a user or a preset code stream type, to the second device, so that the second device performs screen projection playing.
And at this time, whether the screen-projecting playing of the provided video to be screen-projected by the second device is abnormal or not can be detected, and then the step of sending the data request to the server is executed when the screen-projecting playing of the provided video to be screen-projected is detected to be abnormal. For convenience of understanding, the following describes a specific way for detecting whether the screen-projected playing of the video to be screen-projected is abnormal in an alternative embodiment.
In an optional implementation manner, the detecting a manner of whether the screen-projection playing of the video to be screen-projected is abnormal may specifically include the following steps:
detecting whether a preset abnormal playing condition is met, and if so, judging that the screen-casting playing of the video to be subjected to screen casting on the second equipment is abnormal;
wherein the predetermined abnormal playing condition comprises at least one of the following conditions:
the second equipment acquires a video of the video to be projected, wherein the data volume of the video is smaller than a preset data volume threshold;
when the screen is projected and played, the staying time length of a screen projection operation page of the first equipment is less than a preset staying time length threshold value;
the playing time of the video to be projected in the second equipment is less than a preset playing time threshold;
the playing failure times of the video to be projected in the second equipment are larger than the threshold value of the preset times.
In a specific application, when the second device plays a video to be screen-projected which belongs to a code stream type that is not supported by the second device, it is likely that the video to be screen-projected acquires a smaller amount of data because the decoding is abnormal because the code stream type is not supported. Therefore, the predetermined abnormal playing condition may include that the video acquisition data amount of the video to be projected by the second device is smaller than a preset data amount threshold. The preset data amount threshold may be various. For example, the preset data amount threshold may be an average of relatively small request data amounts in the historical video request data amount of the first device during normal playing, or may be an average of the request data amounts multiplied by an adjustment coefficient. The adjustment factor may be set according to specific requirements to adjust the threshold.
And when the screen projection playing is carried out, the first device usually displays a screen projection operation page, so that a user can instruct the second device to execute the screen projection playing related operation through the screen projection operation page. When the second device does not support the code stream type of the screen-casting video, and the video playing is abnormal, the user is likely to quit the screen-casting operation page. Therefore, the predetermined abnormal playing condition may include that, during the screen-casting playing, the duration of the screen-casting operation page of the first device is less than the preset duration threshold. The preset stay time threshold may be various. For example, the preset stay time threshold may be an average of relatively short stay times in the historical stay time of the screen-casting operation page during normal playing, or may be an average of the stay times multiplied by an adjustment coefficient. The adjustment coefficient can be set according to specific requirements to adjust the preset stay time threshold.
Moreover, the abnormal to-be-screen-projected playing may be the video playing is stuck, the picture is abnormal, and the like, so that the user may directly end the screen projection playing, and at this time, the screen projection playing time of the video is relatively short. Therefore, the predetermined abnormal playing condition may include that the playing time of the video to be projected in the second device is less than the preset playing time threshold. The preset playing time threshold may be various. For example, the preset playing time length threshold may be an average of relatively short playing time lengths in the history playing time length in the normal playing, or may be an average of the playing time lengths multiplied by an adjustment coefficient. The adjustment coefficient can be set according to specific requirements to adjust the preset playing time threshold.
Moreover, when the second device does not support the code stream type of the screen-shot video, frequent playing failure is likely to be caused, and therefore, the predetermined playing abnormal condition may include that the playing failure frequency of the video to be screen-shot in the second device is greater than the predetermined frequency threshold. The playing failure times of the video to be projected on the screen in the second device can be recorded by the second device, or recorded by the first device, or recorded by the server.
In another optional embodiment, when the failure times are smaller than a preset failure time threshold, it may be detected whether other three predetermined abnormal playing conditions except the failure times are satisfied;
and if so, detecting that the to-be-projected-screen playing is abnormal.
In a specific application, when the second device does not support the stream type of the screen-shot video, it is likely that the screen-shot video has not failed, but the other three predetermined abnormal playing conditions except the failure times are satisfied, and therefore, it can be detected whether the other three predetermined abnormal playing conditions except the failure times are satisfied.
Compared with the abnormal playing when any one of the conditions is met, the abnormal playing is more likely to be caused by the fact that the second device does not support the code stream type of the video to be projected. Therefore, in a specific application, all of the four conditions can be used as preset abnormal playing conditions, and the four conditions are met if all the four conditions are met, so that the judgment accuracy is improved. Illustratively, when the screen-casting playing failure reaches 3 times and is greater than the predetermined threshold 2, the preset data volume of the video request for screen-casting playing is much less than 720P, the staying time of the screen-casting operation page is less than 2 minutes, and the playing time is less than 2 minutes, it may be determined that the screen-casting playing abnormality is detected.
And, the execution subject of detecting the screen projection playing abnormality of the provided video to be projected can be various. Illustratively, the execution subject may be the first device, or the execution subject may be a server. In the case of a server, the data related to the predetermined abnormal playing condition may be sent to the server by the device generating the data, or forwarded to the server by the first device, and the server sends the detection result to the first device. At this time, when the first device receives a detection result of the server about the screen projection play abnormality, the first device may determine that the screen projection play abnormality is detected.
Corresponding to the method embodiment, the embodiment of the invention also provides a video screen projection playing device.
As shown in fig. 4, a video projection playing apparatus provided in an embodiment of the present invention is applied to a first device with a video projection function, and the apparatus may include:
the deviceparameter acquiring module 401 is configured to acquire a specified device parameter of a second device serving as a screen projection receiver; the specified device parameter is a device parameter which affects the code stream type supported by the second device;
a mappingrelationship obtaining module 402, configured to obtain a mapping relationship between the specified device parameter and an alternative code stream type; the alternative code stream type is a code stream type supported by the equipment with the specified equipment parameter;
a code streamtype selecting module 403, configured to select a code stream type from the obtained mapping relationship, as a target code stream type;
and a videoscreen projection module 404, configured to provide the video to be screen projected, which belongs to the target code stream type, to the second device.
In the scheme provided by the embodiment of the invention, the mapping relation is the mapping relation between the specified equipment parameter and the alternative code stream type, and the alternative code stream type is the code stream type supported by the equipment with the specified equipment parameter. Therefore, after the mapping relationship is obtained, the code stream type is selected from the obtained mapping relationship and is used as the target code stream type, and the video to be projected belonging to the target code stream type is provided for the second device, so that when the video to be projected provided by the second device is projected and played on the screen of the first device, the code stream type of the video to be projected is the code stream type supported by the second device. Therefore, the situation that the first device provides the video to be projected belonging to the code stream type which is not supported by the second device can be relatively reduced, and the failure times of video screen projection playing caused by the fact that the second device does not support the code stream type can be reduced. Therefore, the failure rate of video screen projection playing can be reduced through the scheme.
Optionally, the mappingrelationship obtaining module 402 is further configured to:
when the abnormal screen projection playing of the video to be screen projected is detected, or when the acquiring mode of the mapping relation is a mode acquired locally from the first equipment and the mapping relation is not acquired locally, sending a data request to a server, wherein the data request is used for requesting the mapping relation between the designated equipment parameter and the alternative code stream type;
receiving a mapping relation fed back by the server;
and selecting an alternative code stream type from the received mapping relation, and providing the video to be projected belonging to the selected alternative code stream type to the second device.
Optionally, when the obtaining manner of the mapping relationship is a manner obtained locally from the first device and the mapping relationship is not obtained locally, before the mappingrelationship obtaining module 402 sends the data request to the server, the videoscreen projection module 404 provides the video to be screen projected, which belongs to the code stream type selected by the user or the preset code stream type, to the second device, and detects whether screen projection playing of the provided video to be screen projected in the second device is abnormal;
when detecting that the screen-projecting playing of the provided video to be screen-projected is abnormal, triggering the mappingrelation obtaining module 402 to execute the data sending request to the server.
Optionally, the mappingrelationship obtaining module 402 detects whether the screen projection playing of the video to be screen projected is abnormal, including:
detecting whether a preset abnormal playing condition is met, and if so, judging that the screen-casting playing of the video to be screen-cast on the second equipment is abnormal; wherein the predetermined abnormal playing condition comprises at least one of the following conditions:
the second equipment acquires a data volume of the video to be projected, which is smaller than a preset data volume threshold value;
when the screen is projected and played, the stay time of the screen projection operation page of the first equipment is less than a preset stay time threshold;
the playing time of the video to be projected in the second equipment is less than a preset playing time threshold;
the playing failure times of the video to be projected in the second equipment are larger than a preset time threshold value.
Optionally, the mappingrelationship obtaining module 402 is further configured to:
when the acquiring mode of the mapping relation is a mode of local acquisition from the first equipment and the mapping relation locally stored in the first equipment meets a preset expiration condition, sending a data request to a server, wherein the data request is used for requesting the mapping relation between the specified equipment parameter and the alternative code stream type;
receiving a mapping relation fed back by the server;
updating the mapping relationship stored locally by the first device using the received mapping relationship.
Optionally, the specifying the device parameter includes: device model, and/or version information of the operating system.
Corresponding to the method embodiment, the embodiment of the invention also provides a video screen projection playing system.
As shown in fig. 5, a video screen-casting playing system according to an embodiment of the present invention may include:
afirst device 501 having a video projection function, and asecond device 502 as a projection recipient;
thefirst device 501 is configured to obtain a specified device parameter of thesecond device 502; the specified device parameter is a device parameter which affects the code stream type supported by the second device; acquiring a mapping relation between the designated equipment parameter and the alternative code stream type; the alternative code stream type is a code stream type supported by the equipment with the specified equipment parameter; selecting a code stream type from the obtained mapping relation as a target code stream type; providing a video to be projected belonging to the target code stream type to thesecond device 502;
thesecond device 502 is configured to receive the video to be screened, which is provided by thefirst device 501 and belongs to the target code stream type, and play the video.
In the scheme provided by the embodiment of the invention, the mapping relation is the mapping relation between the specified equipment parameter and the alternative code stream type, and the alternative code stream type is the code stream type supported by the equipment with the specified equipment parameter. Therefore, after the mapping relation is obtained, the code stream type is selected from the obtained mapping relation and used as the target code stream type, and the video to be screen-projected which belongs to the target code stream type is provided for the second device, so that when the video to be screen-projected which is provided by the second device is played in a screen-projecting manner on the video to be screen-projected which is provided by the first device, the code stream type of the video to be screen-projected is the code stream type supported by the second device. Therefore, the situation that the first device provides the video to be projected belonging to the code stream type which is not supported by the second device can be relatively reduced, and the failure times of video projection playing caused by the fact that the second device does not support the code stream type are reduced. Therefore, the failure rate of video screen projection playing can be reduced through the scheme.
Corresponding to the above embodiments, an embodiment of the present invention further provides an electronic device, as shown in fig. 6, where the electronic device may include:
the system comprises aprocessor 601, acommunication interface 602, amemory 603 and acommunication bus 604, wherein theprocessor 601, thecommunication interface 602 and the memory complete mutual communication through thecommunication bus 604 through the 603;
amemory 603 for storing a computer program;
theprocessor 601 is configured to implement any of the steps of the video screen projection playing method applied to the server corresponding to the first device in the foregoing embodiment when executing the computer program stored in thememory 603.
In the scheme provided by the embodiment of the invention, the mapping relation is the mapping relation between the specified equipment parameter and the alternative code stream type, and the alternative code stream type is the code stream type supported by the equipment with the specified equipment parameter. Therefore, after the mapping relationship is obtained, the code stream type is selected from the obtained mapping relationship and is used as the target code stream type, and the video to be projected belonging to the target code stream type is provided for the second device, so that when the video to be projected provided by the second device is projected and played on the screen of the first device, the code stream type of the video to be projected is the code stream type supported by the second device. Therefore, the situation that the first device provides the video to be projected belonging to the code stream type which is not supported by the second device can be relatively reduced, and the failure times of video projection playing caused by the fact that the second device does not support the code stream type are reduced. Therefore, the failure rate of video screen projection playing can be reduced through the scheme.
The Memory may include a RAM (Random Access Memory) or an NVM (Non-Volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
The computer-readable storage medium provided by an embodiment of the present invention stores a computer program therein, and when the computer program is executed by a processor, the computer program implements the steps of any one of the above embodiments, which is applied to the video screen-casting playing method of the server corresponding to the first device.
In the scheme provided by the embodiment of the invention, the mapping relation is the mapping relation between the specified equipment parameter and the alternative code stream type, and the alternative code stream type is the code stream type supported by the equipment with the specified equipment parameter. Therefore, after the mapping relationship is obtained, the code stream type is selected from the obtained mapping relationship and is used as the target code stream type, and the video to be projected belonging to the target code stream type is provided for the second device, so that when the video to be projected provided by the second device is projected and played on the screen of the first device, the code stream type of the video to be projected is the code stream type supported by the second device. Therefore, the situation that the first device provides the video to be projected belonging to the code stream type which is not supported by the second device can be relatively reduced, and the failure times of video projection playing caused by the fact that the second device does not support the code stream type are reduced. Therefore, the failure rate of video screen projection playing can be reduced through the scheme.
In another embodiment of the present invention, there is also provided a computer program product containing instructions, which when run on a computer, causes the computer to execute the video screen projection playing method described in any of the above embodiments.
In the above embodiments, all or part of the implementation may be realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to be performed in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber, DSL (Digital Subscriber Line), or wireless (e.g., infrared, radio, microwave, etc.).
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus, system, and electronic device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple and reference may be made to some descriptions of the method embodiments for relevant points.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.