Display device and local video playing starting method

By creating the surface view and video player simultaneously, and independently initializing the decoder and decapsulation process in the display device, preloading the decoder library and performing asynchronous initialization, the problem of long local video playback time is solved, thus improving the user experience.

CN122027809APending Publication Date: 2026-05-12HISENSE VISUAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HISENSE VISUAL TECH CO LTD
Filing Date
2024-11-11
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

In existing technologies, local video playback takes a long time, resulting in users seeing a long buffering circle or a black screen, leading to a poor user experience.

Method used

The display device simultaneously creates the surface view and the video player, and simultaneously initializes the decoder and decapsulates the original video stream data. The independent processes are not affected by each other's processes, and the decoder library is preloaded and initialized asynchronously.

Benefits of technology

有效降低了本地视频起播的总体耗时,提高了用户的播放体验,减少了缓冲圈或黑屏的显示时间。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122027809A_ABST
    Figure CN122027809A_ABST
Patent Text Reader

Abstract

The invention provides a display device and a local video playing starting method, relates to the field of video playing, and is used for solving the problems that in the prior art, playing starting of a local video consumes long time, a user sees a buffer ring or a blank screen picture for a long time, and the use experience of the user is poor, and the method comprises the steps that a surface layer view and a video player are created at the same time; configuring the surface view in a video player; meanwhile, initializing a decoder and de-packaging original view stream data of a local video; wherein the decoder is used for decoding original stream data of a local video to obtain data to be played; and controlling the display to play the to-be-played data on the playing interface through the video player. According to the display equipment and the local video playing starting method provided by the embodiment of the invention, the total time consumption of playing starting of the local video can be effectively reduced, and the use experience of a user when the local video is played is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of video playback technology, and in particular to a display device and a method for initiating local video playback. Background Technology

[0002] Currently, when a user requests to play a locally stored video on a display device, the device's background video playback system detects the user's button presses using the remote control and creates a player. The display device then opens the original file of the selected local video, performing a series of operations including reading the original file, decompressing it, sending the decompressed file to the decoder for decoding, and finally, playing the decoded local video. Only after all these operations are completed does the local video actually begin playing. Therefore, in the current local video playback solution, the time required before successful playback is significant, resulting in a prolonged buffering loop or a black screen for the user, leading to a poor user experience. Summary of the Invention

[0003] To address the aforementioned technical problems, this application provides a display device and a method for starting local video playback, which solves the problem in the prior art where the start-up time of local video playback is long, resulting in users seeing a long buffering circle or a black screen, leading to a poor user experience.

[0004] The technical solution of this application is as follows:

[0005] In a first aspect, this application provides a display device, characterized in that it includes: a display configured to display a playback interface; and a controller coupled to the display and configured to: simultaneously create a surface view SurfaceView and a video player; configure the surface view in the video player; simultaneously initialize a decoder and decapsulate the original video stream data of a local video; wherein the decoder is used to decode the original stream data of the local video to obtain data to be played; and control the display to play the data to be played through the video player on the playback interface.

[0006] The above technical solution has the following advantages or beneficial effects: In this application embodiment, the creation of the surface view and the video player are performed simultaneously. The creation processes of these two processes are independent and not affected by the other's creation process. This avoids the problem of a long overall process execution time caused by a problem occurring in only one of the creation processes (surface view or video player) during creation. Similarly, since the decoder initialization and decapsulation of the original local video stream data are performed simultaneously, these two processes are independent and concurrent, and are not affected by the execution of the other's process. This also avoids the problem of a long overall process execution time caused by a problem occurring in only one of the initialization processes (decoder initialization or decapsulation of the original local video stream data). Therefore, this application can effectively reduce the overall time required to start local video playback and improve the user experience when playing local videos.

[0007] In some embodiments, before creating the surface view and the video player simultaneously, the controller is further configured to: determine the playback interface in response to a first event instruction; wherein the first event instruction includes a KeyDown event instruction; and after determining the playback interface, control the display to show the playback interface.

[0008] The above technical solution has the following advantages or beneficial effects: Since the event command responded by the controller is a button press event command, rather than a button release event command, this application can reduce the time consumed in the process of determining the playback interface in response to the event command.

[0009] In some embodiments, the controller creates a surface view in the playback interface, specifically configured as follows:

[0010] From the layout file of the playback interface, determine the controls of the surface view; based on the controls of the surface view, create an instance of the surface view; configure the execution parameters of the surface view; among which, the execution parameters of the surface view include the position information and capacity information of the surface view.

[0011] The above technical solution has the following advantages or beneficial effects: it can create a surface view, which in turn carries the playback interface of the local video to be played.

[0012] In some embodiments, the controller creates a video player in the playback interface, specifically configured to: determine the player type of the video player; create a player instance of the video player according to the player type of the video player; and configure the execution parameters of the video player; wherein the execution parameters include the file path of the local video and the playback mode.

[0013] The above technical solution has the following advantages or beneficial effects: it can create a video player for playing local videos, thereby loading and playing local video files.

[0014] In some embodiments, before simultaneously initializing the decoder and decapsulating the original video stream data, the controller is further configured to: preload multiple decoder libraries; wherein the multiple decoder libraries include video stream decoder libraries, audio stream decoder libraries, subtitle stream decoder libraries, and auxiliary stream decoder libraries.

[0015] The above technical solution has the following advantages or beneficial effects: Since the controller preloads the decoder library before simultaneously initializing the decoder and decapsulating the original video stream data, the time spent initializing the decoder is also reduced, thereby further reducing the total time spent by the display device when playing local video.

[0016] In some embodiments, the controller initializes the decoder by: determining multiple target decoder libraries from multiple decoder libraries based on the encoding format of the local video and the raw stream data; and asynchronously initializing the decoder by calling the application programming interface (API) of each target decoder library.

[0017] The above technical solution has the following advantages or beneficial effects: When initializing the decoder, asynchronous initialization of the decoder is realized, which can reduce the time spent initializing the decoder while effectively utilizing the system resources of the display device, thereby further reducing the total time spent by the display device when playing local video.

[0018] In some embodiments, the controller decapsulates the original video stream data of the local video, specifically configured to: determine a decapsulation library or decapsulation tool according to the encoding format of the local video; and use the decapsulation library or decapsulation tool to decapsulate the original video stream data of the local video to obtain the data to be played.

[0019] The above technical solution has the following advantages or beneficial effects: it can decapsulate the original stream data of local video, and thus obtain the data to be played that can be directly played by the video player.

[0020] In some embodiments, the data to be played includes video stream data, audio stream data, subtitle stream data, and auxiliary stream data of the local video.

[0021] The above technical solution has the following advantages or beneficial effects: for the various streaming data included in the local video, the embodiments of this application can decapsulate and play them.

[0022] Secondly, this application provides a method for initiating local video playback, comprising: simultaneously creating a surface view and a video player in a playback interface; configuring the surface view in the video player; simultaneously initializing a decoder and decapsulating the original video stream data of the local video; wherein the decoder is used to decode the original stream data of the local video to obtain the data to be played; and controlling the display to play the data to be played through the video player in the playback interface.

[0023] Thirdly, the present invention provides a computer-readable storage medium, comprising: storing a computer program on the computer-readable storage medium, the computer program being executed by a processor as a local video initiation method as provided in any of the second aspects.

[0024] Fourthly, the present invention provides a computer program product that, when run on a computer, causes the computer to execute a local video initiation method as provided in any of the second aspects.

[0025] It should be noted that the aforementioned computer instructions may be stored, in whole or in part, on the first computer-readable storage medium. The first computer-readable storage medium may be packaged together with the processor of the display device, or it may be packaged separately from the processor of the display device; this application does not impose any limitation on this.

[0026] The descriptions of the second, third, and fourth aspects in this application can be referenced to the detailed description of the first aspect; and the beneficial effects described in the second, third, and fourth aspects can be referenced to the analysis of the beneficial effects of the first aspect, which will not be repeated here.

[0027] In this application, the names of the aforementioned display devices do not limit the devices or functional modules themselves. In actual implementation, these devices or functional modules may appear under other names. As long as the functions of each device or functional module are similar to those in this application, they fall within the scope of the claims of this application and their equivalents.

[0028] These or other aspects of this application will become more readily apparent in the following description.

[0029] The technical solution provided in this application has the following advantages compared with the prior art:

[0030] In this embodiment, when the display device initiates playback of local video in response to user operation, the event command is a button press event command, not a button release event command. Therefore, this embodiment responds as soon as the user presses a button on the display device remote control, thereby displaying the playback interface to the user and reducing the time spent initiating playback in response to user operation. Furthermore, since this embodiment simultaneously creates the surface view and the video player, their creation processes are independent and not affected by each other's creation processes. This avoids the problem of a long overall process execution time caused by a problem occurring in only one of the creation processes of the surface view and the video player. Similarly, this embodiment simultaneously initializes the decoder and decapsulates the original video stream data. These two processes are independent and simultaneous, and are not affected by the execution of the other's process. This also avoids the problem of a long overall process execution time caused by a problem occurring in only one of the processes of initializing the decoder and decapsulating the original video stream data.

[0031] Furthermore, this embodiment preloads the decoder library before simultaneously initializing the decoder and decapsulating the original video stream data. It also implements asynchronous decoder initialization during decoder initialization, effectively utilizing display device system resources while reducing decoder initialization time, thereby further reducing the total time spent playing local videos. Therefore, this embodiment effectively reduces the overall time required to start local video playback, improving the user experience. Attached Figure Description

[0032] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0033] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0034] Figure 1 A schematic diagram illustrating a local video initiation method provided in an embodiment of this application;

[0035] Figure 2 This is one of the structural schematic diagrams of the display device provided in the embodiments of this application;

[0036] Figure 3 This is a second schematic diagram of the structure of the display device provided in the embodiments of this application;

[0037] Figure 4 A schematic diagram illustrating the current process of initiating local video playback, provided for embodiments of this application;

[0038] Figure 5 One of the flowcharts for a local video initiation method provided in an embodiment of this application;

[0039] Figure 6 A second schematic flowchart illustrating the local video initiation method provided in this application embodiment;

[0040] Figure 7 The third flowchart illustrating the local video initiation method provided in this application embodiment;

[0041] Figure 8 The fourth flowchart illustrating the local video initiation method provided in this application embodiment;

[0042] Figure 9 Fifth flowchart illustrating the local video initiation method provided in this application embodiment;

[0043] Figure 10 A flowchart illustrating the local video initiation method provided in this application embodiment is shown in Figure 6.

[0044] Figure 11 This is the seventh flowchart illustrating the local video initiation method provided in this application embodiment. Detailed Implementation

[0045] The embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described below do not represent all embodiments consistent with this application. They are merely examples of systems and methods consistent with some aspects of this application as detailed in the claims.

[0046] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.

[0047] The terms "first," "second," "third," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar or related objects or entities, and do not necessarily imply a specific order or sequence, unless otherwise specified. It should be understood that such terms are interchangeable where appropriate.

[0048] The terms “comprising” and “having,” and any variations thereof, are intended to cover but not exclude inclusion. For example, a product or device that includes a series of components is not necessarily limited to all components explicitly listed, but may include other components not explicitly listed or inherent to such product or device. The term “module” means any known or subsequently developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code capable of performing the functions associated with that component.

[0049] In this application embodiment, the display device 200 mentioned generally refers to a device with screen display and data processing capabilities. For example, the display device 200 includes, but is not limited to, smart TVs, mobile terminals, computers, monitors, advertising screens, wearable devices, virtual reality devices, augmented reality devices, etc.

[0050] Figure 1 This is a schematic diagram illustrating an operational scenario between a display device and a control device provided in some embodiments of this application. For example... Figure 1 As shown, a user can operate the display device 200 via touch operation, a mobile terminal 300, and a control device 100. The control device 100 receives user input commands and converts them into control commands that the display device 200 can recognize and respond to. For example, the control device 100 can be a remote control, a stylus, a gamepad, etc.

[0051] The mobile terminal 300 can function as a control device for human-computer interaction between the user and the display device 200. It can also function as a communication device for establishing a communication connection with the display device 200 and exchanging data. In some embodiments, the mobile terminal 300 can have software applications installed on it and communicate with the display device 200 via network communication protocols to achieve one-to-one control and data communication. Furthermore, it can transmit audio and video content displayed on the mobile terminal 300 to the display device 200 for synchronized display.

[0052] In some embodiments, the mobile terminal 300 or other electronic devices may also simulate the functions of the control device 100 by running an application that controls the display device 200.

[0053] like Figure 1 The diagram also shows that the display device 200 communicates with the server 400 via various communication methods. This allows the display device 200 to communicate via a local area network (LAN), a wireless local area network (WLAN), and other networks.

[0054] Server 400 can train the text-based image model using a large amount of human image data. This human image data can be obtained by generalizing human features from human images uploaded by display device 200. Display device 200 can send user input information to server 400, which can then input this information into the text-based image model to generate images that meet the user's needs in advertising creation, copywriting, digital human production and promotion, story creation, and other applications.

[0055] Display device 200 can provide broadcast television reception function, and can also be equipped with intelligent network television function that provides computer support, including but not limited to network television, smart television, Internet Protocol television (IPTV), etc.

[0056] Figure 2 Provided for some embodiments of this application Figure 1 Hardware configuration block diagram of display device 200.

[0057] In some embodiments, the display device 200 may include at least one of a tuner 210, a communication device 220, a detector 230, a device interface 240, a controller 250, a display 260, an audio output device 270, a memory, a power supply, and a user input interface.

[0058] In some embodiments, detector 230 is used to acquire signals from the external environment or to interact with the outside world. For example, detector 230 includes a light receiver, a sensor for acquiring ambient light intensity; or, detector 230 includes an image acquisition device, such as a camera, which can be used to acquire external environmental scenes, user attributes, or user interaction gestures; or, detector 230 includes a sound acquisition device, such as a microphone, for receiving external sounds.

[0059] In some embodiments, the display 260 includes display function components for presenting images and driving components for driving image display. The display 260 is used to receive and display image signals output from the controller 250. For example, the display 260 can be used to display video content, image content, menu control interface components, and user control UI interfaces, etc.

[0060] In some embodiments, the communication device 220 is a component used to communicate with external devices or the server 400 according to various communication protocol types. The display device 200 may have multiple communication devices 220 depending on the supported communication methods. For example, when the display device 200 supports wireless network communication, it may have a communication device 220 with WiFi functionality. When the display device 200 supports Bluetooth connectivity, it needs to have a communication device 220 with Bluetooth functionality.

[0061] The communication device 220 enables the display device 200 to communicate with external devices or the server 400 via wireless or wired connections. Wired connections utilize data cables, interfaces, or other components to connect the display device 200 to external devices. Wireless connections utilize wireless signals or wireless networks. The display device 200 can directly establish a connection with external devices or indirectly through gateways, routers, or other connection devices.

[0062] In some embodiments, the controller 250 may include at least one of a central processing unit, a video processor, an audio processor, a graphics processor, and a power processor, and a first to an nth interface for input / output. The controller 250 controls the operation of the display device and responds to user operations through various software control programs stored in memory. The controller 250 controls the overall operation of the display device 200.

[0063] In some embodiments, the controller 250 and the tuner 210 may be located in different separate devices, that is, the tuner 210 may also be located in an external device of the main device where the controller 250 is located, such as an external set-top box.

[0064] In some embodiments, a user can input user commands through a graphical user interface (GUI) displayed on a display 260, and the user input interface receives user input commands through the graphical user interface (GUI).

[0065] In some embodiments, the audio output device 270 can be a built-in speaker of the display device 200 or an external audio output device connected to the display device 200. For the external audio output device connected to the display device 200, the display device 200 may also be provided with an external audio output terminal, through which the audio output device can be connected to the display device 200 to output sound from the display device 200.

[0066] In some embodiments, the user input interface 280 can be used to receive instructions from user input. For example, the user input interface 280 can receive an instruction from the user to select a person image. The user input interface 280 can also receive text information entered by the user in the user interface. This text information includes descriptions of the person and descriptions for generating a specific image. The user input interface 280 can also receive confirmation instructions from the user regarding controls or images in the user interface. The user input interface 280 can also receive voice instructions entered by the user.

[0067] In some embodiments, to enable user interaction, the display device 200 may run an operating system. This operating system is a computer program used to manage and control the hardware and software resources of the display device 200. The operating system can control the display device to provide a user interface; for example, the operating system can directly control the display device to provide a user interface, or it can provide a user interface by running an application. The operating system also allows users to interact with the display device 200.

[0068] It should be noted that the aforementioned operating system can be a native operating system based on a specific operating platform, a third-party operating system that is deeply customized based on a specific operating platform, or an independent operating system specifically developed for display devices.

[0069] An operating system can be divided into different modules or levels based on the functions it implements, for example... Figure 3 As shown, in some embodiments, the system is divided into four layers, from top to bottom: the Applications layer (referred to as the "Application Layer"), the Application Framework layer (referred to as the "Framework Layer"), the System Library layer, and the Kernel layer.

[0070] In some embodiments, the application layer provides services and interfaces for applications, enabling the display device 200 to run applications and interact with the user based on the applications. The application layer may contain at least one application, which may be a built-in Windows program, system settings program, or clock program of the operating system; or it may be an application developed by a third-party developer. In specific implementations, the application packages in the application layer are not limited to the examples above.

[0071] In this embodiment, the application layer may include a text-to-image application. This application can generate corresponding images based on user-input text. It can be used to generate images for advertising creation, copywriting creation, digital human creation and promotional images, and story creation, etc.

[0072] The framework layer provides application programming interfaces (APIs) and a programming framework for applications. The application framework layer includes predefined functions. It acts as a central processing unit, determining the actions taken by applications within the application layer. Through the API, applications can access system resources and obtain system services during execution.

[0073] like Figure 3As shown, the application framework layer in this embodiment includes a view system, managers, and content providers. The view system designs and implements the application's interface and interactions, and includes lists, grids, text boxes, and buttons. The managers include at least one of the following modules: an activity manager for interacting with all running activities in the system; a location manager for providing system services or applications with access to system location services; a package manager for retrieving various information related to application packages currently installed on the device; a notification manager for controlling the display and clearing of notification messages; and a window manager for managing icons, windows, toolbars, wallpapers, and desktop widgets on the user interface.

[0074] In some embodiments, the Activity Manager manages the lifecycle of individual applications and common navigation and back functions, such as controlling application exit, opening, and back actions. The Window Manager manages all window programs, such as obtaining the screen size, determining if a status bar is present, locking the screen, capturing the screen, and controlling changes to the display window, such as shrinking the display window, shaking the display, or distorting the display.

[0075] In some embodiments, the system runtime library layer can provide support for the framework layer. When the framework layer is used, the operating system runs the instruction library contained in the system runtime library layer, such as the C / C++ instruction library, to implement the functions to be performed by the framework layer.

[0076] In some embodiments, the kernel layer is a functional layer situated between the hardware and software of the display device 200. The kernel layer can implement functions such as hardware abstraction, multitasking, and memory management. For example, ... Figure 3 As shown, hardware drivers can be configured in the kernel layer. The drivers included in the kernel layer can be at least one of the following: audio driver, display driver, Bluetooth driver, camera driver, WIFI driver, USB driver, HDMI driver, sensor driver (such as fingerprint sensor, temperature sensor, pressure sensor, etc.), and power driver, etc.

[0077] It should be noted that the above examples are merely a simple division of operating system functions and do not limit the specific form of the operating system of the display device 200 in this application embodiment. Depending on the function of the display device, the type of operating system, and other factors, the number of levels and the specific level type of the operating system may be expressed in other forms.

[0078] The following is an explanation of the technical terms used in this application:

[0079] 1. Activity

[0080] In Android development, an Activity refers to a single screen within an application that contains user interface elements and is used for user interaction. In media playback applications, listening for remote control button events and launching the corresponding Activity can provide users with a richer interactive experience.

[0081] In this application, when a user presses a button using a remote control, the media playback application in the display device system captures the event command corresponding to that button (e.g., the KeyUp command) and launches a new Activity accordingly.

[0082] Specifically, "Activity" can be translated as user interface activity, interactive interface, or playback activity. In the following description of this application, the translation "playback activity" will be used.

[0083] 2. SurfaceView

[0084] SurfaceView is a special view class in Android development that allows drawing operations to be performed in a background thread, thus avoiding blocking the main thread of the user interface. Because of this feature, SurfaceView is ideal for scenarios requiring high-performance drawing, such as video playback and game rendering.

[0085] In Android applications, SurfaceView is typically created within an Activity. SurfaceView can be created and initialized in the Activity's onCreate method or other lifecycle methods using findViewById or by defining it directly in the layout file.

[0086] Specifically, SurfaceView can be translated as surface view or surface layer view, and the term surface layer view will be used in the following description of this application.

[0087] 3. Player

[0088] The media player mentioned in this application is software typically designed to read, decode, and play audio and video files in various formats. This software can run on a variety of operating systems and platforms, including computers, mobile devices (such as smartphones and tablets), and dedicated display devices (such as smart TVs).

[0089] The functions of a media player typically include:

[0090] (1) File reading: The player can recognize and read audio and video files stored on the device.

[0091] (2) Decoding: The player has a built-in decoder to decode compressed audio and video data into a playable original format.

[0092] (3) Playback control: The player provides basic playback control functions such as play, pause, stop, fast forward, and rewind.

[0093] (4) User interface: The player usually has a user interface to display information such as playlist, current playback progress, volume control, etc., and provides an interface for interaction with the user.

[0094] (5) Format support: The player supports a variety of audio and video formats.

[0095] (6) Additional features: Some players also offer additional features such as subtitle support, equalizer adjustment, playlist management, and network streaming playback.

[0096] In Android development, media players are typically developed as part of an application and may utilize Android's media playback frameworks (such as MediaPlayer, ExoPlayer, etc.) to implement their functionality. These media player software can be used in conjunction with other Android components (such as Activities mentioned earlier) to provide a rich user experience.

[0097] 4. Elementary Streams (ES)

[0098] The raw stream is the data stream that comes directly from the encoder. These data streams can be encoded video data streams (such as H.264, MJPEG, etc.), audio data streams (such as AAC, MP3), or other encoded data streams.

[0099] In the local video playback scheme involved in this application, raw streaming data typically exists as raw encoded data streams of video and audio. These data streams need to undergo a series of processes before playback, including decoding and synchronization, before they can finally be presented through the display device in a form perceptible to the user (such as video images and audio sounds).

[0100] 5. Decoder

[0101] A decoder is a tool that converts compressed audio and video data into uncompressed raw data. During video playback, compressed video and audio data need to be decoded by the decoder into raw video frames and audio samples. This allows the data to be recognized and played by display and audio devices. The decoder can be a hardware decoder (such as the decoder built into a graphics processor) or a software decoder.

[0102] Correspondingly, the decoder needs to be initialized before use, and the tool for initialization is the decoder library. The decoder library typically contains all the functions, variables, and data structures required by the decoder, forming the foundation for its proper functioning. During decoder initialization, corresponding functions need to be called from the decoder library to configure the decoder, such as setting decoder parameters and allocating necessary memory space.

[0103] A decoder library is a software library that contains decoder functionality. In the local video playback process, decoder libraries typically provide rich Application Programming Interfaces (APIs) for developers to call to implement audio and video decoding of different formats. For example, the libavcodec library in FFmpeg is a powerful decoder library that supports the functionality of most commercially available decoders. Developers can use functions in the libavcodec library to decode audio and video data of different encoding formats.

[0104] 6. Decapsulation

[0105] Decapsulation is a crucial step in audio and video processing. It involves splitting encapsulated audio and video files into audio and video streams according to specific rules for further processing and playback. Accordingly, decapsulation requires decapsulation libraries or tools.

[0106] De-packaging libraries typically contain various functions and data structures needed for de-packaging, capable of recognizing and parsing different container formats such as MP4, MKV, and FLV. By calling functions in the de-packaging library, developers can read, parse, and extract audio and video streams from containerized files. For example, the libavformat library in FFmpeg is a powerful de-packaging library that supports parsing multiple container formats and extracting audio and video data.

[0107] In addition, there are some specialized decompression tools, such as mp4box, which usually provide simpler and easier-to-use interfaces, making it easier for developers to decompress and repackage audio and video files.

[0108] Whether to use a decapsulation library or a decapsulation tool in the decapsulation process depends on the specific application scenario and the developer's needs.

[0109] 7. Asynchronous initialization

[0110] Asynchronous initialization is a strategy that loads and initializes components or resources on demand during program startup or runtime. It allows the program to begin performing other tasks without having to wait for all components to complete initialization, thereby improving program responsiveness and performance.

[0111] In this application, after determining the target decoder library to be used, the controller can call the video stream decoder library, audio stream decoder library, subtitle stream decoder library, and auxiliary stream decoder library respectively to asynchronously initialize the corresponding parts of the decoder, so as to reduce the time spent initializing the decoder.

[0112] The above provides a brief overview of the technical terms used in the embodiments of this application.

[0113] Currently, with the rapid development of the video industry, the industry has increasingly higher requirements for video picture quality, bandwidth, playback latency, startup speed, and stability. Correspondingly, market competition for display devices such as televisions is becoming increasingly fierce. To ensure the viewing quality and effect of televisions and other display devices, users hope for instant playback when watching certain movies or TV series.

[0114] Currently, when a user requests to play a locally stored video on a display device, the device's background video playback system detects the user's button presses using the remote control and creates a player. The display device then opens the original file of the selected local video, performing a series of operations including reading the original file, decompressing it, sending the decompressed file to the decoder for decoding, and finally, playing the decoded local video. Only after all these operations are completed does the local video actually begin playing. Therefore, in the current local video playback solution, the time required before successful playback is significant, resulting in a prolonged buffering loop or a black screen for the user, leading to a poor user experience.

[0115] For example, such as Figure 4 As shown, Figure 4 This illustrates the current process of a display device initiating playback of a local video after a user selects to play it. Specifically, it includes:

[0116] S401, The user selects a local video file to play.

[0117] Specifically, the user opens the file browser on the display device and browses local videos. The user selects the local video they want to play and clicks the "OK" button on the remote control.

[0118] S402, Receive the KeyUp event command from the remote control and return.

[0119] Correspondingly, upon receiving a button release event, the playback activity is initiated.

[0120] S403. Create a surface view (SurfaceView).

[0121] SurfaceView is used for screen display.

[0122] S404, Create a media player.

[0123] Specifically, the player is created after the SurfaceView is created.

[0124] S405. Configure SurfaceView for the player.

[0125] Specifically, after the player is created, the SurfaceView is configured for the player.

[0126] S406. Decode the local video file.

[0127] Specifically, the player sends the ES data of the local video to the decoder to obtain the video data parsed by the decoder.

[0128] S407, the player plays the video data obtained from decoding.

[0129] In the aforementioned local video playback process, all steps are executed sequentially. Therefore, when some steps are time-consuming, the overall process takes longer to complete, resulting in a longer time from when the user presses a button on the remote control to when the screen actually appears, leading to a poor user experience.

[0130] To address the aforementioned technical issues, this application provides a display device and a method for initiating local video playback. Specifically, when the display device responds to a user pressing the play button to play a local video, it simultaneously creates a surface view and a player, and simultaneously encapsulates and initializes the decoder for the player. This effectively reduces the time required to initiate local video playback, shortens the duration of buffering or black screens seen by the user, and improves the user's local video playback experience.

[0131] In some embodiments, Figure 5 This is a flowchart illustrating how a display device, as provided in an embodiment of this application, executes a local video playback initiation method according to an operation instruction. Figure 5As shown, this application embodiment provides a display device, which includes a display 260 and a controller 250. The display 260 is configured to display a playback interface; the controller 250 is coupled to the display 260 and configured to execute the following steps S501-S505:

[0132] S501, in response to the first event instruction, determines the playback interface.

[0133] The first event instruction includes the KeyDown event instruction for pressing a button.

[0134] It's important to note that, in order to respond to user interactions, the controller needs to listen for remote control button events. This is typically done by implementing a button listener. When the controller detects a button press, the application checks the button's identifier (such as the "play" button) and triggers the corresponding action. In this scenario, if the captured event is a play button press for a local video, the controller will start a new playback activity to create and host the playback interface.

[0135] For example, such as Figure 6 As shown, the controller can execute S501 through the following steps S601-S603 to realize the process of determining the playback interface in response to the first event command:

[0136] S601, Register key listener.

[0137] In one possible implementation, the controller registers a key listener in an Activity or Fragment within the media playback application. This key listener can be implemented using OnKeyListener or a custom key handling class; this embodiment does not impose specific limitations.

[0138] S602, listens for key press event commands.

[0139] For example, when the key listener detects a key-related event command, it checks the corresponding identifier. For instance, if the identifier is "KeyEvent.KEYCODE_MEDIA_PLAY", then it is determined that a key press event command has been detected.

[0140] S603, Start playback activity.

[0141] For example, when the controller hears a button press event, it starts the playback activity (i.e., the Activity described above), and then the controller creates the playback interface. The playback interface created here is the interface that the monitor displays to the user, allowing the user to see it intuitively on the display device.

[0142] The above describes the specific process of controlling the execution of the first event instruction and determining the playback interface.

[0143] It is understandable that in this step S501, since the event command responded by the controller is a button press event command rather than a button release event command, this application can reduce the time consumed in the process of determining the playback interface in response to the event command.

[0144] For example, when a user presses a button on a remote control, some types of users (such as the elderly or children) press the button with greater force, resulting in a longer time between pressing and releasing the button. This application's embodiment addresses this by responding to button press event commands, thus preventing the increased local video playback time caused by prolonged button presses and further reducing the local video playback time.

[0145] Understandably, once the playback interface is determined, the controller will control the display to show the playback interface.

[0146] S502, Create a surface view and a video player simultaneously.

[0147] Understandably, during the initial playback activity, a surface view needs to be created to display the video frame of the local video. For a detailed explanation of surface views, please refer to the section on technical terminology above; it will not be repeated here.

[0148] In one possible implementation, such as Figure 7 As shown, the controller executes the creation process of the surface view in S502 by performing the following steps S701-S703:

[0149] S701. Determine the controls for the surface view from the layout file of the playback interface.

[0150] The layout file for the playback interface is the same as the layout file used in the playback activity in S501 mentioned above.

[0151] Specifically, the layout file can be an extensible markup language (XML) file or other files that can define the space of the surface view; this application does not impose any specific limitations. The controller can define a surface view control based on the XML file in the layout file.

[0152] S702. Create an instance of the table view based on the controls of the table view.

[0153] For example, the controller can obtain the code of the surface view in the code of the play activity, and then obtain the instance of the surface view in the onCreate method or the corresponding lifecycle method of the play activity by findingViewById or by defining it directly in the layout file.

[0154] S703, Configure the execution parameters of the table view.

[0155] The execution parameters of the surface view include the position information and capacity information of the surface view.

[0156] For example, the execution parameters of the surface view can be determined from the layout file of the playback activity or a pre-defined configuration class.

[0157] The above describes the specific process of creating a surface view from a controller.

[0158] It should be noted that the video player in S502 is used to play local videos. This video player can be a media player class based on the Android system, or it can be a third-party media library (such as a media library in the ExoPlayer format). For detailed explanations of the player, please refer to the introduction of technical terms above, which will not be repeated here.

[0159] For example, such as Figure 8 As shown, the controller executes the video player creation process in S502 by performing the following steps S801-S803:

[0160] S801. Determine the player type of the video player.

[0161] For example, the controller can select the video player type based on the needs of the application used to play local videos on the display device.

[0162] For example, if a user selects to play a local video in MP4 or MKV format, the corresponding application requirements are: support for multiple video formats without the need for additional decoder installation; provide a smooth playback experience without stuttering or delay; support subtitle functionality, including loading external subtitle files and adjusting subtitle styles; a simple and easy-to-use interface; and support for hardware acceleration to reduce CPU and battery consumption.

[0163] Furthermore, based on the above requirements, the controller can determine that the video player type is MX Player, an Android video player that supports multiple video formats, including high-definition video files. This player has a built-in decoder, enabling smooth playback of various video files, supports hardware acceleration and subtitle functionality, can load external subtitle files, and allows users to adjust subtitle style, size, and color. Alternatively, the controller can select other video players that meet the application requirements; this embodiment does not impose specific limitations.

[0164] S802. Based on the player type of the video player, create a player instance of the video player in the playback interface.

[0165] For example, after determining the player type of the video player, the controller creates a video player of the corresponding player type during the playback activity.

[0166] It should be noted that when the controller creates an instance of the video player, it also requires a corresponding XML file, which can be obtained from the layout file of the playback activity; in addition, a playback activity class needs to be created in the corresponding folder. This class will be responsible for handling the logic of the video player, including initializing the player, setting the data source, and controlling playback actions.

[0167] S803, Configure the execution parameters of the video player.

[0168] The execution parameters include the file path of the local video and the playback mode.

[0169] For example, the execution parameters of the video player can be obtained from the player's software development kit (SDK) or other development tools. After configuring the execution parameters of the video player, the video player is created.

[0170] The above describes the specific process of creating a video player using a controller.

[0171] It should be noted that in S502, since the controller creates the surface view and the video player simultaneously, the creation processes of the two are independent and will not be affected by the creation process of the other. This avoids the problem that if only one creation process of the surface view and the video player has a problem and takes a long time, it will lead to a long overall process execution time, thus reducing the overall time of local video playback.

[0172] S503. Configure the surface view in the video player.

[0173] It's important to note that configuring the surface view within the video player is a crucial step in implementing video playback functionality. This step ensures that the local video feed can be displayed correctly and smoothly on the playback interface. By associating the surface view with the video player, the video player can pass the decoded data to be played to the surface view for rendering, allowing the user to see the video content.

[0174] Specifically, configuring a surface view in a video player enables the following functionalities: Providing an independent drawing layer: The surface view is a special view with its own independent drawing layer. It can call another thread to complete drawing operations and quickly update the image without interfering with the main thread, resulting in better display effects. Implementing a double-buffering mechanism: The surface view uses a double-buffering mechanism, rendering two images simultaneously. This mechanism avoids situations where the next frame's image has not yet been displayed after the previous frame's image has finished displaying, thus ensuring smooth video playback. Optimizing resource utilization: By assigning the surface view to the video player, system resources can be utilized more effectively. For example, when the surface view is invisible, its corresponding view can be destroyed to save resources. Furthermore, the surface view can be combined with hardware acceleration to further reduce processor and battery consumption. Enhancing user experience: Assigning the surface view to the video player provides users with a smoother and clearer video playback experience. Simultaneously, because the surface view can perform drawing operations independently of the main thread, even when performing other operations (such as swiping the screen, clicking buttons, etc.), the smoothness of video playback will not be affected.

[0175] S504. Simultaneously initialize the decoder and decapsulate the original video stream data of the local video.

[0176] In one possible implementation, such as Figure 9 As shown, the controller executes the decoder initialization process in S504 by performing the following steps S901-S902:

[0177] S901. Based on the encoding format of the local video and the raw stream data, determine multiple target decoder libraries from multiple decoder libraries.

[0178] Optionally, the controller preloads multiple decoder libraries before executing S504. These decoder libraries include video stream decoder libraries, audio stream decoder libraries, subtitle stream decoder libraries, and auxiliary stream decoder libraries. Each encoder library corresponds to the initialization of different stream encoders within the encoder. For example, the video stream decoder is used to initialize the decoder portion corresponding to the video stream, and the audio stream decoder is used to initialize the decoder portion corresponding to the audio stream. It should be noted that because the controller preloads the decoder libraries before simultaneously initializing the decoders and decapsulating the original video stream data, the time spent initializing the decoders is also reduced, thereby further reducing the total time spent by the display device when playing local video.

[0179] Furthermore, taking video stream decoder libraries as an example, multiple decoder libraries can also include multiple video stream decoder libraries, each corresponding to a different encoding format, such as H.264, MPEG-4, and VP8. The same applies to decoder libraries for other data stream types, which will not be elaborated upon here.

[0180] After preloading multiple decoder libraries, the controller can determine the target encoder library to use based on the encoding format of the local video selected by the user and the raw stream data. Specifically, if the local video is in MP4 format, has subtitles, and has no other auxiliary requirements, the controller selects the video stream decoder library, audio stream decoder library, and subtitle stream decoder library corresponding to the H.264 format from the preloaded decoder libraries as the target decoder library to perform decoder initialization.

[0181] S902. Call the API of each target decoder library to asynchronously initialize the decoder.

[0182] For example, referring to the example in S901, after the controller determines that the target decoder library to be used is the video stream decoder library, audio stream decoder library, and subtitle stream decoder library corresponding to the H.264 format, the corresponding initializeDecoderAsync method (or other types of methods) is used to call the API of each target decoder library to achieve asynchronous initialization of the decoder in independent threads.

[0183] It is understood that, based on the above S901 and S902, the embodiments of this application realize asynchronous initialization of the decoder when initializing the decoder, which can reduce the time consumption of initializing the decoder while effectively utilizing the system resources of the display device, thereby further reducing the total time consumption of the display device when playing local video.

[0184] The above describes the process of the controller initializing the decoder.

[0185] In one possible implementation, such as Figure 10 As shown, the controller executes the following steps S1001-S1002 to perform the process of decapsulating the original video stream data in S504:

[0186] S1001. Determine the decompression library or decompression tool based on the encoding format of the local video.

[0187] Understandably, decapsulation is a crucial step in audio and video processing. It involves splitting the encapsulated audio and video files into audio and video streams according to specific rules for further processing and playback. This process requires specialized decapsulation libraries or tools to perform.

[0188] Decapsulation libraries typically contain various functions and data structures needed for decapsulation, capable of recognizing and parsing different container formats such as MP4, MKV, and FLV. By calling functions in these libraries, one can read, parse, and extract audio and video streams from encapsulated files. Additionally, there are specialized decapsulation tools that can also decapsulate raw streaming data, such as mp4box. These tools usually provide simpler and easier-to-use interfaces for convenient audio and video file decapsulation operations.

[0189] For example, if the local video is in MP4 format, containing an H.264 encoded video stream and an AAC encoded audio stream, then the controller selects the FFmpeg decapsulation library to perform the decapsulation for the aforementioned local video encoding format.

[0190] S1002. Use a decapsulation library or decapsulation tool to decapsulate the original video stream data of the local video to obtain the data to be played.

[0191] For example, referring to the example in S1001, when the local video is in MP4 format, the controller decapsulates the original video stream data of the local video using the FFmpeg decapsulation library. Specifically, this includes first separating the audio stream data and video stream data in the original stream data, and then using the command-line tool or API of the FFmpeg decapsulation library to process the original stream data of the local video, decoding the H.264 encoded video stream into original video frames, and also performing corresponding operations on the AAC encoded audio stream, finally obtaining the data to be played that the video player can directly play.

[0192] It should be noted that when the original stream data includes not only video and audio streams, but also other streams such as subtitle streams and auxiliary streams, the decapsulation library or decapsulation tool determined by the controller will also process these types of stream data, and the corresponding subtitle stream data and auxiliary stream data will also be included in the data to be played.

[0193] Furthermore, the data to be played may include local video stream data, audio stream data, subtitle stream data, and auxiliary stream data.

[0194] The above describes the process by which the controller decapsulates the original video stream data from the local video stream.

[0195] Understandably, based on S504, since the controller initializes the decoder and decapsulates the original video stream data simultaneously, the two processes are independent and run concurrently, and will not be affected by the execution of the other process. This avoids the problem that if only one process fails and takes a long time during the initialization of the decoder and the decapsulation of the original video stream data, the overall process execution time will be longer, thus reducing the overall time for local video to start playing.

[0196] S505: Control the display to play the data to be played through the video player on the playback interface.

[0197] Understandably, the controller directs the display to play the data via the video player, and the user can then see the selected local video on the playback interface. Specifically, the data to be played is transmitted to the display device's data acquisition module, causing the display to play the data.

[0198] Based on the above technical solutions, in the process of starting local video playback, the display device responds to user operations by initiating the playback process with a button press event instruction, rather than a button release event instruction. Therefore, this embodiment responds as soon as the user presses a button on the display device remote control, thereby displaying the playback interface to the user and reducing the time spent initiating the playback process in response to user operations. Furthermore, since this embodiment simultaneously creates the surface view and the video player, their creation processes are independent and not affected by each other's creation processes. This avoids the problem of a long overall process execution time caused by a problem occurring in only one of the creation processes (surface view or video player). Similarly, this embodiment simultaneously initializes the decoder and decapsulates the original video stream data. These two processes are independent and simultaneous, and are not affected by each other's processes. This also avoids the problem of a long overall process execution time caused by a problem occurring in only one of the processes (decoder initialization or decapsulation) during the execution of the original video stream data.

[0199] Furthermore, this embodiment preloads the decoder library before simultaneously initializing the decoder and decapsulating the original video stream data. It also implements asynchronous decoder initialization during decoder initialization, effectively utilizing display device system resources while reducing decoder initialization time, thereby further reducing the total time spent playing local videos. Therefore, this embodiment effectively reduces the overall time required to start local video playback, improving the user experience.

[0200] For example, such as Figure 11 As shown, for the purpose of making the solution in this application easier to understand, Figure 11 A flowchart illustrating a method for initiating local video playback is provided, including the following steps:

[0201] S1, User browses files.

[0202] It is understandable that the file the user is browsing here is the local video file that the user wants to play.

[0203] S2, The user clicks the file to play.

[0204] In this step, the user plays the selected local video file by clicking a button on the display device.

[0205] S3, Listen for the KeyDown event command.

[0206] It should be noted that the specific implementation of this step can be found in S501 above, and will not be repeated here.

[0207] S4. Simultaneously create the SurfaceView and the video player.

[0208] It should be noted that the specific implementation of this step can be found in S502 above, and will not be repeated here.

[0209] S5. Configure the SurfaceView for the video player.

[0210] It should be noted that the specific implementation of this step can be found in S503 above, and will not be repeated here.

[0211] S6. Simultaneously initialize the decoder and decapsulate the video player.

[0212] It should be noted that the specific implementation of this step can be found in S504 above, and will not be repeated here.

[0213] S7, the data acquisition module acquires the data to be played.

[0214] In this step, the data acquisition module in the display device can obtain the unpacked local video data to be played and send it to the video player for playback.

[0215] S8, play local videos on the screen.

[0216] In this step, the screen directly displays the playback screen to the user, and the SurfaceView is a special view on the playback screen. With the SurfaceView and the video player working together, the screen plays the local video to the user.

[0217] The above description provides a more easily understood explanation of the local video initiation method involved in the embodiments of this application. The specific beneficial effects of the above embodiments can be found in the relevant descriptions of the local video initiation method flow provided in the foregoing embodiments, and will not be repeated here.

[0218] The foregoing mainly describes the solutions provided by the embodiments of this application from a methodological perspective. To achieve the above functions, it includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0219] This application also provides a chip system that can be applied to the display device 200 in the foregoing embodiments. The chip system includes at least one processor 2501 and at least one interface circuit 2502. The processor 2501 may be the processor in the display device 200. The processor 2501 and the interface circuit 2502 are interconnected via a circuit. The processor 2501 can receive and execute computer instructions from the memory of the display device 200 through the interface circuit 2502. When the computer instructions are executed by the processor 2501, the display device 200 can perform the various steps performed by the display device 200 in the foregoing embodiments. Of course, the chip system may also include other discrete components, which are not specifically limited in this application.

[0220] Some embodiments of this application also provide a computer-readable storage medium that can store a program. When the computer storage medium is configured in a display device or server, the program, when executed, can include the program steps involved in the image generation method in the above embodiments. The computer storage medium can be a disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc. Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and not to limit it; although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

[0221] For ease of explanation, the above description has been provided in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. Various modifications and variations can be obtained based on the above teachings. The selection and description of the above embodiments are for the purpose of better explaining the principles and practical applications, thereby enabling those skilled in the art to better use the embodiments and various different variations suitable for specific application considerations.

Claims

1. A display device, characterized in that, include: The monitor is configured to display the playback interface; The controller, coupled to the display, is configured to: Simultaneously create a surface view (SurfaceView) and a video player; Configure the surface view in the video player; Simultaneously, the decoder is initialized and the original video stream data of the local video is decapsulated; wherein, the decoder is used to decode the original stream data of the local video to obtain the data to be played; The display is controlled to play the data to be played through the video player on the playback interface.

2. The display device according to claim 1, characterized in that, Prior to the simultaneous creation of the surface view and the video player, the controller is also configured to: In response to a first event instruction, the playback interface is determined; wherein the first event instruction includes a KeyDown event instruction. After determining the playback interface, control the display to show the playback interface.

3. The display device according to claim 2, characterized in that, The controller creates a surface view in the playback interface, specifically configured as follows: Determine the controls of the surface view from the layout file of the playback interface; Create an instance of the surface view based on the controls of the surface view; Configure the execution parameters of the surface view; wherein, the execution parameters of the surface view include the position information and capacity information of the surface view.

4. The display device according to claim 3, characterized in that, The controller creates a video player in the playback interface, specifically configured as follows: Determine the player type of the video player; Create a player instance of the video player based on its player type; Configure the execution parameters of the video player; wherein the execution parameters include the file path and playback mode of the local video.

5. The display device according to claim 4, characterized in that, Before simultaneously initializing the decoder and decapsulating the original video stream data, the controller is further configured to: Multiple decoder libraries are preloaded; wherein, the categories of the multiple decoder libraries include video stream decoder libraries, audio stream decoder libraries, subtitle stream decoder libraries, and auxiliary stream decoder libraries.

6. The display device according to claim 5, characterized in that, The controller initializes the decoder, specifically configured as follows: Based on the encoding format of the local video and the raw stream data, determine a plurality of target decoder libraries from the plurality of decoder libraries; The API of each target decoder library is invoked to asynchronously initialize the decoder.

7. The display device according to claim 6, characterized in that, The controller is specifically configured to decapsulate the original video stream data of the local video as follows: Based on the encoding format of the local video, determine the decompression library or decompression tool; The original video stream data of the local video is decapsulated using the decapsulation library or the decapsulation tool to obtain the data to be played.

8. The display device according to any one of claims 1-7, characterized in that, The data to be played includes the video stream data, audio stream data, subtitle stream data, and auxiliary stream data of the local video.

9. A method for initiating local video playback, characterized in that, include: Simultaneously create a surface view and a video player; Configure the surface view in the video player; Simultaneously, the decoder is initialized and the original video stream data of the local video is decapsulated; wherein, the decoder is used to decode the original stream data of the local video to obtain the data to be played; The control display plays the data to be played through the video player on the playback interface.