WO2014194815A1 - 一种切换编码方式的方法、发送端和接收端 - Google Patents

一种切换编码方式的方法、发送端和接收端 Download PDF

Info

Publication number
WO2014194815A1
WO2014194815A1 PCT/CN2014/079118 CN2014079118W WO2014194815A1 WO 2014194815 A1 WO2014194815 A1 WO 2014194815A1 CN 2014079118 W CN2014079118 W CN 2014079118W WO 2014194815 A1 WO2014194815 A1 WO 2014194815A1
Authority
WO
WIPO (PCT)
Prior art keywords
media content
sending end
receiving end
status information
sending
Prior art date
Application number
PCT/CN2014/079118
Other languages
English (en)
French (fr)
Inventor
单振威
Original Assignee
华为终端有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为终端有限公司 filed Critical 华为终端有限公司
Priority to EP14807574.0A priority Critical patent/EP2934007A4/en
Publication of WO2014194815A1 publication Critical patent/WO2014194815A1/zh
Priority to US14/813,458 priority patent/US10171815B2/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/164Feedback from the receiver or from the transmission channel
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/12Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/156Availability of hardware or computational resources, e.g. encoding based on power-saving criteria

Definitions

  • the present invention relates to the field of communications, and in particular, to a method, a transmitting end, and a receiving end for switching an encoding method.
  • H.264/MPEG-4 Moving Picture Experts Group
  • AVC Advanced Video Coding
  • H.265/HEVC High Efficiency Video coding
  • the coding efficiency is high, but H.
  • the coding complexity of 265 is 5 times that of H.264, and the decoding algorithm is 2-3 times that of H.264, which greatly increases the power consumption of the encoder and decoder and the burden on the CPU.
  • Embodiments of the present invention provide a method, a transmitting end, and a receiving end for switching an encoding method, which can improve a user experience in switching between high-efficiency video encoding and advanced video encoding.
  • a method for switching an encoding method including:
  • the sending end acquires state information of the sending end and/or the receiving end, where the status information includes a CPU usage rate, a network bandwidth, and a central processing unit of the sending end and/or the receiving end. At least one of the power information and the media content information to be sent by the sending end; the sending end determines whether at least one of the state information meets a preset condition, if one of the state information meets the preset condition , switching the encoding of the media content;
  • the sending end notifies the receiving end of the encoding manner of the media content of the sending end, so that the receiving end determines the decoding manner of the media content according to the encoding manner of the media content.
  • the media content information to be sent is a size of the media content to be sent by the sending end, and/or the sending end is to be sent.
  • the coding mode is advanced video coding H.264 or high efficiency video coding H.265.
  • the CPU usage rate is that the CPU usage rate of the sending end and/or the CPU usage rate of the receiving end is greater than a first preset threshold
  • the one of the status information satisfies the preset condition, and the encoding manner of switching the media content includes:
  • the transmitting end switches the high efficiency video encoding to the high level video encoding.
  • the preset condition is that the network bandwidth is less than a second preset threshold
  • the coding method includes:
  • the transmitting end switches the advanced video coding to the high efficiency video coding.
  • the status information currently determined by the sending end is the power quantity information
  • the preset condition is that when the transmitting end and/or the receiving end are not connected to the power source, the remaining power of the sending end and/or the receiving end is less than a third preset threshold, and the third preset width is The value is the amount of power required by the sending end and/or the receiving end to play media content that has not been played in the media content;
  • the one of the status information satisfies the preset condition, and the encoding manner of switching the media content includes:
  • the transmitting end switches the high efficiency video encoding to the advanced video encoding.
  • the preset condition is that the size and/or resolution and/or the frame rate of the media content to be sent by the sending end is greater than a fourth preset threshold
  • the one of the status information satisfies the preset condition, and the encoding manner of switching the media content includes:
  • the transmitting end switches the advanced video encoding to the high efficiency video encoding.
  • the sending And determining, by the terminal, whether the at least one of the state information meets the preset condition, and if one of the state information meets the preset condition, switching an encoding manner of the media content; or, the sending end is configured according to The weight value of the state information weights the state information to obtain a weighted result;
  • the sending end compares the weighted result with a fifth preset threshold, and if the weighting result is less than the fifth preset threshold, the sending end switches the advanced video encoding to the high-efficiency video. coding.
  • the sending end Decoding the media content of the sending end to the receiving end, so that the receiving end determines the decoding manner of the media content according to the encoding manner of the media content, including:
  • the sending end sends a notification message to the receiving end, where the notification message carries the encoding mode identifier of the switched media content, and the number or location of the starting data packet of the encoding mode that needs to be switched. Information, so that the receiving end determines the decoding manner of the media content according to the notification message;
  • the sending end of the data packet that the sending end sends the media content to the receiving end carries the encoded mode identifier of the switched media content, so that the receiving end determines the media content according to the encoding mode identifier.
  • the way to decode the way to decode.
  • a method for switching a coding mode including:
  • the receiving end determines whether at least one of the status information meets a preset condition, and if one of the status information satisfies the preset condition, sends a request to the sending end. Switching the message, so that the sending end switches the encoding mode of the media content according to the request switching message;
  • the receiving end determines a decoding manner of the media content according to an encoding manner of the media content notified by the sending end.
  • the media content information to be sent is a size of the media content to be sent by the sending end, and/or the sending end is to be sent.
  • the coding method is advanced video coding ⁇ .264 or high efficiency video coding ⁇ .265.
  • the preset condition is that the CPU usage of the sending end and/or the CPU usage of the receiving end is greater than the first preset threshold;
  • sending the request handover message to the sending end includes:
  • the receiving end sends the request switching message to the sending end, so as to facilitate the sending.
  • the terminal switches the high efficiency video coding to the advanced video coding according to the request handover message.
  • the preset condition is that the network bandwidth is less than a second preset threshold
  • sending the request handover message to the sending end includes:
  • the receiving end sends the request switching message to the sending end, so that the sending end switches the advanced video encoding to the high-efficiency video encoding according to the request switching message.
  • the preset condition is that when the sending end and/or the receiving end are not connected to the power source, the remaining power of the sending end and/or the receiving end is less than a third preset threshold, and the third preset threshold Performing, for the sending end and/or the receiving end, the amount of power required for the media content that has not been played in the media content;
  • sending the request handover message to the sending end includes:
  • the receiving end sends the request switching message to the sending end, so that the sending end is configured according to the The request handover message switches the high efficiency video coding to the advanced video coding.
  • a fifth possible implementation manner of the second aspect if the status information currently determined by the receiving end is the media to be sent by the sending end.
  • the content condition is that the size and/or the resolution and/or the frame rate of the media content to be sent by the sending end is greater than a fourth preset threshold;
  • sending the request handover message to the sending end includes:
  • the receiving end sends the request switching message to the sending end, so that And the transmitting end switches the advanced video coding to the high efficiency video coding according to the request handover message.
  • the receiving end determines the status Whether at least one of the information meets the preset condition, and if one of the status information satisfies the preset condition, sending a request handover message to the sending end, so that the sending end switches according to the request Transmitting the content of the media content by the message; or, the receiving end weights the state information according to the weight value of the state information to obtain a weighting result;
  • the receiving end compares the weighting result with a fifth preset threshold, and if the weighting result is less than the fifth preset threshold, the receiving end sends the request switching message to the sending end, so that And the transmitting end switches the advanced video coding to the high efficiency video coding according to the request handover message.
  • the receiving end is notified according to the sending end
  • the manner of encoding the media content determines how the media content is decoded, including:
  • the receiving end receives the notification message sent by the sending end, where the notification message carries the encoding mode identifier of the media content after the switching of the sending end, and the starting data packet of the encoding mode that needs to switch the media content. Number or location information, so that the receiving end determines the decoding manner of the media content according to the notification message;
  • the receiving end determines the media according to the encoding mode identifier of the switched media content in the data packet of the media content. The way the content is decoded.
  • a sending end including:
  • An acquiring unit configured to send, by the sending end, status information of the sending end and/or the receiving end, where the status information includes the central processing unit CPU of the sending end and/or the receiving end At least one of a rate, a network bandwidth, a power amount information, and media content information to be sent by the sending end;
  • a processing unit configured to determine, by the sending end, whether at least one of the status information meets a preset condition, and if one of the status information meets the preset condition, switching a data encoding manner of the media content; The receiving end, so that the receiving end determines the decoding manner of the media content according to the encoding manner of the media content.
  • the media content information to be sent is a size of the media content to be sent by the sending end, and/or the sending end is to be sent.
  • the coding mode is advanced video coding H.264 or high efficiency video coding H.265.
  • the processing unit is configured to: if the status information currently determined by the sending end is the The CPU usage rate is that the CPU usage rate of the sending end and/or the CPU usage rate of the receiving end is greater than a first preset threshold;
  • the processing unit determines to switch the high efficiency video encoding to the advanced video encoding.
  • the processing unit is configured to: if the status information currently determined by the sending end is the The preset condition is that the network bandwidth is less than a second preset threshold;
  • the processing unit is configured to: if the network bandwidth of the sending end and/or the network of the receiving end The processing unit determines to switch the advanced video coding to the high efficiency video coding.
  • the processing unit is configured to: if the status information currently determined by the sending end is the In the case of the power information, the preset condition is that when the transmitting end and/or the receiving end are not connected to the power source, the remaining power of the sending end and/or the receiving end is less than a third preset threshold,
  • the third preset threshold is a quantity of power required by the sending end and/or the receiving end to play media content that has not been played in the media content;
  • the processing unit is configured to switch the high-efficiency video coding to the advanced video coding if a remaining power of the transmitting end and/or the receiving end is less than the third preset threshold.
  • the processing unit is configured to: if the status information currently determined by the sending end is the The preset condition is that the size and/or the resolution and/or the frame rate of the media content to be sent by the sending end is greater than a fourth preset threshold;
  • the processing unit is configured to: if the size and/or the resolution and/or the frame rate of the media content to be sent by the sending end is greater than a fourth preset threshold, the sending end switches the advanced video encoding to the High efficiency video coding.
  • the processing unit determines the status Whether at least one of the information meets the preset condition, and if one of the status information satisfies the preset condition, switching an encoding mode of the media content; or, the processing unit is configured according to the status information
  • the weight value weights the state information to obtain a weighted result;
  • the processing unit compares the weighted result with a fifth preset threshold, and if the weighted result is less than the fifth preset threshold, the sending end switches the advanced video encoding to the high-efficiency video coding.
  • the sending unit is used to:
  • notification message carries an encoding mode identifier of the switched media content, and a number or location information of a starting data packet of an encoding mode that needs to be switched, so as to facilitate Determining, by the receiving end, the decoding manner of the media content according to the notification message;
  • the sending end of the data packet that the sending end sends the media content to the receiving end carries the encoded mode identifier of the switched media content, so that the receiving end determines the media content according to the encoding mode identifier.
  • the way to decode the way to decode.
  • a receiving end including:
  • An acquiring unit configured to receive, by the receiving end, status information of the sending end and/or the receiving end, where the status information includes a central processor CPU usage rate, a network bandwidth, a power quantity information, and a location of the sending end and/or the receiving end Determining at least one of media content information to be sent by the sending end;
  • a processing unit configured to determine, by the receiving end, whether at least one of the state information meets a preset condition, and if one of the state information meets the preset condition, send a request switching message to the sending end, So that the sending end switches the encoding mode of the media content according to the request switching message;
  • the receiving unit is further configured to acquire, by the receiving end, a data decoding manner of the media content according to an encoding manner of the media content notified by the sending end.
  • the The sent media content information is the size of the media content to be sent by the sending end, and/or the resolution of the media content to be sent by the sending end, and/or the frame rate of the media content to be sent by the sending end;
  • the coding mode is advanced video coding H.264 or high efficiency video coding H.265.
  • the processing unit is configured to: if the status information currently determined by the receiving end is the The CPU usage rate is that the CPU usage rate of the sending end and/or the CPU usage rate of the receiving end is greater than a first preset threshold;
  • the processing unit is configured to: if the CPU usage of the sending end and/or the CPU usage of the receiving end is greater than the first preset threshold, the receiving end sends the request switching message to the sending end. So that the transmitting end switches the high efficiency video encoding to the advanced video encoding according to the request switching message.
  • the processing unit is configured to: if the state information currently determined by the receiving end is the The preset condition is that the network bandwidth is less than a second preset threshold;
  • the processing unit is configured to: if the network bandwidth of the sending end and/or the network bandwidth of the receiving end is smaller than the second preset threshold, the receiving end sends the request switching message to the sending end, so as to facilitate The transmitting end switches the advanced video coding to the high efficiency video coding according to the request handover message.
  • the processing unit is configured to:
  • the preset condition is that when the transmitting end and/or the receiving end are not connected to the power source, the remaining power of the sending end and/or the receiving end is less than a third preset threshold,
  • the third preset threshold is the end of the sending end and/or the receiving end The amount of power required for the media content that has not been played in the media content;
  • the processing unit is configured to: if the remaining power of the sending end and/or the receiving end is less than the third preset threshold, the receiving end sends the request switching message to the sending end, to facilitate the The transmitting end switches the high efficiency video encoding to the advanced video encoding according to the request switching message.
  • the processing unit is configured to:
  • the preset condition is that the size and/or the resolution and/or the frame rate of the media content to be sent by the sending end is greater than a fourth preset threshold when the media content information to be sent is sent by the sending end;
  • the processing unit is configured to send the request switching message to the sending end, if the size and/or the resolution and/or the frame rate of the media content to be sent by the sending end is greater than the fourth preset threshold So that the transmitting end switches the advanced video coding to the high efficiency video coding according to the request handover message.
  • the processing unit determines the status Whether at least one of the information meets the preset condition, and if one of the status information satisfies the preset condition, sending a request handover message to the sending end, so that the sending end switches according to the request The message switches the encoding mode of the media content;
  • the processing unit weights the state information according to the weight value of the state information to obtain a weighting result
  • the processing unit compares the weighting result with a fifth preset threshold, and if the weighting result is less than the fifth preset threshold, the receiving end sends the request switching message to the sending end, so that And the sending end switches the message according to the request to the advanced view
  • the frequency coding is switched to the high efficiency video coding.
  • the receiving unit receives the notification message sent by the sending end
  • the notification message carries the encoding mode identifier of the media content after the switching of the sending end, and the number or location information of the starting data packet of the encoding mode that needs to be switched, so that the processing unit can Deleting, notifying, determining a decoding manner of the media content;
  • the processing unit determines, according to the encoding mode identifier of the switched media content in the data packet of the media content, determining the media The way the content is decoded.
  • An embodiment of the present invention provides a method for switching an encoding method, a transmitting end, and a receiving end, and acquiring state information of a transmitting end and/or a receiving end, where the status information includes a CPU usage rate of the central processing unit and a network bandwidth of the transmitting end and/or the receiving end,
  • the power information and the media content information to be sent by the sending end determine whether at least one of the status information satisfies a preset condition.
  • the encoding mode of the media content is switched, and the media content of the sending end is The encoding mode is notified to the receiving end, so that the receiving end determines the decoding mode of the media content according to the encoding manner of the media content, and can improve the user experience according to the switching of the encoding mode of the media content.
  • 1 is a schematic flowchart of a method for switching a coding mode according to an embodiment of the present invention
  • 2 is a schematic flowchart of a method for switching a coding mode according to another embodiment of the present invention
  • FIG. 3 is a schematic flowchart of a method for switching a coding mode according to another embodiment of the present invention.
  • FIG. 4 is a schematic flowchart of a method for switching a coding mode according to another embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a transmitting end according to another embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a receiving end according to another embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of a transmitting end according to another embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of a receiving end according to another embodiment of the present invention. detailed description
  • An embodiment of the present invention provides a method for switching a coding mode. As shown in FIG. 1, the method includes: 101.
  • a sender acquires state information of a sender and/or a receiver, where the state information includes a CPU of the sender and/or the receiver. At least one of usage rate, network bandwidth, power information, and media content information to be sent by the sender.
  • the Source (Sender) and Sink (Receiver) here can use Wi-Fi (Wireless Fidelity) technology with a display terminal.
  • the source side can be a mobile phone, and the Sink side can be a TV (TV).
  • the Source side can be implemented by Wi-Fi Direct (Wireless Direct Connection) or UPnP (Universal Plug and Play) (SSDP (Simple Service Discovery Protocol)). Device discovery and service discovery.
  • Wi-Fi Direct Wireless Direct Connection
  • UPnP Universal Plug and Play
  • SSDP Simple Service Discovery Protocol
  • the source end is device discovery through Wi-Fi Direct, the source end and the sink side establish a connection through Wi-Fi Direct or TDLS (Tunneled Direct Link Setup); if the source end is implemented by UPnP SSDP The device finds that the Source and Sink establish a TCP (Transmission Control Protocol) connection.
  • TCP Transmission Control Protocol
  • the source end and the Sink side perform capability negotiation, and can send a notification message to each other to judge whether the two parties have the same capability.
  • the notification message may include the data resolution of the terminal, the video format, the data encoding mode, and the data decoding mode.
  • the source sends a request message to the sink, so that the sink sends an RTSP (Real Time Streaming Protocol) Session session request to the sender according to the request message, so that the source end is sent to the sink.
  • RTSP Real Time Streaming Protocol
  • URL Universal Resource Locator
  • the Sink After the source end establishes an RTSP session with the Sink, the Sink sends a request to the source to send a message. The source sends a response message to the Sink according to the request to play the message, so that the source sends the video packet to the Sink.
  • the sending end determines whether at least one of the status information satisfies a preset condition, and if one of the status information satisfies the preset condition, switching the encoding mode of the media content.
  • the data encoding method is H.264/AVC (Advanced Video Coding) or H.265/HEVC (High Efficiency Video coding).
  • the source end can determine whether one of the status information satisfies a preset condition, and if one of the status information satisfies the preset condition, the switch is performed.
  • the source end determines whether at least one of the status information satisfies a preset condition, and if one of the status information satisfies the preset condition, switching the encoding mode of the media content. Or, if the status information is at least two, the source end weights the status information according to the weight value of the status information, and compares the weighted result with the fifth preset threshold. If the weighted result is less than the fifth preset threshold, Then, the receiving end sends a request switching message to the sending end, so that the sending end switches the advanced video encoding to the high efficiency video encoding according to the request switching message.
  • the sending end notifies the receiving end of the encoding manner of the media content of the sending end, so that the receiving end determines the decoding manner of the media content according to the encoding manner of the media content.
  • the sending end sends a notification message to the receiving end, where the notification message carries the encoding mode identifier of the switched media content, and the number or location information of the starting data packet of the encoding mode that needs to be switched to facilitate the receiving end.
  • the method for decoding the media content is obtained according to the notification message, where the location information may be time information that needs to be switched, such as minute information, or may be byte information of a real data packet that needs to be switched.
  • the data packet that the sending end sends the media content to the receiving end carries the encoding mode identifier of the switched media content, so that the receiving end identifies the decoding manner of the media content according to the encoding manner.
  • An embodiment of the present invention provides a method for switching an encoding manner, where a sending end acquires state information of a transmitting end and a receiving end, where the status information includes a CPU usage rate, a network bandwidth, a power amount information, and a sending end of the transmitting end and/or the receiving end. At least one of the sent media content information determines whether at least one of the status information satisfies a preset condition. If one of the status information satisfies a preset condition, the encoding mode of the media content is switched, and the sending end encodes the media content of the sending end. Notify the receiving end so that the receiving end can encode according to the media content. The method determines the decoding mode of the media content, and can improve the user experience as the media content encoding mode is switched.
  • a further embodiment of the present invention provides a method for switching an encoding manner.
  • a sending end acquires state information of a transmitting end and/or a receiving end, where the status information includes a central processing unit CPU of the transmitting end and/or the receiving end. At least one of usage rate, network bandwidth, power information, and media content information to be sent by the sender.
  • the Source (sender) and Sink (receiver) here can use Wi-Fi (Wireless Fidelity, Wireless Fidelity) technology with a display terminal.
  • the source side can be a mobile phone
  • the Sink side can be a TV (TV).
  • the Source Before obtaining the status information of the Source and/or Sink on the Source, the Source can use Wi-Fi Direct or UPnP (Universal Plug and Play) SSDP (Simple Service Discovery Protocol). Service Discovery Protocol) Implements device discovery and service discovery. If the source is a device discovery via Wi-Fi Direct, the Source and Sink are via Wi-Fi Direct or TDLS.
  • Wi-Fi Direct or UPnP (Universal Plug and Play) SSDP (Simple Service Discovery Protocol).
  • Service Discovery Protocol Implements device discovery and service discovery. If the source is a device discovery via Wi-Fi Direct, the Source and Sink are via Wi-Fi Direct or TDLS.
  • Tunneled Direct Link Setup Establishes a connection. If the source is a device discovery through UPnP SSDP, the source and Sink establish TCP.
  • the source end and the sink side perform capability negotiation, and can send a notification message to each other to determine whether the two parties have the same capability.
  • the notification message may include the data resolution of the terminal, the video format, the data encoding mode, and the data decoding mode.
  • the source sends a request message to the sink, so that the sink sends an RTSP (Real Time Streaming Protocol) Session session request to the sender according to the request message, so that the source end is sent to the sink.
  • RTSP Real Time Streaming Protocol
  • the sink sends a request to the source to send a message.
  • the source receives the request message from the Sink, the source sends a response message to the Sink, and then the source starts to Sink.
  • the terminal sends a video packet, and the Sink end starts the transmission of the media stream.
  • the source can obtain its own state information in real time.
  • the status information of the source can include the usage of the Central Processing Unit (CPU), network bandwidth information, power information, and media content to be sent on the source. At least one of them, or the source side can obtain at least one of the CPU usage, the network bandwidth, the power information, and the media content information to be sent by the source end in real time through the RTSP GET-PARAMETER ( ) method, or the source end can be real-time.
  • the media content information profile is the size of the media content to be sent by the source end, and/or Source The resolution of the media content to be sent, and/or the frame rate of the media content to be sent at the source.
  • the sending end determines whether at least one of the status information meets a preset condition.
  • the three information in the status information may be disregarded. If the status information is one, the sending end only determines whether one of the status information satisfies a preset condition, and if one of the status information meets the preset condition, the switch is performed.
  • the two information in the state information may be disregarded. If the state information is two, the sender determines whether the remaining two of the state information meet the preset condition, and if one of the state information meets the preset condition, the media is switched.
  • the way the content is encoded For example, regardless of the sender and The power information of the receiving end, and the resolution of the media content to be encoded at the transmitting end, determine whether the CPU usage rate and the network bandwidth of the transmitting end and/or the receiving end satisfy the preset condition, and the transmitting end and/or the receiving end are not limited herein.
  • the CPU processor usage rate and the network bandwidth judgment order if one of the status information satisfies the preset condition, switching the encoding mode of the media content;
  • one information in the status information may be disregarded. If the status information is three, the sender determines whether the remaining three of the status information meet the preset condition, and if one of the status information satisfies the preset condition, the media content is switched.
  • the encoding method For example, regardless of the resolution of the media content to be encoded at the transmitting end, it is determined whether the CPU usage, network bandwidth, and power information of the transmitting end and/or the receiving end of the status information meet the preset condition, and the transmitting end is not limited herein. / or the CPU of the receiving end of the CPU, the network bandwidth, the judgment order of the power information, if one of the status information satisfies the preset condition, switching the encoding mode of the media content;
  • the sending end may determine whether four of the status information meet the preset condition, and if one of the status information satisfies the preset condition, switch the encoding mode of the media content.
  • the CPU usage rate, the network bandwidth, the power information, and the media content information of the media content to be sent by the transmitting end are not limited. If one of the status information meets the preset condition, the media content is switched. Encoding.
  • the data encoding method may include H.264/AVC (Advanced Video Coding) or H.265/HEVC (High Efficiency Video coding).
  • H.264/AVC Advanced Video Coding
  • H.265/HEVC High Efficiency Video coding
  • the sending end switches the encoding mode of the media content.
  • three of the status information may be disregarded, by determining whether one of the status information satisfies a preset condition, and if one of the status information satisfies a preset condition, then switching The way media content is encoded.
  • the default condition is that the CPU usage of the source end and/or the usage rate of the Sink end are greater than the first preset threshold.
  • the data encoding mode may be high-efficiency video encoding, that is, H.265 encoding mode, or advanced video encoding, that is, H.264 encoding mode; when the status information currently judged by the source end is the CPU of the sink side
  • the data encoding mode can be high-efficiency video encoding or advanced video encoding.
  • the data encoding mode may be high-efficiency video encoding or advanced video encoding.
  • the current encoding mode of the transmitting end is high-efficiency video encoding, if the CPU usage of the source end and/or the usage rate of the Sink end is greater than The first preset threshold value switches the high efficiency video encoding H.265 to the advanced video encoding H.264.
  • the source side encodes the media content using the H.265 encoding method, if the CPU usage rate of either or both sides is greater than the first preset width. Value, switch to H.264 encoding to encode the media content.
  • the first preset threshold may be 50% or the like, and may be other values, which are not limited herein.
  • the preset condition is that the network bandwidth is less than the second preset threshold; if the network bandwidth of the sender and/or the network bandwidth of the receiver is less than the second preset threshold, the sender switches the advanced video coding to the high-efficiency video coding. .
  • the encoding mode of the media content of the transmitting end may be high-efficiency video encoding or advanced video encoding;
  • the encoding mode of the media content of the transmitting end may be high-efficiency video encoding or advanced video encoding.
  • the encoding of the media content of the sender may be a high-efficiency video.
  • the encoding may also be an advanced video encoding.
  • the second preset threshold may be 8 Mbit/s or the like, and may be other values, which are not limited herein. For example, when the current bandwidth is less than 8 Mbit/s, the current bandwidth is insufficient.
  • the source uses high-efficiency video coding H.265 to encode the media content. When the current bandwidth is greater than 8 Mbit/s, the bandwidth is sufficient, and the coding mode can be high. Efficiency video coding, also for advanced video coding.
  • the power information of the sending end and/or the receiving end in the status information is determined.
  • the preset condition is that when the transmitting end and the receiving end are not connected to the power source, the remaining power of the transmitting end and/or the receiving end is less than the third preset threshold, and the third preset threshold is that the transmitting end and/or the receiving end play the media.
  • the encoding of the media content may be For high-efficiency video coding, it can also be advanced video coding; when the status information currently judged by the sender is the power information of the receiver, if the remaining power of the receiver is greater than or equal to the content of the media content that is not played in the current media content, The amount of power, the encoding of the media content is high-efficiency video encoding, and can also be advanced video encoding; when the current media content of the sender is encoded in a high-efficiency video encoding If the status information of the current judgment is the power information of the transmitting end and the receiving end, if the remaining power of the transmitting end and the receiving end is greater than or equal to the power required for the unplayed media content in the current media content, the encoding mode is high.
  • Efficiency video coding which can also be advanced video coding; if the remaining power of the sender and/or the receiver is less than the power required for the media content that is not played in the current media content, less than the third preset threshold, the sender will High-efficiency video coding is switched to advanced video coding.
  • the sending end consumes the power consumed by the video data of the current media content in a unit time, and obtains
  • the amount of power required to encode the video data packet corresponding to the unplayed media content in the current media content that is, the length of time required for the sender to play the remaining unplayed media content, and at the same time, may be played according to the current media content in the receiving end.
  • the total amount of time, the amount of power consumed by the receiving end to decode the video data of the current media content in a unit time, and the amount of power required to decode the video data packet corresponding to the unplayed media content in the current media content, that is, the receiving end needs to The length of time it takes for the remaining unplayed media content to play.
  • the high-efficiency video encoding is switched to the advanced video encoding.
  • the sending end when the sending end is not connected to the power source, if the status information currently determined by the sending end is the sending end power information, the remaining power of the transmitting end is greater than or equal to that required for the unplayed media content in the current media content.
  • the power is encoded in high-efficiency video coding, or it can be advanced video coding. If the remaining power of the sender is smaller than the media content that is not played in the current media content, and the unplayed media content is sent to the receiver. If the required power is less than the third preset threshold, the sender switches the high efficiency video coding to the advanced video coding.
  • the preset condition is that the sender waits The size and/or resolution and/or frame rate of the transmitted media content is greater than the fourth predetermined threshold.
  • the encoding mode of the media content may be high-efficiency video encoding or advanced video encoding; when the current media content of the transmitting end is encoded In advanced video coding, if the size and/or resolution and/or frame rate of the media content to be transmitted by the transmitting end is greater than the fourth preset threshold, the transmitting end switches the advanced video encoding to the high efficiency video encoding.
  • the fourth preset threshold here may be 4k/8k/3D, or may be other values, which are not limited here.
  • the media content size of the next media content to be played is 3G, and the media content size is not reached.
  • the preset threshold is 10G, and the resolution reaches the fourth preset threshold of 8K.
  • the sender switches the advanced video coding to high-efficiency video coding.
  • the resolution reaches a fourth preset threshold of 8K, and the frame rate does not reach the fourth preset threshold of 60 frames/s, and the transmitting end encodes the advanced video. Switch to high efficiency video encoding.
  • the fourth preset threshold value is different for the size, resolution, and frame rate of the media content to be transmitted.
  • the two information in the state information may be determined regardless of whether the two remaining information in the state information meet the preset condition. If one of the state information meets the preset condition, the data encoding mode is switched. For example, regardless of the power information of the sender and the receiver, and the media content information to be sent by the sender, it is determined whether the CPU usage and the network bandwidth of the sender and/or the receiver meet the preset conditions. And/or the CPU processor usage rate of the receiving end and the judgment order of the network bandwidth information. If one of the status information satisfies the preset condition, the data encoding mode is switched.
  • the encoding mode of the media content is high-efficiency video encoding or advanced video encoding, which does not meet the preset condition, and does not meet the preset condition.
  • the data coding mode is switched.
  • the status information of the sending end and/or the receiving end is determined, and the status information includes the CPU usage, network bandwidth, and power information of the transmitting end and/or the receiving end.
  • the order of judgment of the three in the status information is not limited. For example, it is first determined whether the CPU usage of the CPU and the receiving end is greater than the first preset threshold. If the CPU usage of the sender and the CPU usage of the receiver are less than or equal to the first preset threshold, the encoding of the media content.
  • the method is high-efficiency video coding or advanced video coding, does not satisfy the preset condition, does not switch the coding mode, and then determines whether the network bandwidth is greater than the second preset threshold, and if the network bandwidth is greater than the second preset threshold, the method is not satisfied.
  • Pre-conditions without switching the encoding mode, finally, determining that the remaining power of the transmitting end is less than the amount of power required to encode the video data packet corresponding to the unplayed media content in the current media content, and whether the remaining power of the receiving end is less than the current The amount of power required for decoding the video data packet corresponding to the unplayed media content in the media content, if the remaining power of the transmitting end is less than the amount of power required to encode the video data packet corresponding to the unplayed media content in the current media content, And/or the remaining power at the receiving end is greater than or equal to the current media content After playing the media content corresponds video data packet quantity required for decoding the current video coding scheme for efficient coding, then switched to a high-efficiency video coding advanced video coding.
  • four of the state information may be comprehensively considered to determine whether four of the state information meet the preset condition. If one of the state information meets the preset condition, the coding mode of the media content is switched, and the determination is performed. The process is similar to the method of judging whether the three conditions in the state information satisfy the preset condition, and details are not described herein again.
  • the status information is at least two, it may be determined whether at least one of the status information satisfies a preset condition, and if one of the status information meets the preset condition, the coding mode of the media content is switched, and the foregoing determining method Similar
  • the sending end may perform weighting on the status information according to the weight value of the status information to obtain a weighting result, and compare the weighting result with a fifth preset threshold, if the weighting result is less than the fifth preset threshold.
  • the CPU usage, network bandwidth information, power information, and media content information to be sent by the sending end of the transmitting end and/or the receiving end may be comprehensively considered, that is, if the status information is four, the transmitting end
  • the state information is determined according to the weight value of the state information, and the preset condition is that the current weight value of the state information is less than the fifth preset threshold.
  • the CPU usage rate, the network bandwidth, the power information, and the media content information to be sent by the sending end are respectively set to different weights, and a standard weight value is obtained by using a weighting algorithm.
  • the weight value can be a fifth preset threshold.
  • the CPU usage is 3.5
  • the network bandwidth is 3.5
  • the power information is 2.0
  • the media content information to be sent by the sender is 1.0.
  • the current weight value of the state information is obtained by weighting the CPU usage, the network bandwidth, the power information, and the media content information to be sent by the sender and/or the receiver in the state information, and then the current state information is obtained.
  • the weight value is compared to the fifth preset threshold.
  • the data encoding mode is high efficiency.
  • the transmitting end switches the advanced video coding to the high efficiency video coding.
  • the sending end sends a notification message to the receiving end, where the notification message carries the encoding mode identifier of the switched media content, and the number or location information of the starting data packet of the encoding mode that needs to be switched, so that the receiving end can notify the receiving end according to the notification.
  • the message determines how the media content is decoded.
  • VCL (Video Coding Layer) data is encapsulated by NAL (Network Abstract Layer), and a NAL-encapsulated video data packet can be used. It is considered to be a set of data. If there is more than one frame of image in one group, the data encoding mode can be switched in units of one NAL video data packet, so that the encoding mode of the internal image of one NAL video data packet is consistent. Therefore, when the transmitting end encodes the current video data packet, if the Nth video data packet after the current video data packet needs to switch the data encoding mode, the sending end sends a notification message to the receiving end, where the notification message carries the switched media.
  • NAL Network Abstract Layer
  • the coding mode identifier of the content, and the number of the start data packet of the coding mode that needs to switch the media content, that is, the number of the Nth video data packet and the coding mode identifier of the Nth video data packet are carried in the message, so as to facilitate the receiving end.
  • the notification message the decoding mode of the Nth video data packet is obtained.
  • N is a positive integer greater than or equal to 1.
  • the notification message carries the coding mode identifier of the switched media content, and the location information of the coding mode that needs to switch the media content.
  • the notification message includes time information and a data encoding mode identifier when the encoding mode needs to be switched, so that the receiving end identifies the video data packet according to the data encoding manner when the time information is decoded by the receiving end.
  • the location information may be byte information of an encoding mode in which the media content needs to be switched. For example, when the receiving end decodes the byte of the byte information, the receiving end switches the decoding mode of the media content.
  • the notification message can be notified by the RT SP SET-PARAMETER ( ) method.
  • the encoding mode identifier of the media content of the receiving end, and the number or location information of the starting data packet of the encoding mode of the media content to be switched, and the decoder of the receiving end identifies the encoding manner of the media content in the notification message and needs to switch the encoding mode of the media content.
  • the number or location information of the starting data packet when the Nth video data packet after the current video data packet is decoded, synchronously switches the decoding mode of the current media content.
  • the data packet that the sending end sends the media content to the receiving end carries the encoding mode identifier of the switched media content, so that the receiving end determines the decoding manner of the media content according to the encoding mode identifier.
  • the sender when the LM packet is packaged by the RTP (Real-Time Transport Protocol), the sender carries the coding mode identifier of the switched media content in the packet header of the RTP video packet, so as to facilitate
  • the decoder decodes the header of the RTP packet to determine the decoding mode of the video packet, if the encoding mode identifier of the video packet and the received encoding identifier of the previous packet If the encoding mode identifier of the video data packet is different from the encoding mode identifier of the received previous data packet, the decoding mode of the decoder is switched.
  • the compression ratio of H.265 is twice that of H.264, but the coding algorithm complexity of H.265 is 5 times that of H.264, and the decoding algorithm complexity is H. 2 to 3 times of 264, that is, the H.265 encoding algorithm increases the power consumption of the encoder and the decoder and the burden on the CPU. Therefore, the status information includes the transmitting end and the status information through the transmitting end and/or the receiving end. / or the central processor CPU usage, network bandwidth, power information, and status judgment of the media content information to be sent at the receiving end, may not be applicable
  • An embodiment of the present invention provides a method for switching an encoding manner, where a sending end acquires state information of a transmitting end and/or a receiving end, where the status information includes a CPU usage rate, a network bandwidth, a power amount information, and a sending end of the transmitting end and/or the receiving end.
  • the receiving end is configured to ensure that the receiving end determines the decoding mode of the media content according to the encoding manner of the media content, and can improve the user experience as the encoding mode is switched.
  • a further embodiment of the present invention provides a method for switching an encoding method. As shown in FIG. 3, the method includes:
  • the receiving end acquires status information of the sending end and/or the receiving end, where the status information includes at least one of a central processor CPU usage rate, a network bandwidth, a power quantity information, and a media content information to be sent by the sending end of the sending end and/or the receiving end.
  • This step is implemented in a similar manner to step 101 in the embodiment shown in FIG. 1, and will not be described again here.
  • the receiving end determines whether at least one of the state information meets the preset condition. If one of the state information meets the preset condition, sending a request switching message to the sending end, so that the sending end switches according to the request; The encoding method.
  • This step is implemented in a similar manner to step 102 in the embodiment shown in FIG. 1, and will not be described again here.
  • the receiving end determines, according to a coding manner of the media content notified by the sending end, a decoding manner of the media content.
  • This step is implemented in a similar manner to step 103 in the embodiment shown in FIG. 1, and will not be described again here.
  • the embodiment of the invention provides a method for switching the coding mode, where the receiving end acquires state information of the transmitting end and/or the receiving end, and the status information includes central processing of the transmitting end and/or the receiving end.
  • CPU usage, network bandwidth, power information, and media content information to be sent by the sending end determining whether at least one of the status information satisfies a preset condition, and if one of the status information satisfies a preset condition, sending to the transmitting end
  • the switching message is requested, so that the sending end switches the encoding mode of the media content according to the request switching message, and the user experience can be improved according to the switching of the encoding mode of the media content.
  • a further embodiment of the present invention provides a method for switching an encoding manner. As shown in FIG. 4, the method includes:
  • the receiving end acquires status information of the sending end and/or the receiving end, where the status information includes at least one of a central processor CPU usage rate, a network bandwidth, a power quantity information, and a media content information to be sent by the sending end of the sending end and/or the receiving end.
  • This step is implemented in a similar manner to step 201 in the embodiment shown in FIG. 2, and will not be described again here.
  • the receiving end determines whether at least one of the status information meets a preset condition.
  • this step is similar to the step 202 in the embodiment shown in FIG. 2, and details are not described herein.
  • the receiving end sends a request switching message to the sending end, so that the sending end switches the encoding mode of the media content according to the request switching message.
  • This step is implemented in a similar manner to step 203 in the embodiment shown in FIG. 2, and will not be described again here.
  • the receiving end sends a request switching message to the sending end, so that the sending end switches according to the request.
  • the message switches the encoding of the media content.
  • the receiving end receives the notification message sent by the sending end, where the notification message carries the sending end.
  • this step is similar to the step 204 in the embodiment shown in FIG. 2, and details are not described herein.
  • the receiving end determines the decoding mode of the media content according to the encoding mode identifier of the media content in the media content that carries the switched media content.
  • this step is similar to the step 205 in the embodiment shown in FIG. 2, and details are not described herein.
  • An embodiment of the present invention provides a method for switching an encoding manner, where a receiving end acquires state information of a transmitting end and/or a receiving end, where the status information includes a CPU usage rate, a network bandwidth, a power amount information, and a sending end of the transmitting end and/or the receiving end.
  • At least one of the media content information to be sent determining whether at least one of the status information satisfies a preset condition, and if one of the status information satisfies a preset condition, sending a request switching message to the sending end, so that the sending end according to the request
  • the switching mode switches the encoding mode of the media content, determines the decoding mode of the media content according to the encoding mode of the media content of the sending end, and can improve the user experience according to the switching of the media content encoding mode.
  • a further embodiment of the present invention provides a transmitting end 01. As shown in FIG.
  • the method includes: an acquiring unit 01 1 configured to acquire status information of a transmitting end and/or a receiving end, where the status information includes a central end of the transmitting end and/or the receiving end. At least one of processor CPU usage, network bandwidth, power information, and media content information to be sent by the sender.
  • the processing unit 012 is configured to determine whether at least one of the status information meets a preset condition, and if one of the status information satisfies the preset condition, switching the encoding mode of the media content.
  • the sending unit 013 is further configured to notify the receiving end of the data encoding manner of the transmitting end, to The receiving end determines the decoding manner of the media content according to the encoding manner of the media content.
  • the media content information to be sent is the size of the media content to be sent by the sending end, and/or the resolution of the media content to be sent by the sending end, and/or the frame rate of the media content to be sent by the sending end;
  • the data coding method is advanced video coding H.264 or high efficiency video coding H.265.
  • the processing unit 012 is configured to: when the status information currently determined by the sending end is the CPU usage rate, the preset condition is that the CPU usage of the sending end and/or the CPU usage rate of the receiving end is greater than the first preset threshold;
  • the processing unit 012 can be configured to: if the CPU usage of the transmitting end and/or the CPU usage of the receiving end is greater than the first preset threshold, the processing unit determines to switch the high efficiency video encoding to the advanced video encoding.
  • the processing unit 012 is configured to: if the status information currently determined by the sending end is the network bandwidth, the preset condition is that the network bandwidth is less than the second preset threshold;
  • the processing unit 012 can be configured to: if the network bandwidth of the transmitting end and/or the network bandwidth of the receiving end is less than the second preset threshold, the processing unit determines to switch the advanced video encoding to the high efficiency video encoding.
  • the processing unit 012 is configured to: when the status information currently determined by the sending end is the power information, the preset condition is that when the sending end and/or the receiving end are not connected to the power source, the remaining power of the sending end and/or the receiving end is less than a third preset threshold, the third preset threshold is a power required by the sender and/or the receiver to play media content that has not been played in the media content;
  • the processing unit 012 can be configured to switch the high efficiency video coding to the advanced video coding if the remaining power of the transmitting end and/or the receiving end is less than the third preset threshold.
  • the processing unit 012 may be configured to: if the status information currently determined by the sending end is small and/or the resolution and/or the frame rate is greater than the fourth preset threshold;
  • the processing unit 012 can be configured to switch the advanced video coding to the high-efficiency video coding if the size and/or the resolution and/or the frame rate of the media content to be sent by the transmitting end is greater than the fourth preset threshold.
  • the processing unit 012 determines whether at least one of the status information meets the preset condition, and if one of the status information meets the preset condition, switching the encoding mode of the media content;
  • the processing unit 012 weights the status information according to the weight value of the status information to obtain a weighted result
  • the processing unit 012 compares the weighted result with the fifth preset threshold. If the weighted result is less than the fifth preset threshold, the transmitting end switches the advanced video encoding to the high efficiency video encoding.
  • the sending unit 013 can be used to:
  • the notification message carries the encoding mode identifier of the switched media content, and the number or location information of the starting data packet of the encoding mode that needs to be switched, so that the receiving end determines the media content according to the notification message.
  • Decoding method
  • the data packet that the sending end sends the media content to the receiving end carries the encoding mode identifier of the switched media content, so that the receiving end determines the decoding manner of the media content according to the encoding mode identifier.
  • the embodiment of the present invention provides a sending end, where the sending end acquires state information of the sending end and/or the receiving end, and the status information includes a CPU usage rate, a network bandwidth, a power quantity information, and a sending end to be sent by the transmitting end and/or the receiving end. At least one of the media content information determines whether at least one of the status information satisfies a preset condition.
  • the receiving end is configured to determine, by the receiving end, the decoding manner of the media content according to the encoding manner of the media content, and can improve the user experience according to the switching of the encoding manner of the media content.
  • a further embodiment of the present invention provides a receiving end 02, as shown in FIG. 6, comprising:
  • the obtaining unit 021 is configured to obtain status information of the sending end and/or the receiving end, where the status information includes at least a central processor CPU usage rate, a network bandwidth, a power quantity information, and a media content information to be sent by the sending end of the sending end and/or the receiving end.
  • the status information includes at least a central processor CPU usage rate, a network bandwidth, a power quantity information, and a media content information to be sent by the sending end of the sending end and/or the receiving end.
  • the processing unit 022 is configured to determine whether at least one of the status information meets the preset condition, and if one of the status information meets the preset condition, send a request handover message to the sending end, so that the sending end switches the media content according to the request switching message.
  • the encoding method is configured to determine whether at least one of the status information meets the preset condition, and if one of the status information meets the preset condition, send a request handover message to the sending end, so that the sending end switches the media content according to the request switching message.
  • the processing unit 022 is further configured to determine a decoding manner of the media content according to an encoding manner of the media content notified by the sending end.
  • the media content information to be sent is the size of the media content to be sent by the sending end, and/or the resolution of the media content to be sent by the sending end, and/or the frame rate of the media content to be sent by the sending end;
  • the coding method is advanced video coding H.264 or high efficiency video coding H.265.
  • the processing unit 022 may be configured to: if the status information currently determined by the receiving end is the CPU usage rate, the preset condition is that the CPU usage of the sending end and/or the CPU usage rate of the receiving end is greater than the first preset threshold;
  • the processing unit 022 can be configured to: if the CPU usage of the sending end and/or the CPU usage rate of the receiving end is greater than the first preset threshold, the receiving end sends a request switching message to the sending end, so that the sending end switches the message according to the request to the high-efficiency video.
  • the encoding is switched to advanced video encoding.
  • the processing unit 022 is configured to: if the status information currently determined by the receiving end is the network bandwidth, the preset condition is that the network bandwidth is less than the second preset threshold;
  • the processing unit 022 can be configured to: if the network bandwidth information of the sending end and/or the network bandwidth information of the receiving end is less than the second preset threshold, the receiving end sends a request switching message to the sending end, so that the sending end switches the message according to the request to the advanced video.
  • the encoding is switched to high efficiency video encoding.
  • the processing unit 022 may be configured to: if the status information currently determined by the receiving end is In the case of the power information, the preset condition is that when the transmitting end and/or the receiving end are not connected to the power source, the remaining power of the transmitting end and/or the receiving end is less than the third preset threshold, and the third preset threshold is the transmitting end and/or Or the amount of power required by the receiving end to play media content that has not been played in the media content;
  • the processing unit 022 can be configured to: if the remaining power of the sending end and/or the receiving end is less than a third preset threshold, the receiving end sends a request switching message to the sending end, so that the sending end switches the high-efficiency video encoding to the advanced according to the request switching message. Video coding.
  • the processing unit 022 is configured to: when the status information currently determined by the receiving end is the media content information to be sent by the sending end, the preset condition is a size and/or a resolution and/or a frame of the media content to be sent by the sending end. The rate is greater than the fourth preset threshold;
  • the processing unit 022 may be configured to send a request handover message to the sending end, so that the sending end switches according to the request, if the size and/or resolution of the media content to be sent by the sending end and/or the frame rate is greater than the fourth preset threshold.
  • the message switches the advanced video encoding to high efficiency video encoding.
  • the processing unit 024 determines whether at least one of the status information meets the preset condition, and if one of the status information meets the preset condition, sends a request switching message to the sending end, so that Transmitting, at the sending end, the encoding mode of the media content according to the request switching message;
  • the processing unit 024 may perform weighting on the status information according to the weight value of the status information to obtain a weighted result
  • the weighting result is compared with the fifth preset threshold. If the weighting result is less than the fifth preset threshold, the receiving end sends a request switching message to the sending end, so that the sending end switches the advanced video encoding to high efficiency according to the request switching message. Video coding.
  • the receiving unit 023 receiving unit receives the notification message sent by the sending end, where the notification message carries the encoding mode identifier of the media content after the switching of the transmitting end and the encoding manner of the media content to be switched.
  • the number or location information of the starting data packet so that the processing unit determines the decoding side of the media content according to the notification message.
  • the processing unit determines, according to the encoding mode identifier of the switched media content in the data packet of the media content, the decoding manner of the media content.
  • the embodiment of the present invention provides a receiving end, where the receiving end acquires state information of the sending end and/or the receiving end, and the status information includes the CPU usage rate, network bandwidth, power quantity information, and the transmitting end to be sent by the transmitting end and/or the receiving end.
  • At least one of the media content information determines whether at least one of the status information satisfies a preset condition. If one of the status information satisfies the preset condition, sending a request switching message to the sending end, so that the sending end switches the message according to the request.
  • the encoding method of the media content determines the data decoding mode of the media content according to the encoding mode of the media content at the transmitting end, and can improve the user experience according to the switching of the encoding mode of the media content.
  • a further embodiment of the present invention provides a transmitting end 03.
  • the transmitting end 03 includes: a bus 031, a processor 032, a transmitter 033, a receiver 034, and a memory 035, where the memory 035 is used.
  • the processor 032 is configured to execute the instruction for acquiring state information of the transmitting end and/or the receiving end, where the status information includes a CPU usage rate, a network bandwidth, a power amount information, and a sending end of the transmitting end and/or the receiving end.
  • At least one of the media content information to be sent; the processor 032 is configured to execute the instruction for determining whether at least one of the state information meets a preset condition, and if one of the state information meets the preset condition, switching the media content
  • the encoding mode is used by the transmitter 033 to notify the receiving end of the encoding manner of the media content of the sending end, so that the receiving end determines the decoding manner of the media content according to the encoding manner of the media content.
  • the media content information to be sent is the size of the media content to be sent by the sending end, and/or the resolution of the media content to be sent by the sending end, and/or the sending end to be sent.
  • the data encoding method is advanced video coding H.264 or high efficiency video coding H.265.
  • the processor 032 is configured to: when the status information currently determined by the sending end is the CPU usage rate, the preset condition is that the CPU usage of the sending end and/or the CPU usage rate of the receiving end is greater than the first Preset threshold;
  • the processor 032 is configured to switch the high-efficiency video coding to the advanced video coding if the CPU usage of the transmitting end and/or the CPU usage of the receiving end is greater than the first preset threshold.
  • the processor 032 is configured to perform, if the status information currently determined by the sending end is the network bandwidth, the preset condition is that the network bandwidth is greater than the second preset threshold;
  • the processor 032 is configured to execute the instruction, if the network bandwidth of the transmitting end and/or the network bandwidth of the receiving end is less than the second preset threshold, the transmitting end switches the advanced video encoding to the high efficiency video encoding.
  • the processor 032 is configured to perform, if the status information currently determined by the sending end is the power information, the preset condition is that when the sending end and/or the receiving end are not connected to the power source, the sending end And/or the remaining power of the receiving end is less than a third preset threshold, and the third preset threshold is a power required by the transmitting end and/or the receiving end to play media content that has not been played in the media content;
  • the processor 032 is configured to execute the instruction, if the remaining power of the transmitting end and/or the receiving end is less than the third preset threshold, the transmitting end switches the high efficiency video encoding to the advanced video encoding.
  • the processor 032 is configured to perform, if the status information currently determined by the sending end is the media content information to be sent by the sending end, the preset condition is the size of the media content to be sent by the sending end. / / or the resolution and / or frame rate is greater than the fourth predetermined threshold; the processor 032 is configured to execute the instruction including if the size and / or resolution and / or frame rate of the media content to be sent by the transmitting end is greater than the fourth pre- Set the threshold, then the sender will encode the advanced video. Switch to high efficiency video encoding.
  • the processor optionally, if the status information is at least two, the processor
  • the sending end weights the state information according to the weight value of the state information to obtain a weighting result
  • the transmitting end compares the weighted result with a fifth preset threshold. If the weighting result is less than the fifth preset threshold, the transmitting end switches the advanced video encoding to the high efficiency video encoding.
  • the transmitter 033 is configured to perform, by the sending end, notifying the receiving end of the encoding manner of the media content of the sending end, so that the receiving end determines the decoding manner of the media content according to the encoding manner of the media content, including:
  • the sending end sends a notification message to the receiving end, where the notification message carries the encoding mode identifier of the switched media content, and the number or location information of the starting data packet of the encoding mode that needs to be switched, so that the receiving end determines according to the notification message.
  • the method of decoding the media content; or, the data packet that the sending end sends the media content to the receiving end carries the encoding mode identifier of the switched media content, so that the receiving end determines the decoding manner of the media content according to the encoding mode identifier.
  • the embodiment of the present invention provides a sending end, where the sending end acquires state information of the sending end and/or the receiving end, and the status information includes a CPU usage rate, a network bandwidth, a power quantity information, and a sending end to be sent by the transmitting end and/or the receiving end. At least one of the media content information determines whether at least one of the status information satisfies a preset condition.
  • the receiving end is configured to determine, by the receiving end, the decoding manner of the media content according to the encoding manner of the media content, and can improve the user experience according to the switching of the encoding manner of the media content.
  • a further embodiment of the present invention provides a receiving end 04, as shown in FIG. 8, the transmitting end 04
  • the method includes: a bus 041, a processor 042, a transmitter 043, a receiver 044, and a memory 045, wherein the memory 045 is configured to store an instruction, and the processor 042 is configured to execute the instruction for acquiring a state of the transmitting end and/or the receiving end.
  • the information, the status information includes at least one of a central processing unit CPU usage rate of the transmitting end and/or the receiving end, network bandwidth information, power quantity information, and media content information to be sent by the transmitting end; the processor 042 is configured to execute the instruction for determining the status.
  • the processor 042 uses The instruction is executed for the receiving end to determine the decoding manner of the media content according to the encoding manner of the media content notified by the sending end.
  • the media content information to be sent is the size of the media content to be sent by the sending end, and/or the resolution of the media content to be sent by the sending end, and/or the sending end to be sent.
  • the coding method is advanced video coding H.264 or high efficiency video coding H.265.
  • the processor 042 is configured to execute, if the status information currently determined by the receiving end is the CPU usage rate, the preset condition is that the CPU usage of the sending end and/or the CPU usage of the receiving end is greater than the first a preset threshold;
  • the processor 042 is configured to execute the instruction for:
  • the receiver sends a request handover message to the sender, so that the sender switches the high-efficiency video coding to the advanced video coding according to the request handover message. .
  • the processor 042 is configured to perform, if the status information currently determined by the receiving end is the network bandwidth, the preset condition is that the network bandwidth is less than the second preset threshold;
  • the processor 042 is configured to execute the instruction including:
  • the receiving end sends a request switching message to the sending end, so that the sending end switches the advanced video encoding to the high efficiency video encoding according to the request switching message.
  • the processor 042 is configured to: when the status information currently determined by the receiving end is the power information, the preset condition is that when the sending end and/or the receiving end are not connected to the power source, the sending end is / or the remaining power of the receiving end is less than the third preset threshold, and the third preset threshold is the power required by the transmitting end and/or the receiving end to play the media content that has not been played in the media content;
  • the processor 042 is configured to execute the instruction including:
  • the receiving end sends a request switching message to the transmitting end, so that the transmitting end switches the high efficiency video encoding to the advanced video encoding according to the request switching message.
  • the processor 042 is configured to: if the status information currently determined by the receiving end is the media content information to be sent by the sending end, the preset condition is the size of the media content to be sent by the sending end and/or Or the resolution and/or frame rate is greater than the fourth predetermined threshold;
  • the processor 042 is configured to execute the instruction including:
  • the receiving end sends a request switching message to the sending end, so that the sending end encodes the advanced video according to the request switching message. Switch to high efficiency video encoding.
  • the receiving end determines whether at least one of the status information meets the preset condition, and if one of the status information meets the preset condition, the sending end Sending a request switching message, so that the sending end switches the encoding mode of the media content according to the request switching message;
  • the processor 042 is configured to perform weighting on the status information according to the weight value of the status information to obtain a weighted result
  • the receiving end compares the weighted result with a fifth preset threshold, if the weighting result is less than the first The fifth preset threshold, the receiving end sends a request switching message to the sending end, so that the sending end switches the advanced video encoding to the high efficiency video encoding according to the request switching message.
  • the processor 042 is configured to perform, by the receiving end, determining, by the receiving end, the decoding manner of the media content according to the encoding manner of the media content notified by the sending end, including:
  • the receiving end receives the notification message sent by the sending end, and the notification message carries the encoding mode identifier of the media content after the switching of the transmitting end and the number or location information of the starting data packet of the encoding mode that needs to switch the media content, so that the receiving end can notify the receiving end according to the notification.
  • the message determines the manner in which the media content is decoded;
  • the receiving end determines the decoding mode of the media content according to the encoding mode identifier of the media content in the media content that carries the switched media content.
  • the embodiment of the present invention provides a receiving end, where the receiving end acquires state information of the sending end and/or the receiving end, and the status information includes the CPU usage rate, network bandwidth, power quantity information, and the transmitting end to be sent by the transmitting end and/or the receiving end.
  • the media content information determining whether at least one of the status information satisfies a preset condition, and if one of the status information satisfies the preset condition, sending a request switching message to the sending end, so that the sending end switches the media content according to the request switching message.
  • the coding mode determines the decoding mode according to the coding mode of the media content at the transmitting end, and can improve the user experience by switching the coding mode of the media content.
  • the disclosed method, the receiving end, and the transmitting end may be implemented in other manners.
  • the device embodiments described above are only schematic.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical, mechanical or Its form.
  • each functional unit may be integrated into one processing unit, or each unit may be physically included separately, or two or more units may be integrated into one unit.
  • the above units may be implemented in the form of hardware or in the form of hardware plus software functional units.
  • All or part of the steps of implementing the foregoing method embodiments may be performed by hardware related to the program instructions.
  • the foregoing program may be stored in a computer readable storage medium, and when executed, the program includes the steps of the foregoing method embodiments;
  • the foregoing storage medium includes:
  • U disk mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk, etc. can store various program code media.

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computing Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Discrete Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

