Video call method, storage medium, electronic device and computer program product
By adjusting the image output resolution of the camera module to deal with the problem of rising equipment temperature, the problem of beauty effects not being continuously provided in video calls is solved, and a more stable user experience and image quality is achieved.
Patent Information
- Application Number
- CN202411356446.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-09-27
AI Technical Summary
During video calls, due to the high load of the device and the rapid temperature rise, the beauty effect cannot be continuously provided, which affects the user experience.
By adjusting the image output resolution of the camera module according to the device temperature, reducing equipment power consumption and reducing heat generation, avoiding the device temperature rising too quickly and reducing the probability of the image beautification algorithm escaping.
It effectively avoids the device temperature rising too quickly, improves the stability of image beautification effect during video calls, and improves the user experience.
Smart Images

Figure CN118890426B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular, to a video calling method, a storage medium, an electronic device, and a computer program product. Background Art
[0002] Currently, during a video call on a device, because the device load is high and the temperature rises quickly, it is easy for the device temperature to stop adding beauty effects to the video image. Therefore, it often happens that during a video call, the user cannot experience the beauty effect, or can only experience the beauty effect for a very short time. Summary of the invention
[0003] The purpose of this application is to provide a video call method, storage medium, electronic device and computer program product.
[0004] A first aspect of the present application provides a video calling method, applied to an electronic device, the method comprising:
[0005] After the target application is started, in response to the first operation, displaying a first video call interface of the target application;
[0006] In a first time period, a first video image output by the camera module is acquired, and in the first time period, a device temperature of the electronic device is a first temperature value;
[0007] Displaying a second video image on the first video call interface, where the second video image is obtained by performing a preset beautification effect processing on the first video image;
[0008] In a second time period, a third video image output by the camera module is obtained, wherein in the second time period, the device temperature of the electronic device is a second temperature value, the resolution of the third video image is smaller than the resolution of the first video image, the second temperature value is larger than the first temperature value, and the second time period is later than the first time period;
[0009] A fourth video image is displayed on the first video call interface, where the fourth video image is obtained by performing a preset beautification effect processing on the third video image.
[0010] It should be noted that the video image in this application can be understood as an image in a video segment. The camera module outputs the image at a preset frame rate, and the electronic device arranges the multiple frames of images output by the camera module in a certain order (such as chronological order) to form a video segment. Performing a preset beautification effect processing on the video image can be understood as performing the preset beautification effect processing on each frame of the image forming the video segment, or performing the preset beautification effect processing on part of the images of the video segment.
[0011] In some embodiments, the preset beautification effect processing may be a facial beautification effect processing or an object beautification effect processing. The preset beautification effect processing may be performed by loading a corresponding beautification processing algorithm, or the beautification effect processing may be avoided by escaping the algorithm. For example, the facial beautification effect processing may be performed by loading a facial beautification algorithm to add a facial beautification effect, and the facial beautification effect processing may be avoided by escaping the facial beautification algorithm, so as to achieve the purpose of not adding a facial beautification effect. The facial beautification effect processing may include skin grinding, whitening, skin lightening, face slimming, body shaping, lip color adjustment, eye beautification, facial features fine-tuning, light and shadow adjustment, special effects, etc. The object beautification effect processing may include removing blemishes and unevenness on the surface of an object to make the surface of the object smoother and more uniform; adjusting the color, brightness and saturation of the object to make the color of the object more vivid and attractive; enhancing the texture and details of the surface of the object to make the object look more real and three-dimensional; enhancing the contrast of the object to make the outline of the object clearer and more distinct; and highlighting the object by blurring the background to make the object more prominent.
[0012] In addition, it should be noted that the resolutions involved in this application are all image resolutions, which can be understood as the number of pixels in the image, rather than the resolution of the display screen. The resolution of the image output by the camera module may also be generally described as the camera's output resolution. The higher the camera's output resolution, the clearer the captured image will be.
[0013] Furthermore, the device temperature in the present application may include at least one of: the maximum temperature of the housing of the electronic device, the average temperature of the housing of the electronic device, the CPU temperature, the battery surface temperature, and the like.
[0014] Through the video call solution provided in the embodiment of the present application, the output resolution of the camera module can be adjusted according to the temperature of the device. Therefore, when the temperature of the device is high, the power consumption of the device can be reduced by reducing the resolution of the image captured by the camera module, thereby reducing the generation of heat from the source, and thus effectively preventing the device temperature from rising too quickly. It can also effectively reduce the probability of the image beautification algorithm escaping, which is beneficial to improving the stability of the image beautification effect during video calls.
[0015] Optionally, the method further comprises:
[0016] In a third time period, a fifth video image output by the camera module is obtained, wherein in the third time period, the device temperature of the electronic device is a third temperature value, the resolution of the fifth video image is smaller than the resolution of the first video image, the third temperature value is larger than the first temperature value, and the third time period is later than the first time period;
[0017] The sixth video image is displayed on the first video call interface, and the sixth video image is not processed with a preset beautification effect.
[0018] Optionally, the method further comprises:
[0019] In a third time period, a fifth video image output by the camera module is obtained. In the third time period, the device temperature of the electronic device is a third temperature value, the resolution of the fifth video image is smaller than the resolution of the first video image, the third temperature value is greater than the first temperature value, and the third time period is later than the first time period.
[0020] The sixth video image is displayed on the first video call interface, and the sixth video image is not processed with a preset beautification effect.
[0021] The third temperature value may be greater than the first temperature threshold, the third temperature value may be less than the second temperature value, or may be greater than or equal to the second temperature value.
[0022] The above technical solution can reduce the power consumption of the device by not beautifying the image instead of reducing the resolution of the image output by the camera module when the temperature of the device is high but the resolution of the image output by the current camera module is low. In this way, it can not only effectively ensure the reliability of video calls, but also prevent the temperature of the device from continuing to rise.
[0023] Optionally, the method further comprises:
[0024] Based on the fact that the second temperature value is greater than the first temperature threshold, the resolution of the image output by the camera module is modified from the first resolution value to the second resolution value, and the first resolution value is greater than the second resolution value.
[0025] Optionally, the method further comprises:
[0026] In a fourth time period, a seventh video image output by the camera module is obtained, wherein in the fourth time period, the device temperature of the electronic device is a fourth temperature value, the resolution of the seventh video image is equal to the resolution of the first video image, the fourth temperature value is less than the second temperature value, and the fourth time period is later than the second time period;
[0027] An eighth video image is displayed on the first video call interface, and the eighth video image is obtained by performing a preset beautification effect processing on the seventh video image.
[0028] It should be noted that the fourth period can be understood as the situation where the device temperature recovers to below the second temperature threshold after the second period or the third period, that is, after the device temperature rises to greater than or equal to the first temperature threshold, the device temperature drops to less than or equal to the second temperature threshold. The second temperature threshold is less than the first temperature threshold, the first temperature threshold can be understood as a preset high temperature threshold, and the second temperature threshold can be understood as a preset low temperature threshold.
[0029] The above technical solution can, after the camera's image output resolution is reduced due to the device's overly high temperature, re-output the image according to the resolution of the first video image when it is determined that the device temperature has recovered to below the second temperature threshold. This can effectively improve the image quality during video calls when the device temperature permits, thereby helping to further improve the user experience.
[0030] Optionally, the method further comprises:
[0031] Based on the fact that the fourth temperature value is less than the second temperature threshold and the second temperature threshold is less than the first temperature threshold, the resolution of the image output by the camera module is modified from the second resolution value to a third resolution value, and the third resolution value is greater than the second resolution value.
[0032] Optionally, the first video call interface further includes a first window, the first window includes a ninth video image, the ninth video image is a video image of the opposite end device received by the electronic device, and during the first time period, an area of the first window is smaller than an area of the second video image, and the first window covers a portion of the second video image;
[0033] During the second period of time, the area of the first window is smaller than the area of the fourth video image, and the first window covers a portion of the fourth video image.
[0034] Optionally, the method further comprises:
[0035] In response to a second operation on the first window, a tenth video image output by the camera module is acquired, wherein a resolution of the tenth video image is smaller than a resolution of the first video image, and a resolution of the tenth video image is smaller than or equal to a resolution of the third video image;
[0036] After the second operation, a second video call interface is displayed, the second video call interface includes a second window and an eleventh video image, the second window includes a twelfth video image, the twelfth video image is obtained by performing a preset beautification effect on the tenth video image, the eleventh video image is a video image of the opposite device received by the electronic device, the area of the second window is smaller than the area of the eleventh video image, and the second window covers a portion of the eleventh video image.
[0037] The second operation may be a click operation on the first window, or other pre-specified operations, such as a click, long press, or slide on a preset button.
[0038] Optionally, the method further comprises:
[0039] After the second operation, obtaining a first duration of displaying the second video call interface;
[0040] When it is determined that the first duration reaches a first preset duration, a fourth resolution value is used as the resolution of the image output by the camera module, and the fourth resolution value is less than or equal to the second resolution value;
[0041] Acquire a thirteenth video image output by the camera module, wherein the resolution of the thirteenth video image is the fourth resolution value;
[0042] The second window displays a fourteenth video image, which is obtained by performing a preset beautification effect processing on the thirteenth video image.
[0043] The above technical solution can adjust the resolution of the image captured by the camera module after the first duration of switching to the second video call interface reaches the first preset duration, which can effectively avoid frequent adjustment of the resolution of the image captured by the camera in a short period of time, thereby effectively avoiding the problem of unstable or flickering pictures caused by frequent resolution adjustment, and thus can help ensure that users get a more stable and consistent video call experience during the video call.
[0044] Optionally, the method further comprises:
[0045] In response to a third operation on the second window, a fifteenth video image output by the camera module is acquired, wherein a resolution of the fifteenth video image is greater than a resolution of the tenth video image, and a resolution of the fifteenth video image is less than or equal to a resolution of the first video image;
[0046] After the third operation, displaying the third video call interface, the third video call interface including a third window and a sixteenth video image, the sixteenth video image being acquired based on the camera module, and an area of the third window being smaller than an area of the sixteenth video image;
[0047] The seventeenth video image is displayed in the third window, and the seventeenth video image is a video image of a peer device received by the electronic device.
[0048] The third operation may be the same as the second operation, for example, a click operation on the first window, or other pre-specified operations, such as a click, long press, or slide on a preset button.
[0049] Optionally, the method further comprises:
[0050] After the third operation, obtaining a second duration of displaying the third video call interface;
[0051] When the second duration reaches a second preset duration, the resolution of the image output by the camera module is changed from a fourth resolution value to a fifth resolution value, the fifth resolution value is less than or equal to the first resolution value, and the fifth resolution value is greater than the fourth resolution value;
[0052] An eighteenth video image output by the camera module is obtained, wherein the resolution of the eighteenth video image is the fifth resolution value, and the sixteenth video image is obtained after performing a preset beautification effect processing on the eighteenth video image.
[0053] It should be noted that after switching from the second video call interface to the third video call interface, if the user switches back to the second video call interface within the second preset duration, in order to avoid frequently adjusting the resolution of the image captured by the camera in a short period of time, the resolution of the image captured by the camera may not be adjusted when the second duration has not reached the second preset duration. This can effectively avoid the problem of unstable or flickering pictures caused by frequent resolution adjustments, and can help ensure that users have a more stable and consistent video call experience during the video call.
[0054] Optionally, the method further comprises:
[0055] In response to a fourth operation on the first video call interface or the second video call interface, acquiring a nineteenth video image output by the camera module, wherein a resolution of the nineteenth video image is less than a resolution of the first video image, and a resolution of the nineteenth video image is less than or equal to a resolution of the third video image;
[0056] After the fourth operation, a fourth window is displayed, and the fourth window is displayed on an upper layer of the current application interface. The fourth window includes a twentieth video image and a twenty-first video image. The twentieth video image is a video image of a peer device received by the electronic device, and the twenty-first video image is obtained by performing a preset beautification effect processing on the nineteenth video image. The areas of the twentieth video image and the twenty-first video image are different.
[0057] Optionally, the method further comprises:
[0058] After the fourth operation, obtaining a third duration of displaying the fourth window;
[0059] When it is determined that the third duration reaches the third preset duration, a sixth resolution value is used as the resolution of the image output by the camera module, and the sixth resolution value is less than or equal to the second resolution value;
[0060] The twenty-third video image output by the camera module is obtained, the resolution of the twenty-third video image being the sixth resolution value, and the 20th video image and the twenty-fourth video image are displayed in the fourth window, the twenty-fourth video image being obtained after performing a preset beautification effect processing on the twenty-third video image.
[0061] The third preset duration may be less than the first preset duration. If the third duration does not reach the third preset duration, the resolution is not adjusted, and there is no need to re-distribute the stream. The camera module still captures images according to the resolution in the setting data configured last time. If the third duration reaches the third preset duration, the resolution of the image captured by the camera module is reduced by re-distributing the stream.
[0062] The above technical solution can adjust the resolution of the image captured by the camera module when the duration of the system small window display state reaches the third preset duration, which can effectively avoid frequent adjustment of the resolution of the image captured by the camera in a short period of time, thereby effectively avoiding the problem of unstable or flickering pictures caused by frequent resolution adjustment, and thus can help ensure that users get a more stable and coherent video call experience during video calls.
[0063] In some embodiments, the sixth resolution value may be a preset minimum resolution, and the preset minimum resolution may be the smallest of multiple resolutions supported by the camera module.
[0064] Optionally, the method further comprises:
[0065] Before displaying the first video call interface, when it is determined that this video call is the first video call of the electronic device based on the target application, a preset prompt window is displayed, and the preset prompt window includes one or more display mode selection controls.
[0066] The selection control is used to receive the target display mode selected by the user through the preset prompt window.
[0067] Optionally, the method further comprises:
[0068] In the first time period, when the target display mode set by the user is a specified mode and the current number of video calls reaches a preset number, obtaining a predicted call duration of the current video call and an ambient temperature of the environment in which the electronic device is located;
[0069] A first resolution value of the image output by the camera module is determined according to the predicted call duration and the ambient temperature.
[0070] The designated mode may be an adaptive mode.
[0071] The method further comprises:
[0072] In the first time period, when the target display mode set by the user is the specified mode and the current number of video calls has not reached the preset number, the seventh resolution value is used as the resolution of the image output by the camera module, and the seventh resolution value is greater than or equal to the first resolution value.
[0073] Optionally, determining a first resolution value of an image output by the camera module according to the predicted call duration and the ambient temperature includes:
[0074] Obtaining energy consumption-temperature relationships corresponding to a plurality of preset resolutions under the ambient temperature of the electronic device, wherein the energy consumption-temperature relationship corresponding to each preset resolution represents a corresponding relationship between a call duration of the video call and a temperature change value under the preset resolution, and the temperature change value is a change value of a device temperature of the electronic device;
[0075] Determine, according to the energy consumption-temperature relationship of each preset resolution, a first temperature change value corresponding to the predicted call duration at the preset resolution;
[0076] The first resolution value is determined according to the first temperature change value corresponding to the predicted call duration at each preset resolution.
[0077] Optionally, determining the first resolution value according to the first temperature change value corresponding to the predicted call duration at each preset resolution includes:
[0078] Determine a second temperature change value that is less than a preset temperature change threshold value from the first temperature change values corresponding to a plurality of preset resolutions;
[0079] The preset resolution corresponding to the second temperature change value with the largest value is used as the first resolution value.
[0080] Optionally, the predicted call duration is obtained in the following manner:
[0081] Obtaining the call duration of each target historical video call of the electronic device based on the target application;
[0082] The predicted call duration is determined according to the call duration of each target historical video call.
[0083] Optionally, the method further comprises:
[0084] In a fifth time period, when it is determined that the device temperature of the electronic device is greater than the first temperature threshold for the first time during the video call, a target time required for the device temperature to reach a third temperature threshold is obtained, the third temperature threshold is greater than the first temperature threshold, and in the fifth time period, the device temperature of the electronic device is a fifth temperature value, and the fifth temperature value is greater than the first temperature threshold;
[0085] The second video image continues to be displayed within the target duration.
[0086] Optionally, obtaining a target time required for the device temperature to reach a third temperature threshold includes:
[0087] Obtaining a target energy consumption-temperature relationship corresponding to a first resolution value under an ambient temperature of an environment in which the electronic device is located;
[0088] Determining the standby talk time corresponding to the third temperature threshold according to the target energy consumption-temperature relationship;
[0089] The difference between the standby call duration and the current call duration of the video call is used as the target duration.
[0090] Optionally, acquiring a third video image output by the camera module includes:
[0091] When it is determined that the current device temperature is greater than the first temperature threshold, if it is determined that this is not the first time that the temperature is greater than the first temperature threshold in this video call, a third video image output by the camera module is obtained.
[0092] The above technical scheme can reduce the resolution of the image captured by the camera module when the first temperature threshold is not exceeded for the first time during the video call, so as to reduce the power consumption of the device, thereby effectively preventing the device temperature from rising too quickly; and can predict the target time from the current moment to the moment when the device is expected to reach the extreme high temperature that the device can withstand when the first temperature threshold is exceeded for the first time during the video call, and will not reduce the resolution of the image captured by the camera module within the target time. It can maximize the quality of the video call without affecting the service life of the device, which is conducive to further improving the video image quality, and thus effectively improving the user experience.
[0093] The second aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in the first aspect above.
[0094] A third aspect of the present application provides an electronic device, including:
[0095] a memory having a computer program stored thereon;
[0096] A processor is used to execute the computer program in the memory to implement the steps of the method described in the first aspect.
[0097] A fourth aspect of the present application is a computer program product, comprising a computer program, which implements the steps of the method described in the first aspect when executed by a processor.
[0098] Through the above technical solution, during a video call, when the device temperature is low, the camera can be controlled to capture video images at a higher resolution, and when the device temperature is high, the camera can be controlled to capture video images at a lower resolution. Therefore, when the device temperature is high, the power consumption of the device can be reduced by reducing the resolution of the image captured by the camera, which can reduce heat generation from the source, and thus effectively prevent the device temperature from rising too quickly. It can also effectively reduce the probability of the image beautification algorithm escaping, which is beneficial to improving the stability of the image beautification effect during video calls.
[0099] Other features and advantages of the present application will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0100] The accompanying drawings are used to provide a further understanding of the present application and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present application but do not constitute a limitation to the present application. In the accompanying drawings:
[0101] Figure 1a-Figure 1p A schematic diagram of the interface of a device during a video call is provided for an embodiment of the present application;
[0102] Figure 2 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0103] Figure 3 A schematic diagram of the architecture of an electronic device provided in an embodiment of the present application;
[0104] Figure 4A is a timing diagram of a video calling method provided by an exemplary embodiment of the present application;
[0105] Figure 4B A schematic diagram of a prompt window is shown for an exemplary embodiment of the present application;
[0106] Figure 4C A schematic diagram of an energy consumption-temperature relationship corresponding curve shown in an exemplary embodiment of the present application;
[0107] Figure 4D A timing diagram of a video calling method shown in another exemplary embodiment of the present application;
[0108] Figure 5A According to this application Figure 4A A timing diagram of a video calling method shown in the embodiment;
[0109] Figure 5B This application is based on Figure 4A A timing diagram of another video calling method shown in the illustrated embodiment;
[0110] Figure 6 According to this application Figure 4A A timing diagram of yet another video calling method shown in the illustrated embodiment;
[0111] Figure 7 According to this application Figure 6 A timing diagram of another video calling method shown in the illustrated embodiment;
[0112] Figure 8 is a flow chart of a video calling method provided by an exemplary embodiment of the present application;
[0113] Fig. 9A According to this application Figure 8 The illustrated embodiment shows a flow chart of a video calling method;
[0114] Fig. 9B According to this application Fig. 9A The illustrated embodiment shows a flow chart of a video calling method;
[0115] Fig.10 According to this application Figure 8 A flowchart of another video calling method shown in the illustrated embodiment;
[0116] Fig.11 It is a flowchart of a video calling method shown in another exemplary embodiment of the present application. DETAILED DESCRIPTION
[0117] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0118] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0119] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0120] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0121] Reference to "one embodiment" or "some embodiments" etc. described in the embodiments of the present application means that one or more embodiments of the present application include a specific feature, structure or characteristic described in conjunction with the embodiment. Therefore, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. appearing in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways.
[0122] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0123] In addition, the “plurality” mentioned in the embodiments of the present application should be interpreted as two or more; the terms “including”, “comprising”, “having” and their variations all mean “including but not limited to”, unless otherwise specifically emphasized.
[0124] The video call method provided by the present application is described below with reference to a schematic diagram of a video call scenario.
[0125] Figure 1a-Figure 1p This is a schematic diagram of an interface of a first electronic device 1 and a second electronic device 2 when making a video call, as shown in an exemplary embodiment of the present application. Figure 1a This is a schematic diagram of an application start interface of a target application on the first electronic device 1 side. Figure 1b and Figure 1c A schematic diagram of a chat session interface of a target application on the first electronic device 1 side, Figure 1d This is a schematic diagram of the interface before the target application on the first electronic device 1 initiates a video call. Figure 1e This is a schematic diagram of the interface in the full-screen display state of the system when the first electronic device 1 sends a video call request. Figure 1f This is a schematic diagram of the interface in the system small window display state when the first electronic device 1 sends a video call request. Figure 1g Schematic diagram of the interface when the first electronic device 1 is in the first application display state after the video call is connected, wherein Figure 1g In the example, the video image on the first electronic device 1 side (i.e., the local image) is displayed in the second floating window; the display area of the image on the second electronic device 2 side (i.e., the opposite end image) is larger than the display area of the local image (for example, the opposite end image can be displayed in full screen). Figure 1h FIG. 1 is a schematic diagram of an interface when the first electronic device 1 is in a second application display state after the video call is connected; wherein, Figure 1h In the example, the peer image is displayed through the second floating window, and the display area of the local image is larger than the display area of the peer image (which may be the area of the second floating window). Figure 1i This is a schematic diagram of an interface in a system small window display state on the first electronic device 1 after the video call is connected; Figure 1i The local image and the peer image are both displayed in the first floating window. Figure 1j This is a schematic diagram of the interface when the target application on the second electronic device 2 receives a video call request. Figure 1k This is a schematic diagram of the interface in the full-screen display state of the system after the video call on the second electronic device 2 is connected. Figure 1l This is a schematic diagram of the interface in the system small window display state after the video call on the second electronic device 2 is connected. Figure 1m This is a diagram of the interface for selecting group members to participate in a video call during a group chat. Figure 1nThis is a diagram of the interface before a video call is connected during a group chat. Figure 1o This is a diagram of the interface in full screen mode after a video call is connected during a group chat. Figure 1p This is a diagram of the interface when the system small window is displayed during group chat.
[0126] Among them, the first floating window is provided by the operating system running in the electronic device, and may not be blocked by the system desktop or other application interfaces; the second floating window is provided by the target application, and is used to be displayed on the preset interface of the application. When entering other interfaces of the application, the second floating window disappears. It should be noted that both the first floating window and the second floating window can be dragged to any position of the current interface. For example, the user can press and hold the floating window with a finger until the floating window starts to respond to the drag operation. After the floating window starts to respond to the drag operation, use the finger to slide on the screen to drag the floating window to the desired target position, and then release the finger, and the floating window will stay at the target position.
[0127] like Figure 1d As shown in the interface, the first electronic device 1 displays a chat interface between the user of the target application and the contact B, which includes a text box, a voice input control, an emoticon control, an album control, a camera control, a geographic location control, a video call control, and a file transfer control, etc.; wherein the text box is used to input text messages; the voice input control is used to record and send voice messages; the emoticon control is used to select and send emoticons, emoticon packages, etc.; the album control is used to send pictures in the album; the geographic location control is used to send and receive geographic location information; the video call control 11 is used to perform video call operations, and clicking the video call control 11 displays a button pop-up box.
[0128] The button pop-up box includes a video call button 111, a voice call button 112 and a cancel button 113, wherein the voice call button 112 is used to trigger a voice call request, the video call button 111 is used to trigger a video call request, and the cancel button 113 is used to close the button pop-up box of the video call control 11. When the first electronic device 1 receives a click operation on the video call button 111, it sends a video call request to the second electronic device 2 through the target application and displays Figure 1e The interface shown in Figure 1eThe interface shown includes the identifier (avatar and name) of contact B, a camera flip button, a blur background button, a camera switch button, an end call button 12A, a display status switch button 13A, and a full-screen screen 14 of the video image on the first electronic device 1 side. The camera flip button is used to switch between the front camera and the rear camera; the blur background button is used to blur the background of the person captured by the camera during a video call; the camera switch button is used to turn the camera on or off during a video call; the end call button 12A is used to trigger an instruction to end the video call; the display status switch button 13A is used to switch the system display status during the video call. The application display status includes the system full-screen display status and the system small window display status. Figure 1e In the interface shown, in response to clicking the display state switching button 13A, you can enter Figure 1f In the interface shown, the local image is displayed through the first floating window; Figure 1f In response to the user clicking on the first floating window, the interface is restored to the Figure 1e The interface shown.
[0129] When the second electronic device 2 receives the video call request sent by the first electronic device 1, it displays Figure 1j The interface shown includes the user's identification, camera flip button, blur background button, camera switch button, accept video call button 21, end call button 20A and display status switch button. The accept video call button 21 is used to trigger the instruction to accept the video call.
[0130] In response to the contact B's operation on the accepting video call button 21 (for example, by clicking the accepting video call button 21), the second electronic device 2 sends an instruction to agree to the video call to the first electronic device 1. After receiving the instruction to agree to the video call, the first electronic device 1 enters Figure 1g The video call interface shown, the second electronic device 2 enters Figure 1k The display interface shown, Figure 1g The video call interface shown includes an opposite-end image (the opposite-end image is displayed as screen 15-1, and the opposite-end image includes an image captured by the second electronic device 2), a local image (the local image is displayed as screen 16-1 through the second floating window, and the local image includes an image captured by the first electronic device 1), a microphone switch, a speaker switch, a camera flip button, a blur background button, a camera switch button, an end call button 12B, and a display status switch button 13A. In addition, in the display Figure 1g In the video call interface shown in FIG. 1 , in response to clicking the second floating window (i.e. Figure 1g In the display area of the middle screen 16-1), the video call interface shown in 1h is displayed. Figure 1hWhen the video call interface is shown, the peer image is displayed in the second floating window, forming screen 16-2, and the local image is displayed in full screen as screen 15-2. Click Figure 1h The second floating window in the video call interface shown (the display area where the picture 16-2 is located) is displayed again. Figure 1g The video call interface shown.
[0131] In the target application Figure 1g Or when the interface shown in 1h is displayed, the first electronic device 1 displays the display state switching button 13A in response to the user clicking the display state switching button 13A. Figure 1i The interface shown, that is, the video call enters the system small window display state, which includes the first floating window and the current application interface. The current application interface can be the interface of the target application (chat interface, public account interface, discovery interface, etc. of the target application) or the system desktop (such as Figure 1l The first floating window displays a local image and a peer image, and the first floating window is displayed on the current application interface without being blocked. It can be understood here that the first floating window is displayed on the upper layer of the current application interface of the first electronic device 1 and is not blocked by the system desktop or other application interfaces.
[0132] exist Figure 1j The interface shown and Figure 1k In the interface shown, you can also click the display status switch button 13B to enter the system small window display state, and display the video call interface by displaying the first floating window, that is, enter Figure 1l The interface shown in this Figure 1i The interface shown or Figure 1l In the interface shown, you can click the first floating window to restore to the system full-screen display state. The system full-screen display state can be understood as at least one of the peer image and the local image being displayed in full-screen state, for example Figure 1e The interface shown, Figure 1g The interface shown in 1h and Figure 1k The interfaces shown can all be understood as full-screen display states.
[0133] It should be pointed out that in Figure 1a-Figure 1p The shown interface may also include a return key 04, a home key 05 and a menu key 06. The return key 04 is used to return to the previous interface, the home key 05 is used to quickly return to the desktop, and the menu key 06 is used to open the multitasking view. In the present application, in an interface including a display status switching button, the same display status switching function as clicking the display status switching button can be achieved by clicking the return key 04, that is, the video call window is switched from the system full-screen display state to the system small window display state.
[0134] When the first electronic device 1 sends a video call request to the second electronic device 2 based on the target application, the first electronic device 1 uses the camera module to call the camera to collect video images and obtain the picture on the first electronic device 1 side, that is, Figure 1e or Figure 1f After the video call is connected, when the local default display state is the second full-screen display state, the first electronic device 1 displays the video image collected by the local camera through the second floating window, forming Figure 1g The interface shown in Figure 16-1 displays the peer image in full screen. Figure 1g Picture 15-1 in the interface shown; when the local default display state is the first full-screen display state, the first electronic device 1 displays the opposite end image through the second floating window to form picture 16-2, and displays the local image in full screen as picture 15-2.
[0135] exist Figure 1g In the interface shown in FIG. 1 or the interface shown in FIG. 1h, in response to the user clicking the display state switching button 13A, the display Figure 1i The interface shown in this Figure 1i The interface shown includes a first floating window and a current application interface. The first electronic device 1 displays the video image captured by the camera through the screen 17 in the first floating window, and displays the video image on the second electronic device 2 side through the screen 18 in the first floating window. The area of the screen 17 is less than or equal to the area of the screen 18.
[0136] On the second electronic device side, after the video call is connected, when the default display state on the second electronic device side is the second full-screen display state, the video image captured by the local camera of the second electronic device 2 is displayed as Figure 1k The screen 22 in the interface shown shows the video image on the first electronic device 1 as Figure 1k Screen 23 in the interface shown; in response to the user clicking Figure 1k The display status switch button 13B in the interface shown in the figure shows Figure 1l The first floating window in the interface shown is displayed on the system desktop when the current application interface is the system desktop. The first floating window includes a screen 25 corresponding to the first electronic device side image and a screen 24 corresponding to the second electronic device side image.
[0137] In addition, the first electronic device can also make video calls with multiple electronic devices at the same time. For example, you can click the video call button in the chat group to display Figure 1m The interface shown, Figure 1m The interface shown includes a plurality of group member selection controls. Figure 1m In the interface shown, select one or more group members as participants in this video call. Figure 1m The confirmation button 30 in the interface shown in the figure sends a video call request (the video call request can also be described as a video call invitation) to the selected multiple group members. After the video call request is sent in the chat group, the display interface of the first electronic device 1 is updated to Figure 1n The interface shown in Figure 1n The interface shown includes a local video image screen 40 of the first electronic device and identification images of other participating members, wherein the local video image screen of the first electronic device and identification images of other participating members are displayed through different second floating windows.
[0138] After one or more of the plurality of group members accept the video call request, the first electronic device 1 and the electronic devices where the group member users participating in the video call are located display Figure 1o The interface shown, Figure 1o This is a schematic diagram of the video call interface when the video call window is in full screen display during a group chat. Figure 1oThe interface shown includes multiple second floating windows, each of which includes a screen corresponding to a video call participant, and different second floating windows include screens corresponding to different video call participants, wherein when a group member accepts a video call invitation and the camera is in an on-state, the video image of the group member is displayed on the video call interface through the second floating window; when a group member accepts a video call invitation but the camera is in an off-state, an identification image (such as a user avatar) of the group member is displayed on the video call interface through the second floating window, and when the group member does not accept the video call invitation but other members accept the video call invitation, the identification of the group member who did not accept the video call invitation is displayed on the video call interface displayed on the side of the group member who accepted the video call invitation through the second floating window. For example, when the user of the first electronic device sends a video call invitation to group members Q1, Q2 and Q3, group members Q1 and Q2 accept the video call invitation, but group member Q3 does not accept the video call invitation. The video call interface displays the video image of group member Q1 as screen 31 through the second floating window, displays the video image of group member Q2 as screen 32 through another second floating window, displays the identification image of group member Q3 as screen 33 through another second floating window, and displays the video requester (i.e., the video image of the first electronic device) as screen 34 through the second floating window. The second floating window displaying screen 33 also includes a waiting identification 35. After group member Q3 accepts the video call invitation, the identification 35 disappears. It should be noted that after clicking on any one of screen 31, screen 32, screen 33 and screen 34, the area of the clicked screen becomes larger, and the enlarged screen area is larger than the screen areas of other group members. The screen areas of other group members can be the same or different.
[0139] On click Figure 1o After 6, it shows Figure 1p The interface shown, Figure 1p This is a diagram of the interface when the video call window is displayed as a small system window during a group chat. Figure 1p In the interface shown, the local video image is displayed as a screen 37 through a first floating window. In addition, the first floating window may also include a camera switch button 38 and a microphone switch button 39.
[0140] In a scenario where the device temperature of the first electronic device 1 is relatively high (for example, when the device temperature is greater than or equal to 44 degrees Celsius), in order to prevent the device temperature from being too high, the first electronic device 1 will temporarily not load the beauty function, that is, will not add the beauty function. In this way, when the temperature of the first electronic device 1 is relatively high, when a video call request is initiated, the image displayed in the screen 14 is a screen without the beauty effect. After the video call is connected, if the device temperature is still relatively high, the screens 16-1, 15-2, and 17 of the first electronic device 1, and the screens 23 and 25 displayed on the second electronic device 2 are also screens without the beauty effect added. When the device temperature of the first electronic device 1 is restored to a temperature lower than the lower limit (for example, less than or equal to 41 degrees Celsius), the beauty algorithm will be loaded again, that is, the beauty effect will be added again, so that the screens 16-1, 15-2, and 17 of the first electronic device 1, and the screens 23 and 25 displayed on the second electronic device 2 are screens after the beauty processing. Therefore, during a video call, beauty effect will be applied at the beginning, and then as the call time increases, the energy consumption of the device accumulates and the temperature of the device rises, which may cause the device temperature to be higher than 44 degrees Celsius. When the device temperature is higher than 44 degrees Celsius, in order to reduce power consumption and avoid excessive temperature of the device, loading of the beauty algorithm will be suspended, that is, no beauty effect will be added. After pausing loading of the beauty algorithm, the speed at which the device temperature rises will decrease due to lower power consumption, and the device may even gradually cool down. When the device temperature is less than or equal to 41 degrees Celsius, the beauty algorithm will be loaded again. In this way, during the video call, the beauty effect on screen 16-1, screen 15-2, screen 17 in the first electronic device 1, and screen 23 and screen 25 displayed on the second electronic device 2 may appear and disappear from time to time, thereby affecting the user experience.
[0141] It should be noted that the application display interface and screen shown in this application are exemplary illustrations, and this application does not limit the display style of the application display interface and screen and the layout of each control in the interface.
[0142] In the embodiment of the present application, in view of the problem that the beautification function is sometimes available and sometimes not available during the above-mentioned video call, it is proposed that after the target application is started, in response to the first operation, the first video call interface of the target application is displayed; in the first period, the first video image output by the camera module is obtained, and in the first period, the device temperature of the electronic device is the first temperature value; the second video image is displayed on the first video call interface, and the second video image is obtained after the preset beautification effect is processed on the first video image; in the second period, the third video image output by the camera module is obtained, and in the second period, the device temperature of the electronic device is the second temperature value, the resolution of the third video image is less than the resolution of the first video image, the second temperature value is greater than the first temperature value, and the second period is later than the first period; the fourth video image is displayed on the first video call interface, and the fourth video image is obtained after the preset beautification effect is processed on the third video image. In other words, in order to avoid the device temperature being too high, the power consumption is reduced by reducing the resolution first, rather than directly reducing the power consumption by not loading the beauty function, so as to avoid the bad experience brought to the user by the direct beauty escape, thereby achieving the purpose of improving the user's experience, optimizing power consumption and reducing device heating.
[0143] The video call method provided in the embodiment of the present application can be applied to electronic devices with camera functions. Figure 2 , Figure 2 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 100 may include a processor 110, an external memory 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management service module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a touch sensor 180A and a temperature sensor 180B, etc.
[0144] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0145] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated into one or more processors. For example, the processor 110 is used to execute the video call method in the embodiment of the present application.
[0146] Among them, the processor 110 is used to display a first video call interface of the target application in response to a first operation after the target application is started; in a first time period, obtain a first video image output by the camera module, and in the first time period, the device temperature of the electronic device is a first temperature value; display a second video image on the first video call interface, and the second video image is obtained after the first video image is processed with a preset beautification effect; in a second time period, obtain a third video image output by the camera module, and in the second time period, the device temperature of the electronic device is a second temperature value, the resolution of the third video image is smaller than the resolution of the first video image, the second temperature value is greater than the first temperature value, and the second time period is later than the first time period; display a fourth video image on the first video call interface, and the fourth video image is obtained after the third video image is processed with a preset beautification effect. Through the above technical solution, during a video call, when the device temperature is low, the camera can be controlled to capture video images at a higher resolution, and when the device temperature is high, the camera can be controlled to capture video images at a lower resolution. Therefore, when the device temperature is high, the power consumption of the device can be reduced by reducing the resolution of the image captured by the camera, which can reduce heat generation from the source, and thus effectively prevent the device temperature from rising too quickly. It can also effectively reduce the probability of the image beautification algorithm escaping, which is beneficial to improving the stability of the image beautification effect during video calls.
[0147] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0148] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0149] The external memory 120 generally refers to an external memory. In the embodiment of the present application, the external memory refers to a memory other than the memory of the electronic device and the cache of the processor, and the memory is generally a non-volatile memory.
[0150] The internal memory 121, which may also be referred to as "memory", may be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. The program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), and the like.
[0151] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0152] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0153] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel may be an organic light-emitting diode (OLED). In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0154] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0155] The electronic device 100 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194 and the application processor. In the present application scheme, during a video call, the camera is in use, and images can be collected through the camera 193, and the collected images can be displayed in the video call interface.
[0156] The electronic device 100 also includes various sensors that can convert various physical signals into electrical signals.
[0157] Among them, the touch sensor 180A is also called a "touch panel". The touch sensor can be set on the display screen 194, and the touch sensor and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.
[0158] The temperature sensor 180B is used to detect the device temperature of the electronic device. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180B to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180B exceeds a threshold, the electronic device 100 reduces the performance of a processor located near the temperature sensor 180B to reduce power consumption and implement thermal protection.
[0159] Specifically in the embodiment of the present application, the camera-related hardware includes a camera 193, a flash, an image processor, etc.
[0160] The above is a specific description of the embodiment of the present application using the electronic device 100 as an example. It should be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. The various components shown in the figure can be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and / or application-specific integrated circuits.
[0161] The electronic device provided in the embodiments of the present application may be a user equipment (UE), for example, a mobile terminal (such as a user's mobile phone), a tablet computer, a desktop computer, a laptop computer, a handheld computer, a netbook, a personal digital assistant (PDA), and the like.
[0162] The methods in the embodiments of the present application can be implemented in an electronic device having the above hardware structure.
[0163] In addition, an operating system is running on the above components, such as the IOS operating system, the Android open source operating system, the Windows operating system, etc. Application programs can be installed and run on the operating system.
[0164] The operating system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 100.
[0165] Figure 3 It is an architectural block diagram of the electronic device 100 of an embodiment of the present application, including a software system architecture, which can be run on an AP (Application Processor). The software architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into layers, which are application layers (applications), application framework layers (application framework), Android runtime (Android Runtime) modules and system libraries, and kernel layers (kernel) from top to bottom. Among them, the system library includes a hardware abstraction layer (HAL). The HAL layer is an interface layer between the operating system kernel and the hardware circuit.
[0166] The application layer may include a series of application packages. For example, the application layer may include applications with video call functions (i.e., the target application in this application), weather applications, gallery, navigation, and other applications, and this embodiment of the application does not impose any restrictions on this.
[0167] In the present application scheme, the target application can provide a video call function. During a video call, the target application can obtain a video image through a camera to display the video image in a video call interface to achieve the effect of a video call.
[0168] The application framework layer provides an application programming interface (API) and a programming framework for the applications of the application layer. The application framework layer includes some predefined functions. Exemplarily, the application framework layer may include a camera server module, a system UI, a camera activity management service (AMS) module, a thermal management daemon service (thermal_daemon) module, a window management service (WMS) module, a setting database, etc., and the embodiments of the present application do not impose any restrictions on this.
[0169] The camera service module provides an interface for the camera driver and manages the camera's opening, closing, configuration, and image capture functions.
[0170] System UI, used to manage and display the device's status bar and notification bar; manage the device's lock screen interface, including displaying the time, date, notification and other information on the lock screen interface, and providing an interactive method for unlocking operations; manage the task switching interface on the device; manage and display the device's navigation bar, including buttons such as return, home screen, and multi-tasking view; manage and display system-level dialog boxes and prompts, such as permission request dialog boxes, system update prompts, etc.; on some devices, the system UI can also include screenshot and screen recording functions, allowing users to perform screenshots and screen recording operations at the system level.
[0171] The camera activity management service module is responsible for managing the life cycle and activity status of the camera application. It can track the running status of the camera application and ensure that the camera application can obtain resource allocation and release at the appropriate time.
[0172] The thermal management daemon service module is used to monitor the temperature of the device and adjust the CPU frequency, limit performance, manage heat dissipation, etc. according to temperature changes to ensure that the device operates normally within a safe temperature range.
[0173] The window management service module is used to manage the display and layout of application windows and handle user interface interactions. It can manage the creation, display, layout, and stacking order of windows to ensure that the application windows can be correctly displayed on the screen and can respond to user interactions.
[0174] The setting database is used to store and manage application and system setting information, which can include device settings, user preferences, application configuration, etc. For example, the network, sound, display, security and other setting information in the system settings; the user preference settings, the switch status of specific functions, permission settings, etc. of the application configuration; it is also used to store and manage the permission settings of applications, such as which applications have the permission to access the device's location information, contacts, storage space, etc.
[0175] In the present application scheme, the camera service module can provide the camera driver module with the resolution of the image captured by the camera. For example, the initial resolution of the image captured by the camera can be determined according to the video call mode, and then the resolution can be adjusted according to the device temperature and display status. It can also provide related services such as updating the beauty mark, recording the full-screen display time, and recording the small window display time.
[0176] In the present application scheme, the system UI is used to draw the interface of the target application and the prompt box of the video call mode, and is also used to receive the target display mode selected by the user through the prompt box, and send the target display mode to the setting database so that the setting database updates the value of the setting item of the video call mode; the camera activity management service can monitor the camera's enabled / disabled status, and can broadcast the camera's enabled / disabled message to the applications in the monitoring list, such as the target application, camera service module, etc.
[0177] The thermal management daemon service module is used to monitor the temperature of the device and periodically send the device temperature to the camera service module. The window management service module is used to provide the camera service module with the display status of the video call window of the target application; the setting database is used to store the user's settings for the video call mode in the target application.
[0178] The Android runtime module is responsible for the scheduling and management of the Android system. The Android runtime module includes a virtual machine and a core library. The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection. The core library contains the function functions that the Java language needs to call.
[0179] The system library can include multiple functional modules, such as surface manager, media libraries, 3D graphics processing library (such as openGL ES), 2D graphics engine (such as SGL), etc. The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.
[0180] In the present application, the HAL layer in the system library includes a camera HAL module, which can provide an interface for implementing various functions of the camera.
[0181] The kernel layer is the layer between hardware and software. The kernel layer includes at least a camera driver and a display driver. The camera driver includes a camera driver and a sensor driver.
[0182] The camera driver is the driver layer of the camera, and is mainly responsible for the interaction between the camera application and the camera module. For example, the camera driver can start the camera in the camera module, and the started camera can collect image data, and the collected image data can be displayed on the display screen. The camera module may include hardware such as a camera and a flash.
[0183] It should be noted that although the embodiments of the present application are described using the Android system as an example, its basic principles are also applicable to electronic devices based on operating systems such as IOS or Windows.
[0184] The execution subject of the camera control method for video calls provided in the embodiment of the present application can be the above-mentioned electronic device, or it can be a functional module and / or functional entity in the electronic device that can implement the camera control method for video calls, and the present application scheme can be implemented in hardware and / or software, which can be determined according to actual use requirements and is not limited by the embodiment of the present application. The following takes an electronic device as an example and combines the accompanying drawings to exemplarily illustrate the camera control method for video calls provided in the embodiment of the present application.
[0185] The following is an introduction to the video call method provided by the embodiment of the present application in conjunction with a specific embodiment. It should be noted that the resolutions involved in this application are all the resolutions of the images captured by the camera, not the resolution of the display screen. The resolution of the image captured by the camera may also be described as the output resolution of the camera, which can be understood as the number of pixels of the image captured by the camera. The higher the output resolution of the camera, the clearer the captured image will be.
[0186] Figure 4Ais a timing diagram of a video call method provided by an exemplary embodiment of the present application. The video call method is applied to an electronic device. The electronic device may include a target application (with a video call function), a camera service module (Camera Server), a camera HAL module, and a camera driver module, such as Figure 4A As shown, the video call method may include:
[0187] S400: The electronic device starts a target application.
[0188] The target application has a video call function or a live broadcast function. For example, after the user clicks the application icon of the target application on the desktop, the display screen displays the application main interface of the target application, such as Figure 1a As shown, the main interface at least includes a chat record window between the user and at least one contact, and the chat record window is used to display the most recent chat record between the user and the contact.
[0189] S401, when the user clicks the video call control, the target application in the electronic device sends a camera start instruction to the camera HAL module.
[0190] For example, the user can trigger (such as clicking) the target record window 01 (i.e., the chat record window corresponding to contact B in the figure) in the chat record window with at least one contact, and the display screen will display the chat session interface corresponding to the target record window, such as Figure 1b As shown, the chat session interface may include an additional function control 02. After the user clicks the additional function control 02, the chat session interface may display an additional function window 03 corresponding to the additional function control 02, such as Figure 1c As shown, the additional function window 03 may include a video call control 11. When the user clicks Figure 1c After the video call control 11 is displayed, the chat session interface will display the function display window corresponding to the video call control 11, such as Figure 1d As shown, the function display window displays a video call button 111, a voice call button 112, and a cancel button 113. The user can click on Figure 1d The video call button 111 in the interface shown triggers the video call request. When the target application determines that the user clicks the video call control, it can call openCamera() to trigger the camera start instruction. After the user clicks the video call control, it can also send a video call request to the other electronic device (for example, the electronic device corresponding to contact B) to invite the other user to make a video call.
[0191] It should be noted that the electronic device in this embodiment is explained by taking the video call initiator as an example, and the present application is not limited to this. The electronic device can also be the video call recipient. When the electronic device is the video call recipient, the above steps S400 and S401 can be replaced by the following steps: the target application of the electronic device receives the video call request sent by the video call initiator, and if the current interface of the electronic device is the interface of the target application, a camera start instruction is sent to the camera HAL module.
[0192] In a possible implementation, after receiving the video call request sent by the video call initiator, the target application of the video call recipient can display the video call prompt information through the display screen of the electronic device, and in response to the user's triggering operation on the video call prompt information, send a camera start instruction to the camera HAL module. The video call prompt information can be a specified video call interface, such as by displaying Figure 1j The interface shown in the figure prompts the user to receive a video call request. Optionally, when the specified video call interface is displayed, it can also be accompanied by a ringtone, vibration or other prompt information. The triggering operation of the video call prompt information can be to trigger the control in the specified video call interface. For example, when the current interface of the electronic device is not the interface of the target application, the user can click on the control to trigger the video call prompt information. Figure 1j After pressing the accept video call button 21, a camera start instruction is sent to the camera HAL module.
[0193] S402: After receiving the camera start instruction, the camera HAL module sends a camera hardware start instruction to the camera driver module.
[0194] Optionally, the camera HAL module may send a camera hardware start instruction to the camera driver module in response to receiving the camera start instruction.
[0195] The camera hardware at least includes a camera, a flash, and a camera sensor, etc. The camera HAL module can pass the camera hardware opening instruction to the camera driver module by calling the open() function.
[0196] S403, when the camera driver module receives the camera hardware power-on instruction, it controls the camera hardware to power on, and when it is determined that the power-on is completed, it returns the target power-on result to the camera HAL module.
[0197] Optionally, the camera driver module may control the camera hardware to power on in response to receiving the camera hardware power-on instruction.
[0198] Among them, the target startup result is used to indicate that the camera hardware is successfully started and can be called normally.
[0199] S404: After receiving the target activation result, the camera HAL module returns the target activation result to the target application.
[0200] Among them, the camera HAL module can call the callback() function to return the target enable result to the target application.
[0201] S405: After receiving the target activation result, the target application sends a first flow distribution instruction to the camera service module.
[0202] Optionally, the target application sends a first flow distribution instruction to the camera service module in response to receiving the target activation result.
[0203] The first stream allocation instruction is used to instruct the camera service module to configure the data stream. The target application can issue the first stream allocation instruction to the camera service module by calling the configure stream() function. The first stream allocation instruction may include the frame rate of the video call and the initial image output resolution of the camera, and may also include camera parameters such as exposure time and white balance.
[0204] S406, the camera service module obtains one or more current Activity names, and determines whether the one or more current Activity names include an Activity name corresponding to the video call interface.
[0205] In this step, if the current one or more Activities include the Activity name corresponding to the video call interface, S407 is executed; if the current one or more Activities do not include the Activity name corresponding to the video call interface, the process ends.
[0206] Optionally, when determining whether the current one or more Activity names include the Activity name corresponding to the video call interface, you can obtain a pre-built whitelist of Activity names corresponding to the video call interface. When an Activity name in the whitelist exists in the current one or more Activity names, it is determined that the current one or more Activity names include the Activity name corresponding to the video call interface.
[0207] The camera of the electronic device can be turned on through S401 to S404 above; after determining that the camera is turned on, it can be determined through S405 to S406 whether it is a video call in the target application.
[0208] S407: Determine whether this video call is the first video call of the target application.
[0209] It should be noted that the first video call can be understood as the first video call made by the electronic device based on the target application after leaving the factory, for example, the first video call made based on the target application after the new device is turned on for the first time; for example, the first video call made based on the target application after the electronic device is restored to factory settings. In this step, the first flag bit for the first video call can be set, and whether it is the first video call can be determined according to the value of the first flag bit. For example, when the video call has not been turned on, the value of the first flag bit can be true, and after the video call is turned on, the first flag bit can be set to false. Accordingly, when determining whether it is the first video call of the target application, it can be determined whether the first flag bit is true. If it is true, it is determined that the video call turned on this time is the first video call of the target application. If it is false, it is determined that the video call turned on this time is not the first video call. Optionally, when it is first determined that the current one or more Activity names include the Activity name corresponding to the video call interface, the first flag bit can be set to false.
[0210] When it is determined that the current video call is the first video call of the target application, S408 is executed; when it is determined that the current video call is not the first video call of the target application, S411 is executed.
[0211] S408, the camera service module sends a window drawing instruction to the system UI.
[0212] S409: After receiving the window drawing instruction, the system UI draws a preset prompt window.
[0213] Among them, the system UI can call the draw() function to draw the preset prompt window. After drawing, the electronic device can display the preset prompt window through the display screen. The preset prompt window can be a preset prompt box, which can be used to prompt the user to select a target display mode. The preset prompt box can include a video HD mode, a beauty priority mode, and an adaptive mode. The video HD mode is a video call display mode that prioritizes the clarity of the video image. The beauty priority mode is a video call display mode that prioritizes the loading of the beauty algorithm. The adaptive mode is a video call display mode that determines the resolution of the camera captured image based on the device temperature, the ambient temperature, and the number of video calls of the target application. When the device temperature is too high, the device power consumption can be reduced by reducing the resolution and / or escaping the beauty algorithm to avoid overheating of the device. The resolution of the camera captured image in the video HD mode is higher than that in the beauty priority mode. The video HD mode, the beauty priority mode, and the adaptive mode all add a beauty effect when the device temperature is less than the preset upper temperature threshold.
[0214] S410: After the user selects a target display mode through the preset prompt window, the system UI sends an identifier of the target display mode to the camera service module.
[0215] Optionally, the display mode, also referred to as the video call mode, may be referred to as the video call display mode, and the target display mode may be a video high definition mode, a beauty priority mode or an adaptive mode.
[0216] Among them, the display mode identifier can be understood as the value of the setting item corresponding to the video display mode. The values of the setting items corresponding to different video display modes are different. For example, the value of the setting item corresponding to the video high-definition mode can be binary 01, the value of the setting item corresponding to the beauty priority mode can be binary 10, and the value of the setting item corresponding to the adaptive mode can be binary 11.
[0217] For example, a user can Figure 4B Select the target display mode from the multiple preset video call modes displayed in the prompt window shown. Figure 4B A schematic diagram of a prompt window is shown in an exemplary embodiment of the present application. Figure 4B As shown, the prompt window includes options for video HD mode, beauty priority mode, adaptive mode and a confirm button. The user can select a video call mode in the prompt window by clicking, and submit the selected target display mode to the system UI by clicking the confirm button.
[0218] S411, the camera service module obtains an identifier of a target display mode set by a user from a target application.
[0219] Optionally, the identifier of a different display mode may be the value of a setting item corresponding to the display mode, or may be the name or code of the display mode.
[0220] It should be noted that after receiving the target display mode, the system UI also needs to send a data update instruction to the setting database to update the value of the video call mode setting item in the setting database. Different values correspond to different video call modes. In this way, when the video call is started again in the future, the setting database can configure the value of the video call mode setting item to the target application. Therefore, the camera service module can obtain the value of the video call mode setting item from the target application to determine the target display mode selected by the user.
[0221] S412: The camera service module determines a first resolution value corresponding to the target display mode according to the identifier.
[0222] The implementation method of determining the first resolution value according to the target display mode may include:
[0223] If the target display mode is the video high-definition mode, the second preset resolution is used as the first resolution value; if the target call mode is the beauty priority mode, the first preset resolution is used as the first resolution value; if the target call mode is the adaptive mode, the first resolution value can be determined according to the predicted call duration of the video call and the ambient temperature of the environment in which the electronic device is located. Optionally, the first preset resolution can be a preset minimum resolution, and the second preset resolution can be a preset maximum resolution.
[0224] For example, the preset maximum resolution can be understood as the maximum of multiple preset resolutions, and the preset minimum resolution can be understood as the minimum of multiple preset resolutions. For example, if the camera of the electronic device supports three resolutions of 1080P, 720P and 480P (that is, the preset resolutions of the electronic device include 1080P, 720P and 480P), the preset maximum resolution is 1080P, and the preset minimum resolution is 480P.
[0225] In some embodiments, the first resolution value may be determined by:
[0226] First, the camera service module determines whether the number of video calls is greater than a preset number.
[0227] For example, the preset number of times may be 30 times, 33 times, 36 times, or 40 times, etc.
[0228] It should be noted that the camera service module or the camera HAL module can record the number of video calls. Each time a video call ends, the number of video calls can be increased by one, and the updated number of video calls can be stored. In this step, the camera service module can first obtain the number of video calls, and then determine whether the obtained number of video calls is greater than the preset number.
[0229] Secondly, when the number of video calls is less than or equal to the preset number, the camera service module uses the preset highest resolution as the first resolution value.
[0230] The preset maximum resolution can be understood as the maximum of multiple resolutions supported by the camera. For example, when the camera supports three resolutions of 1080P, 720P and 480P, the preset maximum resolution can be 1080P.
[0231] In this S412, the reason why the preset highest resolution is used to capture video images when the number of video calls is less than or equal to the preset number is because it is considered that when the number of video calls is small, the hardware of the device is less worn and aged, and the internal resistance generated during the video call is less. Therefore, compared with devices with more calls, when the video call duration is the same, devices with fewer video calls will generate less heat and have a lower probability of overheating of the device. Therefore, when the number of video calls is small, images can be captured at a higher resolution to improve the video image quality, which is beneficial to improving the user experience.
[0232] Again, when the number of video calls is greater than a preset number, the camera service module obtains the predicted call duration, the current ambient temperature, and the energy consumption-temperature relationship of multiple resolutions under the current ambient temperature.
[0233] Among them, the predicted call duration can be the average call duration of multiple target historical video calls, or the median of multiple call durations corresponding to multiple target historical video calls, wherein the multiple target historical video calls can be historical video calls of the target application a specified number of times before this video call, and the specified number can be the same as the preset number or less than the preset number; for example, when the preset number is 30 times, the specified number can be the 30 times closest to the current video call, or the 25 times closest to the current video call. The specific data here is only used to exemplify how to determine the target video call, and is not used to limit the specific protection scope.
[0234] It should be noted that the ambient temperature can be obtained from a weather application, a thermometer application, or other applications containing ambient temperature. The energy consumption-temperature relationship includes the corresponding relationship between the call duration and the temperature change value. The energy consumption-temperature relationship can be in the form of a curve, a table, or a document. The energy consumption-temperature relationship can be stored in a preset file in the camera module for future use.
[0235] Finally, the first resolution value is determined according to the predicted call duration, the current ambient temperature, and the energy consumption-temperature relationship of multiple preset resolutions under the current ambient temperature.
[0236] In some embodiments, determining the first resolution value according to the predicted call duration, the current ambient temperature, and the energy consumption-temperature relationship of multiple preset resolutions at the current ambient temperature may include the following steps:
[0237] First, according to the energy consumption-temperature relationship of each preset resolution, a first temperature change value corresponding to the predicted call duration at the resolution is determined.
[0238] For example, Figure 4C This is a schematic diagram of an energy consumption-temperature relationship curve according to an exemplary embodiment of the present application. Figure 4C As shown in the figure, taking the current ambient temperature of 25 degrees Celsius as an example, curve 1080P represents the corresponding relationship between the call duration t and the device temperature change value △T when the image is captured at a resolution of 1080P; curve 720P represents the device temperature change value △T when the image is captured at a resolution of 720P as the call duration t increases; curve 480P represents the device temperature change value △T when the image is captured at a resolution of 480P as the call duration t increases. If the predicted call duration is 20 minutes, according to Figure 4C The energy consumption-temperature relationship shown in the figure shows that the first temperature change value of a 20-minute call is as follows: ,According to the resolution of 720P, the first temperature change value of the call for 20 minutes is ,According to the resolution of 480P, the first temperature change value of the call for 20 minutes is ,in, Here, it can be understood that, when the predicted call duration is constant, the temperature rise is negatively correlated with the resolution of the captured image.
[0239] Secondly, the first resolution value is determined according to the first temperature change value corresponding to each preset resolution.
[0240] In this step, one or more second temperature change values that are less than a preset change threshold value among the multiple first temperature change values can be determined, and the first resolution value can be determined based on the one or more second temperature change values. For example, the maximum resolution among one or more preset resolutions corresponding to one or more second temperature change values can be used as the first resolution value, or the resolution corresponding to the minimum of one or more second temperature change values can be used as the first resolution value.
[0241] For example, Figure 4C The example shown is used as an example to illustrate that if the preset change threshold is , assuming , then we can get a value less than the preset change threshold The second temperature change value is In one embodiment, due to , is the temperature rise value corresponding to 480P, is the temperature rise value corresponding to 720P, that is, the temperature rise value corresponding to the resolution 480P is smaller, and 480P can be used as the first resolution value; in another embodiment, The larger of the two resolutions is used as the first resolution value, that is, The corresponding resolution 720 is used as the first resolution value. The above example is only used to illustrate how to determine the recommended first resolution value according to the energy consumption-temperature relationship, and is not used to limit the specific protection range.
[0242] In this way, the first resolution value can be obtained according to the call duration of historical video calls, the current ambient temperature and the energy consumption-temperature relationship of multiple preset resolutions under the current ambient temperature. The camera is controlled to capture images according to the first resolution value, which can effectively avoid the device temperature rising too quickly during the video call, thereby reducing the probability of needing to perform beauty escape due to excessive device temperature.
[0243] S413: The camera service module sends a second stream distribution instruction carrying the first resolution value to the camera HAL module.
[0244] Among them, the second stream allocation instruction carries the first resolution value. In addition, the second stream allocation instruction may also include other parameters of the camera, such as the frame rate, exposure time, white balance and other parameters of the video call; here, the camera setting parameters that need to be carried in the second stream allocation instruction can be determined according to the first resolution value and the camera setting parameters in the first stream allocation instruction. In this step, the camera service module can call the Configure Stream () function to send the second stream allocation instruction to the camera HAL module.
[0245] S414: The camera HAL module sends the third stream distribution instruction to the camera driver module.
[0246] The third stream allocation instruction carries the same camera setting parameters as the second stream allocation instruction, and the second stream allocation instruction and the third stream allocation instruction are stream allocation instructions between different levels in the stream allocation process, and both are intended to configure the camera setting parameters. In this step, the camera HAL module can call the HAL Device Configure Stream () function to send the third stream allocation instruction to the camera driver module, so that the camera driver module configures the resolution of the image captured by the camera module according to the third stream allocation instruction.
[0247] S415, after receiving the third flow allocation instruction, the camera driving module configures the setting parameters of the camera module.
[0248] Among them, configuring the setting parameters of the camera module can be understood as writing the setting parameters of the camera module into a specified register for ready call; the camera module includes a camera, and the setting parameters may include the camera output resolution, the frame rate of the video call, the exposure time and white balance, etc.
[0249] S416, after configuring the setting parameters of the camera module, the camera driver module returns configuration completion information to the camera HAL module.
[0250] The configuration completion information is used to indicate that the flow allocation is completed.
[0251] S417, the camera HAL sends configuration completion information to the target application.
[0252] In this way, through the steps shown in S401 to S417, a stream distribution is completed, that is, the setting parameters are configured for the camera once, and then the image during the video call can be obtained according to the steps shown in the following S418 to S421.
[0253] S418, after receiving the configuration completion information, the target application periodically sends an image frame acquisition request to the camera driver module according to the frame rate in the setting parameters.
[0254] In this step, the target application can send the image frame acquisition request to the camera driver module through the request() function.
[0255] S419, after receiving the image frame acquisition request, the camera driver module returns the image frame captured by the camera to the camera HAL module.
[0256] In this step, the camera driver module may return the image frame to the HAL module through a callback function.
[0257] S420: When receiving an image frame, the camera HAL module obtains a beauty mark bit and determines whether to add a beauty effect according to the beauty mark bit.
[0258] It should be noted that the initial value of the beauty flag in the target application of the present application can be an identifier representing the addition of a beauty effect. For example, "1", "T" or "true" can be used to represent the loading of a beauty algorithm, that is, adding a beauty effect, and "0", "F" or "false" can be used to represent not loading a beauty algorithm, that is, not adding a beauty effect.
[0259] S421: If the camera HAL module determines to add a beauty effect according to the beauty flag, the camera HAL module performs beauty processing on the image frame to obtain a target image frame after the beauty effect is added.
[0260] In this step, the beauty algorithm can be set in the camera HAL module, and the camera HAL module can call the processframe() function to perform beauty processing on the image frame, that is, add the beauty effect. Before executing the process frame() function, the value of the beauty flag bit can be used to determine whether to execute the escape() function. When the beauty flag bit is set to "0", "F" or "false", the escape() function is executed to perform beauty escape, that is, no beauty effect is added. When the beauty flag bit is "1", "T" or "true", the process frame() function is executed to load the beauty algorithm and add the beauty effect.
[0261] S422: The camera HAL module returns the target image frame to the target application.
[0262] It should be noted that, in the video call request stage, the target image frame is used to display the screen in the video call request interface of the electronic device, such as Figure 1e After the video call is connected, the target image frame is used to display the video call interface of the target application in the electronic device, such as Figure 1g The screen 16-1 in the interface shown, Figure 1h The screen 15-2 in the interface shown is Figure 1i After the video call is connected, the target image frame is also used to display the video call interface of the target application in the other device, such as Figure 1k Screen 23 of the interface shown, and Figure 1l Screen 25 in the interface shown.
[0263] In addition, it should be noted that each time the target application sends a request, the camera HAL module will report an image frame. After receiving the image frame of the previous cycle, the target application sends a request again. After receiving the request, the camera HAL module reports another image frame. This is executed periodically, and the user can see a video screen.
[0264] S423, when the user clicks the end call button, the target application sends a data update instruction to the target service module and sends a resource release instruction to the camera activity management service.
[0265] The data update instruction is used to instruct the camera service module to record the duration of the video call and update the number of video calls. The resource release instruction is used to instruct the camera activity management service to release camera resources.
[0266] Optionally, the end call button can be Figure 1e The end call button 12A in the interface shown can also be Figure 1g and Figure 1h The end call button 12B in the interface shown can also be Figure 1j The end call button 20A and Figure 1k End call button 20B in the interface shown.
[0267] S424, when the camera service module determines that the data update instruction has been received, it records the duration of the video call and updates the number of video calls.
[0268] Optionally, the duration of the video call can be understood as the duration of the camera being turned on, and the time between the return time of the first frame image and the return time of the last frame image can be used as the duration of the video call. Alternatively, the time from the start of the video call to the end of the call can be used as the duration of the video call.
[0269] Updating the number of video calls in S424 may be understood as adding 1 to the number of video calls.
[0270] S425 , the camera activity management service releases the camera resources in response to receiving the resource release instruction sent by the target application.
[0271] It should be noted that, in some embodiments, the steps in S401 to S425 performed by the camera service module, such as the functions of S411, S412 and S424, may also be implemented by the camera HAL module.
[0272] The above S401 to S425 can determine the output resolution in the camera setting parameters according to the target display mode selected by the user, and in the adaptive mode, can determine the resolution of the camera captured image according to the user's target historical video call situation, the current ambient temperature and the energy consumption temperature relationship of the electronic device. Capturing images according to this resolution can effectively reduce the probability of excessive device temperature during the video call, thereby effectively reducing the probability of beauty escape, and further effectively improving the user experience.
[0273] In some embodiments, after the target application receives a video call request triggered by the user through the video call control, the camera module Figure 4A The camera is turned on in the manner shown, the first resolution value is determined, and the camera is called to capture the target image frame. At the same time, the camera module also periodically obtains the current device temperature. When it is determined that the current device temperature is higher than the preset high temperature threshold, the beauty effect is not added to the target image frame captured by the camera. When it is determined that the current device temperature is restored to below the preset low temperature threshold, the beauty algorithm is reloaded to add the beauty effect to the target image frame captured by the camera.
[0274] In other embodiments, Figure 4A The process of determining the first resolution value executed by the camera service module in the embodiment may be implemented by the target application, for example, one or more functions of S407, S412 and S424 may be executed by the target application, wherein the specific implementation process of the target application may be as follows: Figure 4D As shown, Figure 4D This is a timing diagram of a video calling method shown in another exemplary embodiment of the present application. The video calling method may include:
[0275] S430, the electronic device starts the target application.
[0276] The specific implementation of this step can refer to Figure 4A The relevant description of S400 will not be repeated here in this application.
[0277] S431, when the user clicks the video call control, the target application sends a camera start instruction to the camera HAL module, and determines whether this video call is the first video call of the target application.
[0278] Optionally, the first video call can be understood as the first video call made by the electronic device based on the target application after leaving the factory, for example, the first video call made based on the target application after turning on the new phone for the first time; or the first video call made based on the target application after the electronic device is restored to factory settings.
[0279] In this step, when the user clicks the video call control, the target application sends a camera start instruction to the camera HAL module. Figure 4A The implementation method of determining whether the current video call is the first video call of the target application in this step may include:
[0280] By setting the first flag bit of the first video call, whether it is the first video call is determined according to the value of the first flag bit. For example, when the video call has not been started, the value of the first flag bit can be true. After the video call is started, the first flag bit can be set to false. Accordingly, when determining whether it is the first video call of the target application, it can be determined whether the first flag bit is true. If it is true, it is determined that the video call started this time is the first video call of the target application. If it is false, it is determined that the video call started this time is not the first video call. Optionally, the first flag bit can be set to false when the Activity is started for the first time (the video call interface is created).
[0281] After S431, if it is determined that this video call is the first video call of the target application, S432 is executed; if it is determined that this video call is not the first video call of the target application, S434 is executed.
[0282] S432, the target application draws a preset prompt window.
[0283] Optionally, the target application may draw the preset prompt window through a UI thread of the application.
[0284] After drawing the preset prompt window, the electronic device can display the preset prompt window through the display screen.
[0285] It should be noted that the preset prompt window can be a preset prompt box, which can be used to prompt the user to select a target display mode. The preset prompt box can include a video HD mode, a beauty priority mode, and an adaptive mode. The video HD mode is a video call display mode that prioritizes video image clarity, the beauty priority mode is a video call display mode that prioritizes loading the beauty algorithm, and the adaptive mode is a video call display mode that determines the resolution of the camera captured image based on the device temperature, ambient temperature, and the number of video calls of the target application. When the device temperature is too high, the device power consumption can be reduced by reducing the resolution and / or escaping the beauty algorithm to avoid device overheating. The resolution of the image captured by the camera in the video HD mode is higher than that in the beauty priority mode. The video HD mode, the beauty priority mode, and the adaptive mode all add a beauty effect when the device temperature is less than the preset upper temperature threshold.
[0286] S433: After the user selects a target display mode through the preset prompt window, the target application determines a first resolution value corresponding to the selected target display mode.
[0287] In this step, the target application determines the first resolution value corresponding to the target display mode. Figure 4A The description of the camera service module determining the first resolution value corresponding to the target display mode in S412 is not repeated here in this application because the only difference between this step and S412 is the execution subject and the implementation process is the same.
[0288] S434: The target application obtains an identifier of the target display mode set by the user.
[0289] Among them, the display mode identifier can be understood as the value of the setting item corresponding to the video display mode. The values of the setting items corresponding to different video display modes are different. For example, the value of the setting item corresponding to the video high-definition mode can be binary 01, the value of the setting item corresponding to the beauty priority mode can be binary 10, and the value of the setting item corresponding to the adaptive mode can be binary 11.
[0290] S435: The target application determines a first resolution value according to the identifier.
[0291] For example, still taking S434 as an example, when the target display mode identifier set by the user is 10, the first preset resolution is used as the first resolution value; when the target display mode identifier is 01, the second preset resolution is used as the first resolution value; when the target display mode identifier set by the user is 11, the first resolution value can be determined according to the predicted call duration of the video call and the ambient temperature of the environment in which the electronic device is located. Optionally, the first preset resolution can be a preset minimum resolution, and the second preset resolution can be a preset maximum resolution.
[0292] S436: The target application sends a first target flow distribution instruction carrying the first resolution value to the camera service module.
[0293] S437, the camera service module sends a second target flow allocation instruction to the camera HAL module.
[0294] S438, the camera HAL module sends a third target flow allocation instruction to the camera driver module.
[0295] S439: After receiving the third target flow allocation instruction, the camera driving module configures the setting parameters of the camera module.
[0296] S440, after configuring the setting parameters of the camera module, the camera driver module returns configuration completion information to the camera HAL module.
[0297] S441, the camera HAL sends configuration completion information to the target application.
[0298] The setting parameters of the camera module in the first target flow allocation instruction, the second target flow allocation instruction and the third target flow allocation instruction shown in S436 to S441 above are the same. Sending the first target flow allocation instruction, the second target flow allocation instruction and the third target flow allocation instruction can be understood as calling the Configure Stream () function to configure the resolution of the captured image of the camera module to the first resolution value, and the process of layer-by-layer flow allocation.
[0299] In this way, through the steps shown in S430 to S441, a flow distribution is completed, that is, the setting parameters are configured for the camera once, and then, Figure 4A The steps S418 to S421 are used to obtain images during a video call, which will not be repeated in this application.
[0300] The above technical scheme can determine the output resolution in the camera setting parameters according to the target display mode selected by the user, and in adaptive mode, can determine the resolution of the camera captured image according to the user's target historical video call situation, the current ambient temperature and the energy consumption temperature relationship of the electronic device. Capturing images according to this resolution can effectively reduce the probability of excessive device temperature during video calls, thereby effectively reducing the probability of beauty escape, and further effectively improving the user experience.
[0301] In some other embodiments, after the video call is started, the window management service module can monitor the display status of the target application, wherein the display status can include the system small window display status and the system full screen display status, and the camera service module can adjust the resolution of the camera image according to the display status to reduce power consumption and avoid the device temperature from rising too fast; specifically, Figure 5A As shown, Figure 5A According to this application Figure 4A The embodiment shows a timing diagram of a video call method, and the video call method may further include:
[0302] S501, after the user clicks the video call button, the target application sends a system full-screen display status identifier to the camera service module.
[0303] The system small window display state is also referred to as the small window display state, the system full screen display state is also referred to as the full screen display state, and the system full screen display state identifier is used to indicate the start of the first timer. The system full screen display state can be understood as at least one of the peer image and the local image being displayed in full screen state, for example Figure 1e The interface shown, Figure 1g The interface shown in 1h and Figure 1k The interfaces shown can all be understood as the system full-screen display state. Optionally, the default display state of the target application is the system full-screen display state.
[0304] S502: After receiving the full-screen display status identifier of the system, the camera service module starts timing through a first timer and periodically sends a display status acquisition request to the window management service module.
[0305] The display status acquisition request is used to instruct the window management service module to return the current display status of the target application. The first timer is a timing module of the software, and the implementation of the timer can be achieved by calling the run() function.
[0306] S503: After receiving the display status acquisition request, the window management service module returns the current display status identifier to the camera service module.
[0307] The display status identifier is used to indicate the system small window display status or the system full screen display status. For example, the characters "small window" or "XC" can be used to indicate the system small window display status, and the characters "full screen" or "QP" can be used to indicate the system full screen display status.
[0308] Optionally, steps 502-503 may also be implemented in other ways. For example, when the window management service determines that the display state of the target application has changed, it may send a state change notification to the target application, and the state change notification includes a display state identifier after the change.
[0309] S504: The camera service module determines whether to switch from the system full-screen display state to the system small-window display state according to the display state identifier returned by the window management service module.
[0310] Among them, it can be determined whether to switch from the full-screen display state to the small window display state according to the display state of two adjacent samples; for example, when the current display state is the system small window display state and the previous display state is the non-full-screen display state, it is determined to switch from the full-screen display state to the small window display state. If the current display state is represented by the variable New and the previous display state is represented by the variable Current, the current display state can be updated through the code "If (New = small window && Current! = small window), Current = New", and it is determined that the display state is switched from the full-screen display state to the small window display state.
[0311] In S504, if it is determined that the full-screen display state is switched to the small-window display state, S505 is executed. If it is determined that the display state has not changed, the display state identifier of the next cycle is obtained, and S504 is executed again.
[0312] It should be noted that when it is determined that the display status has not changed, the resolution is not adjusted and there is no need to reallocate the stream. The camera module still captures images according to the resolution in the last configured setting data.
[0313] S505, starting timing through a second timer.
[0314] The second timer is also a timing module of the software, and the implementation of the timer can also be achieved by calling the run() function.
[0315] It should be noted that while the second timer is timing, the camera service module also periodically determines whether to switch from small window display to full screen display based on the current display status. When it is determined that the small window display is switched to full screen display, the first timer starts timing, and the second timer continues timing. When the timing duration of the first timer exceeds the second preset duration, the second timer is reset.
[0316] S506, the camera service module determines whether the timing duration of the second timer exceeds the first preset duration.
[0317] Before the small window display state is switched to the full screen display state, the timing duration of the second timer is used to represent the duration of the system small window display. In this step, if the timing duration of the second timer exceeds the first preset duration, it can indicate that the duration of the system small window display exceeds the first preset duration.
[0318] After this step, when the timing duration of the second timer exceeds the first preset duration, S507 is executed; when the timing duration of the second timer does not exceed the first preset duration, S504 is executed again.
[0319] It should be noted that when the timing duration of the second timer does not exceed the first preset duration, the resolution is not adjusted and there is no need to re-distribute the stream. The camera module still captures images according to the resolution in the setting data of the last configuration.
[0320] S507: The camera service module sends a fourth streaming instruction carrying the first preset resolution to the camera HAL module, and resets the first timer.
[0321] Optionally, the first preset resolution may be the smallest of a plurality of preset resolutions supported by the camera of the electronic device, and the first preset resolution may also be described as a preset minimum resolution.
[0322] It should be noted that sending the fourth stream configuration instruction can be understood as calling the configure stream() function to send the camera's setting parameters to the camera HAL module, and the resolution of the camera's captured image in the setting parameters is the preset minimum resolution. The preset minimum resolution can be understood as the smallest of multiple preset resolutions. For example, if the camera of the electronic device supports three resolutions of 1080P, 720P and 480P, the preset maximum resolution is 1080P, and the preset minimum resolution is 480P. The first preset duration can be preset to 1 minute, 1.5 minutes or 2 minutes, etc.
[0323] S508: After receiving the fourth flow distribution instruction, the camera HAL module sends a fifth flow distribution instruction to the driving module.
[0324] Among them, the fourth stream allocation instruction has the same camera setting parameters as the fifth stream allocation instruction. Sending the fourth stream allocation instruction and the fifth stream allocation instruction can be understood as calling the Configure Stream () function to configure the resolution of the camera's captured image to the preset minimum resolution, and then performing layer-by-layer stream allocation.
[0325] S509: After receiving the fifth stream allocation instruction, the camera driving module configures the resolution of the captured image in the setting parameters of the camera to the first preset resolution.
[0326] It should be noted that before the camera driver module updates the resolution of the image captured by the camera to the first preset resolution, the resolution of the image captured by the camera may be the first resolution value determined according to the above step S412. After the camera driver module updates the resolution of the image captured by the camera to the first preset resolution, the camera captures the image according to the first preset resolution and returns the captured image to the camera HAL module. After the camera HAL module performs beauty processing or beauty escape on the image according to the beauty mark, the processed image is returned to the target application, so that the target application displays the processed image through the electronic device display.
[0327] In the above S504 to S509, when it is determined that the system is switched from full-screen display state to small-window display state, the resolution of the captured image in the setting parameters of the camera can be updated to the first preset resolution. Since the display screen is small when the small window is displayed, the reduction in the resolution of the captured image will not affect the user experience. In addition, the reduction in the resolution of the image captured by the camera can effectively reduce the power consumption of the device, which is beneficial to reduce the probability of temperature increase of the device.
[0328] In addition, it should be noted that the camera service module periodically determines whether to switch from the system full-screen display state to the system small window display state, and also periodically determines whether to switch from the system small window display state to the system full-screen display state. The implementation process of switching from the system small window display state to the system full-screen display state is shown in S510 to S515:
[0329] S510: The camera service module determines whether to switch from the system small window display state to the system full screen display state according to the display state identifier returned by the window management service module.
[0330] When the camera service module determines that the small window display is switched to the full screen display, it executes S511. When it determines that there is no change in the display state, it obtains the display state identifier of the next cycle and executes S510 again.
[0331] It should be noted that when the display status has not changed, the resolution is not adjusted and there is no need to reallocate the stream. The camera module still captures images according to the resolution in the last configured setting data.
[0332] S511, the camera service module starts timing through a first timer.
[0333] It should be noted that while the first timer is timing, the camera service module is also periodically determining whether to switch from the system full-screen display state to the system small-window display state based on the current display state identifier. When it is determined that the system full-screen display state is switched to the system small-window display state, the second timer starts timing. At this time, the first timer continues timing. When the timing duration of the second timer exceeds the first preset duration, the second timer is reset.
[0334] S512, the camera service module determines whether the timing duration of the first timer exceeds a second preset duration.
[0335] Before determining that the system full-screen display state is switched to the system small window display state, the timing duration of the first timer can be understood as the second duration of maintaining the full-screen display. In this step, if the timing duration of the first timer exceeds the second preset duration, it can indicate that the second duration of the system full-screen display exceeds the second preset duration.
[0336] After this step, if the timing duration of the first timer exceeds the second preset duration, S513 is executed, and if the timing duration of the first timer does not exceed the second preset duration, S510 is executed again.
[0337] It should be noted that when the timing duration of the first timer does not exceed the second preset duration, the resolution is not adjusted and there is no need to re-distribute the stream. The camera module still captures images according to the resolution in the setting data of the last configuration.
[0338] S513: The camera service module sends a sixth stream distribution instruction carrying the first resolution value to the camera HAL module, and resets the second timer.
[0339] The first resolution value may be the resolution determined in step S412 before the camera driver module updates the resolution of the image captured by the camera to the preset minimum resolution in step S509. The second preset duration is less than the first preset duration. For example, the second preset duration may be less than 1 minute, for example, 30 seconds, and the first preset duration may be 1 minute, 1.5 minutes or 2 minutes.
[0340] S514: After receiving the sixth streaming instruction, the camera HAL module sends a seventh streaming instruction to the camera driver module.
[0341] Among them, the camera service module sends the sixth stream allocation instruction to the camera HAL module through S511 and S512, and the camera HAL module sends the seventh stream allocation instruction to the camera driver module, which can be understood as a layer-by-layer stream allocation process of calling the stream allocation function to configure the resolution of the camera's captured image to the first resolution value.
[0342] S515: In response to receiving the seventh stream allocation instruction, the camera driving module updates the resolution of the captured image in the camera setting parameters to the first resolution value.
[0343] It should be noted that after the camera driver module updates the resolution of the image captured by the camera to the first resolution value, the camera captures the image according to the first resolution value and returns the captured image to the camera HAL module. The camera HAL module performs beauty processing or beauty escape on the image according to the beauty mark, and then returns the processed image to the target application so that the target application can display the processed image. The specific implementation process of the camera capturing the image according to the first resolution value and returning the processed image to the target application can be referred to. Figure 4A The implementation process described in S419 to S422 will not be repeated here in this application.
[0344] The steps described in the above S510 to S515 can, when it is determined that the system small window display state is switched to the system full screen display state, and the duration of the system full screen display state exceeds the second preset duration, restore the resolution of the image captured by the camera from the preset minimum resolution to the first resolution value before switching to the small window display. This can effectively avoid frequent adjustments to the camera output resolution when the display state is switched frequently in a short period of time, thereby effectively improving the stability of image acquisition during video calls.
[0345] In addition, it should be noted that in some embodiments, Figure 5A The steps performed by the camera service module, such as S502, S504-S507, S510-S513, can also be implemented by the camera HAL module. The steps of adjusting the resolution according to the display state described in S504 to S509, and S510 to S515 can be executed in parallel in a loop before receiving the end video call instruction triggered by the end call button of the user described in S424.
[0346] The above technical solution can adjust the resolution of the captured image of the camera according to the system display status, thereby further reducing the power consumption of the device without affecting the user's video call experience, which is conducive to further improving the experience of the device user.
[0347] In some embodiments, the camera service module can obtain an application window display state from the target application, and the application window display state can include a first application display state and a second application display state. The first application display state can be understood as the local image is displayed through the second floating window. Optionally, the first application display state can also be understood as the local image is displayed through the second floating window, and the area of the opposite end image display area is larger than the area of the second floating window. Optionally, the first application display state can also be understood as the local image is displayed through the second floating window, and the opposite end image is displayed in full screen (such as Figure 1g The second application display state can be understood as the opposite end image is displayed through the second floating window. Optionally, the second application display state can be understood as the opposite end image is displayed through the second floating window, and the area of the local image display area is larger than the area of the second floating window. Optionally, the second application display state can be understood as the opposite end image is displayed through the second floating window, and the local image is displayed in full screen (such as Figure 1h As shown). Among them, when the camera service module determines that the target application is currently in the first application display state, it can refer to the logic of adjusting the resolution of the camera module to collect images in the system small window display state to adjust the resolution of the camera module to collect images; when it is determined that the target application is currently in the second application display state, it can refer to the logic of adjusting the resolution of the camera module to collect images in the system full screen display state to adjust the resolution of the camera module to collect images, so as to achieve the effect of further reducing the power consumption of the device without affecting the user's video call experience. The specific implementation process is as follows Figure 5B As shown, Figure 5B This application is based on Figure 4A The timing diagram of another video call method shown in the embodiment shown in FIG. Figure 5B As shown, the video calling method includes:
[0348] S520: After the user clicks the video call button, the target application sends a second application display status identifier to the camera service module.
[0349] Optionally, the second application display state identifier is a default window display state of the target application.
[0350] It should be noted that the video call button can be Figure 1d Button 111 in the interface. The first application display state identifier may be a character or code for indicating the display state of the first application, and the second display state identifier may be a character or code for indicating the display state of the second application. For example, the first application display state identifier may be N1, and the second display state identifier may be N2.
[0351] S521: After receiving the second application display status identifier, the camera service module starts timing through a third timer.
[0352] In this step, before determining to switch from the second application display state to the first application display state, or, before switching from the second application display state to the system small window display state, the timing duration of the third timer is used to represent the duration that the target application is in the second application display state.
[0353] S522: When the target application determines that the display state of the application window has a specified change, the target application sends a window display state change notification to the camera service module.
[0354] Optionally, S522 may be replaced by the target application periodically sending the current application window display status to the camera service module.
[0355] The window display status change notification includes the latest application window display status.
[0356] It should be noted that there are six situations in which the display state of the application window changes: situation one, switching from the second application display state to the system small window display state; situation two, switching from the second application display state to the first application display state; situation three, switching from the system small window display state to the first application display state; situation four, switching from the first application display state to the system small window display state; situation five, switching from the first application display state to the second application display state; situation six, switching from the system small window display state to the second application display state. Among them, in situations one and two, since the local image will be displayed through the second floating window, reducing the image output resolution of the camera module will not affect the user experience, so the power consumption can be reduced by reducing the image output resolution; in situations five and six, since the local image will be displayed in full screen, it is necessary to increase the image output resolution of the camera module to avoid affecting the video call experience; in situations three and four, the application window display state change may not be reported, that is, the window display state change notification is not sent to the camera service module. That is, the specified change can be a change in situation one, situation two, situation five, and situation six.
[0357] S523, the camera service module determines whether to switch from the second application display state to the first application display state, or switch from the second application display state to the system small window display state.
[0358] Optionally, when it is determined that the window display state change notification has not been received, it is determined that the application window display state has not changed, it is determined that the display state has not been switched from the second application display state to the first application display state, and it is determined that the display state has not been switched from the second application display state to the system small window display state. When it is determined that the window display state change notification has been received, if the current application window display state is the second application display state and the latest application window display state is the first application display state, it is determined that the display state has been switched from the second application display state to the first application display state; if the current application window display state is the second application display state and the latest application window display state is the system small window display state, it is determined that the display state has been switched from the second application display state to the system small window display state.
[0359] After this step, if it is determined that the display state of the second application is switched to the display state of the first application, S524 is executed; if it is determined that the display state has not changed, S523 is executed again.
[0360] It should be noted that when it is determined that the display status has not changed, or has not been switched from the second application display state to the first application display state, and has not been switched from the second application display state to the system small window display state, the resolution is not adjusted and there is no need to re-allocate the stream. The camera module still captures images according to the resolution in the setting data of the last configuration.
[0361] S524, the camera service module starts timing through a fourth timer.
[0362] S525, the camera service module determines whether the timing duration of the fourth timer exceeds the third preset duration.
[0363] After this step, when the timing duration of the fourth timer exceeds the third preset duration, execute S525; when the timing duration of the fourth timer does not exceed the third preset duration, execute S523 again, that is, when the timing duration of the fourth timer does not exceed the third preset duration, the resolution is not adjusted, and there is no need to re-allocate the flow. The camera module still captures images according to the resolution in the setting data of the last configuration.
[0364] S526: The camera service module sends a streaming instruction carrying the first preset resolution to the camera HAL module, and resets the third timer.
[0365] S527: After receiving the stream allocation instruction carrying the first preset resolution, the camera HAL module sends the stream allocation instruction to the camera driver module.
[0366] S528: After receiving the stream allocation instruction, the camera driving module configures the resolution of the captured image in the setting parameters of the camera to the first preset resolution.
[0367] It should be noted that before the camera driver module updates the resolution of the image captured by the camera to the first preset resolution, the resolution of the image captured by the camera may be the first resolution value determined according to the above step S412. After the camera driver module updates the resolution of the image captured by the camera to the first preset resolution, the camera captures the image according to the first preset resolution and returns the captured image to the camera HAL module. After the camera HAL module performs beauty processing or beauty escape on the image according to the beauty mark, the processed image is returned to the target application, so that the target application displays the processed image through the electronic device display.
[0368] In the above S520 to S528, when it is determined that the display state is switched from the second application to the first application or from the second application to the system window, the resolution of the captured image in the setting parameters of the camera can be updated to the first preset resolution. Since the display screen of the local image is small in the first application display state, the reduction in the resolution of the captured image will not affect the user experience. In addition, the reduction in the resolution of the image captured by the camera can effectively reduce the power consumption of the device, thereby helping to reduce the probability of temperature increase of the device.
[0369] In addition, it should be noted that the camera service module periodically determines whether to switch from the second application display state to the first application display state, or from the second application display state to the system small window display state, while also periodically determining whether to switch from the first application display state to the second application display state, or from the system small window display state to the second application display state. Among them, when switching from the first application display state to the second application display state or from the system small window display state to the second application display state, since the local image becomes full-screen display, the resolution is too low and will affect the user experience. Therefore, it is necessary to promptly increase the resolution of the image captured by the camera module. The specific process can be shown as S529 to S534:
[0370] S529, the camera service module determines whether to switch from the first application display state to the second application display state or from the system small window display state to the second application display state.
[0371] Among them, the camera service module executes S530 when it is determined that the display state of the first application is switched to the second application display state or the display state of the system small window is switched to the second application display state; when it is determined that the display state of the first application is not switched to the second application display state and the display state of the system small window is not switched to the second application display state, it executes S529 again.
[0372] It should be noted that when it is determined that the display state has not been switched from the first application display state to the second application display state and the display state has not been switched from the system small window display state to the second application display state, the resolution is not adjusted and there is no need to re-allocate the stream. The camera module still captures images according to the resolution in the setting data of the last configuration.
[0373] S530: The camera service module starts timing via a third timer.
[0374] S531, the camera service module determines whether the timing duration of the third timer exceeds a fourth preset duration.
[0375] In this step, if the timing duration of the third timer exceeds the fourth preset duration, it may indicate that the duration of the full-screen display of the local image exceeds the fourth preset duration.
[0376] After this step, if the timing duration of the third timer exceeds the fourth preset duration, S532 is executed; if the timing duration of the third timer does not exceed the fourth preset duration, S529 is executed again.
[0377] It should be noted that, when the timing duration of the third timer does not exceed the fourth preset duration, it indicates that the time for full-screen display of the local image is too short. In order to avoid frequent switching of the display status and frequent adjustment of the camera output resolution causing unnecessary power consumption, when the timing duration of the third timer does not exceed the fourth preset duration, the resolution will not be adjusted and there is no need to reallocate the flow. The camera module still captures images according to the resolution in the setting data of the last configuration.
[0378] S532: The camera service module sends a stream allocation instruction carrying the first resolution value to the camera HAL module, and resets the fourth timer.
[0379] S533: After receiving the stream allocation instruction carrying the first resolution value, the camera HAL module sends the stream allocation instruction to the camera driver module.
[0380] S534: After receiving the stream allocation instruction, the camera driving module updates the resolution of the captured image in the setting parameters of the camera to the first resolution value.
[0381] S532 and S533 may be understood as a layer-by-layer flow allocation process of calling a flow allocation function to configure the resolution of the captured image of the camera to the first resolution value.
[0382] The steps described in S529 to S534 above can restore the resolution of the image captured by the camera from the preset minimum resolution to the first resolution value before switching to the small window display when switching from the first application display state to the second application display state or from the system small window display state to the second application display state. This can effectively avoid the impact of too low resolution on user experience when the local image becomes full-screen display, and can also avoid frequent adjustment of the camera output resolution, thereby effectively improving the stability of image acquisition during video calls.
[0383] Figure 6 is based on Figure 4A The timing diagram of another video call method shown in the embodiment shown. After the user clicks the video call button, the camera service module periodically obtains the device temperature and the system display status of the target application, the system display status includes the system small window display status and the system full screen display status, adjusts the resolution of the camera's captured image according to the device temperature and the system display status, and captures the video image according to the adjusted resolution to avoid the device temperature being too high. The specific steps are as follows: Figure 6 As shown:
[0384] S600, after receiving the target activation result of the camera hardware activation, the target application sends a request for registering a temperature monitoring client to the thermal management daemon service module.
[0385] Among them, the temperature monitoring client can be registered to the thermal management daemon service module through the Register Client() function.
[0386] In this step, the implementation process of receiving the target opening result of the camera hardware opening can refer to Figure 4A The relevant descriptions in S401 to S404 will not be repeated in this application.
[0387] S601, after completing the registration of the temperature monitoring client, if the thermal management daemon service module determines that the device temperature has changed, it sends a temperature change notification to the temperature monitoring client, and the temperature change notification includes the changed device temperature.
[0388] Optionally, the camera service module may include the temperature monitoring client program.
[0389] Among them, the thermal management daemon service module may include a device temperature monitoring list, which includes the identifiers of one or more temperature monitoring clients. When registering a temperature monitoring client, the identifier of the target application may be stored in the device temperature monitoring list as a representation of the registered temperature monitoring client. When determining that the device temperature changes, the thermal management daemon service module sends a notify carrying the latest device temperature to the client in the temperature monitoring list. The temperature monitoring client of the target application is one of the one or more temperature monitoring clients in the temperature monitoring list. After receiving the notify, the camera service module can set the latest temperature in the temperature monitoring client by calling Set LatestThermal Level().
[0390] S602: The camera service module periodically obtains the current device temperature from the temperature monitoring client.
[0391] The camera service module can obtain the current device temperature from the temperature monitoring client through the getTemperature() function.
[0392] S603: The camera service module determines whether the current device temperature exceeds a first temperature threshold.
[0393] The fact that the current device temperature exceeds the first temperature threshold may be understood as the current device temperature of the electronic device being greater than the first temperature threshold.
[0394] After this step, when the camera service module determines that the current device temperature exceeds the first temperature threshold, the count value of the counter is controlled to increase by one, and S604 is executed. When it is determined that the current device temperature does not exceed the first temperature threshold, it is determined whether the count value of the counter is greater than the initial count value. When it is determined that the count value of the counter is equal to the initial count value, the current device temperature of the next cycle is obtained, and S603 is executed again. The counter is used to record the number of times the device temperature exceeds the first temperature threshold before the device temperature is lower than the second temperature threshold. The first temperature threshold and the second temperature threshold can be pre-set, the second temperature threshold is less than the first temperature threshold, the first temperature threshold can be understood as a preset high temperature threshold, and the second temperature threshold can be understood as a preset low temperature threshold. For example, the first temperature threshold can be a value between 44°C and 45°C, and the second temperature threshold can be a value between 40°C and 41°C.
[0395] S604: The camera service module determines whether the first temperature threshold is exceeded for the first time during the video call.
[0396] In this step, a second mark bit can be set to indicate whether the device temperature exceeds the first temperature threshold for the first time during this video call. The initial value of the second mark bit can be true. When the device temperature exceeds the first temperature threshold for the first time, true is changed to false. After the device temperature exceeds the first temperature threshold for the first time, if it is determined again that the device temperature exceeds the first temperature threshold, the value of the second mark bit will not be updated. When determining whether it is the first time to exceed the first temperature threshold during this video call, if the value of the second mark bit obtained is false, it is determined that the device temperature exceeds the first temperature threshold this time and it is not the first time to exceed the first temperature threshold.
[0397] After this step, if it is determined that this is the first time that the first temperature threshold is exceeded during this video call, execute S605; if it is determined that this is not the first time that the first temperature threshold is exceeded during this video call, execute S607.
[0398] S605: The camera service module obtains a target duration between the time when the third temperature threshold is expected to be exceeded and the current time.
[0399] Among them, the third temperature threshold is greater than the first temperature threshold. Optionally, the third temperature threshold can be a preset extreme high temperature. The target duration can indicate the time from the current moment to the time when the device temperature reaches the extreme high temperature. Optionally, the target duration can be understood as the remaining time for maintaining the current state and the beauty effect. It should be noted that during the video call, since no other cooling or power consumption reduction measures will be taken, the device temperature will usually not decrease before the device reaches the extreme high temperature, but will continue to rise slowly.
[0400] In a possible implementation manner, the implementation process of the camera service module determining the target duration may include:
[0401] S11, the camera service module determines the inactive talk time corresponding to the third temperature threshold according to the energy consumption-temperature relationship corresponding to the first resolution value.
[0402] The energy consumption-temperature relationship includes the corresponding relationship between the duration of the video call and the temperature change value. The energy consumption-temperature relationship can be expressed in the form of a curve, a table, or a document. An ambient temperature and a resolution can correspond to an energy consumption-temperature relationship, such as Figure 4C As shown, under the current ambient temperature, the resolution 1080P corresponds to one energy consumption temperature curve, 720P corresponds to one energy consumption temperature curve, and 480P corresponds to one energy consumption temperature curve.
[0403] Optionally, the standby call duration may be a limit call duration corresponding to the third temperature threshold. The limit call duration represents the length of time required for the electronic device to reach a preset limit temperature when the electronic device is in a video call state based on a target application, and the preset limit temperature represents the maximum temperature that the electronic device can withstand for normal operation.
[0404] S12, the camera service module determines the target duration according to the idle call duration.
[0405] For example, Figure 4C Take an example to illustrate, when the energy consumption-temperature relationship is an energy consumption-temperature rise curve, the horizontal axis of the energy consumption-temperature rise curve represents the call duration of the video call; the vertical axis represents the increase in device temperature; the energy consumption-temperature rise curve can be used to determine the horizontal axis corresponding to the preset limit temperature to obtain the limit call duration, and the difference between the limit call duration and the current call duration can be obtained to obtain the target duration.
[0406] S606: After the target time, the camera service module obtains the device temperature and the display status of the target application.
[0407] Optionally, within the target duration, the camera service module no longer obtains the device temperature and the display status of the target application.
[0408] In this step, pausing the acquisition of device temperature and display status within the target duration can be understood as delaying the acquisition of device temperature for the target duration. Since the device temperature and the display status of the target application will not be obtained within the target duration, the action of updating the camera setting parameters according to the device temperature and the action of updating the camera setting parameters according to the system window status can be temporarily stopped, so that the camera can still capture images according to the resolution of the camera image captured in the setting parameters of the last flow distribution.
[0409] It should be noted that, since the target duration is determined based on the energy consumption temperature rise curve under the current ambient temperature, the remaining time to reach the preset limit temperature, the probability of the device temperature exceeding the preset limit temperature is low within the target duration, so the current temperature and display status may not be obtained temporarily within the target duration, and the camera output resolution may not be updated. After the target duration, that is, after reaching the limit call duration, the device temperature and window status are obtained again. If the device temperature exceeds the first temperature threshold again, the following steps S607 to S615 may be performed:
[0410] S607: When the camera service module determines that the temperature exceeds the first temperature threshold during the video call but not for the first time, the camera service module determines whether the current resolution is a preset minimum resolution.
[0411] Optionally, combined Figure 4AIn the related description of determining the first resolution value in S412, the current resolution can be the first resolution value. When the current resolution is the preset minimum resolution, execute S608. When the current resolution is not the preset minimum resolution, execute step S609.
[0412] The first resolution value can be understood as the current image output resolution of the camera, and the current image output resolution can be Figure 4A The resolution determined in step 412 may be the output resolution adjusted according to the device temperature, or may be the initial preset output resolution.
[0413] For example, when the camera supports three resolutions of 1080P, 720P and 480P, the preset minimum resolution may be 480P.
[0414] S608: The camera service module sets the beauty mark as the first designated mark.
[0415] The first designated mark is used to indicate that no beautification effect is added.
[0416] It should be noted that the first designated mark can be "0", "F" or "false", which is used to indicate the need for beauty escape, that is, no beauty effect is added. Before executing the process frame() function, the value of the beauty mark bit can be used to determine whether to execute the escape() function. The escape() function is used for beauty escape, wherein when the beauty mark bit is set to "0", "F" or "false", the escape() function is executed. In this way, through beauty escape, the power consumption of the device can be effectively reduced, which in turn helps to reduce the rate at which the temperature of the device rises, thereby achieving the effect of avoiding excessive temperature of the device.
[0417] S609: The camera service module obtains a second resolution value.
[0418] Optionally, the second resolution value is smaller than the first resolution value.
[0419] Optionally, there may be a corresponding relationship between the first resolution value and the second resolution value. For example, when the camera supports three resolutions of 1080P, 720P and 480P, if the first resolution value is 1080P, the second resolution value may be 720P; if the first resolution value is 720P, the second resolution value may be 480P.
[0420] Optionally, the resolution may be reduced according to a preset list / sequence. For example, a resolution list list may be preset, list = [1080P, 720P, 480P], and when the current resolution is 720P, the second resolution value obtained may be the next resolution in the list, 480P.
[0421] It should be noted that, in some embodiments, after executing S603, S607 and S609, the current resolution may be reduced to the preset minimum resolution, so in step 607, the current resolution is determined to be the preset minimum resolution. In other embodiments, after executing S603, S607 and S609 multiple times in a loop, the current resolution may be reduced to the preset minimum resolution.
[0422] S610: The camera service module sends an eighth stream allocation instruction carrying a second resolution value to the camera HAL module.
[0423] In this step, the eighth stream configuration instruction carrying the second resolution value may be issued through the Configure Stream () function.
[0424] S611, after receiving the eighth stream allocation instruction, the camera HAL module sends a ninth stream allocation instruction to the camera driver module.
[0425] Among them, the setting parameters of the camera in the eighth stream allocation instruction and the ninth stream allocation instruction are the same. Sending the eighth stream allocation instruction and the ninth stream allocation instruction can be understood as a layer-by-layer stream allocation process when calling the Configure Stream () function to configure the resolution of the camera's captured image to the second resolution value.
[0426] S612: The camera driving module updates the setting parameters of the camera according to the second resolution value.
[0427] S613: When the camera driver module determines that the configuration of the setting parameters is completed, the camera driver module returns configuration completion information to the camera HAL module.
[0428] S614, the camera HAL returns the received stream allocation completion information to the camera service module.
[0429] S615, after a preset buffering time after receiving the flow distribution completion information, the camera service module obtains the device temperature and system display status, and returns the flow distribution completion information to the target application.
[0430] Optionally, within a preset buffering time, the camera service module may no longer obtain the device temperature and the system display status of the target application.
[0431] This step can be understood as delaying the preset buffering time to execute the acquisition of the device temperature and display status. When the acquisition of the device temperature and display status is delayed, the image is still collected according to the current setting parameters of the camera.
[0432] In addition, the preset buffering time can be 1min, 1.5min or 2min, etc. During the preset buffering time, the acquisition of device temperature and display status is suspended, so as to achieve the purpose of delaying the adjustment of the resolution of the camera image. Frequent adjustment of the resolution of the camera image in a short period of time can be avoided, thereby effectively avoiding the problem of unstable or flickering picture caused by frequent resolution adjustment, and thus can help ensure that users get a more stable and coherent video call experience during video calls.
[0433] It should be noted that after the target application receives the flow allocation result, it can Figure 4A In the process, steps S418 to S422 are used to obtain images during a video call, which will not be described in detail in this application.
[0434] Through the steps shown in S601 to S615, the resolution of the image captured by the camera can be reduced when the device temperature is high, which can effectively reduce the power consumption of the device, thereby effectively preventing the device temperature from rising too quickly; and the above technical solution can perform beauty escape only when the first resolution value is a preset minimum resolution, thereby effectively reducing the probability of beauty escape, and further effectively improving the stability of beauty during video calls.
[0435] In some embodiments, after updating the setting parameters of the camera according to the second resolution value, if it is determined that the current device temperature is less than or equal to the second temperature threshold, and the second temperature threshold is less than the first temperature threshold, the resolution of the camera captured image can be adjusted according to the current display state, such as Figure 7 As shown, Figure 7 According to this application Figure 6 The embodiment shown is a timing diagram of another video calling method, and the video calling method may further include the following steps:
[0436] S616: When the camera service module determines that the device temperature does not exceed the first temperature threshold, it determines whether the count value of the counter is greater than the initial count value.
[0437] The fact that the current device temperature does not exceed the first temperature threshold can be understood as the device temperature being less than or equal to the first temperature threshold, and the initial value of the counter can be zero or other preset values.
[0438] After this step, when it is determined that the count value of the counter is greater than the initial count value, execute S617; when it is determined that the count value of the counter is equal to the initial count value, obtain the current device temperature of the next cycle, and execute again the determination described in S603 to determine whether the current device temperature exceeds the first temperature threshold.
[0439] S617: When the camera service module determines that the count value of the counter is greater than the initial count value, it determines whether the current device temperature is lower than a second temperature threshold.
[0440] Wherein, the first temperature threshold is greater than the second temperature threshold.
[0441] It should be noted that the device temperature being lower than the second temperature threshold can be understood as the device temperature being lower than the second temperature threshold. The count value of the counter is greater than the initial count value, which can indicate that before the device temperature is lower than the second temperature threshold, the device temperature exceeds the first temperature threshold, that is, the current situation belongs to the situation where the device temperature recovers from exceeding the first temperature threshold to being lower than the second temperature threshold.
[0442] S618, when the camera service module determines that the device temperature is lower than the second temperature threshold, it determines whether the current display state is the system small window display state, and resets the counter.
[0443] Optionally, this step may also be replaced by determining whether the current display state is the first application display state, where the first application display state may be understood as the local image being displayed through the second floating window and the peer image being displayed in full screen, such as Figure 1g shown.
[0444] When the initial value of the counter is zero, resetting the counter can be understood as clearing the value of the counter to zero, and when the initial value of the counter is a non-zero value, resetting the counter can be understood as resetting the value of the counter to the initial value.
[0445] After this step, if the determination is yes, execute S619, and if the determination is no, execute S623.
[0446] S619: When the camera service module determines that the current display state is a small window display, it obtains the timing duration of the second timer.
[0447] It should be noted that when the current display state is a small window display, the timing duration of the second timer can be understood as the duration of the small window display.
[0448] S620: The camera service module determines whether the timing duration of the second timer exceeds the first preset duration.
[0449] In this step, when it is determined that the timing duration of the second timer is greater than the first preset duration, it is determined that the timing duration of the second timer exceeds the first preset duration. When it is determined that the timing duration of the second timer is less than or equal to the first preset duration, it is determined that the timing duration of the second timer does not exceed the first preset duration.
[0450] S621: When the camera service module determines that the timing duration of the second timer exceeds the first preset duration, the beauty mark is set to a second designated mark.
[0451] The second designated mark indicates adding a beauty effect, for example, the second designated mark may be 1, T, True, or MY.
[0452] S622, when the camera service module determines that the timing duration of the second timer does not exceed the first preset duration, if it is determined that the system small window display state is switched to the system full screen display state, the first timer starts timing.
[0453] S623, the camera service module determines whether the timing duration of the first timer exceeds a second preset duration.
[0454] The first preset time length is greater than the second preset time length.
[0455] It should be noted that when the current display state is full screen display, the timing duration of the first timer can be understood as the second duration of the system full screen display state. When it is determined that the timing duration of the first timer exceeds the second preset duration, S624 is executed; when it is determined that the timing duration of the first timer does not exceed the second preset duration, S628 is executed.
[0456] S624, the camera service module obtains the third resolution value and sets the beauty mark to the second designated mark.
[0457] The third resolution value is greater than the second resolution value, and the third resolution value may be the same as the first resolution value, or may be the preset highest resolution. For example, still taking the preset resolutions including 1080P, 720P, and 480P as an example, if the second resolution value is 480P and the first resolution value is 720P, the third resolution value may be 720P or 1080P (i.e., the preset highest resolution).
[0458] S625, the camera service module sends a tenth stream allocation instruction carrying the third resolution value to the camera HAL module.
[0459] S626, the camera HAL module sends an eleventh stream distribution instruction to the camera driver module.
[0460] Among them, the camera service module sends the tenth stream allocation instruction carrying the third resolution value to the camera HAL module, and the camera HAL module sends the eleventh stream allocation instruction to the camera driver module, which can be understood as a layer-by-layer stream allocation process when calling the Configure Stream () function to configure the resolution of the camera's captured image to the third resolution value.
[0461] S627, the camera driver module updates the setting parameters of the camera according to the third resolution value.
[0462] Here, updating the setting parameters of the camera according to the third resolution value may be understood as setting the resolution of the image captured by the camera in the configuration parameters of the camera to the third resolution value.
[0463] S628, the camera service module uses the first preset resolution as the resolution of the image captured by the camera, and sets the beauty mark to the second designated mark.
[0464] Optionally, the first preset resolution may be a preset minimum resolution.
[0465] S629: The camera service module sends a twelfth streaming instruction carrying the first preset resolution to the camera HAL module.
[0466] S630: The camera HAL module sends a thirteenth stream allocation instruction to the camera driver module.
[0467] Among them, the camera service module sends the twelfth stream allocation instruction carrying the first preset resolution to the camera HAL module, and the camera HAL module sends the thirteenth stream allocation instruction to the camera driver module, which can be understood as a layer-by-layer stream allocation process when calling the Configure Stream () function to configure the resolution of the camera's captured image to the first preset resolution.
[0468] S631, the camera driving module sets the resolution of the captured image of the camera to a preset minimum resolution.
[0469] It should be noted that after this step, when the camera driver module determines that the configuration of the setting parameters is complete, it returns the configured streaming result to the camera HAL module; in response to receiving the streaming result, the target application periodically sends an image frame acquisition request to the camera driver module according to the frame rate in the setting parameters. After receiving the image frame acquisition request, the camera will capture the image according to the updated resolution, and the camera driver module will return the image frame captured by the camera to the camera HAL module. The camera HAL module adds beauty to the image frame returned by the camera driver module or performs beauty escape according to the value of the current beauty mark bit, thereby obtaining the target image frame, and the camera HAL module returns the target image frame to the target application.
[0470] In the above S616 to S631, the steps performed by the camera service module, such as S603-S609, and the functions of S616-S624 may also be implemented by the camera HAL module.
[0471] Through S616 to S631, after the camera's image output resolution is reduced due to the device's overheated temperature, it can be determined whether to restore the image output resolution based on the current device temperature and display status. The resolution of the image captured by the camera can be restored in a timely and effective manner, so that the image quality of the video call can be improved in a timely manner when the device temperature permits, which is conducive to further improving the user experience.
[0472] Figure 8 is a flowchart of a video calling method provided by an exemplary embodiment of the present application. Figure 8 As shown, the video call method is used in an electronic device. The electronic device in this embodiment is described by taking the initiator of the video call as an example. The method may include:
[0473] S801, receiving a user's operation on a video call control.
[0474] The operation may be a designated operation. When the received operation is a designated operation, a video call interface in the target application is displayed. The video call interface may correspond to one or more video call activities. When the video call function in the target application is integrated into one Activity, the video call interface may correspond to one video call activity. When the video call function in the target application is implemented by multiple Activities, the video call interface may correspond to multiple video call activities. The designated operation is used to trigger a video call request, and may be a click operation, a long press operation, or a sliding operation on a preset button in the video call control. By way of example, the video call control may include: Figure 1d For the video call button 111 in the interface shown, the designated operation may be a click operation on the video call button 111 .
[0475] It should be noted that the electronic device may include a target application (with a video call function), a camera service module, a camera HAL module, and a camera driver module. The user triggers a video call request by performing a specified operation on the video call control. After receiving the video call request triggered by the user through the video call control, the target application starts the camera to collect images by calling the camera service module and the camera HAL module, and adds a beauty effect to the collected images to obtain the video images of the electronic device side to be displayed in the electronic device and the other device.
[0476] In this step, after receiving the user's designated operation on the video call control, the electronic device can Figure 4A In the steps shown in S401 to S404, the camera is turned on; and after determining that the camera is turned on, through S405 to S406, it is determined whether it is a video call in the target application according to the current one or more Activity names.
[0477] It should be noted that, if the electronic device is a recipient of a video call, the video call request may be sent by an initiator of the video call.
[0478] S802: Determine whether the video call is the first video call.
[0479] This step can be performed by the camera service module in the electronic device. For the specific implementation of the camera service module performing this step, please refer to the present application. Figure 4A The implementation method of S407 will not be described in detail in this application.
[0480] S803: When it is determined that the video call is the first video call, a preset prompt window is displayed.
[0481] Among them, the preset prompt window can display video HD mode options, beauty priority mode options and adaptive mode options.
[0482] For the detailed implementation process of this step, please refer to Figure 4A The implementation methods of S408 to S409 will not be described in detail in this application.
[0483] S804: Receive a target display mode selected by the user through the preset prompt window.
[0484] The underlying implementation process of this step can be referred to Figure 4A S410 and Figure 4B The implementation methods of the present application will not be described in detail here.
[0485] S805: Determine whether the target display mode is a designated mode.
[0486] Among them, the target display mode can be a video high-definition mode, a beauty priority mode, or an adaptive mode; the specified mode can be an adaptive mode. The video high-definition mode is a video call mode that prioritizes the clarity of the video image. When the device temperature is too high, the power consumption can be reduced by other means except reducing the resolution of the camera captured image; the beauty priority mode is a video call mode that prioritizes the loading of the beauty algorithm. When the device temperature is too high, the power consumption can be reduced by other means except the beauty algorithm escape. The adaptive mode is a video call mode that determines the resolution of the camera captured image according to the device temperature, ambient temperature, and the number of video calls of the target application. When the device temperature is too high, the device power consumption can be reduced by reducing the resolution and / or the beauty algorithm escape to avoid overheating of the device. The resolution of the camera captured image in the video high-definition mode is higher than that in the beauty priority mode. The video high-definition mode, the beauty priority mode, and the adaptive mode all load the beauty when the device temperature is less than the preset upper temperature threshold.
[0487] The implementation method of determining whether the target display mode is the adaptive mode in this step can refer to Figure 4A The relevant descriptions in S410 and S411 will not be repeated in this application.
[0488] S806: When it is determined that the target display mode is the designated mode, obtain the current number of video calls.
[0489] Among them, the camera service module or camera HAL module of the electronic device can record the number of video calls. Each time a video call ends, the number of video calls can be increased by one, and the updated number of video calls can be stored.
[0490] S807, determining whether the number of video calls is greater than a preset number.
[0491] S808: When the number of video calls is less than or equal to the preset number, use the second preset resolution as the first resolution value.
[0492] Optionally, the second preset resolution may be a preset maximum resolution, which may be understood as the maximum of multiple resolutions supported by the camera. For example, if the camera supports 1080P, 720P, and 480P, the preset maximum resolution may be 1080P.
[0493] It should be noted that the resolutions involved in this application are the resolutions of images captured by the camera, not the resolutions of the display screen. The resolution of images captured by the camera may also be described as the output resolution of the camera.
[0494] S809, when the number of video calls is greater than the preset number, obtain the predicted call duration, the current ambient temperature, and the energy consumption-temperature relationship of multiple preset resolutions under the current ambient temperature.
[0495] Among them, the predicted call duration can be the average call duration of multiple target historical video calls, or the median of multiple call durations corresponding to multiple target historical video calls, wherein the multiple target historical video calls can be historical video calls of the target application for a specified number of times before the video call, and the specified number can be the same as the preset number or less than the preset number; for example, the average call duration of the 30 historical video calls most recent to the current video call can be used as the predicted call duration, or the median of the 30 call durations corresponding to the 30 historical video calls most recent to the current video call can be used as the predicted call duration.
[0496] For the implementation of this step, please refer to Figure 4A The specific implementation methods described in the relevant steps will not be repeated in this application.
[0497] S810: Determine the first resolution value according to the predicted call duration, the current ambient temperature, and energy consumption-temperature relationships of multiple preset resolutions under the ambient temperature.
[0498] The implementation method of this step can refer to Figure 4A The implementation process described in the relevant steps will not be repeated in this application.
[0499] S811: When it is determined that the target display mode is a non-specified mode, determine whether the target display mode is a video high-definition mode.
[0500] The values of the setting items corresponding to different video call modes are different. For example, the value of the setting item corresponding to the video high-definition mode may be binary 01, the value of the setting item corresponding to the beauty priority mode may be binary 10, and the value of the setting item corresponding to the adaptive mode may be binary 11. In this step, when it is determined that the value of the setting item according to the target video image is 01, the target display mode is determined to be the video high-definition mode.
[0501] S812: When it is determined that the target display mode is the video high definition mode, use the second preset resolution as the first resolution value.
[0502] Optionally, the second preset resolution may be a preset highest resolution.
[0503] S813: When it is determined that the target display mode is a non-video high-definition mode, determine that the target display mode is a beauty priority mode, and use the first preset resolution as the first resolution value.
[0504] Optionally, the first preset resolution may be a preset minimum resolution. The preset maximum resolution may be understood as the smallest of multiple resolutions supported by the camera module, for example, if the camera supports 1080P, 720P, and 480P, the preset minimum resolution may be 480P.
[0505] For example, still taking the example described in S811 as an example, when it is determined that the value of the setting item according to the target video image is 10, it is determined that the target display mode is the beauty priority mode.
[0506] S814, control the camera to capture a video image according to the first resolution value, and add a beauty effect to the image to obtain a first target image.
[0507] In this step, the beautification algorithm can be set in the camera HAL module, and the camera HAL module can call the processframe() function to add a beautification effect to the image collected by the camera.
[0508] S815: Display the first target image.
[0509] In the video call request stage, the first target image can be displayed on the video call request interface of the electronic device (such as Figure 1e After the video call is connected, the first target image can be displayed on the video call interface of the target application in the electronic device, such as Figure 1f The screen 16 in the interface shown and the Figure 1i Screen 17 in the interface shown.
[0510] S816: When it is determined that an instruction to end the video call is received, the duration of the video call is recorded and the number of video calls is updated.
[0511] Among them, the instruction to end the video call can be triggered by the user clicking the end call button in the video call interface. The call duration of this video call can be understood as the length of time the camera is turned on. In this step, the time length between the return time of the first frame image and the return time of the last frame image can be used as the call duration of this video call.
[0512] The above technical scheme can determine the output resolution in the camera setting parameters according to the target display mode selected by the user, and in adaptive mode, can determine the resolution of the camera captured image according to the user's target historical video call situation, the current ambient temperature and the energy consumption temperature relationship of the electronic device. Capturing images according to this resolution can effectively reduce the probability of excessive device temperature during video calls, and thus effectively reduce the probability of beauty escape, thereby effectively improving the user experience.
[0513] In some embodiments, by Figure 8 When making a video call using the video calling method shown in the figure, the electronic device can adjust the resolution of the image captured by the camera according to the display state of the target application to reduce the power consumption of the device and avoid the temperature of the device from rising too fast. Fig. 9A As shown, Fig. 9A According to this application Figure 8 The embodiment shown is a flow chart of a video calling method; the video calling method may include:
[0514] S901, in response to receiving a user's designated operation on a video call control, obtaining a display state of a video call window in a target application.
[0515] The specified operation, used to trigger the video call request, may be a click operation, a long press operation, or a slide operation on a preset button in the video call control. For example, the video call control may include: Figure 1d For the video call button 111 in the interface shown, the designated operation may be a click operation on the video call button 111 .
[0516] Optionally, after receiving a user's designated operation on the video call control, the current display state of the video call window in the target application may be periodically obtained.
[0517] For the specific implementation of this step, please refer to Figure 5A The relevant descriptions in S501 to S503 will not be repeated in this application.
[0518] Optionally, when the current display state of the video call window is a small window display and the last display state was a full screen display, it is determined that the video call window is switched from the full screen display to the small window display.
[0519] In some embodiments, Fig. 9A The full screen display in can be understood as the system full screen display state, and the small window display can be understood as the system small window display state;
[0520] In some other embodiments, Fig. 9A The full screen display in the local image can be understood as the full screen display state of the local image, and the small window display can be understood as the small window display state of the local image. The small window display state of the local image can include the system small window display state and the state of the local image being displayed through the second floating window. Figure 1g and 1o As shown, in the system small window display state, the local image and the peer image are displayed through the first floating window, for example Figure 1i and 1p shown.
[0521] S902: When it is determined that the video call window is switched from full-screen display to small-window display, determine whether a first duration of maintaining the small-window display exceeds a first preset duration.
[0522] S903: When it is determined that the first duration of maintaining the small window display exceeds the first preset duration, use the preset minimum resolution as the resolution of the image captured by the current camera.
[0523] The implementation method of this step can refer to Figure 5A The relevant descriptions in S507 to S509 will not be repeated in this application.
[0524] Through S901 to S903, when it is determined that the full-screen display is switched to the small window display, the resolution of the captured image in the camera setting parameters can be updated to the preset minimum resolution. Since the display screen is small when the small window is displayed, the reduction in the resolution of the captured image will not affect the user experience. In addition, the reduction in the resolution of the image captured by the camera can effectively reduce the power consumption of the device, which is beneficial to reduce the probability of the device temperature rising.
[0525] S904: When it is determined that the video call window is switched from a small window display to a full screen display, determine whether a second duration of the full screen display exceeds a second preset duration.
[0526] Optionally, when the current display state of the video call window is full-window display and the last display state was small-window display, it is determined that the video call window is switched from small-window display to full-screen display.
[0527] The second preset time length is shorter than the first preset time length.
[0528] S905: When it is determined that the second duration of the full-screen display exceeds the second preset duration, the resolution of the image captured by the camera is updated to the first resolution value.
[0529] For the implementation of this step, please refer to Figure 5A The relevant descriptions in S512 to S514 will not be repeated in this application.
[0530] For example, Fig. 9B According to this application Fig. 9A The embodiment shown is a flowchart of a video calling method, such as Fig. 9B As shown, the second preset time length is 2 minutes, the second preset time length is 30 seconds, and the preset minimum resolution is 480P. For example, the functions described in S901 to S904 and S905 to S907 above can be implemented through the full-screen timer and the small window timer.
[0531] The steps described in S904 to S905 above can, when determining that the display is switched from a small window to a full screen display, restore the resolution of the image captured by the camera from the preset minimum resolution to the first resolution value before switching to the small window display, and can timely adjust the resolution of the image captured by the camera according to the display status of the target application, and can reduce the power consumption of the device while ensuring the user experience during the video call, thereby effectively reducing the probability of overheating of the device.
[0532] In some embodiments, Fig. 9A The functions described in S901 to S905 can be performed by Fig. 9B Implementation of the process in Fig. 9B According to this application Fig. 9A The illustrated embodiment shows a flow chart of a video calling method.
[0533] like Fig. 9B As shown, when the user makes a video call based on the target application, the full-screen timer starts timing. Making a video call can be understood as the user clicking the video call button. The video call request triggered by the video call button. After the user clicks the video call button, the electronic device follows Figure 4A The steps S401 to S417 configure the camera's image output resolution to determine a first resolution value, and then acquire and display the video image on the electronic device side according to the steps S418 to S421. After determining that the user triggers the end call instruction by pressing the end call button, the electronic device can record the duration of the video call and increase the number of video calls by one.
[0534] Among them, in the process of acquiring and displaying the video image on the electronic device side according to steps S418 to S421, it can be periodically determined whether the system full-screen display state is switched to the system small window display state, and whether the system small window display state is switched to the system full-screen display state.
[0535] It should be noted that the period for determining whether to switch from full-screen display to small-window display and the period for determining whether to switch from small-window display to full-screen display may be different or the same.
[0536] When it is determined that the display is switched from full-screen to small-window, the small-window timer is controlled to start timing. At this time, the full-screen timer is still timing, and it is periodically determined whether the display is switched from small-window to full-screen. If the display is not switched from small-window to full-screen during the period from when the small-window timer starts timing to when the timing duration exceeds the first preset duration (for example, 2 minutes), the stream is allocated according to the preset minimum resolution (for example, 480P), and the full-screen timer is controlled to be reset to zero, so that the camera can capture images according to the preset minimum resolution. After the stream is allocated according to the preset minimum resolution, the small-window timer is still timing. If, after the stream is allocated according to the preset minimum resolution, it is determined that the display is switched from small-window to full-screen, the full-screen timer is controlled to restart timing. After the full-screen is maintained for a second preset duration (for example, 30s), the stream is allocated again according to the first resolution value, and the small-window timer is controlled to be reset to zero, so that the resolution of the image captured by the camera is restored to the resolution before switching to small-window display.
[0537] During the period from the start of the small window timer to the time when the timing duration is 2 minutes, if it is determined that the small window display is switched to full-screen display, the full-screen timer restarts timing. At this time, the small window timer continues to timing. After the duration of the full-screen timer restarting timing exceeds 30s, the flow is re-distributed according to the first resolution value, and the small window timer is controlled to be reset.
[0538] It should be noted that, in one embodiment, Fig. 9B The full screen in the description may be understood as the system full screen display state, and the small window may be understood as the system small window display state; in another implementation, the full screen may be understood as the local image full screen display state, and the small window may be understood as the local image small window display state, and the local image small window display state may include the system small window display state and the state of the local image displayed through the second floating window. Figure 1g and 1n As shown, in the system small window display state, the local image and the peer image are displayed through the first floating window, for example Figure 1i and 1p shown.
[0539] Switching from full screen to small window can be understood as the system full screen display state switching to the system small window display state, and can also be understood as the local image switching from the full screen display state to the small window display state.
[0540] Switching from a small window to a full screen can be understood as the system small window display state switching to the system full screen display state, and can also be understood as the local image switching from a small window display state to a full screen display state.
[0541] above Fig. 9B In the implementation method, since both the full screen timer and the small window timer are provided, it is possible to ensure that when the display state is switched, Fig. 9AThe reliability of the functions implemented in S901 to S904 and S905 to S907 is improved, which is conducive to further improving the user experience.
[0542] In other embodiments, based on Figure 8 In the embodiment shown, the electronic device can periodically obtain the device temperature and the display state of the target application when capturing an image according to a first resolution value, adding a beauty effect to obtain a first target image, and displaying the first target image. The display state includes a system small window display state and a system full screen display state. The resolution of the captured image of the camera is adjusted according to the device temperature and the window state, and a video image is captured according to the adjusted resolution to avoid excessive device temperature. The specific steps are as follows: Fig.10 As shown, Fig.10 According to this application Figure 8 The embodiment shown is a flowchart of another video calling method, and the video calling method may include:
[0543] S1001, obtaining a device temperature of an electronic device and a display status of a target application.
[0544] Optionally, the current display status of the video communication window in the target application may be periodically obtained.
[0545] The specified operation, used to trigger the video call request, may be a click operation, a long press operation, or a slide operation on a preset button in the video call control. For example, the video call control may include: Figure 1d For the video call button 111 in the interface shown, the designated operation may be a click operation on the video call button 111 .
[0546] In some embodiments, the display state may include a system full-screen display state and a system small-window display state.
[0547] In other embodiments, the display state may be a full-screen display state of the local image, a small-window display state of the local image, and the small-window display state of the local image may include a system small-window display state and a state where the local image is displayed through a second floating window. Figure 1g and 1o As shown, in the system small window display state, the local image and the peer image are displayed through the first floating window, for example Figure 1i and 1p shown.
[0548] S1002: Determine whether the current device temperature exceeds a first temperature threshold.
[0549] For example, the first temperature threshold may be a value between 44°C and 45°C.
[0550] S1003: When it is determined that the current device temperature exceeds the first temperature threshold, control the count value of the counter to increase by one, and determine whether it is the first time that the first temperature threshold is exceeded during the current video call.
[0551] The specific implementation process of this step can be referred to Figure 6 The implementation method of S604 will not be described in detail in this application.
[0552] If it is determined that the current device temperature does not exceed the first temperature threshold, return to step S1001.
[0553] S1004: When it is determined that the first temperature threshold is exceeded for the first time during the video call, determine a target time duration for reaching a preset temperature limit.
[0554] In this step, the implementation process of determining the target time to reach the extreme high temperature can refer to Figure 6 The implementation method shown in S605 will not be described in detail in this application.
[0555] S1005: Within the target time period, suspend obtaining the device temperature and the display status of the target application.
[0556] The specific implementation process of this step can be referred to Figure 6 The implementation method shown in S606 will not be described in detail in this application.
[0557] S1006: When it is determined that the temperature exceeds the first temperature threshold for the non-second time during the video call, determine whether the first resolution value is a preset minimum resolution.
[0558] The first resolution value can be obtained by Figure 8 S810, S812 or S813 determines the result; it can also be Fig. 9A and Fig. 9B The resolution after the display status is switched.
[0559] The specific implementation process of this step can be referred to Figure 6 The implementation method shown in S607 will not be described in detail in this application.
[0560] S1007: When it is determined that the first resolution value is the preset minimum resolution, call the camera of the electronic device to capture a video image according to the first preset resolution to obtain a third target image, and display the third target image.
[0561] The third target image is an image without a beauty effect added. The first preset resolution may be a preset minimum resolution.
[0562] The implementation process of this step can refer to Figure 6The implementation method shown in S608 will not be described in detail in this application.
[0563] S1008: When it is determined that the first resolution value is not the preset minimum resolution, configure the image output resolution of the camera to be the second resolution value.
[0564] The implementation process of this step can refer to Figure 6 The implementation methods shown in S610 to S614 are not described in detail in this application.
[0565] The second resolution value is smaller than the first resolution value.
[0566] In some embodiments, the second resolution value may be the largest resolution among the third specified resolutions, and the third specified resolution may be a resolution among multiple preset resolutions that is smaller than the first resolution value. In this way, the resolution can be controlled to decrease layer by layer to avoid the resolution being directly reduced to the minimum, resulting in a poor display effect of the video image.
[0567] For example, when the camera supports three preset resolutions of 1080P, 720P, and 480P, if the first resolution value is 1080P, the second resolution value may be 720P; if the first resolution value is 720P, the second resolution value may be 480P.
[0568] S1009, calling the camera to capture video images according to the second resolution value.
[0569] The implementation process of this step can refer to Figure 6 The implementation method shown in S615 will not be repeated in this application.
[0570] Through the steps shown in S1001 to S1009, the resolution of the image captured by the camera can be reduced when the device temperature is high, thereby reducing the power consumption of the device when the device temperature is high, reducing heat generation from the source, and effectively preventing the device temperature from rising too quickly; and the above technical scheme can perform beauty escape only when the first resolution value is a preset minimum resolution, thereby effectively reducing the probability of beauty escape, and effectively improving the stability of beauty during video calls.
[0571] S1010: When it is determined that the device temperature does not exceed the first temperature threshold, determine whether the value of the counter is greater than an initial count value.
[0572] The fact that the device temperature does not exceed the first temperature threshold can be understood as the device temperature being less than or equal to the first temperature threshold, and the initial value of the counter can be zero or other preset values.
[0573] S1011: When it is determined that the value of the counter is greater than the initial count value, determine whether the device temperature is lower than a second temperature threshold.
[0574] The second temperature threshold is smaller than the first temperature threshold. For example, the first temperature threshold may be a value between 44° C. and 45° C., and the second temperature threshold may be a value between 40° C. and 41° C.
[0575] It should be noted that the device temperature being lower than the second temperature threshold can be understood as the device temperature being lower than or equal to the second temperature threshold. The value of the counter is greater than the initial count value, which can indicate that before the device temperature is lower than the second temperature threshold, the device temperature exceeds the first temperature threshold, that is, the current situation belongs to the situation where the device temperature recovers from exceeding the first temperature threshold to being lower than the second temperature threshold.
[0576] When it is determined that the value of the counter is less than or equal to the initial count value, the process returns to step S1001.
[0577] S1012: When it is determined that the device temperature is lower than the second temperature threshold, reset the counter and determine whether the display state of the target application is switched from full-screen display to small-window display.
[0578] When the initial value of the counter is zero, resetting the counter can be understood as clearing the value of the counter to zero, and when the initial value of the counter is a non-zero value, resetting the counter can be understood as resetting the value of the counter to the initial value.
[0579] S1013: After determining that the display state of the target application in the electronic device is a small window display, obtain a first duration of the small window display.
[0580] In some embodiments, full screen display can be understood as a full screen display state of the system, and small window display can be understood as a small window display state of the system;
[0581] In some other embodiments, full screen display can be understood as a full screen display state of a local image, and small window display can be understood as a small window display state of a local image. The small window display state of the local image can include a system small window display state and a state where the local image is displayed through a second floating window. Figure 1g As shown, in the system small window display state, the local image and the peer image are displayed through the first floating window, for example Figure 1i and Figure 1p shown.
[0582] S1014: Determine whether the first duration of the small window display exceeds a first preset duration.
[0583] If it is determined that the first duration of the small window display exceeds the first preset duration, executing step S1015;
[0584] When it is determined that the display state of the target application is switched from small window display to full screen display within the first preset time period, steps S1016 to S1017 are executed.
[0585] S1015, calling the camera to capture a video image according to the second resolution value, adding a beauty effect to the captured video image, obtaining a second target image, and displaying the second target image.
[0586] The second resolution value is smaller than the first resolution value, and the second resolution value may be a preset minimum resolution.
[0587] S1016: Determine whether the second duration of the full-screen display exceeds a second preset duration.
[0588] Among them, the first preset time length is greater than the second preset time length.
[0589] When it is determined that the second duration of the full-screen display exceeds the second preset duration, executing step S1019;
[0590] After determining that the display state of the target application is switched from full-screen display to small-window display within the second preset time period, step S1015 is continued.
[0591] S1017, redisplay the first target image.
[0592] The first target image may be Figure 8 In the illustrated embodiment, the electronic device adds an image beautification effect to a video image captured by a camera according to a first resolution value to obtain an image.
[0593] It should be noted that when it is determined that the second continuous duration of full-screen display exceeds the second preset duration, the present embodiment may also include another implementation method. When the above-mentioned first resolution value is not the preset highest resolution, the camera can also be called to capture video images according to the preset highest resolution, add beauty effects, and display the image after adding the beauty effects. In this way, the resolution can be directly restored to the maximum resolution, thereby making the restored video image clearer.
[0594] Through S1010 to S1017, after the resolution is reduced due to overheating of the device, it can be determined whether to restore the resolution based on the current device temperature and display status, and the resolution of the image captured by the camera can be restored in a timely and effective manner, so that the image quality of the video call can be improved in a timely manner when the device temperature permits, which is conducive to further improving the user experience.
[0595] It should be noted that in any of the above steps, if an instruction to end the video call is received, the duration of the video call can be recorded, the number of video calls can be updated, and the current video call can be ended.
[0596] Fig.11 is a flowchart of a video calling method shown in another exemplary embodiment of the present application; Fig.11 As shown, the video calling method is applied to an electronic device, and the video calling method may include:
[0597] S1101, after the target application is started, in response to a first operation, displaying a first video call interface of the target application.
[0598] The first operation may be a trigger operation of the video call button, such as a click, slide, long press or voice control trigger. The first operation may be Figure 8 , Fig. 9A as well as Fig.10 In the specified operation, optionally, the first video call interface can be the default video call interface of the target application, for example, before the video call is not connected, it can be Figure 1e The interface shown can also be Figure 1n The interface shown, where Figure 1n This is a diagram of the interface when the video call is not connected during a group chat. After the video call is connected, it can be Figure 1g , Figure 1h or Figure 1o The video call interface shown.
[0599] S1102, obtaining a first video image output by the camera module during a first time period, wherein a device temperature of the electronic device is a first temperature value during the first time period.
[0600] The first temperature value may be less than the first temperature threshold. The camera module includes at least a camera, and may also include auxiliary hardware such as a flash and a filter. The first video image may be understood as when the device temperature is low. Figure 4A In S419, the camera driver module returns the image frame to the camera HAL module.
[0601] S1103, displaying a second video image on the first video call interface, where the second video image is obtained by performing a preset beautification effect processing on the first video image.
[0602] The second video image can be understood as when the device temperature is low. Figure 4A The target image frame after processing in S420 and S421. It can also be understood as Figure 8 The first target image shown in S815.
[0603] It should be noted that the preset beautification effect can be a person beautification effect, such as adding a beauty effect, which can include: softening skin details, reducing wrinkles and blemishes, identifying and covering facial blemishes such as acne and spots in the image, adjusting the brightness and saturation of the skin color, whitening teeth, adding beauty filters, such as fresh, elegant, sweet, etc. The preset beautification effect can also be adding object beautification, such as removing blemishes and unevenness on the surface of the object to make the surface of the object smoother and more uniform; adjusting the color, brightness and saturation of the object to make the color of the object more vivid and attractive; enhancing the texture and details of the surface of the object to make the object look more real and three-dimensional; enhancing the contrast of the object to make the outline of the object clearer and more distinct; or highlighting the object by blurring the background to make the object more prominent.
[0604] S1104, in a second time period, obtaining a third video image output by the camera module, wherein in the second time period, the device temperature of the electronic device is a second temperature value, the resolution of the third video image is smaller than the resolution of the first video image, the second temperature value is larger than the first temperature value, and the second time period is later than the first time period.
[0605] Optionally, the second temperature value may be greater than or equal to a first temperature threshold, and the first temperature threshold may be a preset temperature value.
[0606] It should be noted that the third video image can be understood as when the device temperature rises to a value greater than or equal to the first temperature threshold, Figure 4A The image frame returned by the camera driver module to the camera HAL module in S419 can also be understood as Fig.10 The video images captured in S1009, the first video image and the third video image are both output by the camera module and are not processed with a preset beautification effect.
[0607] S1105, displaying a fourth video image on the first video call interface, where the fourth video image is obtained by performing a preset beautification effect processing on the third video image.
[0608] The fourth video image can be understood as when the device temperature rises to a value greater than or equal to the first temperature threshold. Figure 4A The target image frame after processing in S420 and S421; it can also be understood as Fig.10 The second target image displayed in S1015. The fourth video image and the second video image are both images obtained by performing a preset beautification effect processing on the video image output by the camera module.
[0609] The above technical scheme can control the camera to capture video images at a higher resolution when the device temperature is low during a video call, and can control the camera to capture video images at a lower resolution when the device temperature is high. Thus, when the device temperature is high, the power consumption of the device can be reduced by reducing the resolution of the image captured by the camera, which can reduce heat generation from the source and effectively prevent the device temperature from rising too quickly. It can also effectively reduce the probability of the image beautification algorithm escaping, which is beneficial to improving the stability of the image beautification effect during video calls.
[0610] Optionally, the method further comprises:
[0611] In the third time period, the fifth video image output by the camera module is obtained. In the third time period, the device temperature of the electronic device is a third temperature value, the resolution of the fifth video image is smaller than the resolution of the first video image, the third temperature value is greater than the first temperature value, and the third time period is later than the first time period.
[0612] The sixth video image is displayed on the first video call interface, and the sixth video image is not processed with a preset beautification effect.
[0613] The third temperature value may be greater than the first temperature threshold, the third temperature value may be less than the second temperature value, or may be greater than or equal to the second temperature value.
[0614] It should be noted that the third time period can be understood as a time period in which the device temperature is greater than or equal to the first temperature threshold, and when the resolution of the image captured by the current camera module is lower than the preset minimum resolution threshold, the resolution of the image captured by the camera module is not reduced, and the power consumption of the electronic device is reduced by not loading the beautification algorithm. For example, when the device temperature of the electronic device at the current moment is greater than the first temperature threshold, and the resolution of the image captured by the camera module at the current moment is the preset minimum resolution, it is determined that the current time period belongs to the third time period, and the preset minimum resolution can be the smallest of multiple output resolutions supported by the camera module. The fifth video image and the third video image are both when the temperature rises to a value greater than or equal to the first temperature threshold, Figure 4A The image frame returned by the camera driver module to the camera HAL module in S419. For example, the sixth video image can be understood as Figure 4A In S420, when it is determined that no beautification effect is to be added, the escape() function is executed to perform a video image after beautification escape. Figure 6 The relevant description of setting the beauty mark bit to the first designated mark in S607 to S608 will not be repeated here in this application.
[0615] The above technical solution can reduce the power consumption of the device by not beautifying the image instead of reducing the resolution of the image output by the camera module when the temperature of the device is high but the resolution of the image output by the current camera module is low. In this way, it can not only effectively ensure the reliability of video calls, but also prevent the temperature of the device from continuing to rise.
[0616] Optionally, the method further comprises:
[0617] Based on the fact that the second temperature value is greater than the first temperature threshold, the resolution of the image output by the camera module is modified from the first resolution value to the second resolution value, and the first resolution value is greater than the second resolution value.
[0618] The process of determining the first resolution value can refer to Figure 4A For the related description in S412, the process of determining the second resolution value can refer to Figure 6 The relevant description in S609 will not be repeated here in this application.
[0619] Optionally, the method further comprises:
[0620] In a fourth time period, a seventh video image output by the camera module is obtained, in which the device temperature of the electronic device is a fourth temperature value, the resolution of the seventh video image is equal to the resolution of the first video image, the fourth temperature value is less than the second temperature value, and the fourth time period is later than the second time period;
[0621] An eighth video image is displayed on the first video call interface, and the eighth video image is obtained after performing a preset beautification effect processing on the seventh video image.
[0622] It should be noted that the fourth time period can be understood as the situation where the device temperature recovers to below the second temperature threshold after the second time period or the third time period, that is, after the device temperature rises to greater than or equal to the first temperature threshold, the device temperature drops to less than or equal to the second temperature threshold. The second temperature threshold is lower than the first temperature threshold. The first temperature threshold can be understood as a preset high temperature threshold, and the second temperature threshold can be understood as a preset low temperature threshold. For example, the first temperature threshold can be a value between 44°C and 45°C, and the second temperature threshold can be a value between 40°C and 41°C. The seventh video image can be understood as the situation where the device temperature drops to less than or equal to the second temperature threshold after the device temperature rises to greater than or equal to the first temperature threshold. Figure 4A The image frame returned by the camera driver module to the camera HAL module in S419. The eighth video image is when the device temperature rises to a value greater than or equal to the first temperature threshold and then drops to a value less than or equal to the second temperature threshold. Figure 4AThe target image frame after processing in S420 and S421.
[0623] The above technical solution can, after the camera's image output resolution is reduced due to the device's overly high temperature, re-output the image according to the resolution of the first video image when it is determined that the device temperature has recovered to below the second temperature threshold. This can effectively improve the image quality during video calls when the device temperature permits, thereby helping to further improve the user experience.
[0624] Optionally, the method further comprises:
[0625] Based on the fact that the fourth temperature value is less than the second temperature threshold, and the second temperature threshold is less than the first temperature threshold, the resolution of the image output by the camera module is modified from the second resolution value to a third resolution value, and the third resolution value is greater than the second resolution value.
[0626] Among them, the third resolution value is greater than the second resolution value, and the third resolution value can be the same as the first resolution value, or less than the first resolution value, or can be the preset highest resolution. For example, taking the preset resolutions including 1080P, 720P, and 480P as an example, if the second resolution value is 480P and the first resolution value is 720P, then the third resolution value can be 720P or 1080P (that is, the preset highest resolution). For another example, taking the preset resolutions including 4K, 1080P, 720P, and 480P as an example, if the second resolution value is 480P and the first resolution value is 1080P, then the third resolution value can be 720P or 4k.
[0627] Optionally, the first video call interface further includes a first window, the first window includes a ninth video image, the ninth video image is a video image of the opposite end device received by the electronic device, and within the first time period, an area of the first window is smaller than an area of the second video image, and the first window covers a portion of the second video image;
[0628] During the second time period, the area of the first window is smaller than the area of the fourth video image, and the first window covers a partial area of the fourth video image.
[0629] Among them, the first video image interface can be understood as Figure 5B The display interface of the second application display state in the first window can be understood as Figure 1h The second floating window in the target application is provided by the target application and is used to be displayed on the preset interface of the application. When entering other interfaces of the application, the second floating window disappears. The ninth video image can be understood as Figure 1hThe second video image and the fourth video image can be understood as Figure 1h The first window can be dragged to other display areas of the second video image or the fourth video image.
[0630] Optionally, the method further comprises:
[0631] In response to a second operation on the first window, a tenth video image output by the camera module is acquired, wherein a resolution of the tenth video image is smaller than a resolution of the first video image, and a resolution of the tenth video image is smaller than or equal to a resolution of the third video image;
[0632] After the second operation, a second video call interface is displayed, the second video call interface includes a second window and an eleventh video image, the second window includes a twelfth video image, the twelfth video image is obtained by performing a preset beautification effect on the tenth video image, the eleventh video image is a video image of the opposite device received by the electronic device, the area of the second window is smaller than the area of the eleventh video image, and the second window covers a portion of the eleventh video image.
[0633] The second operation may be a click operation on the first window, or other pre-specified operations, such as a click, long press, or slide on a preset button. The second video call interface may be Figure 1g The interface shown in , the second window is the second floating window displayed in the second video call interface. The eleventh video image can be understood as Figure 1g In the picture 15-1 of the interface shown in FIG. 15 , the twelfth video image can be understood as Figure 1g In the screen 16-1 in the interface shown in FIG. 16 , the tenth video image can be understood as being in the second video call interface, Figure 4A In S419, the camera driver module returns an image frame to the camera HAL module. The twelfth video image is obtained by Figure 4A The target image frame after processing in S420 and S421. Since the twelfth video image is used to be displayed in the second window, the area of the second window is small, and therefore the second video image can be captured with a resolution lower than the first resolution value, thus reducing the power consumption of the electronic device and ensuring that the user's video call experience is not affected.
[0634] Optionally, the method further comprises:
[0635] After the second operation, obtaining a first duration of displaying the second video call interface;
[0636] When it is determined that the first duration reaches a first preset duration, a fourth resolution value is used as the resolution of the image output by the camera module, and the fourth resolution value is less than or equal to the second resolution value;
[0637] Acquire a thirteenth video image output by the camera module, wherein the resolution of the thirteenth video image is the fourth resolution value;
[0638] The second window displays a fourteenth video image, which is obtained by performing a preset beautification effect processing on the thirteenth video image.
[0639] Among them, when it is determined that the first duration has not reached the first preset duration, the resolution of the image output by the camera module is not adjusted, and the image is still captured according to the current output resolution. For example, in the first period, the current output resolution may be the resolution of the first video image, and in the second period, the current output resolution is equal to the resolution of the third video image. The thirteenth video image can be understood as the image frame returned by the camera driver module to the camera HAL module in S419, and the fourteenth video image is the image frame returned by the camera driver module to the camera HAL module in S419. Figure 4A In S420 and S421, the target image frame is obtained after the thirteenth video image is processed.
[0640] It should be noted that the specific method after the second operation can refer to Figure 5B The relevant description shown in S525 to S528; also refer to Fig. 9A The relevant descriptions in S902 to S903.
[0641] The above technical solution can adjust the resolution of the image captured by the camera module when the first duration of switching to the second video call interface reaches the first preset duration, which can effectively avoid frequent adjustment of the resolution of the image captured by the camera in a short period of time, thereby effectively avoiding the problem of unstable or flickering pictures caused by frequent resolution adjustment, and thus can help ensure that users get a more stable and consistent video call experience during the video call.
[0642] Optionally, the method further comprises:
[0643] In response to a third operation on the second window, a fifteenth video image output by the camera module is acquired, wherein a resolution of the fifteenth video image is greater than a resolution of the tenth video image, and a resolution of the fifteenth video image is less than or equal to a resolution of the first video image;
[0644] After the third operation, displaying the third video call interface, the third video call interface including a third window and a sixteenth video image, the sixteenth video image being acquired based on the camera module, and an area of the third window being smaller than an area of the sixteenth video image;
[0645] The seventeenth video image is displayed in the third window, and the seventeenth video image is a video image of a peer device received by the electronic device.
[0646] The third operation may be the same as the second operation. For example, after clicking the second window on the second video call interface, the third video call interface is displayed. The third video call interface may be understood as Figure 1g In the interface shown in the figure, click the area where 16-1 is located, and switch to the Figure 1h The interface shown in the figure, the third video image interface and the second video image interface can be understood as different moments Figure 1h The interface shown.
[0647] In some embodiments, the fifteenth video image can be understood as the image frame returned by the camera driver module to the camera HAL module in S419, and the sixteenth video image is the image frame returned by the camera driver module to the camera HAL module in S419. Figure 4A The target image frame after the fifteenth video image is processed in S420 and S421. The sixteenth video image can be displayed in full screen or in non-full screen.
[0648] Optionally, the method further comprises:
[0649] After the third operation, obtaining a second duration of displaying the third video call interface;
[0650] When the second duration reaches a second preset duration, the resolution of the image output by the camera module is changed from a fourth resolution value to a fifth resolution value, the fifth resolution value is less than or equal to the first resolution value, and the fifth resolution value is greater than the fourth resolution value;
[0651] An eighteenth video image output by the camera module is obtained, wherein the resolution of the eighteenth video image is the fifth resolution value, and the sixteenth video image is obtained after performing a preset beautification effect processing on the eighteenth video image.
[0652] Wherein, when the second duration does not reach the second preset duration, the resolution of the image output by the camera module is not adjusted, and the image is still captured according to the current output resolution. For example, in the first period, the current output resolution may be the resolution of the first video image, and in the second period, the current output resolution is equal to the resolution of the third video image. The eighteenth video image and the fifteenth image can be understood as the image frames returned by the camera driver module to the camera HAL module in S419, and the sixteenth video image can also be the image frame returned by the camera driver module to the camera HAL module in S419. Figure 4A In S420 and S421, the target image frame is obtained after the thirteenth video image is processed.
[0653] In some other embodiments, the sixteenth video image may also be Figure 4A In S420 and S421, the target image frame is obtained by processing the eighteenth video image.
[0654] It should be noted that the specific method after the third operation can refer to Figure 5B The relevant description shown in S529 to S530; also refer to Fig. 9A After switching from the second video call interface to the third video call interface, if the user switches back to the second video call interface within the second preset duration (e.g., 30s), in order to avoid frequent adjustments in the resolution of the image captured by the camera in a short period of time, the resolution of the image captured by the camera may not be adjusted when the second duration does not reach the second preset duration. This can effectively avoid the problem of unstable or flickering images caused by frequent resolution adjustments, thereby helping to ensure that the user obtains a more stable and coherent video call experience during the video call.
[0655] The above-mentioned modification of the resolution of the image output by the camera module from the fourth resolution value to the fifth resolution value can be understood as configuring the resolution of the image captured by the camera module to the fifth resolution value. For example, the Configure Stream () function can be called to configure the resolution of the image captured by the camera module to the fifth resolution value. The specific implementation method of configuring the resolution of the image captured by the camera module can be referred to Figure 4A S413 to S417, you can also refer to Figure 5B Specific implementation methods in S532 to S534.
[0656] Optionally, the method further comprises:
[0657] In response to a fourth operation on the first video call interface or the second video call interface, acquiring a nineteenth video image output by the camera module, wherein a resolution of the nineteenth video image is less than a resolution of the first video image, and a resolution of the nineteenth video image is less than or equal to a resolution of the third video image;
[0658] After the fourth operation, a fourth window is displayed, and the fourth window is displayed on an upper layer of the current application interface. The fourth window includes a twentieth video image and a twenty-first video image. The twentieth video image is a video image of a peer device received by the electronic device, and the twenty-first video image is obtained by performing a preset beautification effect processing on the nineteenth video image. The areas of the twentieth video image and the twenty-first video image are different.
[0659] The first video call interface and the second video call interface may include an interface switching control. In one implementation, the interface switching control may be as follows: Figure 1g and Figure 1h The display state switching button 13A in the display state switching button 13A may also be as follows Figure 1j and Figure 1k The display status switch button 13B in the Figure 1o The display state switch button 36 in the interface shown, the fourth operation can be a click operation on the display state switch button; in another embodiment, the interface switch control can be replaced by the system return key 04, the fourth operation can be a click operation on the return key 04. The fourth window can be understood as Figure 1i The first floating window is displayed on the upper layer of the current application interface and is not blocked by the system desktop or other application interfaces.
[0660] In some embodiments, the area of the twentieth video image may be greater than the area of the twenty-first video image. In other embodiments, the area of the twentieth video image may be less than or equal to the area of the twenty-first video image. Figure 1i In the figure, the twenty-first video image can be understood as picture 17, and the twentieth video image can be understood as picture 18.
[0661] The nineteenth video image described above can be understood as being displayed in a small window of the system. Figure 4A In S419, the camera driver module returns an image frame to the camera HAL module. The twenty-first video image is displayed in the system small window through Figure 4A In S420 and S421, the target image frame is obtained after the nineteenth video image is beautified.
[0662] It should be noted that the specific method after the fourth operation can refer to Figure 5A The relevant description shown in S504 to S509; also refer to Fig. 9A The relevant description shown in S901 to S903.
[0663] Optionally, the method further comprises:
[0664] After the fourth operation, obtaining a third duration of displaying the fourth window;
[0665] When it is determined that the third duration reaches the third preset duration, a sixth resolution value is used as the resolution of the image output by the camera module, and the sixth resolution value is less than or equal to the second resolution value;
[0666] The 23rd video image output by the camera module is obtained, the resolution of the 23rd video image is the sixth resolution value, and the 20th video image and the 24th video image are displayed in the fourth window, and the 24th video image is obtained after performing a preset beautification effect processing on the 23rd video image.
[0667] The third duration can be understood as the duration of the video call window maintaining the system small window state, and the third preset duration can be less than the first preset duration. If the third duration does not reach the third preset duration, the resolution is not adjusted, and there is no need to re-allocate the stream. The camera module still captures images according to the resolution in the last configured setting data. If the third duration reaches the third preset duration, the resolution of the image captured by the camera module is reduced by re-allocating the stream.
[0668] It should be noted that the specific method after the fourth operation can refer to Figure 5A The relevant description shown in S501 to S509; also refer to Fig. 9A The relevant description shown in S901 to S903.
[0669] The above technical solution can adjust the resolution of the image captured by the camera module when the duration of the system small window display state reaches the third preset duration, which can effectively avoid frequent adjustment of the resolution of the image captured by the camera in a short period of time, thereby effectively avoiding the problem of unstable or flickering pictures caused by frequent resolution adjustment, and thus can help ensure that users get a more stable and coherent video call experience during video calls.
[0670] In some embodiments, the sixth resolution value may be a preset minimum resolution, and the preset minimum resolution may be the smallest of multiple resolutions supported by the camera module.
[0671] It should be noted that when it is determined that the system switches from full-screen display state to small-window display state, the resolution of the captured image in the camera's setting parameters is updated to the preset minimum resolution. Since the display screen is small in the small-window display state, the reduction in the resolution of the captured image will not affect the user experience. In addition, the reduction in the resolution of the image captured by the camera module can effectively reduce the power consumption of the device, thereby helping to reduce the probability of temperature increase of the device.
[0672] Optionally, in response to a fifth operation on the fourth window, the first video call interface or the second video call interface is displayed.
[0673] Among them, the fifth operation can be a click operation on the fourth window, or it can be other preset operations, such as sliding, touching or long pressing the button displayed in the preset exit system small window.
[0674] In some embodiments, when the area of the local video image is larger than the area of the peer video image in the fourth window, the first video call interface is displayed after clicking the fourth window; and when the area of the peer video image is larger than the area of the local video image in the fourth window, the second video call interface is displayed after clicking the fourth window.
[0675] In other embodiments, when in the fourth window, the area of the local video image is larger than the area of the peer video image, after clicking the fourth window, the first video call interface or the second video image interface is displayed; when in the fourth window, the area of the peer video image is larger than the area of the local video image, after clicking the fourth window, the second video call interface or the second video image interface is displayed.
[0676] Optionally, the method further comprises:
[0677] Before displaying the first video call interface, when it is determined that this video call is the first video call of the electronic device based on the target application, a preset prompt window is displayed; the preset prompt window includes one or more display mode selection controls.
[0678] The selection control may be an option button of a display mode, a switch button of a display mode, or other selection controls.
[0679] It should be noted that the implementation method of the target display mode selected through the preset prompt window can refer to Figure 4A S408 to S411 and Figure 8 The relevant descriptions of S803 to S805 will not be repeated here in this application.
[0680] Optionally, the method further comprises:
[0681] In the first time period, when the target display mode set by the user is a specified mode and the current number of video calls reaches a preset number, the predicted call duration of the video call and the ambient temperature of the environment in which the electronic device is located are obtained;
[0682] A first resolution value of the image output by the camera module is determined according to the predicted call duration and the ambient temperature.
[0683] The designated mode may be an adaptive mode, and the above-mentioned implementation method of determining the first resolution value of the image output by the camera module according to the predicted call duration and the ambient temperature may include:
[0684] First, energy consumption-temperature relationships corresponding to a plurality of preset resolutions under the ambient temperature of the electronic device are obtained, wherein the energy consumption-temperature relationship corresponding to each preset resolution represents a corresponding relationship between the call duration of the video call under the preset resolution and a temperature change value, and the temperature change value is a change value of the device temperature of the electronic device;
[0685] Secondly, according to the energy consumption-temperature relationship of each preset resolution, determining a first temperature change value corresponding to the predicted call duration at the preset resolution;
[0686] Thirdly, the first resolution value is determined according to the first temperature change value corresponding to the predicted call duration at each preset resolution.
[0687] In some embodiments, the above-mentioned implementation process of determining the first resolution value according to the first temperature change value corresponding to the predicted call duration at each preset resolution may include:
[0688] A second temperature change value less than a preset temperature change threshold is determined from the first temperature change values corresponding to a plurality of preset resolutions; and the preset resolution corresponding to the second temperature change value with the largest value is used as the first resolution value.
[0689] In some embodiments, the predicted call duration described above may be obtained in the following manner:
[0690] Obtain the call duration of each target historical video call of the electronic device based on the target application; and determine the predicted call duration according to the call duration of each target historical video call.
[0691] It should be noted that a more detailed implementation of determining the first resolution value of the image output by the camera module according to the predicted call duration and the ambient temperature can be referred to Figure 4A S412 or Figure 8 The relevant description of S810 in this application will not be repeated here.
[0692] Optionally, the method further comprises:
[0693] In the first time period, when the target display mode set by the user is the specified mode and the current number of video calls has not reached the preset number, the seventh resolution value is used as the resolution of the image output by the camera module, and the seventh resolution value is greater than or equal to the first resolution value.
[0694] The seventh resolution value may be a preset maximum resolution. The preset maximum resolution may be understood as the maximum of multiple resolutions supported by the camera. For example, when the camera supports three resolutions of 1080P, 720P, and 480P, the preset maximum resolution may be 1080P. The above-mentioned user-set target display mode is a specified mode, and the judgment method that the current number of video calls does not reach the preset number can refer to Figure 8 The relevant descriptions in S805 to S808.
[0695] It should be noted that the reason why the preset maximum resolution is used to capture video images when the number of video calls is less than or equal to the preset number is because when the number of video calls is small, the hardware characterizing the device is less worn and aged, and the internal resistance generated during the video call is less. Therefore, compared with devices with a more number of calls, when the video calls are of the same length, devices with fewer video calls will generate less heat and have a lower probability of overheating of the device. Therefore, when the number of video calls is small, images can be captured at a higher resolution to improve the video image quality, which in turn helps to improve the user experience.
[0696] Optionally, the method further comprises:
[0697] In a fifth time period, when it is determined that the device temperature of the electronic device in this video call is greater than the first temperature threshold for the first time, a target time required for the device temperature to reach a third temperature threshold is obtained, where the third temperature threshold is greater than the first temperature threshold, and in the fifth time period, the device temperature of the electronic device is a fifth temperature value, which is greater than the first temperature threshold;
[0698] The second video image continues to be displayed within the target duration.
[0699] The fifth time period may be understood as the time when the device temperature exceeds the first temperature threshold for the first time during this video call.
[0700] The above-mentioned implementation method of obtaining the target time required for the device temperature to reach the third temperature threshold may include:
[0701] Obtaining a target energy consumption-temperature relationship corresponding to a first resolution value under an ambient temperature of an environment in which the electronic device is located;
[0702] Determining the standby talk time corresponding to the third temperature threshold according to the target energy consumption-temperature relationship;
[0703] The difference between the standby call duration and the current call duration of the video call is used as the target duration.
[0704] It should be noted that the specific implementation method of determining that the device temperature of the electronic device in the current video call is greater than the first temperature threshold for the first time can refer to Figure 4A S407 and Figure 8 For more detailed implementation details of the relevant description in S802 of the fifth time period, the target time required for the device temperature to reach the third temperature threshold can be referred to. Figure 6 S605 and Fig.10 The relevant description of S1004 will not be repeated here in this application.
[0705] Optionally, the obtaining of the third video image output by the camera module in S1104 above may include:
[0706] When it is determined that the current device temperature is greater than the first temperature threshold, if it is determined that this is not the first time that the temperature is greater than the first temperature threshold in this video call, a third video image output by the camera module is obtained.
[0707] The above technical scheme can reduce the resolution of the image captured by the camera module when the first temperature threshold is not exceeded for the first time during the video call, so as to reduce the power consumption of the device, thereby effectively preventing the device temperature from rising too quickly; and can predict the target time from the current moment to the moment when the device is expected to reach the extreme high temperature that the device can withstand when the first temperature threshold is exceeded for the first time during the video call, and will not reduce the resolution of the image captured by the camera module within the target time. It can maximize the quality of the video call without affecting the service life of the device, which is conducive to further improving the video image quality, and thus effectively improving the user experience.
[0708] The present application also provides a chip, which is coupled to a memory and is used to read and execute computer programs or instructions stored in the memory to execute the methods in the above embodiments.
[0709] The present application also provides an electronic device, which includes a chip, and the chip is used to read and execute a computer program or instruction stored in a memory, so that the method in each embodiment is executed.
[0710] An embodiment of the present application also provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the video call method in the above-mentioned embodiment.
[0711] An embodiment of the present application also provides a computer program product, wherein the computer-readable storage medium stores program code. When the computer program product runs on a computer, the computer executes the above-mentioned related steps to implement the video call method in the above-mentioned embodiment.
[0712] In addition, an embodiment of the present application also provides a device, which may specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer-executable instructions, and when the device is running, the processor may execute the computer-executable instructions stored in the memory so that the chip executes the video call method in the above-mentioned method embodiments.
[0713] Among them, the electronic device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above and will not be repeated here.
[0714] The preferred embodiments of the present application are described in detail above in conjunction with the accompanying drawings. However, the present application is not limited to the specific details in the above embodiments. Within the technical concept of the present application, the technical solution of the present application can be subjected to a variety of simple modifications, and these simple modifications all belong to the protection scope of the present application. It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present application will not further describe various possible combinations.
[0715] In addition, the various implementation modes of the present application may be arbitrarily combined, and as long as they do not violate the concept of the present application, they should also be regarded as the contents disclosed in the present application.
Claims
1. A video calling method, characterized in that: Applied to electronic equipment, the method comprises: After the target application is started, in response to the first operation, displaying a first video call interface of the target application; In a first time period, a first video image output by the camera module is acquired, and in the first time period, a device temperature of the electronic device is a first temperature value; Displaying a second video image on the first video call interface, where the second video image is obtained by performing a preset beautification effect processing on the first video image; In a second time period, a third video image output by the camera module is obtained, wherein in the second time period, the device temperature of the electronic device is a second temperature value, the resolution of the third video image is smaller than the resolution of the first video image, the second temperature value is larger than the first temperature value, and the second time period is later than the first time period; A fourth video image is displayed on the first video call interface, where the fourth video image is obtained by performing a preset beautification effect processing on the third video image.
2. The method according to claim 1, characterized in that: The method further comprises: In a third time period, a fifth video image output by the camera module is obtained, wherein in the third time period, the device temperature of the electronic device is a third temperature value, the resolution of the fifth video image is smaller than the resolution of the first video image, the third temperature value is larger than the first temperature value, and the third time period is later than the first time period; The sixth video image is displayed on the first video call interface, and the sixth video image is not processed with a preset beautification effect.
3. The method according to claim 1, characterized in that: The method further comprises: Based on the fact that the second temperature value is greater than the first temperature threshold, the resolution of the image output by the camera module is modified from the first resolution value to the second resolution value, and the first resolution value is greater than the second resolution value.
4. The method according to claim 1, characterized in that: The method further comprises: In a fourth time period, a seventh video image output by the camera module is obtained, wherein in the fourth time period, the device temperature of the electronic device is a fourth temperature value, the resolution of the seventh video image is equal to the resolution of the first video image, the fourth temperature value is less than the second temperature value, and the fourth time period is later than the second time period; An eighth video image is displayed on the first video call interface, and the eighth video image is obtained by performing a preset beautification effect processing on the seventh video image.
5. The method according to claim 4, characterized in that The method further comprises: Based on the fact that the fourth temperature value is less than the second temperature threshold and the second temperature threshold is less than the first temperature threshold, the resolution of the image output by the camera module is modified from the second resolution value to a third resolution value, and the third resolution value is greater than the second resolution value.
6. The method according to claim 1, characterized in that The first video call interface further includes a first window, the first window includes a ninth video image, the ninth video image is a video image of a peer device received by the electronic device, during the first time period, the area of the first window is smaller than the area of the second video image, and the first window covers a portion of the second video image; during the second time period, the area of the first window is smaller than the area of the fourth video image, the first window, and the first window covers a portion of the fourth video image, and the method further includes: In response to a second operation on the first window, a tenth video image output by the camera module is acquired, wherein a resolution of the tenth video image is smaller than a resolution of the first video image, and a resolution of the tenth video image is smaller than or equal to a resolution of the third video image; After the second operation, a second video call interface is displayed, the second video call interface includes a second window and an eleventh video image, the second window includes a twelfth video image, the twelfth video image is obtained by performing a preset beautification effect on the tenth video image, the eleventh video image is a video image of the opposite device received by the electronic device, the area of the second window is smaller than the area of the eleventh video image, and the second window covers a portion of the eleventh video image.
7. The method according to claim 6, characterized in that The method further comprises: After the second operation, obtaining a first duration of displaying the second video call interface; When it is determined that the first duration reaches a first preset duration, a fourth resolution value is used as the resolution of the image output by the camera module, and the fourth resolution value is less than or equal to the second resolution value; Acquire a thirteenth video image output by the camera module, wherein the resolution of the thirteenth video image is the fourth resolution value; The second window displays a fourteenth video image, which is obtained by performing a preset beautification effect processing on the thirteenth video image.
8. The method according to claim 6, characterized in that The method further comprises: In response to a third operation on the second window, a fifteenth video image output by the camera module is acquired, wherein a resolution of the fifteenth video image is greater than a resolution of the tenth video image, and a resolution of the fifteenth video image is less than or equal to a resolution of the first video image; After the third operation, displaying a third video call interface, the third video call interface including a third window and a sixteenth video image, the sixteenth video image being acquired based on the camera module, and an area of the third window being smaller than an area of the sixteenth video image; The seventeenth video image is displayed in the third window, and the seventeenth video image is a video image of a peer device received by the electronic device.
9. The method according to claim 8, characterized in that The method further comprises: After the third operation, obtaining a second duration of displaying the third video call interface; When the second duration reaches a second preset duration, the resolution of the image output by the camera module is changed from a fourth resolution value to a fifth resolution value, the fifth resolution value is less than or equal to the first resolution value, and the fifth resolution value is greater than the fourth resolution value; An eighteenth video image output by the camera module is obtained, wherein the resolution of the eighteenth video image is the fifth resolution value, and the sixteenth video image is obtained after performing a preset beautification effect processing on the eighteenth video image.
10. The method according to claim 1, characterized in that The method further comprises: In response to a fourth operation on the first video call interface or the second video call interface, acquiring a nineteenth video image output by the camera module, wherein a resolution of the nineteenth video image is less than a resolution of the first video image, and a resolution of the nineteenth video image is less than or equal to a resolution of the third video image; After the fourth operation, a fourth window is displayed, and the fourth window is displayed on an upper layer of the current application interface. The fourth window includes a twentieth video image and a twenty-first video image. The twentieth video image is a video image of a peer device received by the electronic device, and the twenty-first video image is obtained by performing a preset beautification effect processing on the nineteenth video image. The areas of the twentieth video image and the twenty-first video image are different.
11. The method according to claim 10, characterized in that The method further comprises: After the fourth operation, obtaining a third duration of displaying the fourth window; When it is determined that the third duration reaches the third preset duration, a sixth resolution value is used as the resolution of the image output by the camera module, and the sixth resolution value is less than or equal to the second resolution value; The twenty-third video image output by the camera module is obtained, the resolution of the twenty-third video image being the sixth resolution value, and the twentieth video image and the twenty-fourth video image are displayed in the fourth window, the twenty-fourth video image being obtained after performing a preset beautification effect processing on the twenty-third video image.
12. The method according to claim 1, characterized in that The method further comprises: Before displaying the first video call interface, when it is determined that this video call is the first video call of the electronic device based on the target application, a preset prompt window is displayed, and the preset prompt window includes one or more display mode selection controls.
13. The method according to claim 1, characterized in that The method further comprises: In the first time period, when the target display mode set by the user is a specified mode and the current number of video calls reaches a preset number, obtaining a predicted call duration of the current video call and an ambient temperature of the environment in which the electronic device is located; A first resolution value of the image output by the camera module is determined according to the predicted call duration and the ambient temperature.
14. The method according to claim 13, characterized in that The method further comprises: In the first time period, when the target display mode set by the user is the specified mode and the current number of video calls has not reached the preset number, the seventh resolution value is used as the resolution of the image output by the camera module, and the seventh resolution value is greater than or equal to the first resolution value.
15. The method according to claim 13, characterized in that The determining, according to the predicted call duration and the ambient temperature, a first resolution value of the image output by the camera module comprises: Obtaining energy consumption-temperature relationships corresponding to a plurality of preset resolutions under the ambient temperature of the electronic device, wherein the energy consumption-temperature relationship corresponding to each preset resolution represents a corresponding relationship between a call duration of the video call and a temperature change value under the preset resolution, and the temperature change value is a change value of a device temperature of the electronic device; Determine, according to the energy consumption-temperature relationship of each preset resolution, a first temperature change value corresponding to the predicted call duration at the preset resolution; The first resolution value is determined according to the first temperature change value corresponding to the predicted call duration at each preset resolution.
16. The method according to claim 13, characterized in that The predicted call duration is obtained in the following way: Obtaining the call duration of each target historical video call of the electronic device based on the target application; The predicted call duration is determined according to the call duration of each target historical video call.
17. The method according to claim 1, characterized in that The method further comprises: In the fifth time period, when it is determined that the device temperature of the electronic device is greater than the first temperature threshold for the first time during the video call, a target time required for the device temperature to reach a third temperature threshold is obtained, the third temperature threshold is greater than the first temperature threshold, and in the fifth time period, the device temperature of the electronic device is a fifth temperature value, and the fifth temperature value is greater than the first temperature threshold; The second video image continues to be displayed within the target duration.
18. The method according to claim 17, characterized in that The obtaining of a target time required for the device temperature to reach a third temperature threshold includes: Obtaining a target energy consumption-temperature relationship corresponding to a first resolution value under an ambient temperature of an environment in which the electronic device is located; Determining the standby talk time corresponding to the third temperature threshold according to the target energy consumption-temperature relationship; The difference between the standby call duration and the current call duration of the video call is used as the target duration.
19. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 18 are implemented.
20. An electronic device, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 18.
21. A computer program product, characterized in that The invention comprises a computer program, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 18.
Citation Information
Patent Citations
Video call processing method and device, equipment and storage medium
CN115150508A
Video data processing method, electronic equipment and readable storage medium
CN116055778A