CN112269886A - Shared image acquisition method, window sharing method and shared image acquisition device - Google Patents

Shared image acquisition method, window sharing method and shared image acquisition device Download PDF

Info

Publication number
CN112269886A
CN112269886A CN202011255626.9A CN202011255626A CN112269886A CN 112269886 A CN112269886 A CN 112269886A CN 202011255626 A CN202011255626 A CN 202011255626A CN 112269886 A CN112269886 A CN 112269886A
Authority
CN
China
Prior art keywords
window
mode
full
screen
demonstration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011255626.9A
Other languages
Chinese (zh)
Other versions
CN112269886B (en
Inventor
蒋成军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Youmi Technology Shenzhen Co ltd
Original Assignee
Youmi Technology Shenzhen Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Youmi Technology Shenzhen Co ltd filed Critical Youmi Technology Shenzhen Co ltd
Priority to CN202011255626.9A priority Critical patent/CN112269886B/en
Publication of CN112269886A publication Critical patent/CN112269886A/en
Application granted granted Critical
Publication of CN112269886B publication Critical patent/CN112269886B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/40Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
    • G06F16/43Querying
    • G06F16/438Presentation of query results
    • G06F16/4387Presentation of query results by the use of playlists
    • G06F16/4393Multimedia presentations, e.g. slide shows, multimedia albums
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1454Digital output to display device ; Cooperation and interconnection of the display device with other functional units involving copying of the display data of a local workstation or window to a remote workstation or window so that an actual copy of the data is displayed simultaneously on two or more displays, e.g. teledisplay

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the application discloses a shared image acquisition method, which relates to the technical field of image processing, and comprises the following steps: when sharing demonstration is carried out through appointed software, a demonstration mode of the appointed software is obtained; when the demonstration mode is a window demonstration mode, acquiring an image corresponding to the window demonstration mode as the shared image; and when the demonstration mode is a full-screen demonstration mode, acquiring an image corresponding to the full-screen demonstration mode as the shared image. The method can identify whether the current window of the third-party software is in a window demonstration mode or a full-screen demonstration mode, and can acquire the images of the windows in different modes. The method can automatically capture the image of the current window when the window is switched from the window demonstration mode to the full-screen demonstration mode in the process of sharing the window of the local third-party software, even if the window demonstration mode and the full-screen demonstration mode belong to different processes and correspond to different window handles.

Description

Shared image acquisition method, window sharing method and shared image acquisition device
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a shared image acquisition method, a window sharing method, and a shared image acquisition apparatus.
Background
With the development of the internet, services such as online lecture and video conference are more and more popular. In these services, it is often necessary to share some content, such as a presentation, a presentation video, etc., and the content can be shared by screen sharing.
The screen sharing can be realized by acquiring the screen image of the sharing end, compressing the acquired screen image, transmitting the compressed data to the receiving end, and decompressing the compressed data by the receiving end to obtain the screen image of the sharing end, so that the screen sharing can be realized.
However, when the sharing end shares the local third-party window, the third-party window may be switched to a different display mode, and since the switched display mode and the original display mode are in different processes, the user has to manually perform a corresponding switching operation to continue to acquire the screen image of the third-party window, the current screen image acquisition method has a problem of inconvenient acquisition, and the experience of the user in sharing the screen is reduced.
Disclosure of Invention
The application provides a shared image acquisition method, a window sharing method and a shared image acquisition device, which aim to solve the problems.
In a first aspect, an embodiment of the present application provides a shared image acquisition method, where the method includes: when sharing demonstration is carried out through appointed software, a demonstration mode of the appointed software is obtained; when the demonstration mode is a window demonstration mode, acquiring an image corresponding to the window demonstration mode as a shared image; and when the demonstration mode is a full-screen demonstration mode, acquiring an image corresponding to the full-screen demonstration mode as a shared image.
In a second aspect, an embodiment of the present application provides a window sharing method, where the method is applied to a sharing end, and the sharing end is connected to a receiving end, and the method includes: when sharing demonstration is carried out through the designated software, a demonstration mode of the designated software is obtained; when the demonstration mode is a window demonstration mode, acquiring an image corresponding to the window demonstration mode as a shared image; when the demonstration mode is a full-screen demonstration mode, acquiring an image corresponding to the full-screen demonstration mode as a shared image; and sending the shared image to the receiving end to instruct the receiving end to display the shared image.
In a third aspect, an embodiment of the present application provides a shared image capturing apparatus, where the apparatus includes: the mode acquisition module is used for acquiring the demonstration mode of the specified software when sharing demonstration is carried out through the specified software; the window demonstration mode image acquisition module is used for acquiring an image corresponding to the window demonstration mode as a shared image when the demonstration mode is the window demonstration mode; and the full-screen demonstration mode image acquisition module is used for acquiring an image corresponding to the full-screen demonstration mode as a shared image when the demonstration mode is the full-screen demonstration mode.
In a fourth aspect, an embodiment of the present application provides a window sharing apparatus, where the apparatus includes: the acquisition module is used for acquiring a demonstration mode of the specified software when sharing demonstration is carried out through the specified software; the first acquisition module is used for acquiring an image corresponding to the window demonstration mode as a shared image when the demonstration mode is the window demonstration mode; the second acquisition module is used for acquiring an image corresponding to the full-screen demonstration mode as a shared image when the demonstration mode is the full-screen demonstration mode; and the sending module is used for sending the shared image to the receiving end so as to indicate the receiving end to display the shared image.
In a fifth aspect, an embodiment of the present application provides an electronic device, including: one or more processors; a memory; one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications configured to perform the gray scale publishing method provided herein.
In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, where a program code is stored in the computer-readable storage medium, and the program code can be called by a processor to execute the gray scale publishing method provided in the present application.
According to the shared image acquisition method provided by the embodiment of the application, when shared demonstration is carried out through designated software, a demonstration mode of the designated software is obtained; when the demonstration mode is a window demonstration mode, acquiring an image corresponding to the window demonstration mode as a shared image; and when the demonstration mode is a full-screen demonstration mode, acquiring an image corresponding to the full-screen demonstration mode as a shared image. Therefore, whether the third-party software is in a window demonstration mode or a full-screen demonstration mode can be identified, and images of windows in different modes can be collected. Furthermore, in the process of sharing the window of the local third-party software, when the window is switched from the window demonstration mode to the full-screen demonstration mode, even if the two modes are in different processes and window handles, the method can automatically capture the image of the current focus window, thereby simplifying the acquisition of the shared image during screen sharing and improving the user experience.
In the window sharing method provided by the embodiment, when sharing demonstration is performed through designated software, a demonstration mode of the designated software is acquired; when the demonstration mode is a window demonstration mode, acquiring an image corresponding to the window demonstration mode as a shared image; when the demonstration mode is a full-screen demonstration mode, acquiring an image corresponding to the full-screen demonstration mode as a shared image; and sending the shared image to the receiving end to instruct the receiving end to display the shared image. Therefore, whether the third-party software is in a window demonstration mode or a full-screen demonstration mode can be identified, the shared images of the windows in different modes can be collected, the collection of the shared images during screen sharing is simplified, the collected shared images are transmitted to the receiving end, the receiving end is indicated to display the shared images, window sharing is achieved, the receiving end can only display the contents of the windows, the contents of the whole screen cannot be displayed, and the privacy of a sharer can be effectively protected.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments will be briefly introduced below. It should be noted that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained by those skilled in the art without inventive effort.
Fig. 1 is a schematic application environment diagram illustrating a shared image acquisition method and a window sharing method according to an embodiment of the present application;
FIG. 2 is a schematic flow chart illustrating a shared image acquisition method according to an embodiment of the present application;
FIG. 3 is a schematic interface diagram illustrating a specified software slide editing interface in the shared image capture method according to an embodiment of the present application;
FIG. 4 is a schematic interface diagram illustrating a full screen presentation interface when a slide show is played by a designated software in the shared image capture method according to an embodiment of the present application;
FIG. 5 is a schematic flow chart diagram illustrating a shared image acquisition method according to another embodiment of the present application;
FIG. 6 is a schematic flow chart diagram illustrating a shared image acquisition method according to another embodiment of the present application;
FIG. 7 is a flowchart illustrating a shared image acquisition method according to yet another embodiment of the present application;
fig. 8 is a schematic flowchart illustrating step S410 of a shared image capturing method according to an embodiment of the present application;
FIG. 9 is a schematic interface diagram illustrating a designated software in a shared image capture method according to an embodiment of the present application in a full-screen window mode;
fig. 10 is a flowchart illustrating a method for determining a full screen of a window in a window sharing method provided in an embodiment of the present application;
fig. 11 is a schematic flowchart illustrating step S410 of a shared image capturing method according to an embodiment of the present application;
FIG. 12 is a diagram illustrating a switching flow of captured images in a window presentation mode and a slide presentation mode according to an exemplary embodiment of the present application;
FIG. 13 is a flowchart illustrating a window sharing method according to an embodiment of the present application;
fig. 14 shows a block diagram of a shared image capturing apparatus provided in an embodiment of the present application;
fig. 15 is a block diagram illustrating a structure of a window sharing apparatus according to an embodiment of the present application;
fig. 16 shows a block diagram of an electronic device provided in an embodiment of the present application;
fig. 17 shows a block diagram of a computer-readable storage medium according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of the embodiments of the present application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
At present, in video and audio communication services, content sharing is generally realized in a screen sharing manner, but screen sharing can share all content of a screen, and in an actual application scene, a sharer does not want to share other content to audiences, and the other content may relate to privacy of the sharer and may interfere with the line of sight of the audiences.
Then, a window sharing mode can be adopted, namely only a designated window can be shared, any window except the window cannot be displayed, even if the window is blocked, the window is only shared, and the privacy of a sharer can be well protected by the window sharing mode.
And only one window is shared, and the window may be an operation interface in which the third-party software does not play the shared content, i.e., a window presentation mode, or may be a full-screen presentation interface in which the third-party software plays the shared content, i.e., a full-screen presentation mode. These two modes belong to different processes and are independent memory spaces in the operating system. When the two modes are switched, how to automatically capture the image of the current focus window is a technical problem to be solved urgently.
The embodiment of the application provides a shared image acquisition method, a window sharing method and a shared image acquisition device, which aim to solve the problems, wherein the shared image acquisition method comprises the following steps: when sharing demonstration is carried out through appointed software, a demonstration mode of the appointed software is obtained; when the demonstration mode is a window demonstration mode, acquiring an image corresponding to the window demonstration mode as a shared image; and when the demonstration mode is a full-screen demonstration mode, acquiring an image corresponding to the full-screen demonstration mode as a shared image. The method can identify whether the current focus window of the third-party software is in a window demonstration mode or a full-screen demonstration mode, and can automatically capture the image of the current focus window when the two modes are switched.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating an application environment of a shared image capturing method and a window sharing method according to an embodiment of the present application, where the application environment 100 includes a sharing terminal 110, a server 120, and a receiving terminal 130. The sharing terminal 110 is at least one, and may be a mobile terminal such as a computer, a mobile phone, a tablet, a wearable smart device, and the like, for acquiring a sharing image. The receiving end 130 is at least one, and may be a mobile terminal such as a computer, a mobile phone, a tablet, a wearable smart device, and the like, and is configured to receive and display the shared image. The server 120 is at least one, and may be a conventional server or a cloud server, etc., for transmitting the shared image from the sharing end 110 to the receiving end 130. The server 120 is in communication connection with the sharing end 110 and the receiving end 130, respectively, so as to perform data interaction among the sharing end 110, the server 120, and the receiving end 130.
Referring to fig. 2, fig. 2 is a flowchart illustrating a shared image capturing method according to an embodiment of the present application, where the method may be applied to the sharing end 110 in the application environment 100, and the method specifically includes the following steps:
s110: when the shared demonstration is performed by the designated software, the demonstration mode of the designated software is acquired.
The specific software may be third-party software for displaying the shared content, such as software for playing a video, software for playing a slide show, and the like, which is not limited in this embodiment of the application. The shared content may be content displayed by the sharing end and the receiving end when the sharing end is in communication connection with the receiving end in the audio and video call service, and the shared content may be a video, a slide, a document, and the like, which is not limited in this embodiment of the present application.
The shared demonstration may be a communication mode, such as screen sharing or window sharing, in which the sharing end is in communication connection with the receiving end in the audio/video call service, so that the sharing end and the receiving end can display shared content and perform data interaction. And in the whole process from the beginning of window sharing to the end of sharing, modes corresponding to the current demonstration interface of the designated software are collectively called demonstration modes. Wherein the presentation mode may be a window presentation mode or a full screen presentation mode.
In some embodiments, when the sharing end performs the shared demonstration through the designated software, the sharing end may acquire the demonstration mode of the designated software, and may acquire the demonstration mode through the application program of the designated software. One skilled in the art can write code into the application program of the designated software that can be used to identify the presentation mode of the designated software, and then the application program of the designated software can call the code to obtain the presentation mode of the designated software.
In other embodiments, when the sharing end performs the shared demonstration through the designated software, the sharing end may acquire the demonstration mode of the designated software, and may acquire the demonstration mode through the server. The server may issue an acquisition instruction to the designated software, and after the designated software responds to the acquisition instruction, the server may call a code for identifying the presentation mode to acquire the presentation mode of the designated software, where the code for identifying the presentation mode may be a code pre-written in an application program of the designated software, or a code pre-written in the server, which is not specifically limited in this embodiment of the application.
S120: and when the demonstration mode is the window demonstration mode, acquiring an image corresponding to the window demonstration mode as a shared image.
In the window presentation mode, the designated software is still in an editable interface, for example, the interface for editing a slide shown in fig. 3, where a is the interface for editing a slide at the sharing end, and b is the interface displayed at the receiving end when the slide is edited at the sharing end. At this time, the designated software is in a window demonstration mode process, the window demonstration mode process is an independent memory space in an operating system, and the image of the window demonstration mode process is an image corresponding to the window demonstration mode.
When the demonstration mode is the window demonstration mode, it can be shown that the specified software does not play the shared content and is still in the editable interface, and at this time, the image of the editable interface can be collected as the shared image.
In some embodiments, the image corresponding to the window demonstration mode is captured as the shared image, the image can be captured by an application program of the designated software, and a person skilled in the art can write a code for capturing the image into the application program of the designated software, and then when the demonstration window is in the window demonstration mode, the application program of the designated software can call the code to capture the image corresponding to the window demonstration mode as the shared image.
In other embodiments, the image corresponding to the window demonstration mode is collected as the shared image, the collection may be performed by a server, the server may detect at intervals whether the demonstration mode of the third-party software is the window demonstration mode, and when it is detected that the demonstration mode of the third-party software is the window demonstration mode, the code for collecting the image may be called to collect the image corresponding to the window demonstration mode as the shared image. The period of time may be set according to actual requirements, for example, the period of time may be 0.1 second, which is not specifically limited in the embodiment of the present application. The code for acquiring the image may be a code that can be written into an application program of the designated software in advance, or a code that can be written into the server in advance, which is not limited in this embodiment of the application.
S130: and when the demonstration mode is a full-screen demonstration mode, acquiring an image corresponding to the full-screen demonstration mode as a shared image.
In the full-screen presentation mode, the designated software plays the shared content and is in a full-screen presentation interface, such as the full-screen presentation interface shown in fig. 4 when a is a full-screen presentation interface when a shared terminal plays a slide, and b is an interface displayed by a receiving terminal when a shared terminal plays a slide, at this time, the designated software is in a full-screen presentation mode process, the full-screen presentation mode process is an independent memory space in an operating system, and an image of the full-screen presentation mode process is an image corresponding to the full-screen presentation mode.
When the presentation mode is a full screen presentation mode, it can be shown that the specified software is playing the shared content at this time, and is in a full screen presentation interface, and at this time, an image of the full screen presentation interface can be collected as a shared image.
In some embodiments, the image corresponding to the full-screen presentation mode is captured as the shared image, the image may be captured by an application program of the designated software, a code for capturing the image may be written into the application program of the designated software, and then when the presentation window is in the full-screen presentation mode, the application program may call the code to capture the image corresponding to the full-screen presentation mode as the shared image.
In other embodiments, the image corresponding to the full-screen presentation mode is collected as the shared image, the collection may be performed by a server, the server may detect whether the presentation mode of the designated software is the window presentation mode at intervals, and when it is detected that the presentation mode of the designated software is the full-screen presentation mode, a code for collecting the image may be called to collect the image corresponding to the full-screen presentation mode as the shared image. The period of time may be set according to actual requirements, for example, the period of time may be 0.01 second, which is not specifically limited in this embodiment of the application. The code for acquiring the image may be a code that can be written into an application program of the designated software in advance, or a code that can be written into the server in advance, which is not limited in this embodiment of the application.
In the embodiment, when the shared image acquisition method performs shared demonstration through designated software, a demonstration mode of the designated software is obtained; when the demonstration mode is a window demonstration mode, acquiring an image corresponding to the window demonstration mode as a shared image; and when the demonstration mode is a full-screen demonstration mode, acquiring an image corresponding to the full-screen demonstration mode as a shared image. Therefore, different demonstration modes of the designated software can be obtained, and images corresponding to the different demonstration modes can be automatically acquired when the designated software is in the different demonstration modes, namely, in the process of window sharing, when the different demonstration modes of the designated software are mutually switched, the method can be used for automatically capturing the image of the current focus window of the designated software.
Referring to fig. 5, fig. 5 is a schematic flow chart illustrating a shared image acquisition method according to another embodiment of the present application, where the method specifically includes the following steps:
s210: when the shared demonstration is performed by the designated software, the demonstration mode of the designated software is acquired.
In this embodiment, please refer to step S110 for detailed description of step S210, which is not described herein again.
S220: and when the demonstration mode is the window demonstration mode, acquiring a handle of a window corresponding to the window demonstration mode.
Wherein, the handle is a reference of a data structure inside the system, and is an internal code. Special elements under the control of the system, such as windows, bitmaps, icons, memory blocks, cursors, fonts, menus, etc., may be referenced by the handle.
The window corresponding to the window demonstration mode may be a window corresponding to an editable interface when the specified software does not play the shared content.
In some embodiments, when the demonstration mode is the window demonstration mode, the handle of the window corresponding to the window demonstration mode is acquired, the handle may be acquired through an application program of the designated software, a code for acquiring the handle may be written in the application program of the designated software in advance, and when the demonstration mode is the window demonstration mode, the application program of the designated software may call the code to acquire the handle of the window corresponding to the window demonstration mode. The code for obtaining the handle includes a function for obtaining the handle, such as a FindWindow function, where the function for obtaining the handle may be selected from existing functions according to actual needs, or may be a function customized by a person skilled in the art, and the function is not specifically limited in this embodiment of the application.
In other embodiments, when the demonstration mode is the window demonstration mode, the handle of the window corresponding to the window demonstration mode is obtained, and the handle can be obtained through the server, the server can detect whether the demonstration mode of the designated software is the window demonstration mode at intervals, and when the demonstration mode is the window demonstration mode, the server can call the code for obtaining the handle to obtain the handle of the window corresponding to the window demonstration mode. The code for acquiring the handle may be a code pre-written in an application program of the specified software, or a code pre-written in the server, which is not specifically limited in this embodiment of the application. The code for obtaining the handle includes a function for obtaining the handle, such as a FindWindow function, where the function for obtaining the handle may be selected from existing functions according to actual needs, or may be a function customized by a person skilled in the art, and the function is not specifically limited in this embodiment of the application.
S230: and acquiring an image corresponding to the window demonstration mode as a shared image according to the handle of the window corresponding to the window demonstration mode.
In some embodiments, the image corresponding to the window demonstration mode is collected according to the handle of the window corresponding to the window demonstration mode, and the image can be collected through an application program of the designated software. The application program of the designated software may acquire the device environment of the shared terminal according to the handle of the window corresponding to the window demonstration mode, where the device environment refers to a software environment and may include an operating environment of the designated software, such as Windows, Macos, Linux, and the like, and the device environment further includes a peripheral environment required by the designated software to operate and application layer software other than the designated software. Then, the size of the window corresponding to the window presentation mode may be obtained according to the device environment of the sharing end, and then, a system Application Programming Interface (API) Interface may be used to obtain a bitmap of the window based on the size of the window corresponding to the window presentation mode, and convert the bitmap into raw video data in the YUV420p format, where the raw video data includes an image corresponding to the window presentation mode, that is, a shared image.
In other embodiments, the image corresponding to the window demonstration mode is collected according to the handle of the window corresponding to the window demonstration mode, and the collection may be performed by the server. The server may call a code for obtaining a handle to obtain a handle of a window corresponding to the window presentation mode, then may obtain a device environment of the sharing end based on the handle, then may obtain a size of the window corresponding to the window presentation mode based on the device environment of the sharing end, and obtain a bitmap of the window through an Application Programming Interface (API) Interface based on the size of the window corresponding to the window presentation mode, and further may convert the bitmap into raw video data in YUV420p format, where the raw video data includes an image corresponding to the window presentation mode, that is, a shared image. The code for acquiring the handle may be a code pre-written in an application program of the specified software, or a code pre-written in the server, which is not specifically limited in this embodiment of the application.
S240: and when the demonstration mode is a full-screen demonstration mode, acquiring an image corresponding to the full-screen demonstration mode as a shared image.
In this embodiment, please refer to step S130 for the detailed description of step S240, which is not described herein again.
In the embodiment, when the shared image acquisition method performs shared demonstration through designated software, the demonstration mode of the designated software is obtained; when the demonstration mode is a window demonstration mode, acquiring a handle of a window corresponding to the window demonstration mode; acquiring an image corresponding to the window demonstration mode as a shared image according to the handle of the window corresponding to the window demonstration mode; and when the demonstration mode is a full-screen demonstration mode, acquiring an image corresponding to the full-screen demonstration mode as a shared image. Therefore, the image of the window demonstration mode can be collected in the process of sharing the window of the designated software, and the images corresponding to different demonstration modes can be collected when the window demonstration mode and the full-screen demonstration mode are switched.
Referring to fig. 6, fig. 6 is a schematic flow chart illustrating a shared image acquisition method according to another embodiment of the present application, where the method specifically includes the following steps:
s310: when the shared demonstration is performed by the designated software, the demonstration mode of the designated software is acquired.
S320: and when the demonstration mode is the window demonstration mode, acquiring an image corresponding to the window demonstration mode as a shared image.
For the detailed description of step S310 and step S320, please refer to step S110 and step S120, which is not described herein again.
S330: and when the demonstration mode is a full-screen demonstration mode, acquiring a handle of a window corresponding to the full-screen demonstration mode.
The window corresponding to the full-screen presentation mode may be a window corresponding to a full-screen presentation interface when the specified software plays the shared content.
When the presentation mode is the full-screen presentation mode, the handle of the window corresponding to the full-screen presentation mode is acquired, and the handle may be acquired through an application program of the designated software or may be acquired in other manners.
In some embodiments, a code for obtaining a handle may be written in advance in the application program of the designated software, and when the presentation mode is the full-screen presentation mode, the application program of the designated software may call the code to obtain a handle of a window corresponding to the window presentation mode. The code for obtaining the handle includes a function that can obtain the handle, such as a FindWindow function, where the function that can obtain the handle may be selected from existing functions according to actual needs, or may be a function customized by a person skilled in the art, which is not specifically limited in this embodiment of the application.
In other embodiments, the server may detect whether the presentation mode of the designated software is a full-screen presentation mode at intervals, and when the presentation mode is the full-screen presentation mode, the server may call the code for obtaining the handle to obtain the handle of the window corresponding to the full-screen presentation mode. The code for acquiring the handle may be a code pre-written in an application program of the specified software, or a code pre-written in the server, which is not specifically limited in this embodiment of the application. The code for obtaining the handle includes a function that can obtain the handle, such as a FindWindow function, where the function that can obtain the handle may be selected from existing functions according to actual needs, or may be a function customized by a person skilled in the art, which is not specifically limited in this embodiment of the application.
S340: and acquiring an image corresponding to the full-screen demonstration mode as a shared image according to the handle of the window corresponding to the full-screen demonstration mode.
In some embodiments, the image corresponding to the full-screen presentation mode is collected as the shared image according to the handle of the window corresponding to the full-screen presentation mode, and the collection may be performed by an application program of the designated software. The Application program of the designated software can obtain the device environment of the sharing end according to the handle of the window corresponding to the full-screen presentation mode, then obtain the size of the window corresponding to the full-screen presentation mode according to the device environment of the sharing end, and then use an Application Programming Interface (API) Interface to capture the bitmap of the window based on the size of the window corresponding to the full-screen presentation mode and convert the bitmap into original video data in YUV420p format, where the original video data includes an image corresponding to the full-screen presentation mode, that is, a shared image.
In other embodiments, the image corresponding to the full-screen presentation mode is collected as the shared image according to the handle of the window corresponding to the full-screen presentation mode, and the image may be collected by the server. The server may call a code for obtaining a handle to obtain a handle of a window corresponding to the full-screen presentation mode, then obtain an equipment environment of the sharing end based on the handle, then obtain a size of the window corresponding to the full-screen presentation mode based on the equipment environment of the sharing end, and capture a bitmap of the window through an Application Programming Interface (API) Interface based on the size of the window corresponding to the full-screen presentation mode, and further convert the bitmap into raw video data in the YUV420p format, where the raw video data includes an image corresponding to the full-screen presentation mode, that is, a shared image. The code for acquiring the handle may be a code pre-written in an application program of the designated software, or a code pre-written in the server, which is not specifically limited in this embodiment of the application.
In the embodiment, when the shared image acquisition method performs shared demonstration through designated software, a demonstration mode of the designated software is obtained; when the demonstration mode is a window demonstration mode, acquiring an image corresponding to the window demonstration mode as a shared image; when the demonstration mode is a full-screen demonstration mode, acquiring a handle of a window corresponding to the full-screen demonstration mode; and acquiring an image corresponding to the full-screen demonstration mode as a shared image according to the handle of the window corresponding to the full-screen demonstration mode. Therefore, the image in the full-screen demonstration mode can be acquired in the process of sharing the window of the designated software, and the images corresponding to different demonstration modes can be acquired when the window demonstration mode and the full-screen demonstration mode are switched.
Referring to fig. 7, fig. 7 is a schematic flowchart illustrating a shared image capturing method according to still another embodiment of the present application. The method may specifically comprise the steps of:
s510: when the shared demonstration is carried out through the designated software, the designated software is detected to be in a full-screen demonstration mode or a window demonstration mode through the designated thread.
The thread is the smallest unit that the operating system can perform operation scheduling. The thread is included in the process and is the actual unit of operation in the process. A thread refers to a single sequential control flow in a process, multiple threads can be concurrently executed in a process, and each thread can execute different tasks in parallel. The designated thread in this embodiment may be a thread written in advance in a process of third-party software, and the designated thread may include at least two threads, where the at least two threads may be in a parallel relationship or a serial relationship, and this embodiment of the present application does not specifically limit this.
In some implementations, the designated threads can include a first thread and a second thread, where the first thread and the second thread can be in a serial relationship. Referring to fig. 8, fig. 8 is a schematic flowchart illustrating step S410 of the shared image capturing method according to an embodiment of the present application. The step S410 may specifically include the following steps:
S411A: when shared demonstration is carried out through the designated software, whether the designated software enters a full-screen demonstration window is detected through the first thread.
The first thread can be written into the process of the designated software in advance and is used for detecting whether the designated software enters a full-screen demonstration window or not when the designated software carries out sharing demonstration.
In some embodiments, S411A may specifically include the following steps:
firstly, window handles of coordinate pixel points of at least two corners of a display are obtained through a first thread.
Where the corners may be the top left, bottom left, top right, and bottom right corners of the display. The first thread may select at least two corners from the four corners, and obtain window handles of the coordinate pixel points of the at least two corners. Those skilled in the art will appreciate that the window handle for the coordinate pixel points for each corner may vary.
Secondly, determining whether the designated software is in a full-screen window mode or not according to window handles of coordinate pixel points of at least two corners of the display, wherein the full-screen window mode comprises a mode of amplifying a window corresponding to a window demonstration mode to the full screen or a full-screen demonstration mode, as shown in fig. 9, wherein a in fig. 9 is an interface displayed by a sharing end when the sharing end is in the mode of amplifying the window corresponding to the window mode to the full screen, and b in fig. 9 is an interface displayed by a receiving end when the sharing end is in the mode of amplifying the window corresponding to the window mode to the full screen; as shown in fig. 4, where a in fig. 4 is an interface when the sharing end is in the full-screen presentation mode, and b in fig. 4 shares an interface displayed by the receiving end when the sharing end is in the full-screen presentation mode.
Wherein, the full screen window mode may be a display interface of the designated software when the current focus window size of the designated software is the same as the screen size. The full-screen window mode may include a mode of enlarging a window corresponding to the window presentation mode to a full screen, or a full-screen presentation mode.
In some embodiments, each of the window handles of the coordinate pixels of at least two corners of the display corresponds to one application process. For example, window handle WndiD _ LT corresponds to application Process1, window handle WndiD _ LB corresponds to application Process2, window handle WndiD _ RT corresponds to application Process3, and window handle WndiD _ RB corresponds to application Process 4. The specific implementation of determining whether the designated software is in the full-screen window mode according to the window handles of the coordinate pixel points of at least two corners of the display may be as follows:
the method comprises the steps of firstly obtaining the window resolution of window handles of coordinate pixel points of at least two corners of a display.
The screen resolution is the precision of the screen image, and refers to the number of pixels that can be displayed by the display. Since the dots, lines and surfaces on the screen or window are composed of pixels, the more pixels the display can display, the finer the picture, and the more information can be displayed in the same screen or window area.
It should be noted that the window resolution of the window handle for obtaining the coordinate pixel points of at least two corners of the display may be obtained through an application program of the designated software, or may be obtained through other methods, which is not specifically limited in this embodiment of the present application.
In some embodiments, an application specifying software may call a function for obtaining a window resolution to obtain a window resolution of a window handle for coordinate pixel points of at least two corners of a display. The function for obtaining the window resolution may be an existing function or a function customized by a person skilled in the art, and the embodiment of the present application does not specifically limit this function.
In other embodiments, the server may send a request to the designated software to request to obtain window handles for coordinate pixel points of at least two corners of the display; the appointed software can respond to the request, call a function for obtaining the window resolution to obtain the window resolution of the window handle of the coordinate pixel points of at least two corners of the display, and send the obtained window resolution of the window handle to the server, and the server can obtain the resolution of the window handle. Alternatively, in some embodiments, the server may include a function pre-written therein for obtaining the window resolution, and then may directly call the function to obtain the window resolution of the window handle. The function for obtaining the window resolution may be an existing function or a function customized by a person skilled in the art, and the embodiment of the present application does not specifically limit this function.
And when the window resolution ratios of the window handles of the coordinate pixel points of at least two corners of the display are equal to the resolution ratio of the screen and the application process names corresponding to the window handles of the coordinate pixel points of at least two corners of the display are consistent, determining that the designated software is in a full-screen window mode.
It should be noted that, when the window resolution of the window handle of the coordinate pixel point of the corner is equal to the resolution of the screen, the window corresponding to the corner can be considered to be in a full-screen window mode, so that the condition that the window of the designated software is blocked by other windows and is judged to be wrong can be effectively avoided. When the window resolution of the window handle of the coordinate pixel point of at least two corners of the display is equal to the resolution of the screen, it can be indicated that the window corresponding to at least two corners is in a full-screen window mode, at this time, the process names corresponding to at least two corners can be further matched, and when the process names corresponding to at least two corners are consistent, it can be determined that the designated software is in the full-screen window mode. For example, when there are windows corresponding to two corners in the full-screen window mode, the Process name corresponding to the first corner is Process1, and the Process name corresponding to the second corner is Process2, at this time, it may be determined that the Process names corresponding to the first corner and the second corner are the same, and further, it may be determined that the designated software is in the full-screen window mode.
In this embodiment, whether the designated software is in the full-screen window mode may be determined according to the window resolutions of the window handles of the coordinate pixel points of at least two corners of the display, and when the window resolutions of the window handles of the coordinate pixel points of at least two corners of the display are equal to the resolution of the screen and the application process names corresponding to the window handles of the coordinate pixel points of at least two corners of the display are consistent, it may be determined that the designated software is in the full-screen window mode.
And thirdly, when the specified software is determined to be in the full-screen window mode, determining whether the process name corresponding to the full-screen window mode is consistent with the process name corresponding to the preset full-screen demonstration mode.
It should be noted that, when the designated software is in the full-screen window mode, the designated software may not play the shared content, but only enlarge the editable window to the full screen, and at this time, the designated software is still in the window demonstration mode; it is also possible to designate that the software is playing the shared content while the designated software is in a full screen presentation mode. It is further determined whether the process name corresponding to the full screen window mode is consistent with the process name corresponding to the preset full screen presentation mode, so as to determine whether the designated software enters the full screen presentation window.
And finally, when the process name corresponding to the full-screen window mode is consistent with the process name corresponding to the preset full-screen demonstration mode, determining that the designated software enters the full-screen demonstration window.
The process name corresponding to the preset full-screen presentation mode can be a process name corresponding to the designated software in the full-screen presentation mode, and when the process name corresponding to the full-screen window mode is consistent with the process name corresponding to the preset full-screen presentation mode, the designated software can be indicated to play the shared content at the moment, so that the designated software can be determined to enter the full-screen presentation window.
In the embodiment, whether the designated software enters the full-screen demonstration window is determined, window handles of coordinate pixel points of at least two corners of the display can be obtained through the first thread, then whether the designated software is in the full-screen window mode can be determined according to the window handles, then the full-screen window mode is compared with the preset full-screen demonstration mode, and when the full-screen demonstration window mode is consistent with the preset full-screen demonstration mode, the designated software is determined to enter the full-screen demonstration window.
In some embodiments, whether the designated software enters the full-screen presentation window is determined, and the window handle of four coordinate pixel points of the upper left corner, the lower left corner, the upper right corner, the lower right corner and the like of the display can be detected at intervals through the first thread. As shown in fig. 10, the window handles at the corners of the display 4 are different, and the 4 window handles correspond to 4 different application processes, for example, the window handle name at the upper left corner is wndd _ LT, and the application Process name corresponding to the window handle, i.e., program ID1, is Process 1; the window handle name in the lower left corner is WndiD _ LB, and the application Process name corresponding to the window handle, namely program ID2, is Process 2; the name of the window handle at the upper right corner is WndiD _ RT, and the name of the application Process corresponding to the window handle, namely the program ID3 is the Process 3; the window handle name in the bottom right corner is WndiD _ RB, and the application Process name corresponding to the window handle, i.e., program ID4, is Process 4.
If the window resolution of one window handle is equal to the resolution of the screen in the 4 window handles, the application process is considered to be in a full-screen window, so that the condition that the application process is blocked by other windows and is mistakenly judged can be effectively avoided. If 4 window handles, 2 or more than 2 application processes are all in the full-screen window, and the application Process names corresponding to the full-screen window are consistent, for example, the full-screen window appears in the Process1 and the Process2, and the Process1 and the Process2 have the same name, it is determined that the designated software is in the full-screen window mode.
When the designated software is a Word Processing System (WPS), if a process name of the WPS entering a slide full screen window mode is a preset slide process name, for example, WPS.
S412A: when the specified software is detected to enter the full-screen presentation window through the first thread, the specified software is determined to be in the full-screen presentation mode.
It should be noted that, when it is detected through the first thread that the specified software enters the full-screen presentation window, it may be indicated that the specified software is playing the shared content at this time, and it may be determined that the specified software is in the full-screen presentation mode at this time.
S413A: and detecting whether the specified software exits the full-screen presentation window or not through the second thread.
The second thread can be written into the process of the designated software in advance and used for detecting whether the designated software exits from the full-screen presentation window.
In some embodiments, the specific implementation of detecting whether the specified software exits the full screen presentation window by the second thread may be as follows:
firstly, a handle of a window corresponding to a full-screen demonstration mode is obtained through a second thread.
The second thread may obtain the handle of the window corresponding to the full-screen presentation mode at intervals, and specifically, the second thread may call a function to obtain the handle. The period of time may be set according to actual requirements, for example, the period of time may be 100 milliseconds, which is not specifically limited in the embodiment of the present application. It should be noted that the function may be an existing function or a function customized by a person skilled in the art, and the embodiment of the present application does not specifically limit this.
And secondly, when the handle of the window corresponding to the full-screen demonstration mode is invalid, determining that the designated software exits from the full-screen demonstration window.
It should be noted that, when the window changes, the handle changes accordingly, and is no longer the original handle, so that the handle of the current focus window of the designated software may be matched with the handle of the window corresponding to the full-screen presentation mode, and when the handle of the current focus window of the designated software is not consistent with the handle of the window corresponding to the full-screen presentation mode, the handle of the window corresponding to the full-screen presentation mode may be determined to be invalid, at this time, it may be stated that the window of the designated software has changed, and it may be determined that the designated software exits from the full-screen presentation window.
In this embodiment, the handle of the window corresponding to the full-screen presentation mode may be obtained through the second thread, and whether the handle is valid is determined, and when the handle is invalid, it may be determined that the designated software exits from the full-screen presentation window.
S414A: and when the specified software exits from the full-screen presentation window through the second thread, determining that the specified software is in the window presentation mode.
It should be noted that, when it is detected through the second thread that the designated software exits from the full-screen presentation window, it may be indicated that the designated software does not play the shared content and is still in the editable interface, and at this time, it may be determined that the designated software is in the window presentation mode.
In the embodiment, whether the designated software enters a full-screen demonstration window is detected through a first thread; when the first thread detects that the designated software enters a full-screen window, determining that the designated software is in a full-screen window mode; then detecting whether the designated software exits from the full screen demonstration window or not through a second thread; and when the specified software exits from the full-screen demonstration window through the second thread, determining that the specified software is in the window demonstration mode. The method and the device can automatically identify whether the designated software enters or exits the full-screen demonstration window so as to automatically identify whether the current window of the designated software is in the full-screen demonstration mode or the window demonstration mode.
In other embodiments, the designated threads may include a first thread and a second thread, wherein the first thread and the second thread may be in a serial relationship. Referring to fig. 11, fig. 11 is a schematic flowchart illustrating step S410 of a shared image capturing method according to an embodiment of the present application. The step S410 may specifically include the following steps:
S411B: and when the shared demonstration is carried out through the specified software, detecting whether the specified software exits from the full-screen demonstration window or not through the second thread.
S412B: and when the specified software exits the full-screen window through the second thread, determining that the specified software is in the window demonstration mode.
For the detailed description of the steps S411B and S412B, please refer to step S413A and step S414A, which are not described herein again.
S413B: whether the specified software enters a full screen presentation window is detected through the first thread.
S414B: when the specified software is detected to enter the full screen window through the first thread, the specified software is determined to be in a full screen presentation mode.
For the detailed description of the steps S413B and S414B, please refer to step S411A and step S412A, which are not described herein again.
In the embodiment, whether the designated software exits from the full-screen demonstration window is detected through a second thread; when the second thread detects that the designated software exits from the full-screen demonstration window, determining that the designated software is in a window demonstration mode; and then detecting whether the specified software enters a full-screen presentation window through the first thread, and determining that the specified software is in a full-screen presentation mode when the specified software enters the full-screen presentation window through the first thread. The method and the device can automatically identify whether the designated software exits or enters the full-screen demonstration window so as to automatically identify whether the designated software is in the window demonstration mode or the full-screen demonstration mode.
S420: and when the demonstration mode is the window demonstration mode, acquiring an image corresponding to the window demonstration mode as a shared image.
S430: and when the demonstration mode is a full-screen demonstration mode, acquiring an image corresponding to the full-screen demonstration mode as a shared image.
For the detailed description of step S420 and step S430, please refer to step S120 and step S130, which is not described herein in detail.
In practical applications, as an example, the software is WPS, and as shown in fig. 12, the captured image switching flow in the window presentation mode and the slide presentation mode may be as follows:
firstly, an application program of the WPS starts to acquire an image of a WPS window demonstration mode process; when a sharer starts playing a slide, matching identification is carried out by identifying a process name corresponding to a full-screen window; the WPS application process can respectively identify coordinate points such as the upper left corner, the lower left corner, the upper right corner and the lower right corner of the full screen, and self-adaptive judgment is carried out: if the full-screen playing process is the WPS matching process, the image is required to be automatically switched to the slide acquiring process; when the images of the slide process are collected, the action in the window mode needs to be stopped; then, the collection of images of the slide process can be started; and when the window corresponding to the slide process exits, automatically switching to the window mode.
Specifically, the application process of the WPS starts to run, at this time, the WPS software is in a window demonstration mode, and at this time, an image corresponding to the window demonstration mode may be collected as a shared image; then, detecting whether a full-screen window appears in the WPS by using a first thread; judging whether the window resolution of the window handle of the coordinate pixel points at the four corners of the display is equal to the resolution of the display or not; when the window resolution of the window handle of the coordinate pixel points at the four corners of the display is equal to the resolution of the display, determining that the WPS is in a full screen; further judging whether the process name corresponding to the WPS window is wps.exe; when the process name corresponding to the WPS window is wps.exe, stopping collecting the image corresponding to the window demonstration mode, and stopping the detection operation of the first thread; then, starting to collect a full screen demonstration mode, namely an image corresponding to a slide show mode in the picture; detecting the window state of the WPS by using a second thread; when the second thread detects that the slide window is closed, stopping collecting the image corresponding to the slide mode, and stopping the detection operation of the second thread; and finally, automatically switching to a flow corresponding to the window demonstration mode.
In the embodiment, when the shared image acquisition method performs shared demonstration through designated software, the designated software is detected to be in a full-screen demonstration mode or a window demonstration mode through a designated thread; when the demonstration mode is a window demonstration mode, acquiring an image corresponding to the window demonstration mode as a shared image; and when the demonstration mode is a full-screen demonstration mode, acquiring an image corresponding to the full-screen demonstration mode as a shared image. Therefore, the designated thread is configured, and the designated software is identified to be in a full-screen demonstration mode or a window demonstration mode by the designated thread, so that the identification efficiency can be effectively improved.
Referring to fig. 13, fig. 13 is a flowchart illustrating a window sharing method according to an embodiment of the present application, where the method is applied to the application environment 100 of fig. 1, and the method specifically includes the following steps:
s510: when the shared demonstration is performed by the designated software, the demonstration mode of the designated software is acquired.
In some embodiments, when the sharing end performs the shared demonstration through the designated software, the sharing end acquires the demonstration mode of the designated software.
S520: and when the demonstration mode is the window demonstration mode, acquiring an image corresponding to the window demonstration mode as a shared image.
In some embodiments, when the sharing terminal determines that the presentation mode is the window presentation mode, the sharing terminal acquires an image corresponding to the window presentation mode as the shared image.
S530: and when the demonstration mode is a full-screen demonstration mode, acquiring an image corresponding to the full-screen demonstration mode as a shared image.
In some embodiments, when the sharing terminal determines that the presentation mode is the full-screen presentation mode, the sharing terminal acquires an image corresponding to the full-screen presentation mode as a shared image.
For the detailed description of steps S510 to S530, please refer to steps S110 to S130, which are not described herein again.
S540: and sending the shared image to the receiving end to instruct the receiving end to display the shared image.
In some embodiments, the sharing end sends the shared image to the receiving end. And the receiving end displays the shared image after receiving the shared image, wherein when the receiving end is displayed as a window, only the shared image is displayed in the window, and when the receiving end is displayed in a full screen, the shared image occupies the screen of the receiving end.
The shared image is sent to the receiving end by the sharing end, the sharing end can encode the collected shared image, pack the encoded shared image through a Real-time Transport Protocol (RTP), and then send the packed shared image to the receiving end to instruct the receiving end to display the shared image. The sharing end may encode the acquired image according to an h.264 standard, an image encoding standard of Joint Photographic Experts Group (JPEG), or the like, which is not specifically limited in the embodiment of the present application.
It should be noted that, in addition to the sharing end, the server may also be used as an execution subject to execute the window sharing method.
In the embodiment, when the window sharing method carries out sharing demonstration through appointed software, the demonstration mode of the appointed software is obtained; when the demonstration mode is a window demonstration mode, acquiring an image corresponding to the window demonstration mode as a shared image; when the demonstration mode is a full-screen demonstration mode, acquiring a head portrait corresponding to the full-screen demonstration mode as a shared image; and sending the shared image to the receiving end to instruct the receiving end to display the shared image. Therefore, the designated software can be identified to be in a window demonstration mode or a full-screen demonstration mode, and images corresponding to different modes can be acquired, so that the image of the current focus window of the designated software can be acquired in a self-adaptive manner. The method can also send the acquired shared image to the receiving end to indicate the receiving end to display the shared image so as to realize window sharing. According to the method, the appointed window is shared, any window except the window cannot be displayed, even if the window is shielded, the window is only displayed, and the whole screen cannot be displayed, so that when a sharer does not want to share other contents except shared contents, the personal privacy of the sharer can be effectively protected, and better experience can be brought to the user.
Referring to fig. 14, fig. 14 is a block diagram illustrating a shared image capturing apparatus according to an embodiment of the present application, where the shared image capturing apparatus 1400 includes a mode obtaining module 1410, a window demonstration mode image capturing module 1420, and a full-screen demonstration image capturing module 1430, specifically:
the mode obtaining module 1400 is configured to obtain a display mode of the designated software when the shared presentation is performed by the designated software.
And the window demonstration mode image acquisition module 1410 is configured to acquire an image corresponding to the window demonstration mode as a shared image when the demonstration mode is the window demonstration mode.
A full screen presentation mode image collecting module 1420, configured to collect, as a shared image, an image corresponding to the full screen presentation mode when the presentation mode is the full screen presentation mode.
Optionally, the window demonstration mode image acquisition module 1410 may include a first acquisition sub-module and a first acquisition sub-module, wherein:
and the first acquisition submodule is used for acquiring a handle of a window corresponding to the window demonstration mode when the demonstration mode is the window demonstration mode.
And the first acquisition submodule is used for acquiring the image corresponding to the window demonstration mode as a shared image according to the handle of the window corresponding to the window demonstration mode.
Optionally, the full screen presentation mode image acquisition module 1420 may include a second acquisition sub-module and a second acquisition sub-module, wherein:
and the second obtaining submodule is used for obtaining the handle of the window corresponding to the full-screen demonstration mode when the demonstration mode is the full-screen demonstration mode.
And the second acquisition sub-module is used for acquiring the image corresponding to the full-screen demonstration mode as a shared image according to the handle of the window corresponding to the full-screen demonstration mode.
Optionally, the mode acquisition module 1400 may include a mode determination sub-module, wherein:
and the mode determination submodule is used for detecting that the designated software is in a full-screen presentation mode or a window presentation mode through the designated thread when the shared presentation is performed through the designated software.
The designated threads comprise a first thread and a second thread, and the first thread and the second thread are in a serial relation. Optionally, the mode determination submodule may include a first detection unit, a first determination unit, a second detection unit, and a second determination unit, wherein:
and the first detection unit is used for detecting whether the specified software enters a full-screen demonstration window or not through a first thread when the shared demonstration is carried out through the specified software.
And the first determining unit is used for determining that the specified software is in a full-screen demonstration mode when the first thread detects that the specified software enters a full-screen demonstration window.
And the second detection unit is used for detecting whether the specified software exits the full-screen demonstration window or not when the second thread detects the full-screen demonstration window.
And the second determining unit is used for determining that the specified software is in the window demonstration mode when the specified software exits from the full-screen demonstration window through the second thread.
Further, the first detection unit is also used for acquiring window handles of coordinate pixel points of at least two corners of the display through the first thread; determining whether the designated software is in a full-screen window mode or not according to window handles of coordinate pixel points of at least two corners of a display, wherein the full-screen window mode can comprise a mode that a window corresponding to a window demonstration mode is amplified to be full screen or a full-screen demonstration mode; when the designated software is determined to be in the full-screen window mode, determining whether the process name corresponding to the full-screen window mode is consistent with a preset full-screen demonstration mode process name; and when the process name corresponding to the full screen window mode is consistent with the preset full screen demonstration mode process name, determining that the designated software enters the full screen demonstration window.
Each window handle in the window handles of the coordinate pixel points of at least two corners of the display corresponds to one application process respectively. The first detection unit is also used for acquiring the window resolution of the window handle of the coordinate pixel points of at least two corners of the display; and when the window resolution ratios of the window handles of the coordinate pixel points of at least two corners of the display are equal to the resolution ratio of the screen and the application process names corresponding to the window handles of the coordinate pixel points of at least two corners of the display are consistent, determining that the designated software is in a full-screen window mode.
Further, the second detection unit is also used for acquiring a handle of a window corresponding to the full-screen demonstration mode through a second thread; and when the handle of the window corresponding to the full-screen demonstration mode is invalid, determining that the designated software exits from the full-screen demonstration window.
It can be clearly understood by those skilled in the art that the shared image acquisition apparatus provided in the embodiment of the present application can implement each process in the embodiment of the shared image acquisition method provided in the present application, and the specific working processes of the above-described apparatus and modules may refer to corresponding processes in the foregoing method embodiments, and are not described in detail herein.
In the embodiments provided in this application, the coupling, direct coupling or communication connection between the modules shown or discussed may be an indirect coupling or communication coupling through some interfaces, devices or modules, and may be in an electrical, mechanical or other form, and the embodiments of this application are not limited to this specifically.
In addition, each functional module in the embodiments of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The integrated module can be realized in a form of hardware, and can also be realized in a form of a functional module of software.
Referring to fig. 15, fig. 15 is a block diagram illustrating a window sharing apparatus 1500 according to an embodiment of the present disclosure, where the window sharing apparatus employs a sharing node, and the sharing node is connected to a receiving node. The window sharing apparatus 1500 includes an obtaining module 1510, a first collecting module 1520, a second collecting module 1530, and a sending module 1540, where:
an obtaining module 1510, configured to obtain a presentation mode of the specified software when the shared presentation is performed by the specified software.
The first acquiring module 1520, configured to acquire an image corresponding to the window presentation mode as the shared image when the presentation mode is the window presentation mode.
And a second collecting module 1530 for collecting an image winning the full screen presentation mode as a shared image when the presentation mode is the full screen presentation mode.
A sending module 1540, configured to send the shared image to the receiving end to instruct the receiving end to display the shared image.
It can be clearly understood by those skilled in the art that the window sharing device provided in the embodiment of the present application can implement each process in the embodiment of the window sharing method provided in the present application, and the specific working processes of the above-described devices and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described in detail herein.
In the embodiments provided in this application, the coupling, direct coupling or communication connection between the modules shown or discussed may be an indirect coupling or communication coupling through some interfaces, devices or modules, and may be in an electrical, mechanical or other form, and the embodiments of this application are not limited to this specifically.
In addition, each functional module in the embodiments of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The integrated module can be realized in a form of hardware, and can also be realized in a form of a functional module of software.
Referring to fig. 16, fig. 16 is a block diagram illustrating a structure of an electronic device according to an embodiment of the present disclosure, where the electronic device 1600 may be an electronic device such as an intelligent device and a server. The electronic device 1600 in the present application may include one or more of the following components: a processor 1610, a memory 1620, and one or more applications, wherein the one or more applications may be stored in the memory 1620 and configured to be executed by the one or more processors 1610, the one or more programs configured to perform a method as described in the aforementioned method embodiments.
A processor may include one or more processing cores. The processor 1610, using various interfaces and circuitry, interfaces with various components throughout the electronic device 1600, executes or executes instructions, programs, code sets, or instruction sets stored in the memory 1620, and invokes execution or execution of data stored in the memory 1620, performs various functions of the electronic device 1600 and processes the data. Alternatively, processor 1610 may be implemented in hardware using at least one of Digital Signal Processing (DSP), field-programmable gate array (FPGA), and Programmable Logic Array (PLA). The processor 1610 may integrate one or a combination of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), and a modem. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 1610, but may be implemented by a communication chip.
The memory 1620 may include a Random Access Memory (RAM) and a read-only memory (ROM). The memory 1620 may be used for storing an instruction, a program, a code set or an instruction set, the memory 1620 may include a program storage area and a data storage area, wherein the storage programmer may store an instruction for implementing an operating system, an instruction for implementing at least one function, an instruction for implementing the various method embodiments described above, and the like. The stored data area may store data created during use by the electronic device 1600, and the like.
Referring to fig. 17, fig. 17 is a block diagram illustrating a computer readable storage medium according to an embodiment of the present disclosure. The computer-readable storage medium 1700 has stored therein program code that can be invoked by a processor to perform the methods described in the method embodiments above.
The computer-readable storage medium 1700 may be an electronic memory such as a flash memory, an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a hard disk, or a ROM. Alternatively, the computer-readable storage medium 1700 includes a non-volatile computer-readable storage medium. The computer readable storage medium 1700 has storage space for program code 1710 for performing any of the method steps described above. The program code can be read from or written to one or more computer program products. The program code 1710 may be compressed, for example, in a suitable form.
In summary, the embodiments of the present application provide a shared image acquisition method, a window sharing method, and a shared image acquisition apparatus, so as to solve the above problems.
The shared image acquisition method comprises the steps of acquiring a demonstration mode of designated software when sharing demonstration is carried out through the designated software; when the demonstration mode is a window demonstration mode, acquiring an image corresponding to the window demonstration mode as a shared image; and when the demonstration mode is a full-screen demonstration mode, acquiring an image corresponding to the full-screen demonstration mode as a shared image. Therefore, the current focus window of the third-party software can be identified to be in a window demonstration mode or a full-screen demonstration mode, and the image of the current focus window can be automatically captured when the two modes are switched.
The window sharing method comprises the steps of acquiring a demonstration mode of designated software when sharing demonstration is carried out through the designated software; when the demonstration mode is a window demonstration mode, acquiring an image corresponding to the window demonstration mode as a shared image; when the demonstration mode is a full-screen demonstration mode, acquiring an image corresponding to the full-screen demonstration mode as a shared image; and sending the shared image to the receiving end to instruct the receiving end to display the shared image. Therefore, the shared image of the designated software can be collected and transmitted to the receiving end, and then the receiving end displays the shared image, so that window sharing can be realized. The method only displays the content of the window, but does not display the content of the whole screen, and can effectively protect the privacy of the sharers.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (10)

1. A shared image acquisition method, comprising:
when sharing demonstration is carried out through appointed software, a demonstration mode of the appointed software is obtained;
when the demonstration mode is a window demonstration mode, acquiring an image corresponding to the window demonstration mode as the shared image;
and when the demonstration mode is a full-screen demonstration mode, acquiring an image corresponding to the full-screen demonstration mode as the shared image.
2. The method according to claim 1, wherein when the presentation mode is a window presentation mode, acquiring an image corresponding to the window presentation mode as the shared image comprises:
when the demonstration mode is a window demonstration mode, acquiring a handle of a window corresponding to the window demonstration mode;
and acquiring an image corresponding to the window demonstration mode as the shared image according to the handle of the window corresponding to the window demonstration mode.
3. The method according to claim 1, wherein the capturing an image corresponding to the full-screen presentation mode as the shared image when the presentation mode is a full-screen presentation mode comprises:
when the demonstration mode is a full-screen demonstration mode, acquiring a handle of a window corresponding to the full-screen demonstration mode;
and acquiring an image corresponding to the full-screen demonstration mode as the shared image according to the handle of the window corresponding to the full-screen demonstration mode.
4. The method according to claim 1, wherein the obtaining of the presentation mode of the specified software when the shared presentation is performed by the specified software comprises:
when sharing demonstration is carried out through appointed software, detecting that the appointed software is in the full-screen demonstration mode or the window demonstration mode through an appointed thread.
5. The method of claim 4, wherein the designated threads comprise a first thread and a second thread, the first thread and the second thread are in a serial relationship, and wherein detecting that the designated software is in the full-screen presentation mode or the window presentation mode through the designated threads when the shared presentation is performed through the designated software comprises:
when sharing demonstration is carried out through appointed software, whether the appointed software enters a full-screen demonstration window or not is detected through the first thread;
when the specified software is detected to enter the full-screen presentation window through the first thread, determining that the specified software is in the full-screen presentation mode;
detecting whether the designated software exits the full screen presentation window through the second thread;
determining that the designated software is in the window presentation mode when it is detected by the second thread that the designated software exits the full screen presentation window.
6. The method of claim 5, wherein the detecting, by the first thread, whether the designated software enters a full screen presentation window when the shared presentation is performed by the designated software comprises:
acquiring window handles of coordinate pixel points of at least two corners of the display through the first thread;
determining whether the designated software is in a full-screen window mode or not according to window handles of coordinate pixel points of at least two corners of the display, wherein the full-screen window mode comprises a mode of amplifying a window corresponding to the window demonstration mode to a full screen or the full-screen demonstration mode;
when the designated software is determined to be in the full-screen window mode, determining whether the process name corresponding to the full-screen window mode is consistent with the process name corresponding to a preset full-screen demonstration mode;
and when the process name corresponding to the full screen window mode is consistent with the process name corresponding to the preset full screen demonstration mode, determining that the designated software enters the full screen demonstration window.
7. The method of claim 6, wherein each of the window handles of the at least two corners of the display corresponds to a respective application process, and wherein determining whether the designated software is in a full-screen window mode according to the window handles of the at least two corners of the display comprises:
acquiring the window resolution of the window handle of the coordinate pixel points of at least two corners of the display;
and when the window resolution ratios of the window handles of the coordinate pixel points of at least two corners of the display are equal to the resolution ratio of the screen, and the application process names corresponding to the window handles of the coordinate pixel points of at least two corners of the display are consistent, determining that the designated software is in the full-screen window mode.
8. The method of claim 5, wherein the detecting, by the second thread, whether the designated software exits the full screen presentation window comprises:
acquiring a handle of a window corresponding to the full screen demonstration mode through the second thread;
and when the handle of the window corresponding to the full-screen demonstration mode is invalid, determining that the designated software exits the full-screen demonstration window.
9. A window sharing method is applied to a sharing end, wherein the sharing end is connected with a receiving end, and the method comprises the following steps:
when sharing demonstration is carried out through appointed software, a demonstration mode of the appointed software is obtained;
when the demonstration mode is a window demonstration mode, acquiring an image corresponding to the window demonstration mode as a shared image;
and when the demonstration mode is a full-screen demonstration mode, acquiring an image corresponding to the full-screen demonstration mode as the shared image.
And sending the shared image to the receiving end to instruct the receiving end to display the shared image.
10. A shared image acquisition system, comprising:
the mode acquisition module is used for acquiring the demonstration mode of the specified software when sharing demonstration is carried out through the specified software;
the window demonstration mode image acquisition module is used for acquiring an image corresponding to the window demonstration mode as a shared image when the demonstration mode is the window demonstration mode;
and the full-screen demonstration mode image module is used for collecting an image corresponding to the full-screen demonstration mode as the shared image when the demonstration mode is the full-screen demonstration mode.
CN202011255626.9A 2020-11-11 2020-11-11 Shared image acquisition method, window sharing method and shared image acquisition device Active CN112269886B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011255626.9A CN112269886B (en) 2020-11-11 2020-11-11 Shared image acquisition method, window sharing method and shared image acquisition device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011255626.9A CN112269886B (en) 2020-11-11 2020-11-11 Shared image acquisition method, window sharing method and shared image acquisition device

Publications (2)

Publication Number Publication Date
CN112269886A true CN112269886A (en) 2021-01-26
CN112269886B CN112269886B (en) 2021-05-25

Family

ID=74339177

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011255626.9A Active CN112269886B (en) 2020-11-11 2020-11-11 Shared image acquisition method, window sharing method and shared image acquisition device

Country Status (1)

Country Link
CN (1) CN112269886B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113038155A (en) * 2021-03-03 2021-06-25 广州虎牙科技有限公司 Live broadcast method and device

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040087326A1 (en) * 2002-10-30 2004-05-06 Dunko Gregory A. Method and apparatus for sharing content with a remote device using a wireless network
CN101197990A (en) * 2006-12-13 2008-06-11 四川川大智胜软件股份有限公司 Screen vision recording method irrelated with hardware and operating system platform
CN101447998A (en) * 2008-12-25 2009-06-03 广东威创视讯科技股份有限公司 Desktop sharing method and system
CN101594440A (en) * 2008-05-30 2009-12-02 日本电气株式会社 Image sharing system
CN102780757A (en) * 2011-05-12 2012-11-14 索尼公司 Information processing apparatus, information processing method and computer program
CN102804161A (en) * 2009-04-03 2012-11-28 社会传播公司 Application sharing
CN102883134A (en) * 2012-11-01 2013-01-16 成都飞视美视频技术有限公司 Screen sharing and controlling method for video conference system
CN104469256A (en) * 2013-09-22 2015-03-25 思科技术公司 Immersive and interactive video conference room environment
CN104601930A (en) * 2015-01-09 2015-05-06 西安融成科技有限公司 System and method for automatically switching and displaying video image and desktop image
CN105005426A (en) * 2014-04-18 2015-10-28 深圳Tcl新技术有限公司 Screenshot method and system for touch screen terminal, and data sharing method and system for touch screen terminal
CN106547547A (en) * 2016-10-18 2017-03-29 广州酷狗计算机科技有限公司 Collecting method and device
CN106657875A (en) * 2016-09-23 2017-05-10 山东浪潮商用系统有限公司 Command scheduling method method and device
CN109559313A (en) * 2018-12-06 2019-04-02 网易(杭州)网络有限公司 Image processing method, medium, device and calculating equipment

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040087326A1 (en) * 2002-10-30 2004-05-06 Dunko Gregory A. Method and apparatus for sharing content with a remote device using a wireless network
CN101197990A (en) * 2006-12-13 2008-06-11 四川川大智胜软件股份有限公司 Screen vision recording method irrelated with hardware and operating system platform
CN101594440A (en) * 2008-05-30 2009-12-02 日本电气株式会社 Image sharing system
CN101447998A (en) * 2008-12-25 2009-06-03 广东威创视讯科技股份有限公司 Desktop sharing method and system
CN102804161A (en) * 2009-04-03 2012-11-28 社会传播公司 Application sharing
CN102780757A (en) * 2011-05-12 2012-11-14 索尼公司 Information processing apparatus, information processing method and computer program
CN102883134A (en) * 2012-11-01 2013-01-16 成都飞视美视频技术有限公司 Screen sharing and controlling method for video conference system
CN104469256A (en) * 2013-09-22 2015-03-25 思科技术公司 Immersive and interactive video conference room environment
CN105005426A (en) * 2014-04-18 2015-10-28 深圳Tcl新技术有限公司 Screenshot method and system for touch screen terminal, and data sharing method and system for touch screen terminal
CN104601930A (en) * 2015-01-09 2015-05-06 西安融成科技有限公司 System and method for automatically switching and displaying video image and desktop image
CN106657875A (en) * 2016-09-23 2017-05-10 山东浪潮商用系统有限公司 Command scheduling method method and device
CN106547547A (en) * 2016-10-18 2017-03-29 广州酷狗计算机科技有限公司 Collecting method and device
CN109559313A (en) * 2018-12-06 2019-04-02 网易(杭州)网络有限公司 Image processing method, medium, device and calculating equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
无: """家"强办公 7款主流在线视频会议APP横向测试"", 《电脑报》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113038155A (en) * 2021-03-03 2021-06-25 广州虎牙科技有限公司 Live broadcast method and device
CN113038155B (en) * 2021-03-03 2024-03-01 广州虎牙科技有限公司 Live broadcast method and device

Also Published As

Publication number Publication date
CN112269886B (en) 2021-05-25

Similar Documents

Publication Publication Date Title
CN109862301B (en) Screen video sharing method and device and electronic equipment
WO2022257699A1 (en) Image picture display method and apparatus, device, storage medium and program product
CN111163345A (en) Image rendering method and device
KR20120014868A (en) Information processing device, information processing method, computer program, and content display system
CN112667184A (en) Display device
CN112306607A (en) Screenshot method and device, electronic equipment and readable storage medium
CN109068063B (en) Three-dimensional image data processing and displaying method and device and mobile terminal
US9053526B2 (en) Method and apparatus for encoding cloud display screen by using application programming interface information
CN112269886B (en) Shared image acquisition method, window sharing method and shared image acquisition device
WO2022161401A1 (en) Screen-projection data processing method and display device
CN113038141B (en) Video frame processing method and electronic equipment
CN116723353A (en) Video monitoring area configuration method, system, device and readable storage medium
CN113453069B (en) Display device and thumbnail generation method
CN114374869B (en) Panoramic video playing method and device and computer storage medium
CN112926420B (en) Display device and menu character recognition method
CN116980554A (en) Display equipment and video conference interface display method
US11284094B2 (en) Image capturing device, distribution system, distribution method, and recording medium
CN112948046A (en) Screen capturing method, device, equipment and storage medium
CN110865911B (en) Image testing method, device, storage medium, image acquisition card and upper computer
CN114338897A (en) Object sharing method and device, electronic equipment and storage medium
CN113691815A (en) Video data processing method, device and computer readable storage medium
CN108540726B (en) Method and device for processing continuous shooting image, storage medium and terminal
CN111782100A (en) Method, device, terminal and storage medium for previewing background picture
CN112312067A (en) Method, device and equipment for pre-monitoring input video signal
CN113473175B (en) Content display method and display equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant