CN107483812B - Multi-platform parallel live broadcast method and device - Google Patents
Multi-platform parallel live broadcast method and device Download PDFInfo
- Publication number
- CN107483812B CN107483812B CN201710650710.2A CN201710650710A CN107483812B CN 107483812 B CN107483812 B CN 107483812B CN 201710650710 A CN201710650710 A CN 201710650710A CN 107483812 B CN107483812 B CN 107483812B
- Authority
- CN
- China
- Prior art keywords
- application program
- real
- camera service
- camera
- preview data
- 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.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/617—Upgrading or updating of programs or applications for camera control
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/431—Generation of visual interfaces for content selection or interaction; Content or additional data rendering
- H04N21/4312—Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
- H04N21/4316—Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations for displaying supplemental content in a region of the screen, e.g. an advertisement in a separate window
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/433—Content storage operation, e.g. storage operation in response to a pause request, caching operations
- H04N21/4331—Caching operations, e.g. of an advertisement for later insertion during playback
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/433—Content storage operation, e.g. storage operation in response to a pause request, caching operations
- H04N21/4332—Content storage operation, e.g. storage operation in response to a pause request, caching operations by placing content in organized collections, e.g. local EPG data repository
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/45—Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
- H04N21/462—Content or additional data management, e.g. creating a master electronic program guide from data received from the Internet and a Head-end, controlling the complexity of a video stream by scaling the resolution or bit-rate based on the client capabilities
Abstract
The embodiment of the invention provides a method and a device for multi-platform parallel live broadcast, wherein the method comprises the following steps: after a first application program is connected with a camera service of an operating system, starting camera equipment through the camera service, and previewing an image in real time through the camera equipment; storing real-time preview data of a real-time preview image to a preset preview buffer area through the camera service, and sending the real-time preview data stored in the preset preview buffer area to the first application program; according to the received real-time preview data, the real-time preview data are respectively sent to the at least one second application program through the camera service; and displaying a real-time preview image in a corresponding window interface of the at least one second application program according to the received real-time preview data. By the method and the system, the anchor can be live broadcast in a plurality of live broadcast platforms at the same time.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a multi-platform parallel live broadcast method and device.
Background
With the continuous development of internet technology, people's daily life entertainment activities are also more and more abundant, for example, more and more users like to watch video programs or audio programs provided by a main broadcast on line through a live broadcast application program, and the main broadcast can be live broadcast through each live broadcast platform in a PC (Personal Computer) or a mobile phone in a live broadcast room at present, so the types of live broadcast platforms are also more and more diversified. With the fact that each live broadcast platform has different user groups, the anchor wants to obtain more attention of users under different live broadcast platforms to the anchor, but the anchor cannot communicate with fan users of different live broadcast platforms simultaneously under different live broadcast platforms. In the prior art, the anchor usually carries out live broadcast simultaneously under different live broadcast platforms through using multiple devices simultaneously, so that the anchor can communicate with users under multiple live broadcast platforms simultaneously, and a better live broadcast effect is obtained.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art: through the live broadcast mode that uses many equipment simultaneously to carry out the live broadcast under the live broadcast platform of difference, not only need invest higher cost, the operation of anchor in the live broadcast process and loaded down with trivial details moreover, simultaneously, still need consider the live broadcast visual angle scheduling problem between many equipment room.
Therefore, a live broadcasting method is urgently needed, so that a main broadcast can be live broadcast in a plurality of live broadcasting platforms at the same time.
Disclosure of Invention
The embodiment of the invention provides a method for realizing live broadcasting of a main broadcast in a plurality of live broadcasting platforms at the same time.
In one aspect, an embodiment of the present invention provides a method for multi-platform parallel live broadcasting, including:
after a first application program is connected with a camera service of an operating system, starting camera equipment through the camera service, and previewing an image in real time through the camera equipment;
storing real-time preview data of a real-time preview image to a preset preview buffer area through the camera service, and sending the real-time preview data stored in the preset preview buffer area to the first application program;
displaying a real-time preview image in a corresponding window interface of the first application program according to the received real-time preview data;
if the fact that at least one second application program is connected with the system camera service is monitored, the real-time preview data are obtained from the preset preview buffer area through the camera service, and the real-time preview data are respectively sent to the at least one second application program;
and displaying a real-time preview image in a corresponding window interface of the at least one second application program according to the received real-time preview data.
On the other hand, an embodiment of the present invention provides a multi-platform parallel live broadcasting apparatus, including:
the starting unit is used for starting the camera equipment through the camera service after the first application program is connected with the camera service of the operating system, and previewing images in real time through the camera equipment;
a storage and transmission unit for storing live preview data of a live preview image to a predetermined preview buffer through the camera service and transmitting the live preview data stored in the predetermined preview buffer to the first application;
the first display unit is used for displaying a real-time preview image in a corresponding window interface of the first application program according to the received real-time preview data;
the acquisition and transmission unit is used for acquiring the real-time preview data from the preset preview buffer area through the camera service and respectively transmitting the real-time preview data to at least one second application program after the connection between the at least one second application program and the system camera service is monitored;
and the second display unit is used for displaying the real-time preview image in the corresponding window interface of the at least one second application program according to the received real-time preview data.
The technical scheme has the following beneficial effects: the problem that hardware resources cannot serve two or more live broadcast application programs simultaneously due to the exclusivity of the hardware resources of camera equipment in terminal equipment is solved, through simple and convenient operation, the preview pictures are displayed in real time in a window interface of the live broadcast application programs simultaneously, and the condition that live broadcast service is automatically closed when each live broadcast application program in a foreground is switched to a background, so that live broadcast interruption is caused is avoided; furthermore, the live broadcast cost is saved, and the live broadcast experience of the anchor is greatly improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow diagram of a method for multi-platform parallel live broadcasting in an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a multi-platform parallel live broadcasting apparatus according to another embodiment of the present invention;
FIG. 3 is a flowchart illustrating a process of acquiring real-time preview data by each application according to a preferred embodiment of the present invention;
FIG. 4 is a diagram illustrating the storage structure of each Task storage Activity in the preferred embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, a flowchart of a method for multi-platform parallel live broadcasting in an embodiment of the present invention includes:
101. after a first application program is connected with a camera service of an operating system, starting camera equipment through the camera service, and previewing an image in real time through the camera equipment;
102. storing real-time preview data of a real-time preview image to a preset preview buffer area through the camera service, and sending the real-time preview data stored in the preset preview buffer area to the first application program;
103. displaying a real-time preview image in a corresponding window interface of the first application program according to the received real-time preview data;
103. if the fact that at least one second application program is connected with the system camera service is monitored, the real-time preview data are obtained from the preset preview buffer area through the camera service, and the real-time preview data are respectively sent to the at least one second application program;
104. and displaying a real-time preview image in a corresponding window interface of the at least one second application program according to the received real-time preview data.
Preferably, before the first application establishes a connection with a camera service of an operating system, the method includes:
starting a camera service of an operating system and establishing connection between the camera service and camera equipment;
the method comprises the steps of establishing connection between a first application program and a camera service of an operating system after receiving a request of establishing connection between the first application program and the camera service of the operating system, wherein the request is sent by the first application program.
Preferably, after it is monitored that at least one second application program is connected to the system camera service, the step of obtaining the real-time preview data from the predetermined preview buffer area through the camera service and sending the real-time preview data to the at least one second application program respectively includes:
monitoring a connection state of the camera service, and after the first application program is connected with the camera service, acquiring the real-time preview data from the preset preview buffer area through the camera service and copying at least one piece of real-time preview data if at least one second application program is monitored to be connected with the camera service;
and respectively sending the copied at least one piece of real-time preview data to the at least one second application program through the camera service.
Optionally, the method further comprises:
according to the started application program window component Activities of each application program, a plurality of Task stacks Task corresponding to each Activities are created;
and sequentially determining the Activity corresponding to each application program as the Activity of the system main window at a preset frequency based on the created tasks, so as to be used for sequentially and alternately displaying the respective pictures of the windows.
Optionally, the method further comprises:
monitoring the running state of each application program;
and when monitoring that each application program exits the operation, closing the camera equipment through the camera service.
As shown in fig. 2, a schematic structural diagram of a multi-platform parallel live broadcasting apparatus in an embodiment of the present invention includes:
the starting unit 21 is configured to start a camera device through a camera service of an operating system after a first application program is connected to the camera service, and preview an image in real time through the camera device;
a storing and transmitting unit 22 for storing the live preview data of the live preview image to a predetermined preview buffer through the camera service and transmitting the live preview data stored in the predetermined preview buffer to the first application;
a first display unit 23, configured to display a live preview image in a corresponding window interface of the first application according to the received live preview data;
an obtaining and sending unit 24, configured to obtain the real-time preview data from the predetermined preview buffer through the camera service if it is monitored that at least one second application is connected to the system camera service, and send the real-time preview data to the at least one second application respectively;
and a second display unit 25, configured to display a live preview image in a corresponding window interface of the at least one second application according to the received live preview data.
Preferably, the method comprises the following steps:
the starting and establishing connection unit is used for starting the camera service of the operating system and establishing the connection between the camera service and the camera equipment;
the connection establishing unit is used for establishing the connection between the first application program and the camera service of the operating system after receiving a request which is sent by the first application program and establishes the connection with the camera service of the operating system.
Preferably, the acquiring and sending unit includes:
the monitoring module is used for monitoring the connection state of the camera service, and after the first application program is connected with the camera service, if the situation that at least one second application program is connected with the camera service is monitored, the real-time preview data is obtained from the preset preview buffer area through the camera service, and at least one piece of real-time preview data is copied;
a sending module, configured to send the copied at least one piece of live preview data to the at least one second application program through the camera service.
Optionally, the method further comprises:
the creating unit is used for creating a plurality of Task stacks Task corresponding to each Activity according to the Activity of the application window component of each started application;
and the determining unit is used for sequentially determining the Activity corresponding to each application program as the Activity of the system main window at a preset frequency based on the plurality of tasks which are created, so as to sequentially and alternately display the respective pictures of the plurality of windows.
Optionally, the method further comprises:
the monitoring unit is used for monitoring the running state of each application program;
and the closing unit is used for closing the camera equipment through the camera service when monitoring that each application program exits the operation.
The technical scheme of the embodiment of the invention has the following beneficial effects: the problem that hardware resources cannot serve two or more live broadcast application programs simultaneously due to the exclusivity of the hardware resources of camera equipment in terminal equipment is solved, through simple and convenient operation, the preview pictures are displayed in real time in a window interface of the live broadcast application programs simultaneously, and the condition that live broadcast service is automatically closed when each live broadcast application program in a foreground is switched to a background, so that live broadcast interruption is caused is avoided; furthermore, the live broadcast cost is saved, and the live broadcast experience of the anchor is greatly improved.
The above technical solutions of the embodiments of the present invention are described in detail below with reference to application examples:
the application example of the invention aims to enable the anchor to be live in a plurality of live broadcast platforms at the same time.
As shown in fig. 1, for example, in a terminal device a, after a live application App1 in the terminal device a is started, if an operating system of the terminal device a is Android, a Camera Service in the Android operating system is CameraService, after App1 establishes a connection with a Camera Service in the Android operating system of the terminal device a, the Camera device of the terminal device a is started through the CameraService, and an image is previewed in real time through the Camera device; storing the real-time Preview data of the real-time Preview image into a preset Preview Buffer area, such as a Preview Buffer, through a Camera Service, and sending the real-time Preview data stored in the Preview Buffer to an App1 through the Camera Service; app1 displays a live preview image in a corresponding window interface of App1 according to the received live preview data; subsequently, if it is monitored that the live application programs App2 and App3 are connected with the Camera Service, acquiring real-time Preview data from the Preview Buffer through the Camera Service, and respectively sending the real-time Preview data to App2 and App 3; app2 and App3 display live preview images in respective corresponding window interfaces of App2 and App3 according to the respective received live preview data. The predetermined preview buffer may be a preview buffer in an operating system, or may be a preview buffer created by a developer, which is not limited herein.
In a preferred embodiment, before the first application establishes a connection with a camera service of an operating system, the method includes: starting a camera service of an operating system and establishing connection between the camera service and camera equipment; the method comprises the steps of establishing connection between a first application program and a camera service of an operating system after receiving a request of establishing connection between the first application program and the camera service of the operating system, wherein the request is sent by the first application program.
For example, in a terminal device a, an operating system of the terminal device a is Android, and after the terminal device a is started, a Camera Service of the Android operating system is started, and a connection between the Camera Service and a Camera device of the terminal device a is established; and after receiving a request for establishing connection with the Camera Service, which is sent by the live application App1, establishing connection between the App1 and the Camera Service.
In a preferred embodiment, after it is monitored that at least one second application program is connected to the system camera service, the step 104 acquires the real-time preview data from the predetermined preview buffer through the camera service, and respectively sends the real-time preview data to the at least one second application program, including: monitoring a connection state of the camera service, and after the first application program is connected with the camera service, acquiring the real-time preview data from the preset preview buffer area through the camera service and copying at least one piece of real-time preview data if at least one second application program is monitored to be connected with the camera service; and respectively sending the copied at least one piece of real-time preview data to the at least one second application program through the camera service.
For example, in the terminal device a, an operating system of the terminal device a is Android, a connection state of CameraService is monitored, after a connection between a live application App1 and CameraService is established, if it is monitored that the live application App2 and App3 are connected with CameraService, then real-time Preview data is obtained from a predetermined Preview Buffer, such as Preview Buffer, through the CameraService, and two pieces of real-time Preview data are copied; and respectively sending the copied two pieces of real-time preview data to App2 and App3 through Camera Service. Referring to fig. 3, a schematic flow chart of acquiring live preview data by each application program is shown.
In a preferred embodiment, the method further comprises: according to the started application program window component Activities of each application program, a plurality of Task stacks Task corresponding to each Activities are created; and sequentially determining the Activity corresponding to each application program as the Activity of the system main window based on the created tasks at a preset frequency so as to sequentially display the respective pictures of the windows.
For example, in the terminal device a, an operating system of the terminal device a is Android, and Task stacks Task corresponding to the Activity of App1, Task corresponding to the Activity of App2, and Task corresponding to the Activity of App3 are created according to the Activity of application window components App1, App2, and App3 that have been started; subsequently, based on the two created tasks, repeatedly and sequentially determining the activities corresponding to App1, App2 and App3 as the activities of the system main window within each minute at a predetermined frequency, such as 10 times per minute, so as to sequentially display the respective screens of the multiple windows. It should be noted that, on one hand, the selection of the user can be received according to the different requirements of the user, and the window picture of any application program can be determined to be watched; on the other hand, the display mode of the window interface of each application program may be based on the multi-window technology of the Android sound, and the display mode is performed in a picture-in-picture multi-window mode, which is not limited herein. The storage structure diagram of each Task storage Activity refers to fig. 4.
It should be noted that, as can be understood by those skilled in the art, Activity is one of the four most basic and common components in Android. Activity is an application component that provides a screen through which a user can interact in order to perform a task, and in an Android application, an Activity is typically a separate screen on which controls can be displayed and in which the user's events can be monitored and processed in response. A Task is a container with a stack structure that contains a stack of activities, and multiple Activity instances can be placed, and an application is launched following a first-in-last-out principle, for which the system creates a Task.
Through this embodiment, through establishing a plurality of tasks, when each live application switches to the backstage, avoided the condition of live broadcast service interruption to take place, simultaneously, realized the window interface of each application of carousel in the system home window for the anchor can compromise the live broadcast effect of a plurality of live broadcast platforms simultaneously when live, thereby improved the live broadcast experience of anchor.
In a preferred embodiment, the method further comprises: monitoring the running state of each application program; and when monitoring that each application program exits the operation, closing the camera equipment through the camera service.
For example, in the terminal device a, when it is monitored that the applications App1, App2, and App3 exit the operation, the Camera device of the terminal device a is turned off by Camera Service.
By means of the method and the device for realizing live broadcast, the fact that the application programs acquire the real-time preview picture in the respective running process is guaranteed, the situation that other application programs cannot acquire the real-time preview picture due to the fact that any application program exits from running is avoided, and important precondition guarantee is provided for the fact that the anchor broadcast can be simultaneously live broadcast in a plurality of live broadcast platforms.
The embodiment of the present invention provides a multi-platform parallel live broadcasting device, which can implement the method embodiment provided above, and for specific function implementation, reference is made to the description in the method embodiment, which is not repeated herein.
It should be understood that the specific order or hierarchy of steps in the processes disclosed is an example of exemplary approaches. Based upon design preferences, it is understood that the specific order or hierarchy of steps in the processes may be rearranged without departing from the scope of the present disclosure. The accompanying method claims present elements of the various steps in a sample order, and are not intended to be limited to the specific order or hierarchy presented.
In the foregoing detailed description, various features are grouped together in a single embodiment for the purpose of streamlining the disclosure. This method of disclosure is not to be interpreted as reflecting an intention that the claimed embodiments of the subject matter require more features than are expressly recited in each claim. Rather, as the following claims reflect, invention lies in less than all features of a single disclosed embodiment. Thus, the following claims are hereby expressly incorporated into the detailed description, with each claim standing on its own as a separate preferred embodiment of the invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. To those skilled in the art; various modifications to these embodiments will be readily apparent, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
What has been described above includes examples of one or more embodiments. It is, of course, not possible to describe every conceivable combination of components or methodologies for purposes of describing the aforementioned embodiments, but one of ordinary skill in the art may recognize that many further combinations and permutations of various embodiments are possible. Accordingly, the embodiments described herein are intended to embrace all such alterations, modifications and variations that fall within the scope of the appended claims. Furthermore, to the extent that the term "includes" is used in either the detailed description or the claims, such term is intended to be inclusive in a manner similar to the term "comprising" as "comprising" is interpreted when employed as a transitional word in a claim. Furthermore, any use of the term "or" in the specification of the claims is intended to mean a "non-exclusive or".
Those of skill in the art will further appreciate that the various illustrative logical blocks, units, and steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate the interchangeability of hardware and software, various illustrative components, elements, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design requirements of the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present embodiments.
The various illustrative logical blocks, or elements, described in connection with the embodiments disclosed herein may be implemented or performed with a general purpose processor, a digital signal processor, an Application Specific Integrated Circuit (ASIC), a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general-purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a digital signal processor and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a digital signal processor core, or any other similar configuration.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may be stored in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. For example, a storage medium may be coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC, which may be located in a user terminal. In the alternative, the processor and the storage medium may reside in different components in a user terminal.
In one or more exemplary designs, the functions described in the embodiments of this invention may be implemented in hardware, software, firmware, or any combination thereof, if implemented in software, these functions may be stored on a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium including a computer storage medium and a communications medium that facilitates transfer of a computer program from one place to another.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims (7)
1. A multi-platform parallel live broadcasting method is characterized by comprising the following steps:
after a first application program is connected with a camera service of an operating system, starting camera equipment through the camera service, and previewing an image in real time through the camera equipment;
storing real-time preview data of a real-time preview image to a preset preview buffer area through the camera service, and sending the real-time preview data stored in the preset preview buffer area to the first application program;
displaying a real-time preview image in a corresponding window interface of the first application program according to the received real-time preview data;
if it is monitored that at least one second application program is connected with the camera service, the real-time preview data are obtained from the preset preview buffer area through the camera service, and the real-time preview data are respectively sent to the at least one second application program, and the method comprises the following steps:
monitoring a connection state of the camera service, and after the first application program is connected with the camera service, acquiring the real-time preview data from the preset preview buffer area through the camera service and copying at least one piece of real-time preview data if at least one second application program is monitored to be connected with the camera service;
respectively sending the copied at least one piece of real-time preview data to the at least one second application program through the camera service;
displaying a live preview image in a respective corresponding window interface of the at least one second application program according to the respective received live preview data;
according to the started application program window component Activities of each application program, a plurality of Task stacks Task corresponding to each Activities are created;
and sequentially determining the Activity corresponding to each application program as the Activity of the system main window based on the created tasks at a preset frequency, so as to sequentially and alternately display the respective pictures of the windows.
2. The method of claim 1, wherein before the first application establishes a connection with a camera service of an operating system, comprising:
starting a camera service of an operating system and establishing connection between the camera service and camera equipment;
the method comprises the steps of establishing connection between a first application program and a camera service of an operating system after receiving a request of establishing connection between the first application program and the camera service of the operating system, wherein the request is sent by the first application program.
3. The method of claim 1, further comprising:
monitoring the running state of each application program;
and when monitoring that each application program exits the operation, closing the camera equipment through the camera service.
4. A multi-platform parallel live broadcasting apparatus, comprising:
the starting unit is used for starting the camera equipment through the camera service after the first application program is connected with the camera service of the operating system, and previewing images in real time through the camera equipment;
a storage and transmission unit for storing live preview data of a live preview image to a predetermined preview buffer through the camera service and transmitting the live preview data stored in the predetermined preview buffer to the first application;
the first display unit is used for displaying a real-time preview image in a corresponding window interface of the first application program according to the received real-time preview data;
the acquiring and sending unit is configured to acquire the real-time preview data from the predetermined preview buffer area through the camera service and send the real-time preview data to the at least one second application program respectively after it is monitored that the at least one second application program is connected to the camera service, and includes:
the monitoring module is used for monitoring the connection state of the camera service, and after the first application program is connected with the camera service, if the situation that at least one second application program is connected with the camera service is monitored, the real-time preview data is obtained from the preset preview buffer area through the camera service, and at least one piece of real-time preview data is copied;
a sending module, configured to send the copied at least one piece of live preview data to the at least one second application program through the camera service;
the second display unit is used for displaying the real-time preview image in the corresponding window interface of the at least one second application program according to the received real-time preview data;
the creating unit is used for creating a plurality of Task stacks Task corresponding to each Activity according to the Activity of the application window component of each started application;
and the determining unit is used for sequentially determining the Activity corresponding to each application program as the Activity of the system main window according to a preset frequency based on the plurality of created tasks, so as to sequentially and alternately display the respective pictures of the plurality of windows.
5. The apparatus of claim 4, comprising:
the starting and establishing connection unit is used for starting the camera service of the operating system and establishing the connection between the camera service and the camera equipment;
the connection establishing unit is used for establishing the connection between the first application program and the camera service of the operating system after receiving a request which is sent by the first application program and establishes the connection with the camera service of the operating system.
6. The apparatus of claim 4 or 5, wherein the acquiring and sending unit comprises:
the monitoring module is used for monitoring the connection state of the camera service, and after the first application program is connected with the camera service, if the situation that at least one second application program is connected with the camera service is monitored, the real-time preview data is obtained from the preset preview buffer area through the camera service, and at least one piece of real-time preview data is copied;
a sending module, configured to send the copied at least one piece of live preview data to the at least one second application program through the camera service.
7. The apparatus of claim 4, further comprising:
the monitoring unit is used for monitoring the running state of each application program;
and the closing unit is used for closing the camera equipment through the camera service when monitoring that each application program exits the operation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710650710.2A CN107483812B (en) | 2017-08-02 | 2017-08-02 | Multi-platform parallel live broadcast method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710650710.2A CN107483812B (en) | 2017-08-02 | 2017-08-02 | Multi-platform parallel live broadcast method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107483812A CN107483812A (en) | 2017-12-15 |
CN107483812B true CN107483812B (en) | 2020-08-04 |
Family
ID=60597374
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710650710.2A Active CN107483812B (en) | 2017-08-02 | 2017-08-02 | Multi-platform parallel live broadcast method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107483812B (en) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109005415A (en) * | 2018-07-26 | 2018-12-14 | 阿里巴巴集团控股有限公司 | A kind of network direct broadcasting control method, apparatus and system |
CN109068179B (en) * | 2018-09-17 | 2020-10-02 | 珠海市筑巢科技有限公司 | Multi-platform live broadcast method, computer device and computer readable storage medium |
WO2021185302A1 (en) * | 2020-03-20 | 2021-09-23 | 华为技术有限公司 | Live streaming and configuration method based on cloud phones, and related apparatus and system |
CN111901614A (en) * | 2020-06-22 | 2020-11-06 | 深圳市沃特沃德股份有限公司 | Multi-platform synchronous live broadcast method and device, computer equipment and readable storage medium |
CN112188222A (en) * | 2020-09-25 | 2021-01-05 | 吕庆新 | Information acquisition processing device and application thereof, information transfer method, computer readable medium, and information acquisition processing method |
CN116886810A (en) * | 2020-11-20 | 2023-10-13 | 华为终端有限公司 | Camera calling method, system and electronic equipment |
CN112799622A (en) * | 2021-01-22 | 2021-05-14 | 维沃移动通信(杭州)有限公司 | Application control method and device and electronic equipment |
CN114286117A (en) * | 2021-04-15 | 2022-04-05 | 上海商米科技集团股份有限公司 | Multi-platform multi-application live broadcast method and system, live broadcast equipment and storage medium |
CN113259696A (en) * | 2021-05-11 | 2021-08-13 | 西安万像电子科技有限公司 | Live broadcast method and device, storage medium and electronic equipment |
CN113992854A (en) * | 2021-10-29 | 2022-01-28 | Oppo广东移动通信有限公司 | Image preview method and device, electronic equipment and computer readable storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101833520A (en) * | 2009-03-11 | 2010-09-15 | 凹凸电子(武汉)有限公司 | Method for simultaneously utilizing one camera by computer system and a plurality of application programs |
CN202059502U (en) * | 2011-05-31 | 2011-11-30 | 中国华录·松下电子信息有限公司 | Image acquisition device capable of being used for multiple programs simultaneously |
CN102968315A (en) * | 2012-10-30 | 2013-03-13 | 广东欧珀移动通信有限公司 | Method and system for quickly starting camera previewing of intelligent equipment and intelligent equipment |
CN103389900A (en) * | 2013-07-23 | 2013-11-13 | Tcl集团股份有限公司 | Control method and device for Android equipment camera |
CN105791411A (en) * | 2016-03-31 | 2016-07-20 | 成都西可科技有限公司 | System and method of live broadcast network selection based on multiple live broadcast accounts of motion camera |
CN105872225A (en) * | 2016-03-31 | 2016-08-17 | 成都西可科技有限公司 | Method for controlling multiple motion cameras to carry out live broadcast by mobile phone through internet |
CN106791356A (en) * | 2016-11-10 | 2017-05-31 | 北京智能管家科技有限公司 | For the method and device of camera data distribution |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8934044B2 (en) * | 2012-07-20 | 2015-01-13 | Adobe Systems Incorporated | Systems and methods for live view photo layer in digital imaging applications |
-
2017
- 2017-08-02 CN CN201710650710.2A patent/CN107483812B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101833520A (en) * | 2009-03-11 | 2010-09-15 | 凹凸电子(武汉)有限公司 | Method for simultaneously utilizing one camera by computer system and a plurality of application programs |
CN202059502U (en) * | 2011-05-31 | 2011-11-30 | 中国华录·松下电子信息有限公司 | Image acquisition device capable of being used for multiple programs simultaneously |
CN102968315A (en) * | 2012-10-30 | 2013-03-13 | 广东欧珀移动通信有限公司 | Method and system for quickly starting camera previewing of intelligent equipment and intelligent equipment |
CN103389900A (en) * | 2013-07-23 | 2013-11-13 | Tcl集团股份有限公司 | Control method and device for Android equipment camera |
CN105791411A (en) * | 2016-03-31 | 2016-07-20 | 成都西可科技有限公司 | System and method of live broadcast network selection based on multiple live broadcast accounts of motion camera |
CN105872225A (en) * | 2016-03-31 | 2016-08-17 | 成都西可科技有限公司 | Method for controlling multiple motion cameras to carry out live broadcast by mobile phone through internet |
CN106791356A (en) * | 2016-11-10 | 2017-05-31 | 北京智能管家科技有限公司 | For the method and device of camera data distribution |
Also Published As
Publication number | Publication date |
---|---|
CN107483812A (en) | 2017-12-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107483812B (en) | Multi-platform parallel live broadcast method and device | |
CN112367543B (en) | Display device, mobile terminal, screen projection method and screen projection system | |
US9285945B2 (en) | Method and apparatus for displaying multi-task interface | |
CN110162343B (en) | Application starting method and device, electronic equipment and storage medium | |
CN109168021B (en) | Plug flow method and device | |
CN111629239B (en) | Screen projection processing method, device, equipment and computer readable storage medium | |
CN104159151A (en) | Device and method for intercepting and processing of videos on OTT box | |
CN109803151B (en) | Multimedia data stream switching method and device, storage medium and electronic device | |
CN108920120B (en) | Information display control method and device | |
CN103927095A (en) | Method and device for achieving screen video recording | |
CN204013943U (en) | A kind of device that carries out video intercepting and process on OTT box | |
CN111683279A (en) | Display apparatus and image restoration method | |
CN111935518A (en) | Video screen projection method and display device | |
CN113014972A (en) | Screen projection method, device and system | |
CN110213657A (en) | A kind of starting-up method and smart television | |
CN112579030A (en) | Screen projection output control method and device and electronic equipment | |
CN112351093A (en) | Screenshot image sharing method, device and equipment and computer readable storage medium | |
CN111954059A (en) | Screen saver display method and display device | |
WO2022028060A1 (en) | Display device and display method | |
CN109561337A (en) | The playing method and device of preview video | |
CN109005455B (en) | Video data processing method and device | |
CN109922366A (en) | A kind of device parameter method of adjustment, device, equipment and medium | |
CN113157178B (en) | Information processing method and device | |
CN114390332A (en) | Display device and method for rapidly switching split-screen application | |
CN111782100A (en) | Method, device, terminal and storage medium for previewing background picture |
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 |