本发明实施例提供一种切换编码方式的方法、发送端和接收端,涉及通信领域,能够随媒体内容的编码方式的切换提高用户体验。其方法为:发送端获取发送端和/或接收端的状态信息,状态信息包括发送端和/或接收端的CPU使用率、网络带宽、电量信息和发送端待发送的媒体内容信息,判断状态信息是否满足预设条件,若状态信息满足预设条件,则切换媒体内容的编码方式,而后将发送端的媒体内容的编码方式通知给接收端,以便于接收端根据媒体内容的编码方式确定媒体内容的解码方式。本发明实施例用于切换编码方式。

Description

一种切换编码方式的方法、 发送端和接收端 本申请要求于 2013 年 6 月 5 日提交中国专利局, 申请号为 201310221059.9、 发明名称为 "一种切换编码方式的方法、 发送端和接收端" 的中国专利申请, 其全部内容通过引用结合在本申请中。
技术领域
本发明涉及通信领域, 尤其涉及一种切换编码方式的方法、 发送端 和接收端。
背景技术
WFA ( Wi-Fi Alliance , WFA联盟) Wi-Fi Display 2.0项目已经启动, 目前其所用的视频格式标准为 H.264/MPEG-4 ( Moving Picture Experts Group ,动态图像专家组)AVC( Advanced Video Coding,高级视频编码 ) , 而 H.265/HEVC ( High Efficiency Video coding, 高效视频编码 ) 视频格 式标准为 H264的继任者, 且 H.265的最高分辨率可达 8192 X 4320。 实 际应用中, 视频的相同画质情况下, H.265与 H.264相比, H.265的比特 率减少了 50% , 压缩率是 H.264的 2倍, 编码效率高, 但是 H.265的编 码计算复杂度是 H.264的 5倍, 解码端算法是 H.264的 2-3倍, 大大增 加了编码器和解码器的功耗和 CPU的负担。 发明内容
本发明的实施例提供一种切换编码方式的方法、 发送端和接收端, 能够在高效率视频编码和高级视频编码的切换中提高用户体验。
为达到上述目的, 本发明的实施例釆用如下技术方案:
第一方面, 提供一种切换编码方式的方法, 包括:
发送端获取所述发送端和 /或接收端的状态信息, 所述状态信息包 括所述发送端和 /或所述接收端的中央处理器 CPU使用率、 网络带宽、 电量信息和所述发送端待发送的媒体内容信息中至少一个; 所述发送端判断所述状态信息中的至少一个是否满足预设条件, 若所述状态信息中的一个满足所述预设条件,则切换媒体内容的编码方 式;
所述发送端将所述发送端的媒体内容的编码方式通知给所述接收 端,以便于所述接收端根据所述媒体内容的编码方式确定所述媒体内容 的解码方式。
结合第一方面, 在第一方面的第一种可能实现的方式中, 所述待 发送的媒体内容信息为所述发送端待发送的媒体内容的大小, 和 /或所 述发送端待发送的媒体内容的分辨率, 和 /或所述发送端待发送的媒体 内容的帧率;
所述编码方式为高级视频编码 H.264或高效率视频编码 H.265。 结合第一方面或第一方面的第一种可能实现的方式, 在第一方面 的第二种可能实现的方式中,若所述发送端当前判断的状态信息为所述
CPU使用率时,所述预设条件为所述发送端的 CPU使用率和 /或所述接 收端的 CPU使用率大于第一预设阔值;
所述状态信息中的一个满足所述预设条件, 切换所述媒体内容的 编码方式包括:
若所述发送端的 CPU使用率和 /或所述接收端的 CPU使用率大于 所述第一预设阈值,则所述发送端将所述高效率视频编码切换为所述高 级视频编码。
结合第一方面或第一方面的第一种可能实现的方式, 在第一方面 的第三种可能实现的方式中,若所述发送端当前判断的状态信息为所述 网络带宽时, 所述预设条件为所述网络带宽小于第二预设阔值;
所述状态信息中的一个满足所述预设条件, 切换所述媒体内容的 编码方式包括:
若所述发送端的网络带宽和 /或所述接收端的网络带宽小于所述第 二预设阈值,则所述发送端将所述高级视频编码切换为所述高效率视频 编码。
结合第一方面或第一方面的第一种可能实现的方式, 在第一方面 的第四种可能实现的方式中,若所述发送端当前判断的状态信息为所述 电量信息时, 则所述预设条件为当所述发送端和 /或所述接收端未接电 源时, 所述发送端和 /或所述接收端的剩余电量小于第三预设阔值, 所 述第三预设阔值为所述发送端和 /或所述接收端播放完所述媒体内容中 还未播放的媒体内容所需的电量;
所述状态信息中的一个满足所述预设条件, 切换所述媒体内容的 编码方式包括:
若所述发送端和 /或所述接收端的剩余电量小于所述第三预设阔 值, 则所述发送端将所述高效率视频编码切换为所述高级视频编码。
结合第一方面或第一方面的第一种可能实现的方式, 在第一方面 的第五种可能实现的方式中,若所述发送端当前判断的状态信息为所述 发送端待发送的媒体内容信息,则所述预设条件为所述发送端待发送的 媒体内容的大小和 /或分辨率和 /或帧率大于第四预设阔值;
所述状态信息中的一个满足所述预设条件, 切换所述媒体内容的 编码方式包括:
若所述发送端待发送的媒体内容的大小和 /或分辨率和 /或帧率大 于第四预设阔值,则所述发送端将所述高级视频编码切换为所述高效率 视频编码。
结合第一方面或第一方面的第一种可能实现的方式, 在第一方面 的第六种可能实现的方式中, 若所述状态信息为至少两个, 则所述发送 端判断所述状态信息中的至少一个是否满足所述预设条件,若所述状态 信息中的一个满足所述预设条件, 则切换所述媒体内容的编码方式; 或, 所述发送端根据所述状态信息的权重值对所述状态信息进行 加权获取加权结果;
所述发送端将所述加权结果与第五预设阈值进行比较, 若所述加 权结果小于所述第五预设阈值,则所述发送端将所述高级视频编码切换 为所述高效率视频编码。
结合第一方面或第一方面的第一种可能实现的方式至第一方面的 第六种可能实现的方式, 在第一方面的第七种可能实现的方式中, 所述 发送端将所述发送端的媒体内容的编码方式通知给所述接收端,以便于 所述接收端根据所述媒体内容的编码方式确定所述媒体内容的解码方 式包括:
所述发送端向所述接收端发送通知消息, 所述通知消息中携带切 换后的所述媒体内容的编码方式标识,和需要切换所述媒体内容的编码 方式的起始数据包的编号或位置信息,以便于所述接收端根据所述通知 消息确定所述媒体内容的解码方式;
或, 所述发送端向所述接收端发送所述媒体内容的数据包中携带 切换后的所述媒体内容的编码方式标识,以便于所述接收端根据所述编 码方式标识确定所述媒体内容的解码方式。
第二方面, 提供一种切换编码方式的方法, 包括:
接收端获取发送端和 /或所述接收端的状态信息, 所述状态信息包 括所述发送端和 /或所述接收端的中央处理器 CPU使用率、 网络带宽、 电量信息和所述发送端待发送的媒体内容信息中至少一个;
所述接收端判断所述状态信息中的至少一个是否满足预设条件, 若所述状态信息中的一个满足所述预设条件,则向所述发送端发送请求 切换消息,以便于所述发送端根据所述请求切换消息切换媒体内容的编 码方式;
所述接收端根据所述发送端通知的媒体内容的编码方式确定所述 媒体内容的解码方式。
结合第二方面, 在第二方面的第一种可能实现的方式中, 所述待 发送的媒体内容信息为所述发送端待发送的媒体内容的大小, 和 /或所 述发送端待发送的媒体内容的分辨率, 和 /或所述发送端待发送的媒体 内容的帧率;
所述编码方式为高级视频编码 Η.264或高效率视频编码 Η.265。 结合第二方面或第二方面的第一种可能实现的方式, 在第二方面 的第二种可能实现的方式中,若所述接收端当前判断的状态信息为所述 CPU使用率,则所述预设条件为所述发送端的 CPU使用率和 /或所述接 收端的 CPU使用率大于第一预设阔值;
所述若所述状态信息中的一个满足所述预设条件, 则向所述发送 端发送请求切换消息包括:
若所述发送端的 CPU使用率和 /或所述接收端的 CPU使用率大于 所述第一预设阔值, 则所述接收端向所述发送端发送所述请求切换消 息,以便于所述发送端根据所述请求切换消息将所述高效率视频编码切 换为所述高级视频编码。
结合第二方面或第二方面的第一种可能实现的方式, 在第二方面 的第三种可能实现的方式中,若所述接收端当前判断的状态信息为所述 网络带宽时, 所述预设条件为所述网络带宽小于第二预设阔值;
所述若所述状态信息中的一个满足所述预设条件, 则向所述发送 端发送请求切换消息包括:
若所述发送端的网络带宽和 /或所述接收端的网络带宽小于所述第 二预设阔值, 则所述接收端向所述发送端发送所述请求切换消息, 以便 于所述发送端根据所述请求切换消息将所述高级视频编码切换为所述 高效率视频编码。
结合第二方面或第二方面的第一种可能实现的方式, 在第二方面 的第四种可能实现的方式中,所述接收端当前判断的状态信息为所述电 量信息时, 则所述预设条件为当所述发送端和 /或所述接收端未接电源 时, 所述发送端和 /或所述接收端的剩余电量小于第三预设阔值, 所述 第三预设阔值为所述发送端和 /或所述接收端播放完所述媒体内容中还 未播放的媒体内容所需的电量;
所述若所述状态信息中的一个满足所述预设条件, 则向所述发送 端发送请求切换消息包括:
若所述发送端和 /或所述接收端的剩余电量小于所述第三预设阔 值, 则所述接收端向所述发送端发送所述请求切换消息, 以便于所述发 送端根据所述请求切换消息将所述高效率视频编码切换为所述高级视 频编码。
结合第二方面或第二方面的第一种可能实现的方式, 在第二方面 的第五种可能实现的方式中,若所述接收端当前判断的状态信息为所述 发送端待发送的媒体内容信息时,所述预设条件为所述发送端待发送的 媒体内容的大小和 /或分辨率和 /或帧率大于第四预设阔值;
所述若所述状态信息中的一个满足所述预设条件, 则向所述发送 端发送请求切换消息包括:
若所述发送端待发送的媒体内容的大小和 /或分辨率和 /或帧率大 于所述第四预设阔值,则所述接收端向所述发送端发送所述请求切换消 息,以便于所述发送端根据所述请求切换消息将所述高级视频编码切换 为所述高效率视频编码。 结合第二方面或第二方面的第一种可能实现的方式, 在第二方面 的第六种可能实现的方式中, 若所述状态信息为至少两个, 则所述接收 端判断所述状态信息中的至少一个是否满足所述预设条件,若所述状态 信息中的一个满足所述预设条件, 则向所述发送端发送请求切换消息, 以便于所述发送端根据所述请求切换消息切换媒体内容的编码方式; 或, 所述接收端根据所述状态信息的权重值对所述状态信息进行 加权获取加权结果;
所述接收端将所述加权结果与第五预设阈值进行比较, 若所述加 权结果小于所述第五预设阈值,则所述接收端向所述发送端发送所述请 求切换消息,以便于所述发送端根据所述请求切换消息将所述高级视频 编码切换为所述高效率视频编码。
结合第二方面或第二方面的第一种可能实现的方式至第六种可能 实现的方式, 在第二方面的第七种可能实现的方式中, 所述接收端根据 所述发送端通知的媒体内容的编码方式确定所述媒体内容的解码方式 包括:
所述接收端接收所述发送端发送的通知消息, 所述通知消息中携 带所述发送端切换后的所述媒体内容的编码方式标识和需要切换所述 媒体内容的编码方式的起始数据包的编号或位置信息,以便于所述接收 端根据所述通知消息确定所述媒体内容的解码方式;
或, 当所述接收端接收所述发送端发送的所述媒体内容时, 所述 接收端根据所述媒体内容的数据包中携带切换后的所述媒体内容的编 码方式标识, 确定所述媒体内容的解码方式。
第三方面, 提供一种发送端, 包括:
获取单元, 用于发送端获取所述发送端和 /或接收端的状态信息, 所述状态信息包括所述发送端和 /或所述接收端的中央处理器 CPU使用 率、 网络带宽、 电量信息和所述发送端待发送的媒体内容信息中至少一 个;
处理单元, 用于所述发送端判断所述状态信息中的至少一个是否 满足预设条件, 若所述状态信息中的一个满足所述预设条件, 则切换媒 体内容的数据编码方式; 知给所述接收端,以便于所述接收端根据所述媒体内容的编码方式确定 所述媒体内容的解码方式。
结合第三方面, 在第三方面的第一种可能实现的方式中, 所述待 发送的媒体内容信息为所述发送端待发送的媒体内容的大小, 和 /或所 述发送端待发送的媒体内容的分辨率, 和 /或所述发送端待发送的媒体 内容的帧率;
所述编码方式为高级视频编码 H.264或高效率视频编码 H.265。 结合第三方面或第三方面的第一种可能实现的方式, 在第三方面 的第二种可能实现的方式中,所述处理单元用于若所述发送端当前判断 的状态信息为所述 CPU使用率时, 所述预设条件为所述发送端的 CPU 使用率和 /或所述接收端的 CPU使用率大于第一预设阔值;
若所述发送端的 CPU使用率和 /或所述接收端的 CPU使用率大于 所述第一预设阈值,则所述处理单元确定将所述高效率视频编码切换为 所述高级视频编码。
结合第三方面或第三方面的第一种可能实现的方式, 在第三方面 的第三种可能实现的方式中,所述处理单元用于若所述发送端当前判断 的状态信息为所述网络带宽时,所述预设条件为所述网络带宽小于第二 预设阔值;
所述处理单元用于若所述发送端的网络带宽和 /或所述接收端的网 络带宽小于所述第二预设阔值,则所述处理单元确定将所述高级视频编 码切换为所述高效率视频编码。
结合第三方面或第三方面的第一种可能实现的方式, 在第三方面 的第四种可能实现的方式中,所述处理单元用于若所述发送端当前判断 的状态信息为所述电量信息时, 所述预设条件为当所述发送端和 /或所 述接收端未接电源时, 所述发送端和 /或所述接收端的剩余电量小于第 三预设阔值, 所述第三预设阔值为所述发送端和 /或所述接收端播放完 所述媒体内容中还未播放的媒体内容所需的电量;
所述处理单元用于若所述发送端和 /或所述接收端的剩余电量小于 所述第三预设阈值,则所述处理单元将所述高效率视频编码切换为所述 高级视频编码。
结合第三方面或第三方面的第一种可能实现的方式, 在第三方面 的第五种可能实现的方式中,所述处理单元用于若所述发送端当前判断 的状态信息为所述发送端待发送的媒体内容信息时,则所述预设条件为 所述发送端待发送的媒体内容的大小和 /或分辨率和 /或帧率大于第四 预设阔值;
所述处理单元用于若所述发送端待发送的媒体内容的大小和 /或分 辨率和 /或帧率大于第四预设阔值, 则所述发送端将所述高级视频编码 切换为所述高效率视频编码。
结合第三方面或第三方面的第一种可能实现的方式, 在第三方面 的第六种可能实现的方式中, 若所述状态信息为至少两个, 则所述处理 单元判断所述状态信息中的至少一个是否满足所述预设条件,若所述状 态信息中的一个满足所述预设条件, 则切换所述媒体内容的编码方式; 或, 所述处理单元根据所述状态信息的权重值对所述状态信息进 行加权获取加权结果; 所述处理单元将所述加权结果与第五预设阈值进行比较, 若所述 加权结果小于所述第五预设阈值,则所述发送端将所述高级视频编码切 换为所述高效率视频编码。
结合第三方面或第三方面的第一种可能实现的方式至第六种可能 实现的方式, 在第三方面的第七种可能实现的方式中, 所述发送单元用 于:
向所述接收端发送通知消息, 所述通知消息中携带切换后的所述 媒体内容的编码方式标识,和需要切换所述媒体内容的编码方式的起始 数据包的编号或位置信息,以便于所述接收端根据所述通知消息确定所 述媒体内容的解码方式;
或, 所述发送端向所述接收端发送所述媒体内容的数据包中携带 切换后的所述媒体内容的编码方式标识,以便于所述接收端根据所述编 码方式标识确定所述媒体内容的解码方式。
第四方面, 提供一种接收端, 包括:
获取单元, 用于接收端获取发送端和 /或所述接收端的状态信息, 所述状态信息包括所述发送端和 /或所述接收端的中央处理器 CPU使用 率、 网络带宽、 电量信息和所述发送端待发送的媒体内容信息中至少一 个;
处理单元, 用于所述接收端判断所述状态信息中的至少一个是否 满足预设条件, 若所述状态信息中的一个满足所述预设条件, 则向所述 发送端发送请求切换消息,以便于所述发送端根据所述请求切换消息切 换媒体内容的编码方式;
所述接收单元还用于所述接收端根据所述发送端通知的媒体内容 的编码方式获取所述媒体内容的数据解码方式。
结合第四方面, 在第四方面的第一种可能实现的方式中, 所述待 发送的媒体内容信息为所述发送端待发送的媒体内容的大小, 和 /或所 述发送端待发送的媒体内容的分辨率, 和 /或所述发送端待发送的媒体 内容的帧率;
所述编码方式为高级视频编码 H.264或高效率视频编码 H.265。 结合第四方面或第四方面的第一种可能实现的方式, 在第四方面 的第二种可能实现的方式中,所述处理单元用于若所述接收端当前判断 的状态信息为所述 CPU 使用率时, 则所述预设条件为所述发送端的 CPU使用率和 /或所述接收端的 CPU使用率大于第一预设阔值;
所述处理单元用于若所述发送端的 CPU使用率和 /或所述接收端的 CPU 使用率大于所述第一预设阔值, 则所述接收端向所述发送端发送 所述请求切换消息,以便于所述发送端根据所述请求切换消息将所述高 效率视频编码切换为所述高级视频编码。
结合第四方面或第四方面的第一种可能实现的方式, 在第四方面 的第三种可能实现的方式中,所述处理单元用于若所述接收端当前判断 的状态信息为所述网络带宽时,所述预设条件为所述网络带宽小于第二 预设阔值;
所述处理单元用于若所述发送端的网络带宽和 /或所述接收端的网 络带宽小于所述第二预设阈值,则所述接收端向所述发送端发送所述请 求切换消息,以便于所述发送端根据所述请求切换消息将所述高级视频 编码切换为所述高效率视频编码。
结合第四方面或第四方面的第一种可能实现的方式, 在第四方面 的第四种可能实现的方式中,所述处理单元用于所述接收端当前判断的 状态信息为所述电量信息时, 则所述预设条件为当所述发送端和 /或所 述接收端未接电源时, 所述发送端和 /或所述接收端的剩余电量小于第 三预设阔值, 所述第三预设阔值为所述发送端和 /或所述接收端播放完 所述媒体内容中还未播放的媒体内容所需的电量;
所述处理单元用于若所述发送端和 /或所述接收端的剩余电量小于 所述第三预设阈值, 则所述接收端向所述发送端发送所述请求切换消 息,以便于所述发送端根据所述请求切换消息将所述高效率视频编码切 换为所述高级视频编码。
结合第四方面或第四方面的第一种可能实现的方式, 在第四方面 的第五种可能实现的方式中,所述处理单元用于所述接收端当前判断的 状态信息为所所述发送端待发送的媒体内容信息时,所述预设条件为所 述发送端待发送的媒体内容的大小和 /或分辨率和 /或帧率大于第四预 设阔值;
所述处理单元用于若所述发送端待发送的媒体内容的大小和 /或分 辨率和 /或帧率大于所述第四预设阔值, 则向所述发送端发送所述请求 切换消息,以便于所述发送端根据所述请求切换消息将所述高级视频编 码切换为所述高效率视频编码。
结合第四方面或第四方面的第二种可能实现的方式, 在第四方面 的第六种可能实现的方式中, 若所述状态信息为至少两个, 则所述处理 单元判断所述状态信息中的至少一个是否满足所述预设条件,若所述状 态信息中的一个满足所述预设条件, 则向所述发送端发送请求切换消 息, 以便于所述发送端根据所述请求切换消息切换媒体内容的编码方 式;
或, 则所述处理单元根据所述状态信息的权重值对所述状态信息 进行加权获取加权结果;
所述处理单元将所述加权结果与第五预设阈值进行比较, 若所述 加权结果小于所述第五预设阈值,则所述接收端向所述发送端发送所述 请求切换消息,以便于所述发送端根据所述请求切换消息将所述高级视 频编码切换为所述高效率视频编码。
结合第四方面或第四方面的第一种可能实现的方式至第六种可能 实现的方式, 在第四方面的第七种可能实现的方式中,接收单元接收所 述发送端发送的通知消息,所述通知消息中携带所述发送端切换后的所 述媒体内容的编码方式标识和需要切换所述媒体内容的编码方式的起 始数据包的编号或位置信息,以便于所述处理单元根据所述通知消 ,包、确 定所述媒体内容的解码方式;
或, 当所述接收单元接收所述发送端发送的所述媒体内容时, 所 述处理单元根据所述媒体内容的数据包中携带切换后的所述媒体内容 的编码方式标识, 确定所述媒体内容的解码方式。
本发明实施例提供一种切换编码方式的方法、 发送端和接收端, 获 取发送端和 /或接收端的状态信息,状态信息包括发送端和 /或接收端的中 央处理器 CPU使用率、 网络带宽、 电量信息和发送端待发送的媒体内容 信息, 判断状态信息中的至少一个是否满足预设条件, 若状态信息中的 一个满足预设条件, 则切换媒体内容的编码方式, 将发送端的媒体内容 的编码方式通知给接收端, 以便于接收端根据媒体内容的编码方式确定 媒体内容的解码方式,能够随媒体内容的编码方式的切换提高用户体验。 附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面 将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易 见地, 下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通 技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获 得其他的附图。
图 1为本发明实施例提供的一种切换编码方式的方法流程示意图; 图 2 为本发明又一实施例提供的一种切换编码方式的方法流程示 意图;
图 3 为本发明又一实施例提供的一种切换编码方式的方法流程示 意图;
图 4 为本发明又一实施例提供的一种切换编码方式的方法流程示 意图;
图 5为本发明又一实施例提供的一种发送端结构示意图;
图 6为本发明又一实施例提供的一种接收端结构示意图;
图 7为本发明又一实施例提供的一种发送端结构示意图;
图 8为本发明又一实施例提供的一种接收端结构示意图。 具体实施方式
下面将结合本发明实施例中的附图, 对本发明实施例中的技术方 案进行清楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分 实施例, 而不是全部的实施例。 基于本发明中的实施例, 本领域普通技 术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于 本发明保护的范围。
本发明实施例提供一种切换编码方式的方法, 如图 1所示, 包括: 101、 发送端获取发送端和 /或接收端的状态信息, 状态信息包括发 送端和 /或接收端的中央处理器 CPU使用率、 网络带宽、 电量信息和发 送端待发送的媒体内容信息中至少一个。
示例性的, 这里的 Source (发送端 ) 和 Sink (接收端 ) 可以能够 使用 Wi-Fi ( Wireless Fidelity, 无线保真度)技术的带有显示屏的终端。 例如 Source端可以为手机, Sink端可以为 TV ( Television, 电视机) 等。 在 Source 端获取 Sink 端的状态信息之前, Source 端可以通过 Wi-Fi Direct (无线直连) 或 UPnP ( Universal Plug and Play, 通用即插 即用) SSDP ( Simple Service Discovery Protocol , 简单服务发现协议 ) 实现设备发现和服务发现。若 Source端是通过 Wi-Fi Direct实现的设备 发现,则 Source端和 Sink端通过 Wi-Fi Direct或 TDLS( Tunneled Direct Link Setup , 通道直接链路建立) 建立连接; 若 Source端是通过 UPnP SSDP实现的设备发现, 则 Source端和 Sink端建立 TCP ( Transmission Control Protocol, 传输控制协议) 连接。
而后, Source端和 Sink端进行能力协商, 可以通过互发送通知消 息判断双方是否具备相同的能力。例如通知消息中可以包括终端的数据 分辨率,视频格式以及数据编码方式和数据解码方式等。 当双方的能力 相同, Source端向 Sink端发送请求消息, 以便于 Sink端根据该请求消 息向发送端发起 RTSP ( Real Time Streaming Protocol , 实时串流协议) Session会话请求, 以便于 Source端向 Sink端发送响应消息, 该响应消 息中携带 URL ( Universal Resource Locator , 统一资源定位符 ) 参数。
当 Source端在与 Sink端建立 RTSP的会话后, Sink端向 Source 端发送请求播放消息, Source端根据请求播放消息向 Sink端发送响应 消息, 以便于 Source端向 Sink端传输视频数据包。
102、 发送端判断状态信息中的至少一个是否满足预设条件, 若状 态信息中的一个满足预设条件, 则切换媒体内容的编码方式。
其中, 数据编码方式为 H.264/AVC ( Advanced Video Coding, 高 级视频编码 )或 H.265/HEVC ( High Efficiency Video coding, 高效率视 频编码 ) 。
示例性的, 若状态信息为一个, 则 Source端可以判断状态信息中 的一个是否满足预设条件, 若状态信息中的一个满足预设条件, 则切换 媒体内容的编码方式;
或, 若状态信息为至少两个, 则 Source端判断状态信息中的至少 一个是否满足预设条件, 若状态信息中的一个满足预设条件, 切换媒体 内容的编码方式。 或, 若状态信息为至少两个, Source 端根据状态信息的权重值对 状态信息进行加权获取加权结果, 将加权结果与第五预设阈值进行比 较, 若加权结果小于第五预设阔值, 则接收端向发送端发送请求切换消 息,以便于发送端根据请求切换消息将高级视频编码切换为高效率视频 编码。
103、 发送端将发送端的媒体内容的编码方式通知给接收端, 以便 于接收端根据媒体内容的编码方式确定媒体内容的解码方式。
示例性的, 发送端向接收端发送通知消息, 通知消息中携带切换 后的媒体内容的编码方式标识,和需要切换媒体内容的编码方式的起始 数据包的编号或位置信息,以便于接收端根据通知消息获取媒体内容的 解码方式, 其中, 位置信息可以是需要切换编码方式的时间信息, 譬如 为分钟信息, 或者可以是需要切换编码方式的其实数据包的字节信息。
或, 发送端向接收端发送媒体内容的数据包中携带切换后的媒体 内容的编码方式标识,以便于接收端根据编码方式标识获取媒体内容的 解码方式。
本发明实施例提供一种切换编码方式的方法, 发送端获取发送端 和接收端的状态信息, 状态信息包括发送端和 /或接收端的中央处理器 CPU 使用率、 网络带宽、 电量信息和发送端待发送的媒体内容信息中 至少一个, 判断状态信息中的至少一个是否满足预设条件, 若状态信息 中的一个满足预设条件, 切换媒体内容的编码方式,发送端将发送端的 媒体内容的编码方式通知给接收端,以便于接收端根据媒体内容的编码 方式确定媒体内容的解码方式,能够随媒体内容编码方式的切换提高用 户体验。
本发明又一实施例提供一种切换编码方式的方法, 如图 2所示, 201、 发送端获取发送端和 /或接收端的状态信息, 状态信息包括发 送端和 /或接收端的中央处理器 CPU使用率、 网络带宽、 电量信息和发 送端待发送的媒体内容信息中至少一个。
示例性的, 这里的 Source (发送端 ) 和 Sink (接收端 ) 可以能够 使用 Wi-Fi ( Wireless Fidelity, 无线保真度)技术的带有显示屏的终端。 例如 Source端可以为手机, Sink端可以为 TV ( Television, 电视机) 等。
在 Source端获取 Source端和 /或 Sink端的状态信息之前, Source 端可以通过 Wi-Fi Direct (无线直连)或 UPnP ( Universal Plug and Play, 通用即插即用) SSDP ( Simple Service Discovery Protocol , 简单服务发 现协议) 实现设备发现和服务发现。 若 Source 端是通过 Wi-Fi Direct 实现的设备发现, 则 Source 端和 Sink端通过 Wi-Fi Direct或 TDLS
( Tunneled Direct Link Setup ,通道直接链路建立)建立连接; 若 Source 端是通过 UPnP SSDP实现的设备发现,则 Source端和 Sink端建立 TCP
( Transmission Control Protocol , 传输控制协议) 连接。
而后, Source端和 Sink端进行能力协商, 可以通过互发送通知消 息判断双方是否具备相同的能力。例如通知消息中可以包括终端的数据 分辨率,视频格式以及数据编码方式和数据解码方式等。 当双方的能力 相同, Source端向 Sink端发送请求消息, 以便于 Sink端根据该请求消 息向发送端发起 RTSP ( Real Time Streaming Protocol , 实时串流协议) Session会话请求, 以便于 Source端向 Sink端发送响应消息, 该响应消 息中携带 URL ( Universal Resource Locator , 统一资源定位符) 参数。 当 Source端在与 Sink端建立 RTSP的会话后, Sink端向 Source 端发送请求播放消息, 当 Source端接收到 Sink端的请求播放消息后, Source端向 Sink端发送响应消息, 之后 Source端开始向 Sink端发送 视频数据包, 与 Sink端开始媒体流的传输。
而后, Source 端可以实时的获取自身的状态信息, 该自身状态信 息可以包括 Source端 CPU ( Central Processing Unit, 中央处理器) 的 使用率情况, 网络带宽信息, 电量信息和 Source端待发送媒体内容信 息中至少一个, 或者 Source端可以通过 RTSP GET— PARAMETER ( ) 方法实时的获取 Sink端 CPU 的使用率情况, 网络带宽, 电量信息和 Source端待发送的媒体内容信息中至少一个, 或者 Source端可以实时 的获取 Source端和 Sink端 CPU的使用率情况, 网络带宽, 电量信息 和 Source端待发送的媒体内容信息中至少一个,该媒体内容信息 Profile 为 Source端待发送的媒体内容大小,和 /或 Source端待发送的媒体内容 的分辨率, 和 /或 Source端待发送的媒体内容的帧率。
202、 发送端判断状态信息中的至少一个是否满足预设条件。
示例性的, 可以不考虑状态信息中的三个信息, 若状态信息为一 个, 则发送端只判断状态信息中的一个是否满足预设条件, 若状态信息 中的一个满足预设条件, 则切换媒体内容的编码方式。 例如, 在不考虑 网络带宽、发送端和接收端的电量信息, 和发送端待发送媒体内容信息 的情况下,通过判断 Source端的 CPU使用率和 /或 Sink端的 CPU使用 率来判断 Source端的 CPU使用率和 /或 Sink端的 CPU使用率是否满足 预设条件。
或, 可以不考虑状态信息中的两个信息, 若状态信息为两个, 则 发送端判断状态信息中剩余的两个是否满足预设条件,若状态信息中的 一个满足预设条件, 切换媒体内容的编码方式。 例如, 不考虑发送端和 接收端的电量信息, 和发送端待编码的媒体内容的分辨率, 判断发送端 和 /或接收端的中央处理器 CPU使用率、 网络带宽是否满足预设条件, 这里不限定发送端和 /或接收端的中央处理器 CPU使用率、 网络带宽的 判断顺序, 若状态信息中的一个满足预设条件,切换媒体内容的编码方 式;
或, 可以不考虑状态信息中的一个信息, 若状态信息为三个, 则 发送端判断状态信息中剩余的三个是否满足预设条件,若状态信息中的 一个满足预设条件, 切换媒体内容的编码方式。 例如, 不考虑发送端待 编码的媒体内容的分辨率, 判断状态信息中发送端和 /或接收端的中央 处理器 CPU使用率、 网络带宽、 电量信息是否满足预设条件, 这里不 限定发送端和 /或接收端的中央处理器 CPU使用率、 网络带宽、 电量信 息的判断顺序, 若状态信息中的一个满足预设条件,切换媒体内容的编 码方式;
或, 若状态信息为四个, 则发送端可以判断状态信息中的四个是 否满足预设条件, 若状态信息中的一个满足预设条件, 切换媒体内容的 编码方式。 这里不限定发送端和 /或接收端的中央处理器 CPU使用率、 网络带宽、 电量信息和发送端待发送的媒体内容信息的判断顺序, 若状 态信息中的一个满足预设条件, 切换媒体内容的编码方式。
其中,数据编码方式可以包括 H.264/AVC( Advanced Video Coding, 高级视频编码 )或 H.265/HEVC ( High Efficiency Video coding, 高效率 视频编码 ) 。
203、 若状态信息中的一个满足预设条件, 则发送端切换媒体内容 的编码方式。
示例性的, 可以不考虑状态信息中的三个, 通过判断状态信息中 的一个是否满足预设条件, 若状态信息中的一个满足预设条件, 则切换 媒体内容的编码方式。
可选的, 在不考虑网络带宽、 发送端和接收端的电量信息, 和发 送端待发送的媒体内容信息的情况下, 当通过判断 Source端的 CPU使 用率和 /或 Sink端的 CPU使用率时, 该预设条件为 Source端的 CPU使 用率和 /或 Sink端的使用率大于第一预设阔值,当 Source端当前判断的 状态信息为 Source端的 CPU使用率时, 若 Source端的 CPU使用率小 于或等于第一预设阔值, 则数据编码方式可以为高效率视频编码, 即 H.265编码方式,也可以为高级视频编码,即 H.264编码方式; 当 Source 端当前判断的状态信息为 Sink端的 CPU使用率时, 若 Sink端的 CPU 使用率小于或等于第一预设阔值,则数据编码方式可以为高效率视频编 码或高级视频编码; 当 Source 端当前判断的状态信息为 Source 端的 CPU使用率和 Sink端的 CPU使用率时, 若 Source端的 CPU使用率和 Sink端的 CPU使用率小于或等于第一预设阔值, 则数据编码方式可以 为高效率视频编码或高级视频编码;当所述发送端当前的编码方式为高 效率视频编码时, 若 Source端的 CPU使用率和 /或 Sink端的使用率大 于第一预设阔值, 则将高效率视频编码 H.265 切换为高级视频编码 H.264。 即在 Source端的 CPU使用率和 /或 Sink端的 CPU使用率比较 空闲的情况下, Source端使用 H.265编码方式对媒体内容进行编码, 如 果任意一方或者双方的 CPU使用率大于第一预设阔值, 切换到 H.264 编码方式对媒体内容进行编码。 其中, 第一预设阔值可以为 50%等, 也可以为其他值, 这里不做限定。
可选的, 在不考虑发送端和接收端的 CPU使用率、 发送端和接收 端的电量信息和发送端待发送的媒体内容信息的情况下,当判断状态信 息中发送端和 /或接收端的的网络带宽时, 预设条件为网络带宽小于第 二预设阔值; 若发送端的网络带宽和 /或接收端的网络带宽小于第二预 设阔值, 则发送端将高级视频编码切换为高效率视频编码。 当发送端当 前判断的状态信息为发送端的网络带宽时,若发送端的网络带宽大于或 等于第二预设阔值,则发送端的媒体内容的编码方式可以为高效率视频 编码,也可以为高级视频编码; 当发送端当前判断的状态信息为接收端 的网络带宽时, 若接收端的网络带宽大于或等于第二预设阔值, 则发送 端的媒体内容的编码方式可以为高效率视频编码,也可以为高级视频编 码; 当发送端当前判断的状态信息为发送端和接收端的网络带宽时, 若 发送端和接收端的网络带宽大于或等于第二预设阔值,则发送端的媒体 内容的编码方式可以为高效率视频编码,也可以为高级视频编码;其中, 第二预设阔值可以为 8Mbit/s等, 也可以为其它值, 这里不做限定。 例 如, 当前带宽小于 8Mbit/s时, 即当前带宽不充足, Source端使用高效 率视频编码 H.265对媒体内容进行编码, 当前带宽大于 8Mbit/s时, 即 带宽比较充足, 编码方式可以为高效率视频编码, 也可以为高级视频编 码。
可选的, 在不考虑发送端和接收端的中央处理器 CPU使用率、 网 络带宽信息, 和发送端待发送的媒体内容信息的情况下, 当判断状态信 息中发送端和 /或接收端的电量信息时, 预设条件为在发送端和接收端 未接电源时, 发送端和 /或接收端的剩余电量小于第三预设阔值, 第三 预设阈值为发送端和 /或接收端播放完媒体内容中还未播放的媒体内容 所需的电量;
示例性的, 当发送端当前判断的状态信息为发送端的电量信息时, 若发送端的剩余电量大于或等于对当前媒体内容中未播放完的媒体内 容所需的电量, 则媒体内容的编码方式可以为高效率视频编码,也可以 为高级视频编码; 当发送端当前判断的状态信息为接收端的电量信息 时,若接收端的剩余电量大于或等于对当前媒体内容中未播放完的媒体 内容所需的电量, 则媒体内容的编码方式为高效率视频编码, 也可以为 高级视频编码; 当发送端当前的媒体内容的编码方式为高效率视频编 码, 且当前判断的状态信息为发送端和接收端的电量信息时, 若发送端 和接收端的剩余电量大于或等于对当前媒体内容中未播放完的媒体内 容所需的电量,则编码方式为高效率视频编码,也可以为高级视频编码; 若发送端和 /或接收端的剩余电量小于对当前媒体内容中未播放完的媒 体内容所需的电量, 小于第三预设阔值, 则发送端将高效率视频编码切 换为高级视频编码。
其中, 在发送端和接收端都不接电源的情况下, 可以根据发送端 中当前媒体内容播放的总时长,发送端在单位时间内对当前媒体内容的 视频数据进行编码所消耗的电量,获取当前媒体内容中未播放完的媒体 内容对应的视频数据包进行编码所需的电量,即发送端要播放完剩余未 播放的媒体内容需要的时长, 同时, 可以根据接收端中当前媒体内容播 放的总时长,接收端在单位时间内对当前媒体内容的视频数据进行解码 所消耗的电量,获取当前媒体内容中未播放完的媒体内容对应的视频数 据包进行解码所需的电量,即接收端要播放完剩余未播放的媒体内容需 要的时长。
当发送端和 /或接收端的电量信息满足预设条件时, 说明发送端和 接收端任意一方电量不充足, 或同时都不充足时, 将高效率视频编码切 换为高级视频编码。
示例性的, 当发送端在未接电源的情况下, 若发送端当前判断的 状态信息为发送端电量信息,发送端的剩余电量大于或等于对当前媒体 内容中未播放完的媒体内容所需的电量, 则编码方式为高效率视频编 码, 也可以为高级视频编码; 若发送端的剩余电量小于对当前媒体内容 中未播放完的媒体内容进行编码且将未播放完的媒体内容发送至接收 端所需的电量, 小于第三预设阔值, 则发送端将高效率视频编码切换为 高级视频编码。 可选的, 在不考虑发送端和接收端的 CPU使用率、 网络带宽, 和 发送端和接收端的电量信息的情况下,当判断发送端待发送的媒体内容 信息时, 预设条件为发送端待发送的媒体内容的大小和 /或分辨率和 /或 帧率大于第四预设阔值。若发送端待发送的媒体内容信息小于或等于第 四预设阔值, 则媒体内容的编码方式可以为高效率视频编码, 也可以为 高级视频编码; 当发送端当前的媒体内容的编码方式为高级视频编码 时, 若发送端待发送的媒体内容的大小和 /或分辨率和 /或帧率大于第四 预设阔值, 则发送端将高级视频编码切换为高效率视频编码。 这里的第 四预设阔值可以为 4k/8k/3D, 也可以为其它值, 这里不 ^1限定。
举例说明, 当同时考虑待发送媒体内容的大小和待发送媒体内容 的分辨率时, 在发送端播放完一个媒体内容后, 下一个待播放媒体内容 的媒体内容大小为 3G没有达到媒体内容大小的预设阔值 10G, 分辨率 大小达到第四预设阔值为 8K, 发送端将高级视频编码切换为高效率视 频编码。 或者, 同时考虑待发送媒体内容的分辨率和帧率时, 分辨率大 小达到第四预设阔值为 8K, 帧率没有达到第四预设阔值 60帧 /s, 发送 端将高级视频编码切换为高效率视频编码。 当然,对于待发送的媒体内 容的大小、 分辨率和帧率, 其第四预设阔值分别不同。
可选的, 可以不考虑状态信息中的两个信息, 判断状态信息中剩 余的两个是否满足预设条件, 若状态信息中的一个满足预设条件, 则切 换数据编码方式。 例如, 不考虑发送端和接收端的电量信息, 和发送端 待发送的媒体内容信息, 判断发送端和 /或接收端的中央处理器 CPU使 用率、 网络带宽是否满足预设条件, 这里不限定发送端和 /或接收端的 中央处理器 CPU使用率、 网络带宽信息的判断顺序, 若状态信息中的 一个满足预设条件, 则切换数据编码方式。
示例性的, 当判断发送端和接收端的中央处理器 CPU使用率、 网 络带宽时, 先判断发送端和接收端的中央处理器 CPU使用率是否大于 预设阔值,若发送端的 CPU使用率和接收端的 CPU使用率小于或等于 第一预设阔值,媒体内容的编码方式为高效率视频编码或者高级视频编 码, 不满足预设条件, 进而不切换媒体内容的编码方式, 而后, 判断网 络带宽信息是否小于第二预设阔值, 若网络带宽小于第二预设阔值, 满 足预设条件, 当前的编码方式为高级视频编码, 则将高级视频编码切换 为高效率视频编码。
可选的, 可以不考虑状态信息中的一个信息, 判断状态信息中剩 余的三个是否满足预设条件, 若状态信息中的一个满足预设条件, 则切 换数据编码方式。
示例性的, 当不考虑发送端待发送的媒体内容信息时, 判断发送 端和 /或接收端的状态信息, 状态信息包括发送端和 /或接收端的中央处 理器 CPU使用率、 网络带宽、 电量信息, 这里不限定该状态信息中的 这三个的判断顺序。 例如, 先判断发送端和接收端的中央处理器 CPU 使用率是否大于第一预设阔值, 若发送端的 CPU 使用率和接收端的 CPU 使用率小于或等于第一预设阔值, 媒体内容的编码方式为高效率 视频编码或者高级视频编码, 不满足预设条件, 进而不切换编码方式, 而后, 判断网络带宽是否大于第二预设阔值, 若网络带宽大于第二预设 阔值, 不满足预设条件, 进而不切换编码方式, 最后, 判断发送端的剩 余电量小于对当前媒体内容中未播放完的媒体内容对应的视频数据包 进行编码所需的电量,和接收端的剩余电量是否小于对当前媒体内容中 未播放完的媒体内容对应的视频数据包进行解码所需的电量,若发送端 的剩余电量小于对当前媒体内容中未播放完的媒体内容对应的视频数 据包进行编码所需的电量, 和 /或接收端的剩余电量大于或等于对当前 媒体内容中未播放完的媒体内容对应的视频数据包进行解码所需的电 量, 当前的编码方式为高效率视频编码, 则将高效率视频编码切换为高 级视频编码。 可选的, 可以将状态信息中的四个进行综合考虑, 判断状态信息 中的四个是否满足预设条件, 若状态信息中的一个满足预设条件, 则切 换媒体内容的编码方式,其判断过程与判断状态信息中的三个是否满足 预设条件的方法类似, 这里不再赘述。
可选的, 若状态信息为至少两个, 则可以判断状态信息中的至少 一个是否满足预设条件, 若状态信息中的一个满足预设条件, 则切换媒 体内容的编码方式, 与上述判断方法类似;
或, 若状态信息为至少两个, 发送端可以根据状态信息的权重值 对状态信息进行加权获取加权结果,将加权结果与第五预设阈值进行比 较, 若加权结果小于第五预设阔值, 当前的媒体内容的编码方式为高级 视频编码, 则发送端将高级视频编码切换为高效率视频编码。
示例性的, 可以将发送端和 /或接收端的中央处理器 CPU使用率、 网络带宽信息、 电量信息, 和发送端待发送的媒体内容信息进行综合考 虑, 即若状态信息为四个,发送端根据状态信息的权重值判断状态信息 是否满足预设条件,预设条件为状态信息当前的权重值小于第五预设阔 值。 具体的, 可以通过设定发送端和 /或接收端的 CPU使用率、 网络带 宽、 电量信息, 和发送端待发送的媒体内容信息分别占不同的权重, 通 过加权算法获取一个标准权重值, 该标准权重值可以为第五预设阔值。 例如 CPU使用率占 3.5 , 网络带宽占 3.5 , 电量信息占 2.0和发送端待 发送的媒体内容信息占 1.0。 而后, 通过对状态信息中发送端和 /或接收 端的 CPU使用率、 网络带宽、 电量信息, 和发送端待发送的媒体内容 信息进行加权获取状态信息当前的权重值, 而后, 将状态信息当前的权 重值与第五预设阔值进行比较。
在将状态信息当前的权重值与第五预设阔值进行比较时, 若状态 信息当前的权重值大于或等于第五预设阔值,则数据编码方式为高效率 视频编码或者高级视频编码,若状态信息当前的权重值小于第五预设阔 值, 当前发送端的编码方式为高级视频编码, 则发送端将高级视频编码 切换为高效率视频编码。
204、 发送端向接收端发送通知消息, 通知消息中携带切换后的媒 体内容的编码方式标识,和需要切换媒体内容的编码方式的起始数据包 的编号或位置信息,以便于接收端根据通知消息确定媒体内容的解码方 式。
示例性的, 在 H.624和 H.265编码方式中, 都是以 NAL ( Network abstract Layer, 网络抽象层 )封装 VCL ( Video Coding layer, 视频编码 层) 数据, 一个 NAL封装的视频数据包可以认为是一组数据, 一个分 组中有大于一帧图像的数据, 可以以一个 NAL视频数据包为单位来切 换数据编码方式, 这样, 一个 NAL视频数据包内部图像的编码方式是 一致的。 因此, 当发送端在编码当前视频数据包时, 若当前视频数据包 之后的第 N个视频数据包需要切换数据编码方式, 则发送端向接收端 发送通知消息,通知消息中携带切换后的媒体内容的编码方式标识, 和 需要切换媒体内容的编码方式的起始数据包的编号,即消息中携带第 N 个视频数据包的编号和第 N个视频数据包的编码方式标识, 以便于接 收端根据通知消息, 获取第 N个视频数据包的解码方式。 其中, N为 大于或等于 1的正整数。 或者, 通知消息中携带切换后的媒体内容的编 码方式标识, 和需要切换媒体内容的编码方式的位置信息。 例如, 在发 送端和接收端的时间同步的情况下,通知消息包括需要切换编码方式时 的时间信息和数据编码方式标识,以便于接收端在该时间信息解码视频 数据包时, 根据数据编码方式标识确定该视频数据包的数据解码方式。 或者, 该位置信息可以为需要切换媒体内容的编码方式的字节信息, 例 如接收端在解码到所述字节信息的字节时, 切换媒体内容的解码方式。
该通知消息可以通过 RT SP SET— PARAMETER ( ) 方法通知给接 收端媒体内容的编码方式标识,和需要切换媒体内容的编码方式的起始 数据包的编号或位置信息,接收端的解码器根据通知消息中媒体内容的 编码方式标识和需要切换媒体内容的编码方式的起始数据包的编号或 位置信息,在解码当前视频数据包之后的第 N个视频数据包时, 同步切 换当前的媒体内容的解码方式。
205、 发送端向接收端发送媒体内容的数据包中携带切换后的媒体 内容的编码方式标识,以便于接收端根据编码方式标识确定媒体内容的 解码方式。
示例性的, 当发送端在通过 RTP ( Real-time Transport Protocol, 实时传输协议 )方式打包 NAL数据包时, 在 RTP的视频数据包的包头 中携带切换后的媒体内容的编码方式标识,以便于在接收端接收 'J该数 据包时, 通过解码器解码 RTP数据包的包头确定该视频数据包的解码 方式,若该视频数据包的编码方式标识与接收到的上一个数据包的编码 方式标识相同, 则不切换解码器的解码方式; 若该视频数据包的编码方 式标识与接收到的上一个数据包的编码方式标识不同,则切换解码器的 解码方式。
在上述说明过程中, 在相同画质下, H.265的压缩率是 H.264的 2 倍, 但是 H.265的编码算法复杂度是 H.264的 5倍, 解码算法复杂度是 H.264的 2〜3倍, 也就是 H.265编码算法增加了编码器和解码器的功耗 和 CPU的负担, 因此, 在通过对发送端和 /或接收端的状态信息, 状态 信息包括发送端和 /或接收端的中央处理器 CPU使用率、 网络带宽、 电 量信息, 和发送端待发送的媒体内容信息的状态判断, 可以在不适用于
H.265编码算法的时候切换至 H.264编码算法, 降低了 H.265编码算法 复杂度高带来的负面影响,发挥了 H.265编码算法和 H.264编码算法的 优势, 在实际应用中提高用户体验。 本发明实施例提供一种切换编码方式的方法, 发送端获取发送端 和 /或接收端的状态信息, 状态信息包括发送端和 /或接收端的中央处理 器 CPU使用率、 网络带宽、 电量信息和发送端待发送的媒体内容信息, 判断状态信息中的至少一个是否满足预设条件,若状态信息中的一个满 足预设条件, 则切换媒体内容的编码方式,发送端将媒体内容的编码方 式通知给接收端,以便于接收端根据媒体内容的编码方式确定媒体内容 的解码方式, 能够随编码方式的切换提高用户体验。
本发明又一实施例提供一种切换编码方式的方法, 如图 3 所示, 包括:
301、 接收端获取发送端和 /或接收端的状态信息, 状态信息包括发 送端和 /或接收端的中央处理器 CPU使用率、 网络带宽、 电量信息和发 送端待发送的媒体内容信息中至少一个。
该步骤的实现方式与图 1 所示的实施例中步骤 101 类似, 这里不 再赘述。
302、 接收端判断状态信息中的至少一个是否满足预设条件, 若状 态信息中的一个满足预设条件, 则向发送端发送请求切换消息, 以便于 发送端根据请求切换; %息切换媒体内容的编码方式。
该步骤的实现方式与图 1 所示的实施例中步骤 102类似, 这里不 再赘述。
303、 接收端根据发送端通知的媒体内容的编码方式确定媒体内容 的解码方式。
该步骤的实现方式与图 1 所示的实施例中步骤 103 类似, 这里不 再赘述。
本发明实施例提供一种切换编码方式的方法, 接收端获取发送端 和 /或接收端的状态信息, 状态信息包括发送端和 /或接收端的中央处理 器 CPU使用率、 网络带宽、 电量信息和发送端待发送的媒体内容信息, 判断状态信息中的至少一个是否满足预设条件,若状态信息中的一个满 足预设条件, 则向所发送端发送请求切换消息, 以便于发送端根据请求 切换消息切换媒体内容的编码方式,能够随媒体内容的编码方式的切换 提高用户体验。 本发明又一实施例提供一种切换编码方式的方法, 如图 4 所示, 包括:
401、 接收端获取发送端和 /或接收端的状态信息, 状态信息包括发 送端和 /或接收端的中央处理器 CPU使用率、 网络带宽、 电量信息和发 送端待发送的媒体内容信息中至少一个。
该步骤的实现方式与图 2所示的实施例中步骤 201 类似, 这里不 再赘述。
402、 接收端判断状态信息中的至少一个是否满足预设条件。
该步骤的实现方式与图 2所示的实施例中步骤 202类似, 这里不 再赘述。
403、 若状态信息中的一个满足预设条件, 则接收端向发送端发送 请求切换消息,以便于发送端根据请求切换消息切换媒体内容的编码方 式。
该步骤的实现方式与图 2所示的实施例中步骤 203 类似, 这里不 再赘述。
其中, 当按照预设方式依次判断状态信息中的至少一个是否满足 预设条件, 若状态信息中的一个满足预设条件, 则接收端向发送端发送 请求切换消息,以便于发送端根据请求切换消息切换媒体内容的编码方 式。
404、 接收端接收发送端发送的通知消息, 通知消息中携带发送端 切换后的媒体内容的编码方式标识和需要切换媒体内容的编码方式的 起始数据包的编号或位置信息,以便于接收端根据通知消息确定媒体内 容的解码方式。
该步骤的实现方式与图 2所示的实施例中步骤 204类似, 这里不 再赘述。
405、 当接收端接收发送端发送的媒体内容时, 接收端根据媒体内 容的数据包中携带切换后的媒体内容的编码方式标识,确定媒体内容的 解码方式。
该步骤的实现方式与图 2所示的实施例中步骤 205类似, 这里不 再赘述。
本发明实施例提供一种切换编码方式的方法, 接收端获取发送端 和 /或接收端的状态信息, 状态信息包括发送端和 /或接收端的中央处理 器 CPU使用率、 网络带宽、 电量信息和发送端待发送的媒体内容信息 中至少一个, 判断状态信息中的至少一个是否满足预设条件, 若状态信 息中的一个满足预设条件, 向所发送端发送请求切换消息, 以便于发送 端根据请求切换消息切换媒体内容的编码方式,根据发送端的媒体内容 的编码方式确定媒体内容的解码方式,能够随媒体内容编码方式的切换 提高用户体验。 本发明又一实施例提供一种发送端 01 , 如图 5所示, 包括: 获取单元 01 1 , 用于获取发送端和 /或接收端的状态信息, 状态信 息包括发送端和 /或接收端的中央处理器 CPU使用率、 网络带宽、 电量 信息和发送端待发送的媒体内容信息中至少一个。
处理单元 012 , 用于判断状态信息中的至少一个是否满足预设条 件, 若状态信息中的一个满足预设条件, 则切换媒体内容的编码方式。
发送单元 013 还用于将发送端的数据编码方式通知给接收端, 以 便于接收端根据媒体内容的编码方式确定媒体内容的解码方式。
可选的, 待发送的媒体内容信息为发送端待发送的媒体内容的大 小, 和 /或发送端待发送的媒体内容的分辨率, 和 /或发送端待发送的媒 体内容的帧率;
数据编码方式为高级视频编码 H.264或高效率视频编码 H.265。 可选的, 处理单元 012 可以用于若发送端当前判断的状态信息为 CPU使用率时, 预设条件为发送端的 CPU使用率和 /或接收端的 CPU 使用率大于第一预设阔值;
处理单元 012可以用于若发送端的 CPU使用率和 /或接收端的 CPU 使用率大于第一预设阔值,则处理单元确定将高效率视频编码切换为高 级视频编码。
可选的, 处理单元 012 可以用于若发送端当前判断的状态信息为 网络带宽时, 预设条件为网络带宽小于第二预设阔值;
处理单元 012可以用于若发送端的网络带宽和 /或接收端的网络带 宽小于第二预设阔值,则处理单元确定将高级视频编码切换为高效率视 频编码。
可选的, 处理单元 012 可以用于若发送端当前判断的状态信息为 电量信息时, 预设条件为当发送端和 /或接收端未接电源时, 发送端和 / 或接收端的剩余电量小于第三预设阔值, 第三预设阔值为发送端和 /或 接收端播放完媒体内容中还未播放的媒体内容所需的电量;
处理单元 012可以用于若发送端和 /或接收端的剩余电量小于第三 预设阔值, 则处理单元将高效率视频编码切换为高级视频编码。
可选的, 处理单元 012 可以用于若发送端当前判断的状态信息为 小和 /或分辨率和 /或帧率大于第四预设阔值; 处理单元 012可以用于若发送端待发送的媒体内容的大小和 /或分 辨率和 /或帧率大于第四预设阔值, 则发送端将高级视频编码切换为高 效率视频编码。
可选的, 若状态信息为至少两个, 则处理单元 012 判断状态信息 中的至少一个是否满足预设条件, 若状态信息中的一个满足预设条件, 则切换媒体内容的编码方式;
或, 若状态信息为至少两个, 处理单元 012 根据状态信息的权重 值对状态信息进行加权获取加权结果;
处理单元 012 将加权结果与第五预设阈值进行比较, 若加权结果 小于第五预设阔值, 则发送端将高级视频编码切换为高效率视频编码。
可选的, 发送单元 013可以用于:
向接收端发送通知消息, 通知消息中携带切换后的媒体内容的编 码方式标识,和需要切换媒体内容的编码方式的起始数据包的编号或位 置信息, 以便于接收端根据通知消息确定媒体内容的解码方式;
或, 发送端向接收端发送媒体内容的数据包中携带切换后的媒体 内容的编码方式标识,以便于接收端根据编码方式标识确定媒体内容的 解码方式。
本发明实施例提供一种发送端, 发送端获取发送端和 /或接收端的 状态信息,状态信息包括发送端和 /或接收端的中央处理器 C P U使用率、 网络带宽、 电量信息和发送端待发送的媒体内容信息中至少一个, 判断 状态信息中的至少一个是否满足预设条件,若状态信息中的一个满足预 设条件, 则切换媒体内容的编码方式,将发送端的媒体内容的编码方式 通知给接收端,以便于接收端根据媒体内容的编码方式确定媒体内容的 解码方式, 能够随媒体内容的编码方式的切换提高用户体验。
本发明又一实施例提供一种接收端 02 , 如图 6所示, 包括: 获取单元 021 , 用于获取发送端和 /或接收端的状态信息, 状态信 息包括发送端和 /或接收端的中央处理器 CPU使用率、 网络带宽、 电量 信息和发送端待发送的媒体内容信息中至少一个。
处理单元 022 , 用于判断状态信息中的至少一个是否满足预设条 件 ,若状态信息中的一个满足预设条件 ,则向发送端发送请求切换消息 , 以便于发送端根据请求切换消息切换媒体内容的编码方式。
处理单元 022 还用于根据发送端通知的媒体内容的编码方式确定 媒体内容的解码方式。
可选的, 待发送的媒体内容信息为发送端待发送的媒体内容的大 小, 和 /或发送端待发送的媒体内容的分辨率, 和 /或发送端待发送的媒 体内容的帧率;
编码方式为高级视频编码 H.264或高效率视频编码 H.265。
可选的, 处理单元 022 可以用于若接收端当前判断的状态信息为 CPU使用率时,则预设条件为发送端的 CPU使用率和 /或接收端的 CPU 使用率大于第一预设阔值;
处理单元 022可以用于若发送端的 CPU使用率和 /或接收端的 CPU 使用率大于第一预设阔值,接收端向发送端发送请求切换消息, 以便于 发送端根据请求切换消息将高效率视频编码切换为高级视频编码。
可选的, 处理单元 022 可以用于若接收端当前判断的状态信息为 网络带宽时, 预设条件为网络带宽小于第二预设阔值;
处理单元 022可以用于若发送端的网络带宽信息和 /或接收端的网 络带宽信息小于第二预设阔值, 则接收端向发送端发送请求切换消息, 以便于发送端根据请求切换消息将高级视频编码切换为高效率视频编 码。
可选的, 处理单元 022 可以用于若接收端当前判断的状态信息为 电量信息时, 则预设条件为当发送端和 /或接收端未接电源时, 发送端 和 /或接收端的剩余电量小于第三预设阔值, 第三预设阔值为发送端和 / 或接收端播放完媒体内容中还未播放的媒体内容所需的电量;
处理单元 022可以用于若发送端和 /或接收端的剩余电量小于第三 预设阈值, 则接收端向发送端发送请求切换消息, 以便于发送端根据请 求切换消息将高效率视频编码切换为高级视频编码。
可选的, 处理单元 022 可以用于接收端当前判断的状态信息为发 送端待发送的媒体内容信息时,预设条件为发送端待发送的媒体内容的 大小和 /或分辨率和 /或帧率大于第四预设阔值;
处理单元 022 可以用于若发送端待发送的媒体内容的大小和 /或分 辨率和 /或帧率大于第四预设阔值, 则向发送端发送请求切换消息, 以 便于发送端根据请求切换消息将高级视频编码切换为高效率视频编码。
可选的, 若状态信息为至少两个, 则处理单元 024 判断状态信息 中的至少一个是否满足预设条件, 若状态信息中的一个满足预设条件, 则向发送端发送请求切换消息,以便于发送端根据请求切换消息切换媒 体内容的编码方式;
或, 若状态信息为至少两个, 处理单元 024 可以根据状态信息的 权重值对状态信息进行加权获取加权结果;
将加权结果与第五预设阈值进行比较, 若加权结果小于第五预设 阔值, 则接收端向发送端发送请求切换消息, 以便于发送端根据请求切 换消息将高级视频编码切换为高效率视频编码。
可选的, 若接收端在解码当前视频数据包, 接收单元 023 接收单 元接收发送端发送的通知消息,通知消息中携带发送端切换后的媒体内 容的编码方式标识和需要切换媒体内容的编码方式的起始数据包的编 号或位置信息, 以便于处理单元根据通知消息确定媒体内容的解码方 式;
或, 当接收单元接收发送端发送的媒体内容时, 处理单元根据媒 体内容的数据包中携带切换后的媒体内容的编码方式标识,确定媒体内 容的解码方式。
本发明实施例提供一种接收端, 接收端获取发送端和 /或接收端的 状态信息,状态信息包括发送端和 /或接收端的中央处理器 C P U使用率、 网络带宽、 电量信息和发送端待发送的媒体内容信息中至少一个, 判断 状态信息中的至少一个是否满足预设条件,若状态信息中的一个满足预 设条件, 则向发送端发送请求切换消息, 以便于发送端根据请求切换消 息切换媒体内容的编码方式,根据发送端的媒体内容的编码方式确定媒 体内容的数据解码方式,能够随媒体内容的编码方式的切换提高用户体 验。
本发明又一实施例提供一种发送端 03 , 如图 7所示, 该发送端 03 包括: 总线 031、处理器 032、发射器 033、接收器 034以及存储器 035 , 其中, 该存储器 035用于存储指令, 该处理器 032用于执行该指令用于 获取发送端和 /或接收端的状态信息, 状态信息包括发送端和 /或接收端 的中央处理器 CPU使用率、 网络带宽、 电量信息和发送端待发送的媒 体内容信息中至少一个;该处理器 032用于执行该指令用于判断状态信 息中的至少一个是否满足预设条件, 若状态信息中的一个满足预设条 件, 则切换媒体内容的编码方式; 该发射器 033用于执行该指令用于将 发送端的媒体内容的编码方式通知给接收端,以便于接收端根据媒体内 容的编码方式确定媒体内容的解码方式。
在本发明实施例中, 可选的, 待发送的媒体内容信息为发送端待 发送的媒体内容的大小, 和 /或发送端待发送的媒体内容的分辨率, 和 / 或发送端待发送的媒体内容的帧率; 数据编码方式为高级视频编码 H.264或高效率视频编码 H.265。 在本发明实施例中, 可选的, 处理器 032 用于若发送端当前判断 的状态信息为 CPU使用率时, 预设条件为发送端的 CPU使用率和 /或 接收端的 CPU使用率大于第一预设阔值;
处理器 032用于若发送端的 CPU使用率和 /或接收端的 CPU使用 率大于第一预设阔值, 则发送端将高效率视频编码切换为高级视频编 码。
在本发明实施例中, 可选的, 处理器 032 用于执行若发送端当前 判断的状态信息为网络带宽时, 预设条件为网络带宽大于第二预设阔 值;
处理器 032用于执行该指令包括若发送端的网络带宽和 /或接收端 的网络带宽小于第二预设阔值,则发送端将高级视频编码切换为高效率 视频编码。
在本发明实施例中, 可选的, 处理器 032 用于执行若发送端当前 判断的状态信息为电量信息时, 则预设条件为当发送端和 /或接收端未 接电源时, 发送端和 /或接收端的剩余电量小于第三预设阔值, 第三预 设阔值为发送端和 /或接收端播放完媒体内容中还未播放的媒体内容所 需的电量;
处理器 032用于执行该指令包括若发送端和 /或接收端的剩余电量 小于第三预设阔值, 则发送端将高效率视频编码切换为高级视频编码。
在本发明实施例中, 可选的, 处理器 032 用于执行若发送端当前 判断的状态信息为发送端待发送的媒体内容信息,则预设条件为发送端 待发送的媒体内容的大小和 /或分辨率和 /或帧率大于第四预设阔值; 处理器 032 用于执行该指令包括若发送端待发送的媒体内容的大 小和 /或分辨率和 /或帧率大于第四预设阔值, 则发送端将高级视频编码 切换为高效率视频编码。
在本发明实施例中, 可选的, 若状态信息为至少两个, 则处理器
032判断状态信息是否满足预设条件, 若状态信息中的一个满足预设条 件, 则切换媒体内容的编码方式;
或, 发送端根据状态信息的权重值对状态信息进行加权获取加权 结果;
发送端将加权结果与第五预设阈值进行比较, 若加权结果小于第 五预设阔值, 则发送端将高级视频编码切换为高效率视频编码。
在本发明实施例中, 可选的, 发射器 033 用于执行发送端将发送 端的媒体内容的编码方式通知给接收端,以便于接收端根据媒体内容的 编码方式确定媒体内容的解码方式包括:
发送端向接收端发送通知消息, 通知消息中携带切换后的媒体内 容的编码方式标识,和需要切换媒体内容的编码方式的起始数据包的编 号或位置信息, 以便于接收端根据通知消息确定媒体内容的解码方式; 或, 发送端向接收端发送媒体内容的数据包中携带切换后的媒体 内容的编码方式标识,以便于接收端根据编码方式标识确定媒体内容的 解码方式。
本发明实施例提供一种发送端, 发送端获取发送端和 /或接收端的 状态信息,状态信息包括发送端和 /或接收端的中央处理器 C P U使用率、 网络带宽、 电量信息和发送端待发送的媒体内容信息中至少一个, 判断 状态信息中的至少一个是否满足预设条件,若状态信息中的一个满足预 设条件, 则切换媒体内容的编码方式,将发送端的媒体内容的编码方式 通知给接收端,以便于接收端根据媒体内容的编码方式确定媒体内容的 解码方式, 能够随媒体内容的编码方式的切换提高用户体验。
本发明又一实施例提供一种接收端 04 , 如图 8所示, 该发送端 04 包括: 总线 041、处理器 042、发射器 043、接收器 044以及存储器 045 , 其中, 该存储器 045用于存储指令, 该处理器 042用于执行该指令用于 获取发送端和 /或接收端的状态信息, 状态信息包括发送端和 /或接收端 的中央处理器 CPU使用率、 网络带宽信息、 电量信息和发送端待发送 的媒体内容信息中至少一个;处理器 042用于执行该指令用于判断状态 信息中的至少一个是否满足预设条件,若状态信息中的一个满足预设条 件, 则向发送端发送请求切换消息, 以便于发送端根据请求切换消息切 换媒体内容的编码方式;处理器 042用于执行该指令用于接收端根据发 送端通知的媒体内容的编码方式确定媒体内容的解码方式。
在本发明实施例中, 可选的, 待发送的媒体内容信息为发送端待 发送的媒体内容的大小, 和 /或发送端待发送的媒体内容的分辨率, 和 / 或发送端待发送的媒体内容的帧率;
编码方式为高级视频编码 H.264或高效率视频编码 H.265。
在本发明实施例中, 可选的, 处理器 042 用于执行若接收端当前 判断的状态信息为 CPU使用率,则预设条件为发送端的 CPU使用率和 /或接收端的 CPU使用率大于第一预设阔值;
处理器 042用于执行该指令用于:
若发送端的 CPU使用率和 /或接收端的 CPU使用率大于第一预设 阔值,接收端向发送端发送请求切换消息, 以便于发送端根据请求切换 消息将高效率视频编码切换为高级视频编码。
在本发明实施例中, 可选的, 处理器 042 用于执行若接收端当前 判断的状态信息为网络带宽时, 预设条件为网络带宽小于第二预设阔 值;
处理器 042用于执行该指令包括:
若发送端的网络带宽和 /或接收端的网络带宽小于第二预设阔值, 则接收端向发送端发送请求切换消息,以便于发送端根据请求切换消息 将高级视频编码切换为高效率视频编码。
在本发明实施例中, 可选的, 处理器 042 用于若接收端当前判断 的状态信息为电量信息时, 则预设条件为当发送端和 /或接收端未接电 源时, 发送端和 /或接收端的剩余电量小于第三预设阔值, 第三预设阔 值为发送端和 /或接收端播放完媒体内容中还未播放的媒体内容所需的 电量;
处理器 042用于执行该指令包括:
若发送端和 /或接收端的剩余电量小于第三预设阔值, 则接收端向 发送端发送请求切换消息,以便于发送端根据请求切换消息将高效率视 频编码切换为高级视频编码。
在本发明实施例中, 可选的, 处理器 042 用于若接收端当前判断 的状态信息为发送端待发送的媒体内容信息时,预设条件为发送端待发 送的媒体内容的大小和 /或分辨率和 /或帧率大于第四预设阔值;
处理器 042用于执行该指令包括:
若发送端待发送的媒体内容的大小和 /或分辨率和 /或帧率大于第 四预设阈值, 则接收端向发送端发送请求切换消息, 以便于发送端根据 请求切换消息将高级视频编码切换为高效率视频编码。
在本发明实施例中, 可选的, 若状态信息为至少两个, 则接收端 判断状态信息中的至少一个是否满足预设条件,若状态信息中的一个满 足预设条件, 则向发送端发送请求切换消息, 以便于发送端根据请求切 换消息切换媒体内容的编码方式;
或, 若状态信息为至少两个, 处理器 042 用于根据状态信息的权 重值对状态信息进行加权获取加权结果;
接收端将加权结果与第五预设阈值进行比较, 若加权结果小于第 五预设阈值, 则接收端向发送端发送请求切换消息, 以便于发送端根据 请求切换消息将高级视频编码切换为高效率视频编码。
在本发明实施例中, 可选的, 处理器 042 用于执行接收端根据发 送端通知的媒体内容的编码方式确定媒体内容的解码方式包括:
接收端接收发送端发送的通知消息, 通知消息中携带发送端切换 后的媒体内容的编码方式标识和需要切换媒体内容的编码方式的起始 数据包的编号或位置信息,以便于接收端根据通知消息确定媒体内容的 解码方式;
或, 当接收端接收发送端发送的媒体内容时, 接收端根据媒体内 容的数据包中携带切换后的媒体内容的编码方式标识,确定媒体内容的 解码方式。
本发明实施例提供一种接收端, 接收端获取发送端和 /或接收端的 状态信息,状态信息包括发送端和 /或接收端的中央处理器 C P U使用率、 网络带宽、 电量信息和发送端待发送的媒体内容信息, 判断状态信息中 的至少一个是否满足预设条件, 若状态信息中的一个满足预设条件, 则 向发送端发送请求切换消息,以便于发送端根据请求切换消息切换媒体 内容的编码方式, 并根据发送端的媒体内容的编码方式确定解码方式, 能够随媒体内容的编码方式的切换提高用户体验。
在本申请所提供的几个实施例中, 应该理解到, 所揭露的方法、 接收端和发送端, 可以通过其它的方式实现。 例如, 以上所描述的设备 实施例仅仅是示意性的, 例如, 所述单元的划分, 仅仅为一种逻辑功能 划分, 实际实现时可以有另外的划分方式, 例如多个单元或组件可以结 合或者可以集成到另一个系统, 或一些特征可以忽略, 或不执行。 另一 点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过 一些接口, 装置或单元的间接耦合或通信连接, 可以是电性, 机械或其 它的形式。
另外, 在本发明各个实施例中的设备和系统中, 各功能单元可以 集成在一个处理单元中, 也可以是各个单元单独物理包括,也可以两个 或两个以上单元集成在一个单元中。且上述的各单元既可以釆用硬件的 形式实现, 也可以釆用硬件加软件功能单元的形式实现。
实现上述方法实施例的全部或部分步骤可以通过程序指令相关的 硬件来完成, 前述的程序可以存储于一计算机可读取存储介质中, 该程 序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:
U盘、 移动硬盘、 只读存储器 (Read Only Memory, 简称 ROM ) 、 随 机存取存储器 (Random Access Memory, 简称 RAM ) 、 磁碟或者光盘 等各种可以存储程序代码的介质。
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并 不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围 内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。 因此, 本发明的保护范围应以所述权利要求的保护范围为准。

Claims

权 利 要求 书
1、 一种切换编码方式的方法, 其特征在于, 包括:
发送端获取所述发送端和 /或接收端的状态信息, 所述状态信息包括 所述发送端和 /或所述接收端的中央处理器 CPU使用率、 网络带宽、 电量 信息和所述发送端待发送的媒体内容信息中至少一个;
所述发送端判断所述状态信息中的至少一个是否满足预设条件, 若 所述状态信息中的一个满足所述预设条件, 则切换媒体内容的编码方式; 所述发送端将所述发送端的媒体内容的编码方式通知给所述接收 端, 以便于所述接收端根据所述媒体内容的编码方式确定所述媒体内容 的解码方式。
2、 根据权利要求 1所述的方法, 其特征在于, 所述待发送的媒体内 容信息为所述发送端待发送的媒体内容的大小, 和 /或所述发送端待发送 的媒体内容的分辨率, 和 /或所述发送端待发送的媒体内容的帧率;
所述编码方式为高级视频编码 H.264或高效率视频编码 H.265。
3、 根据权利要求 2所述的方法, 其特征在于, 若所述发送端当前判 断的状态信息为所述 CPU使用率时, 所述预设条件为所述发送端的 CPU 使用率和 /或所述接收端的 CPU使用率大于第一预设阔值;
所述若所述状态信息中的一个满足所述预设条件, 则切换所述媒体 内容的编码方式包括:
若所述发送端的 CPU使用率和 /或所述接收端的 CPU使用率大于所 述第一预设阈值, 则所述发送端将所述高效率视频编码切换为所述高级 视频编码。
4、 根据权利要求 2所述的方法, 其特征在于, 若所述发送端当前判 断的状态信息为所述网络带宽时, 所述预设条件为所述网络带宽小于第 二预设阔值;
所述若所述状态信息中的一个满足所述预设条件, 则切换所述媒体 内容的编码方式包括:
若所述发送端的网络带宽和 /或所述接收端的网络带宽小于所述第二 预设阈值, 则所述发送端将所述高级视频编码切换为所述高效率视频编 码。
5、 根据权利要求 2所述的方法, 其特征在于, 若所述发送端当前判 断的状态信息为所述电量信息时, 则所述预设条件为当所述发送端和 /或 所述接收端未接电源时, 所述发送端和 /或所述接收端的剩余电量小于第 三预设阔值, 所述第三预设阔值为所述发送端和 /或所述接收端播放完所 述媒体内容中还未播放的媒体内容所需的电量;
所述若所述状态信息中的一个满足所述预设条件, 则切换所述媒体 内容的编码方式包括:
若所述发送端和 /或所述接收端的剩余电量小于所述第三预设阔值, 则所述发送端将所述高效率视频编码切换为所述高级视频编码。
6、 根据权利要求 2所述的方法, 其特征在于, 若所述发送端当前判 断的状态信息为所述发送端待发送的媒体内容信息, 则所述预设条件为 所述发送端待发送的媒体内容的大小和 /或分辨率和 /或帧率大于第四预 设阔值;
所述若所述状态信息中的一个满足所述预设条件, 则切换所述媒体 内容的编码方式包括:
若所述发送端待发送的媒体内容的大小和 /或分辨率和 /或帧率大于 第四预设阔值, 则所述发送端将所述高级视频编码切换为所述高效率视 频编码。
7、 根据权利要求 2所述的方法, 其特征在于, 若所述状态信息为至 少两个, 则所述发送端判断所述状态信息中的至少一个是否满足所述预 设条件, 若所述状态信息中的一个满足所述预设条件, 则切换所述媒体 内容的编码方式; 或, 所述发送端根据所述状态信息的权重值对所述状态信息进行加 权获取加权结果;
所述发送端将所述加权结果与第五预设阈值进行比较, 若所述加权 结果小于所述第五预设阔值, 则所述发送端将所述高级视频编码切换为 所述高效率视频编码。
8、 根据权利要求 1至 7任意一项所述的方法, 其特征在于, 所述发 送端将所述发送端的媒体内容的编码方式通知给所述接收端, 以便于所 述接收端根据所述媒体内容的编码方式确定所述媒体内容的解码方式包 括:
所述发送端向所述接收端发送通知消息, 所述通知消息中携带切换 后的所述媒体内容的编码方式标识, 和需要切换所述媒体内容的编码方 式的起始数据包的编号或位置信息, 以便于所述接收端根据所述通知消 息确定所述媒体内容的解码方式;
或, 所述发送端向所述接收端发送所述媒体内容的数据包中携带切 换后的所述媒体内容的编码方式标识, 以便于所述接收端根据所述编码 方式标识确定所述媒体内容的解码方式。
9、 一种切换编码方式的方法, 其特征在于, 包括:
接收端获取发送端和 /或所述接收端的状态信息, 所述状态信息包括 所述发送端和 /或所述接收端的中央处理器 CPU使用率、 网络带宽、 电量 信息和所述发送端待发送的媒体内容信息中至少一个;
所述接收端判断所述状态信息中的至少一个是否满足预设条件, 若 所述状态信息中的一个满足所述预设条件, 则向所述发送端发送请求切 换消息, 以便于所述发送端根据所述请求切换消息切换媒体内容的编码 方式;
所述接收端根据所述发送端通知的媒体内容的编码方式确定所述媒 体内容的解码方式。
10、 根据权利要求 9 所述的方法, 其特征在于, 所述待发送的媒体 内容信息为所述发送端待发送的媒体内容的大小, 和 /或所述发送端待发 送的媒体内容的分辨率, 和 /或所述发送端待发送的媒体内容的帧率; 所述编码方式为高级视频编码 H.264或高效率视频编码 H.265。
11、 根据权利要求 10所述的方法, 其特征在于, 若所述接收端当前 判断的状态信息为所述 CPU 使用率, 则所述预设条件为所述发送端的 CPU使用率和 /或所述接收端的 CPU使用率大于第一预设阔值;
所述若所述状态信息中的一个满足所述预设条件, 则向所述发送端 发送请求切换消息包括:
若所述发送端的 CPU使用率和 /或所述接收端的 CPU使用率大于所 述第一预设阔值, 则所述接收端向所述发送端发送所述请求切换消息, 以便于所述发送端根据所述请求切换消息将所述高效率视频编码切换为 所述高级视频编码。
12、 根据权利要求 10所述的方法, 其特征在于, 若所述接收端当前 判断的状态信息为所述网络带宽时, 所述预设条件为所述网络带宽小于 第二预设阔值;
所述若所述状态信息中的一个满足所述预设条件, 则向所述发送端 发送请求切换消息包括:
若所述发送端的网络带宽和 /或所述接收端的网络带宽小于所述第二 预设阔值, 则所述接收端向所述发送端发送所述请求切换消息, 以便于 所述发送端根据所述请求切换消息将所述高级视频编码切换为所述高效 率视频编码。
13、 根据权利要求 10所述的方法, 其特征在于, 若所述接收端当前 判断的状态信息为所述电量信息时, 则所述预设条件为当所述发送端和 / 或所述接收端未接电源时, 所述发送端和 /或所述接收端的剩余电量小于 第三预设阔值, 所述第三预设阔值为所述发送端和 /或所述接收端播放完 所述媒体内容中还未播放的媒体内容所需的电量;
所述若所述状态信息中的一个满足所述预设条件, 则向所述发送端 发送请求切换消息包括:
若所述发送端和 /或所述接收端的剩余电量小于所述第三预设阔值, 则所述接收端向所述发送端发送所述请求切换消息, 以便于所述发送端 根据所述请求切换消息将所述高效率视频编码切换为所述高级视频编 码。
14、 根据权利要求 10所述的方法, 其特征在于, 若所述接收端当前 判断的状态信息为所述发送端待发送的媒体内容信息时, 所述预设条件 为所述发送端待发送的媒体内容的大小和 /或分辨率和 /或帧率大于第四 预设阔值;
所述若所述状态信息中的一个满足所述预设条件, 则向所述发送端 发送请求切换消息包括:
若所述发送端待发送的媒体内容的大小和 /或分辨率和 /或帧率大于 所述第四预设阔值, 则所述接收端向所述发送端发送所述请求切换消息, 以便于所述发送端根据所述请求切换消息将所述高级视频编码切换为所 述高效率视频编码。
15、 根据权利要求 10所述的方法, 其特征在于, 若所述状态信息为 至少两个, 则所述接收端判断所述状态信息中的至少一个是否满足所述 预设条件, 若所述状态信息中的一个满足所述预设条件, 则向所述发送 端发送请求切换消息, 以便于所述发送端根据所述请求切换消息切换媒 体内容的编码方式;
或, 所述接收端根据所述状态信息的权重值对所述状态信息进行加 权获取加权结果;
所述接收端将所述加权结果与第五预设阈值进行比较, 若所述加权 结果小于所述第五预设阔值, 则所述接收端向所述发送端发送所述请求 切换消息, 以便于所述发送端根据所述请求切换消息将所述高级视频编 码切换为所述高效率视频编码。
16、 根据权利要求 9至 15任意一项所述的方法, 其特征在于, 所述 接收端根据所述发送端通知的媒体内容的编码方式确定所述媒体内容的 解码方式包括:
所述接收端接收所述发送端发送的通知消息, 所述通知消息中携带 所述发送端切换后的所述媒体内容的编码方式标识和需要切换所述媒体 内容的编码方式的起始数据包的编号或位置信息, 以便于所述接收端根 据所述通知消息确定所述媒体内容的解码方式;
或, 当所述接收端接收所述发送端发送的所述媒体内容时, 所述接 收端根据所述媒体内容的数据包中携带切换后的所述媒体内容的编码方 式标识, 确定所述媒体内容的解码方式。
17、 一种发送端, 其特征在于, 包括:
获取单元, 用于获取所述发送端和 /或接收端的状态信息, 所述状态 信息包括所述发送端和 /或所述接收端的中央处理器 CPU使用率、 网络带 宽、 电量信息和所述发送端待发送的媒体内容信息中至少一个;
处理单元, 用于判断所述状态信息中的至少一个是否满足预设条件, 若所述状态信息中的一个满足所述预设条件, 则切换媒体内容的编码方 式; 端, 以便于所述接收端根据所述媒体内容的编码方式确定所述媒体内容 的解码方式。
18、 根据权利要求 17所述的发送端, 其特征在于, 所述待发送的媒 体内容信息为所述发送端待发送的媒体内容的大小, 和 /或所述发送端待 发送的媒体内容的分辨率, 和 /或所述发送端待发送的媒体内容的帧率; 所述编码方式为高级视频编码 H.264或高效率视频编码 H.265。
19、 根据权利要求 18所述的发送端, 其特征在于, 所述处理单元用 于若所述发送端当前判断的状态信息为所述 C P U使用率时, 所述预设条 件为所述发送端的 CPU使用率和 /或所述接收端的 CPU使用率大于第一 预设阔值;
若所述发送端的 CPU使用率和 /或所述接收端的 CPU使用率大于所 述第一预设阈值, 则所述处理单元确定将所述高效率视频编码切换为所 述高级视频编码。
20、 根据权利要求 18所述的发送端, 其特征在于, 所述处理单元用 于若所述发送端当前判断的状态信息为所述网络带宽时, 所述预设条件 为所述网络带宽小于第二预设阔值;
所述处理单元用于若所述发送端的网络带宽和 /或所述接收端的网络 带宽小于所述第二预设阔值, 则所述处理单元确定将所述高级视频编码 切换为所述高效率视频编码。
21、 根据权利要求 18所述的发送端, 其特征在于, 所述处理单元用 于若所述发送端当前判断的状态信息为所述电量信息时, 所述预设条件 为当所述发送端和 /或所述接收端未接电源时, 所述发送端和 /或所述接收 端的剩余电量小于第三预设阔值, 所述第三预设阔值为所述发送端和 /或 所述接收端播放完所述媒体内容中还未播放的媒体内容所需的电量; 所述处理单元用于若所述发送端和 /或所述接收端的剩余电量小于所 述第三预设阈值, 则所述处理单元将所述高效率视频编码切换为所述高 级视频编码。
22、 根据权利要求 18所述的发送端, 其特征在于, 所述处理单元用 于若所述发送端当前判断的状态信息为所述发送端待发送的媒体内容, 或帧率大于第四预设阔值;
所述处理单元用于若所述发送端待发送的媒体内容的大小和 /或分辨 率和 /或帧率大于第四预设阔值, 则所述发送端将所述高级视频编码切换 为所述高效率视频编码。
23、 根据权利要求 18所述的发送端, 其特征在于, 若所述状态信息 为至少两个, 则所述处理单元判断所述状态信息中的至少一个是否满足 所述预设条件, 若所述状态信息中的一个满足所述预设条件, 则切换所 述媒体内容的编码方式;
或, 所述处理单元根据所述状态信息的权重值对所述状态信息进行 加权获取加权结果;
所述处理单元将所述加权结果与第五预设阈值进行比较, 若所述加 权结果小于所述第五预设阔值, 则所述发送端将所述高级视频编码切换 为所述高效率视频编码。
24、 根据权利要求 17至 23任意一项所述的发送端, 其特征在于, 所述发送单元用于:
向所述接收端发送通知消息, 所述通知消息中携带切换后的所述媒 体内容的编码方式标识, 和需要切换所述媒体内容的编码方式的起始数 据包的编号或位置信息, 以便于所述接收端根据所述通知消息确定所述 媒体内容的解码方式;
或, 所述发送端向所述接收端发送所述媒体内容的数据包中携带切 换后的所述媒体内容的编码方式标识, 以便于所述接收端根据所述编码 方式标识确定所述媒体内容的解码方式。
25、 一种接收端, 其特征在于, 包括:
获取单元, 用于获取发送端和 /或所述接收端的状态信息, 所述状态 信息包括所述发送端和 /或所述接收端的中央处理器 CPU使用率、 网络带 宽、 电量信息和所述发送端待发送的媒体内容信息中至少一个;
处理单元, 用于判断所述状态信息中的至少一个是否满足预设条件, 若所述状态信息中的一个满足所述预设条件, 则向所述发送端发送请求 切换消息, 以便于所述发送端根据所述请求切换消息切换媒体内容的编 码方式;
所述处理单元还用于根据所述发送端通知的媒体内容的编码方式确 定所述媒体内容的解码方式。
26、 根据权利要求 25所述的接收端, 其特征在于, 所述待发送的媒 体内容信息为所述发送端待发送的媒体内容的大小, 和 /或所述发送端待 发送的媒体内容的分辨率, 和 /或所述发送端待发送的媒体内容的帧率; 所述编码方式为高级视频编码 H.264或高效率视频编码 H.265。
27、 根据权利要求 26所述的接收端, 其特征在于, 所述处理单元用 于若所述接收端当前判断的状态信息为所述 CPU使用率, 则所述预设条 件为所述发送端的 CPU使用率和 /或所述接收端的 CPU使用率大于第一 预设阔值;
所述处理单元用于若所述发送端的 CPU 使用率和 /或所述接收端的 CPU 使用率大于所述第一预设阔值, 则所述接收端向所述发送端发送所 述请求切换消息, 以便于所述发送端根据所述请求切换消息将所述高效 率视频编码切换为所述高级视频编码。
28、 根据权利要求 26所述的接收端, 其特征在于, 所述处理单元用 于若所述接收端当前判断的状态信息为所述网络带宽时, 所述预设条件 为所述网络带宽小于第二预设阔值;
所述处理单元用于若所述发送端的网络带宽和 /或所述接收端的网络 带宽小于所述第二预设阔值, 则所述接收端向所述发送端发送所述请求 切换消息, 以便于所述发送端根据所述请求切换消息将所述高级视频编 码切换为所述高效率视频编码。
29、 根据权利要求 26所述的接收端, 其特征在于, 所述处理单元用 于若所述接收端当前判断的状态信息为所述电量信息时, 则所述预设条 件为当所述发送端和 /或所述接收端未接电源时, 所述发送端和 /或所述接 收端的剩余电量小于第三预设阔值, 所述第三预设阔值为所述发送端和 / 或所述接收端播放完媒体内容中还未播放的媒体内容所需的电量;
所述处理单元用于若所述发送端和 /或所述接收端的剩余电量小于所 述第三预设阔值, 则所述接收端向所述发送端发送所述请求切换消息, 以便于所述发送端根据所述请求切换消息将所述高效率视频编码切换为 所述高级视频编码。
30、 根据权利要求 26所述的接收端, 其特征在于, 所述处理单元用 于若所述接收端当前判断的状态信息为所述发送端待发送的媒体内容信 和 /或帧率大于第四预设阔值;
所述处理单元用于若所述发送端待发送的媒体内容的大小和 /或分辨 率和 /或帧率大于所述第四预设阔值, 则向所述发送端发送所述请求切换 消息, 以便于所述发送端根据所述请求切换消息将所述高级视频编码切 换为所述高效率视频编码。
31、 根据权利要求 26所述的接收端, 其特征在于, 若所述状态信息 为至少两个, 则所述处理单元判断所述状态信息中的至少一个是否满足 所述预设条件, 若所述状态信息中的一个满足所述预设条件, 则向所述 发送端发送请求切换消息, 以便于所述发送端根据所述请求切换消息切 换媒体内容的编码方式;
或, 则所述处理单元根据所述状态信息的权重值对所述状态信息进 行加权获取加权结果;
所述处理单元将所述加权结果与第五预设阈值进行比较, 若所述加 权结果小于所述第五预设阔值, 则所述接收端向所述发送端发送所述请 求切换消息, 以便于所述发送端根据所述请求切换消息将所述高级视频 编码切换为所述高效率视频编码。
32、 根据权利要求 25至 31 所述的接收端, 其特征在于, 接收单元 接收所述发送端发送的通知消息, 所述通知消息中携带所述发送端切换 后的所述媒体内容的编码方式标识和需要切换所述媒体内容的编码方式 的起始数据包的编号或位置信息, 以便于所述处理单元根据所述通知消 息确定所述媒体内容的解码方式;
或, 当所述接收单元接收所述发送端发送的所述媒体内容时, 所述处 理单元根据所述媒体内容的数据包中携带切换后的所述媒体内容的编码方 式标识, 确定所述媒体内容的解码方式。
PCT/CN2014/079118 2013-06-05 2014-06-04 一种切换编码方式的方法、发送端和接收端 WO2014194815A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP14807574.0A EP2934007A4 (en) 2013-06-05 2014-06-04 METHOD OF CHANGING CODING MODE, ENTRY END AND RECEIVING END
US14/813,458 US10171815B2 (en) 2013-06-05 2015-07-30 Coding manner switching method, transmit end, and receive end

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310221059.9A CN104219590A (zh) 2013-06-05 2013-06-05 一种切换编码方式的方法、发送端和接收端
CN201310221059.9 2013-06-05

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/813,458 Continuation US10171815B2 (en) 2013-06-05 2015-07-30 Coding manner switching method, transmit end, and receive end

Publications (1)

Publication Number Publication Date
WO2014194815A1 true WO2014194815A1 (zh) 2014-12-11

Family

ID=52007562

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/079118 WO2014194815A1 (zh) 2013-06-05 2014-06-04 一种切换编码方式的方法、发送端和接收端

Country Status (4)

Country Link
US (1) US10171815B2 (zh)
EP (1) EP2934007A4 (zh)
CN (1) CN104219590A (zh)
WO (1) WO2014194815A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111263113A (zh) * 2020-01-22 2020-06-09 浙江大华技术股份有限公司 数据包的发送方法及装置、数据包的处理方法及装置

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104618473B (zh) * 2015-01-26 2019-04-16 上海视聪网络信息技术有限公司 虚拟机桌面显示方法及装置
CN105868068A (zh) * 2015-12-03 2016-08-17 乐视移动智能信息技术(北京)有限公司 终端设备开机视频的下载优化方法及装置
CN108111915A (zh) * 2017-11-24 2018-06-01 西安万像电子科技有限公司 节能方法和装置
CN111182352B (zh) * 2018-11-09 2022-06-14 浙江宇视科技有限公司 一种视频播放的自适应码流控制装置及方法
CN110248192B (zh) * 2019-06-12 2021-10-15 腾讯科技(深圳)有限公司 编码器切换、解码器切换、屏幕分享方法和屏幕分享系统
CN111093076A (zh) * 2019-12-25 2020-05-01 西安万像电子科技有限公司 编码方式确定方法及装置
CN111601109A (zh) * 2020-05-13 2020-08-28 西安万像电子科技有限公司 图像数据的处理方法、装置和系统
CN113099038B (zh) * 2021-03-08 2022-11-22 北京小米移动软件有限公司 图像超分处理方法、图像超分处理装置及存储介质
CN115185362A (zh) * 2021-04-01 2022-10-14 Oppo广东移动通信有限公司 电子设备控制方法、装置、存储介质及电子设备
CN114244958A (zh) * 2021-12-14 2022-03-25 咪咕音乐有限公司 视频彩铃播放控制方法、设备与可读存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040081075A1 (en) * 2002-10-18 2004-04-29 Kazuaki Tsukakoshi Code modulation adaptive and variable multiplexing transmission method and code modulation adaptive and variable multiplexing transmission apparatus
CN1764184A (zh) * 2005-10-20 2006-04-26 中兴通讯股份有限公司 一种实时流媒体通讯传输系统和方法
CN102299762A (zh) * 2010-06-22 2011-12-28 中兴通讯股份有限公司 下一代广播电视无线网系统及信道自适应调整方法
CN102572120A (zh) * 2012-01-09 2012-07-11 苏州阔地网络科技有限公司 一种移动终端及其编码切换方法

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101156449A (zh) * 2005-01-27 2008-04-02 松下电器产业株式会社 具有功耗影响编码/解码模式的便携式终端
US7885330B2 (en) * 2005-07-12 2011-02-08 Insors Integrated Communications Methods, program products and systems for compressing streaming video data
US8442111B2 (en) 2008-11-24 2013-05-14 Nvidia Corporation Optimal power usage in encoding data streams
CA2803449C (en) * 2010-07-02 2013-12-10 Librestream Technologies Inc. Adaptive frame rate control for video in a resource limited system
CN102466745B (zh) 2010-11-03 2015-08-19 北京普源精电科技有限公司 一种用波形显示测量结果的数字万用表
CN102469072A (zh) * 2010-11-08 2012-05-23 华为技术有限公司 流媒体服务方法、系统及客户端
KR101894420B1 (ko) * 2011-04-15 2018-09-03 에스케이플래닛 주식회사 적응적 비디오 트랜스코딩 방법 및 시스템
US9635374B2 (en) * 2011-08-01 2017-04-25 Apple Inc. Systems and methods for coding video data using switchable encoders and decoders
US10045089B2 (en) * 2011-08-02 2018-08-07 Apple Inc. Selection of encoder and decoder for a video communications session

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040081075A1 (en) * 2002-10-18 2004-04-29 Kazuaki Tsukakoshi Code modulation adaptive and variable multiplexing transmission method and code modulation adaptive and variable multiplexing transmission apparatus
CN1764184A (zh) * 2005-10-20 2006-04-26 中兴通讯股份有限公司 一种实时流媒体通讯传输系统和方法
CN102299762A (zh) * 2010-06-22 2011-12-28 中兴通讯股份有限公司 下一代广播电视无线网系统及信道自适应调整方法
CN102572120A (zh) * 2012-01-09 2012-07-11 苏州阔地网络科技有限公司 一种移动终端及其编码切换方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2934007A4 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111263113A (zh) * 2020-01-22 2020-06-09 浙江大华技术股份有限公司 数据包的发送方法及装置、数据包的处理方法及装置
CN111263113B (zh) * 2020-01-22 2021-04-30 浙江大华技术股份有限公司 数据包的发送方法及装置、数据包的处理方法及装置

Also Published As

Publication number Publication date
US20150334400A1 (en) 2015-11-19
EP2934007A1 (en) 2015-10-21
CN104219590A (zh) 2014-12-17
US10171815B2 (en) 2019-01-01
EP2934007A4 (en) 2016-03-02

Similar Documents

Publication Publication Date Title
WO2014194815A1 (zh) 一种切换编码方式的方法、发送端和接收端
Pudlewski et al. Video transmission over lossy wireless networks: A cross-layer perspective
KR100800748B1 (ko) 블루투스를 이용한 동영상 스트림 전송 장치 및 방법
US8179958B2 (en) Device switching system, and sender and distribution destination device
US9629131B2 (en) Energy-aware multimedia adaptation for streaming and conversational services
JP6536404B2 (ja) 情報処理装置および情報処理方法
WO2015033763A1 (ja) 情報処理装置および情報処理方法
WO2011000253A1 (zh) 一种媒体流处理方法及通讯系统以及相关设备
US11973815B2 (en) Network assistance for uplink streaming
WO2015096038A1 (zh) 一种媒体数据传输方法和设备
CN108366044B (zh) 一种VoIP远程音视频共享方法
WO2022052102A1 (zh) 一种通信方法及装置
JP2017517793A (ja) ビデオオリエンテーションネゴシエーション
WO2010108416A1 (zh) 转发可伸缩视频编码数据报文的方法、设备和通信系统
CN114710568B (zh) 音视频数据通信方法、设备及存储介质
WO2018054349A1 (zh) 数据发送方法、数据接收方法及其装置和系统
US11949858B2 (en) Video throughput improvement using long term referencing, deep learning, and load balancing
WO2014082294A1 (zh) 一种媒体流传输方法及相关设备、系统
KR20220033445A (ko) 몰입형 미디어를 처리하기 위한 방법 및 장치
US10945029B2 (en) Video frame rendering criteria for video telephony service
WO2010108372A1 (zh) 共享cmmb视频的方法及提供该共享服务的移动终端
JP5675164B2 (ja) 送信装置、送信方法、並びにプログラム
WO2017020661A1 (zh) 一种码流发送方法及设备
WO2023095438A1 (ja) 端末装置、無線通信システム、および、端末装置の処理方法
WO2022262294A1 (zh) 视频流传输方法以及相关通信装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14807574

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2014807574

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE