| OLD | NEW | 
|    1 /* |    1 /* | 
|    2  *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |    2  *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 
|    3  * |    3  * | 
|    4  *  Use of this source code is governed by a BSD-style license |    4  *  Use of this source code is governed by a BSD-style license | 
|    5  *  that can be found in the LICENSE file in the root of the source |    5  *  that can be found in the LICENSE file in the root of the source | 
|    6  *  tree. An additional intellectual property rights grant can be found |    6  *  tree. An additional intellectual property rights grant can be found | 
|    7  *  in the file PATENTS.  All contributing project authors may |    7  *  in the file PATENTS.  All contributing project authors may | 
|    8  *  be found in the AUTHORS file in the root of the source tree. |    8  *  be found in the AUTHORS file in the root of the source tree. | 
|    9  */ |    9  */ | 
|   10  |   10  | 
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  125     // NOTE: Must be called on the thread that constructed the VCM instance. |  125     // NOTE: Must be called on the thread that constructed the VCM instance. | 
|  126     // |  126     // | 
|  127     // Input: |  127     // Input: | 
|  128     //      - sendCodec      : Settings for the codec to be registered. |  128     //      - sendCodec      : Settings for the codec to be registered. | 
|  129     //      - numberOfCores  : The number of cores the codec is allowed |  129     //      - numberOfCores  : The number of cores the codec is allowed | 
|  130     //                         to use. |  130     //                         to use. | 
|  131     //      - maxPayloadSize : The maximum size each payload is allowed |  131     //      - maxPayloadSize : The maximum size each payload is allowed | 
|  132     //                                to have. Usually MTU - overhead. |  132     //                                to have. Usually MTU - overhead. | 
|  133     // |  133     // | 
|  134     // Return value      : VCM_OK, on success. |  134     // Return value      : VCM_OK, on success. | 
|  135     //                     < 0,         on error. |  135     //                     < 0,    on error. | 
|  136     virtual int32_t RegisterSendCodec(const VideoCodec* sendCodec, |  136     virtual int32_t RegisterSendCodec(const VideoCodec* sendCodec, | 
|  137                                             uint32_t numberOfCores, |  137                                             uint32_t numberOfCores, | 
|  138                                             uint32_t maxPayloadSize) = 0; |  138                                             uint32_t maxPayloadSize) = 0; | 
|  139  |  139  | 
|  140     // Get the current send codec in use. |  140     // Get the current send codec in use. | 
|  141     // |  141     // | 
|  142     // If a codec has not been set yet, the |id| property of the return value |  142     // If a codec has not been set yet, the |id| property of the return value | 
|  143     // will be 0 and |name| empty. |  143     // will be 0 and |name| empty. | 
|  144     // |  144     // | 
|  145     // NOTE: This method intentionally does not hold locks and minimizes data |  145     // NOTE: This method intentionally does not hold locks and minimizes data | 
|  146     // copying.  It must be called on the thread where the VCM was constructed. |  146     // copying.  It must be called on the thread where the VCM was constructed. | 
|  147     virtual const VideoCodec& GetSendCodec() const = 0; |  147     virtual const VideoCodec& GetSendCodec() const = 0; | 
|  148  |  148  | 
|  149     // DEPRECATED: Use GetSendCodec() instead. |  149     // DEPRECATED: Use GetSendCodec() instead. | 
|  150     // |  150     // | 
|  151     // API to get the current send codec in use. |  151     // API to get the current send codec in use. | 
|  152     // |  152     // | 
|  153     // Input: |  153     // Input: | 
|  154     //      - currentSendCodec : Address where the sendCodec will be written. |  154     //      - currentSendCodec : Address where the sendCodec will be written. | 
|  155     // |  155     // | 
|  156     // Return value      : VCM_OK, on success. |  156     // Return value      : VCM_OK, on success. | 
|  157     //                     < 0,         on error. |  157     //                     < 0,    on error. | 
|  158     // |  158     // | 
|  159     // NOTE: The returned codec information is not guaranteed to be current when |  159     // NOTE: The returned codec information is not guaranteed to be current when | 
|  160     // the call returns.  This method acquires a lock that is aligned with |  160     // the call returns.  This method acquires a lock that is aligned with | 
|  161     // video encoding, so it should be assumed to be allowed to block for |  161     // video encoding, so it should be assumed to be allowed to block for | 
|  162     // several milliseconds. |  162     // several milliseconds. | 
|  163     virtual int32_t SendCodec(VideoCodec* currentSendCodec) const = 0; |  163     virtual int32_t SendCodec(VideoCodec* currentSendCodec) const = 0; | 
|  164  |  164  | 
|  165     // DEPRECATED: Use GetSendCodec() instead. |  165     // DEPRECATED: Use GetSendCodec() instead. | 
|  166     // |  166     // | 
|  167     // API to get the current send codec type |  167     // API to get the current send codec type | 
|  168     // |  168     // | 
|  169     // Return value      : Codec type, on success. |  169     // Return value      : Codec type, on success. | 
|  170     //                     kVideoCodecUnknown, on error or if no send codec is s
     et |  170     //                     kVideoCodecUnknown, on error or if no send codec is s
     et | 
|  171     // NOTE: Same notes apply as for SendCodec() above. |  171     // NOTE: Same notes apply as for SendCodec() above. | 
|  172     virtual VideoCodecType SendCodec() const = 0; |  172     virtual VideoCodecType SendCodec() const = 0; | 
|  173  |  173  | 
|  174     // Register an external encoder object. This can not be used together with |  174     // Register an external encoder object. This can not be used together with | 
|  175     // external decoder callbacks. |  175     // external decoder callbacks. | 
|  176     // |  176     // | 
|  177     // Input: |  177     // Input: | 
|  178     //      - externalEncoder : Encoder object to be used for encoding frames in
     serted |  178     //      - externalEncoder : Encoder object to be used for encoding frames in
     serted | 
|  179     //                          with the AddVideoFrame API. |  179     //                          with the AddVideoFrame API. | 
|  180     //      - payloadType     : The payload type bound which this encoder is bou
     nd to. |  180     //      - payloadType     : The payload type bound which this encoder is bou
     nd to. | 
|  181     // |  181     // | 
|  182     // Return value      : VCM_OK, on success. |  182     // Return value      : VCM_OK, on success. | 
|  183     //                     < 0,         on error. |  183     //                     < 0,    on error. | 
|  184     virtual int32_t RegisterExternalEncoder(VideoEncoder* externalEncoder, |  184     virtual int32_t RegisterExternalEncoder(VideoEncoder* externalEncoder, | 
|  185                                             uint8_t payloadType, |  185                                             uint8_t payloadType, | 
|  186                                             bool internalSource = false) = 0; |  186                                             bool internalSource = false) = 0; | 
|  187  |  187  | 
|  188     // API to get codec config parameters to be sent out-of-band to a receiver. |  188     // API to get codec config parameters to be sent out-of-band to a receiver. | 
|  189     // |  189     // | 
|  190     // Input: |  190     // Input: | 
|  191     //      - buffer          : Memory where the codec config parameters should 
     be written. |  191     //      - buffer          : Memory where the codec config parameters should 
     be written. | 
|  192     //      - size            : Size of the memory available. |  192     //      - size            : Size of the memory available. | 
|  193     // |  193     // | 
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  225  |  225  | 
|  226     // Sets the parameters describing the receive channel. These parameters are 
     inputs to the |  226     // Sets the parameters describing the receive channel. These parameters are 
     inputs to the | 
|  227     // Media Optimization inside the VCM. |  227     // Media Optimization inside the VCM. | 
|  228     // |  228     // | 
|  229     // Input: |  229     // Input: | 
|  230     //      - rtt                   : Current round-trip time in ms. |  230     //      - rtt                   : Current round-trip time in ms. | 
|  231     //                                with the most amount available bandwidth i
     n a conference |  231     //                                with the most amount available bandwidth i
     n a conference | 
|  232     //                                scenario |  232     //                                scenario | 
|  233     // |  233     // | 
|  234     // Return value      : VCM_OK, on success. |  234     // Return value      : VCM_OK, on success. | 
|  235     //                     < 0,         on error. |  235     //                     < 0,    on error. | 
|  236     virtual int32_t SetReceiveChannelParameters(int64_t rtt) = 0; |  236     virtual int32_t SetReceiveChannelParameters(int64_t rtt) = 0; | 
|  237  |  237  | 
|  238     // Register a transport callback which will be called to deliver the encoded
      data and |  238     // Register a transport callback which will be called to deliver the encoded
      data and | 
|  239     // side information. |  239     // side information. | 
|  240     // |  240     // | 
|  241     // Input: |  241     // Input: | 
|  242     //      - transport  : The callback object to register. |  242     //      - transport  : The callback object to register. | 
|  243     // |  243     // | 
|  244     // Return value      : VCM_OK, on success. |  244     // Return value      : VCM_OK, on success. | 
|  245     //                     < 0,         on error. |  245     //                     < 0,    on error. | 
|  246     virtual int32_t RegisterTransportCallback(VCMPacketizationCallback* transpor
     t) = 0; |  246     virtual int32_t RegisterTransportCallback(VCMPacketizationCallback* transpor
     t) = 0; | 
|  247  |  247  | 
|  248     // Register video output information callback which will be called to delive
     r information |  248     // Register video output information callback which will be called to delive
     r information | 
|  249     // about the video stream produced by the encoder, for instance the average 
     frame rate and |  249     // about the video stream produced by the encoder, for instance the average 
     frame rate and | 
|  250     // bit rate. |  250     // bit rate. | 
|  251     // |  251     // | 
|  252     // Input: |  252     // Input: | 
|  253     //      - outputInformation  : The callback object to register. |  253     //      - outputInformation  : The callback object to register. | 
|  254     // |  254     // | 
|  255     // Return value      : VCM_OK, on success. |  255     // Return value      : VCM_OK, on success. | 
|  256     //                     < 0,         on error. |  256     //                     < 0,    on error. | 
|  257     virtual int32_t RegisterSendStatisticsCallback( |  257     virtual int32_t RegisterSendStatisticsCallback( | 
|  258                                      VCMSendStatisticsCallback* sendStats) = 0; |  258                                      VCMSendStatisticsCallback* sendStats) = 0; | 
|  259  |  259  | 
|  260     // Register a video protection callback which will be called to deliver |  260     // Register a video protection callback which will be called to deliver | 
|  261     // the requested FEC rate and NACK status (on/off). |  261     // the requested FEC rate and NACK status (on/off). | 
|  262     // |  262     // | 
|  263     // Input: |  263     // Input: | 
|  264     //      - protection  : The callback object to register. |  264     //      - protection  : The callback object to register. | 
|  265     // |  265     // | 
|  266     // Return value      : VCM_OK, on success. |  266     // Return value      : VCM_OK, on success. | 
|  267     //                     < 0,         on error. |  267     //                     < 0,    on error. | 
|  268     virtual int32_t RegisterProtectionCallback(VCMProtectionCallback* protection
     ) = 0; |  268     virtual int32_t RegisterProtectionCallback(VCMProtectionCallback* protection
     ) = 0; | 
|  269  |  269  | 
|  270     // Enable or disable a video protection method. |  270     // Enable or disable a video protection method. | 
|  271     // |  271     // | 
|  272     // Input: |  272     // Input: | 
|  273     //      - videoProtection  : The method to enable or disable. |  273     //      - videoProtection  : The method to enable or disable. | 
|  274     //      - enable           : True if the method should be enabled, false if |  274     //      - enable           : True if the method should be enabled, false if | 
|  275     //                           it should be disabled. |  275     //                           it should be disabled. | 
|  276     // |  276     // | 
|  277     // Return value      : VCM_OK, on success. |  277     // Return value      : VCM_OK, on success. | 
|  278     //                     < 0,         on error. |  278     //                     < 0,    on error. | 
|  279     virtual int32_t SetVideoProtection(VCMVideoProtection videoProtection, |  279     virtual int32_t SetVideoProtection(VCMVideoProtection videoProtection, | 
|  280                                        bool enable) = 0; |  280                                        bool enable) = 0; | 
|  281  |  281  | 
|  282     // Add one raw video frame to the encoder. This function does all the necess
     ary |  282     // Add one raw video frame to the encoder. This function does all the necess
     ary | 
|  283     // processing, then decides what frame type to encode, or if the frame shoul
     d be |  283     // processing, then decides what frame type to encode, or if the frame shoul
     d be | 
|  284     // dropped. If the frame should be encoded it passes the frame to the encode
     r |  284     // dropped. If the frame should be encoded it passes the frame to the encode
     r | 
|  285     // before it returns. |  285     // before it returns. | 
|  286     // |  286     // | 
|  287     // Input: |  287     // Input: | 
|  288     //      - videoFrame        : Video frame to encode. |  288     //      - videoFrame        : Video frame to encode. | 
|  289     //      - codecSpecificInfo : Extra codec information, e.g., pre-parsed in-b
     and signaling. |  289     //      - codecSpecificInfo : Extra codec information, e.g., pre-parsed in-b
     and signaling. | 
|  290     // |  290     // | 
|  291     // Return value      : VCM_OK, on success. |  291     // Return value      : VCM_OK, on success. | 
|  292     //                     < 0,         on error. |  292     //                     < 0,    on error. | 
|  293     virtual int32_t AddVideoFrame( |  293     virtual int32_t AddVideoFrame( | 
|  294         const VideoFrame& videoFrame, |  294         const VideoFrame& videoFrame, | 
|  295         const VideoContentMetrics* contentMetrics = NULL, |  295         const VideoContentMetrics* contentMetrics = NULL, | 
|  296         const CodecSpecificInfo* codecSpecificInfo = NULL) = 0; |  296         const CodecSpecificInfo* codecSpecificInfo = NULL) = 0; | 
|  297  |  297  | 
|  298     // Next frame encoded should be an intra frame (keyframe). |  298     // Next frame encoded should be an intra frame (keyframe). | 
|  299     // |  299     // | 
|  300     // Return value      : VCM_OK, on success. |  300     // Return value      : VCM_OK, on success. | 
|  301     //                     < 0,         on error. |  301     //                     < 0,    on error. | 
|  302     virtual int32_t IntraFrameRequest(int stream_index) = 0; |  302     virtual int32_t IntraFrameRequest(int stream_index) = 0; | 
|  303  |  303  | 
|  304     // Frame Dropper enable. Can be used to disable the frame dropping when the 
     encoder |  304     // Frame Dropper enable. Can be used to disable the frame dropping when the 
     encoder | 
|  305     // over-uses its bit rate. This API is designed to be used when the encoded 
     frames |  305     // over-uses its bit rate. This API is designed to be used when the encoded 
     frames | 
|  306     // are supposed to be stored to an AVI file, or when the I420 codec is used 
     and the |  306     // are supposed to be stored to an AVI file, or when the I420 codec is used 
     and the | 
|  307     // target bit rate shouldn't affect the frame rate. |  307     // target bit rate shouldn't affect the frame rate. | 
|  308     // |  308     // | 
|  309     // Input: |  309     // Input: | 
|  310     //      - enable            : True to enable the setting, false to disable i
     t. |  310     //      - enable            : True to enable the setting, false to disable i
     t. | 
|  311     // |  311     // | 
|  312     // Return value      : VCM_OK, on success. |  312     // Return value      : VCM_OK, on success. | 
|  313     //                     < 0,         on error. |  313     //                     < 0,    on error. | 
|  314     virtual int32_t EnableFrameDropper(bool enable) = 0; |  314     virtual int32_t EnableFrameDropper(bool enable) = 0; | 
|  315  |  315  | 
|  316  |  316  | 
|  317     /* |  317     /* | 
|  318     *   Receiver |  318     *   Receiver | 
|  319     */ |  319     */ | 
|  320  |  320  | 
|  321     // Register possible receive codecs, can be called multiple times for differ
     ent codecs. |  321     // Register possible receive codecs, can be called multiple times for differ
     ent codecs. | 
|  322     // The module will automatically switch between registered codecs depending 
     on the |  322     // The module will automatically switch between registered codecs depending 
     on the | 
|  323     // payload type of incoming frames. The actual decoder will be created when 
     needed. |  323     // payload type of incoming frames. The actual decoder will be created when 
     needed. | 
|  324     // |  324     // | 
|  325     // Input: |  325     // Input: | 
|  326     //      - receiveCodec      : Settings for the codec to be registered. |  326     //      - receiveCodec      : Settings for the codec to be registered. | 
|  327     //      - numberOfCores     : Number of CPU cores that the decoder is allowe
     d to use. |  327     //      - numberOfCores     : Number of CPU cores that the decoder is allowe
     d to use. | 
|  328     //      - requireKeyFrame   : Set this to true if you don't want any delta f
     rames |  328     //      - requireKeyFrame   : Set this to true if you don't want any delta f
     rames | 
|  329     //                            to be decoded until the first key frame has be
     en decoded. |  329     //                            to be decoded until the first key frame has be
     en decoded. | 
|  330     // |  330     // | 
|  331     // Return value      : VCM_OK, on success. |  331     // Return value      : VCM_OK, on success. | 
|  332     //                     < 0,         on error. |  332     //                     < 0,    on error. | 
|  333     virtual int32_t RegisterReceiveCodec(const VideoCodec* receiveCodec, |  333     virtual int32_t RegisterReceiveCodec(const VideoCodec* receiveCodec, | 
|  334                                          int32_t numberOfCores, |  334                                          int32_t numberOfCores, | 
|  335                                          bool requireKeyFrame = false) = 0; |  335                                          bool requireKeyFrame = false) = 0; | 
|  336  |  336  | 
|  337     // Register an externally defined decoder/renderer object. Can be a decoder 
     only or a |  337     // Register an externally defined decoder/renderer object. Can be a decoder 
     only or a | 
|  338     // decoder coupled with a renderer. Note that RegisterReceiveCodec must be c
     alled to |  338     // decoder coupled with a renderer. Note that RegisterReceiveCodec must be c
     alled to | 
|  339     // be used for decoding incoming streams. |  339     // be used for decoding incoming streams. | 
|  340     // |  340     // | 
|  341     // Input: |  341     // Input: | 
|  342     //      - externalDecoder        : The external decoder/renderer object. |  342     //      - externalDecoder        : The external decoder/renderer object. | 
|  343     //      - payloadType            : The payload type which this decoder shoul
     d be |  343     //      - payloadType            : The payload type which this decoder shoul
     d be | 
|  344     //                                 registered to. |  344     //                                 registered to. | 
|  345     //      - internalRenderTiming   : True if the internal renderer (if any) of
      the decoder |  345     //      - internalRenderTiming   : True if the internal renderer (if any) of
      the decoder | 
|  346     //                                 object can make sure to render at a given
      time in ms. |  346     //                                 object can make sure to render at a given
      time in ms. | 
|  347     // |  347     // | 
|  348     // Return value      : VCM_OK, on success. |  348     // Return value      : VCM_OK, on success. | 
|  349     //                     < 0,         on error. |  349     //                     < 0,    on error. | 
|  350     virtual int32_t RegisterExternalDecoder(VideoDecoder* externalDecoder, |  350     virtual int32_t RegisterExternalDecoder(VideoDecoder* externalDecoder, | 
|  351                                             uint8_t payloadType, |  351                                             uint8_t payloadType, | 
|  352                                             bool internalRenderTiming) = 0; |  352                                             bool internalRenderTiming) = 0; | 
|  353  |  353  | 
|  354     // Register a receive callback. Will be called whenever there is a new frame
      ready |  354     // Register a receive callback. Will be called whenever there is a new frame
      ready | 
|  355     // for rendering. |  355     // for rendering. | 
|  356     // |  356     // | 
|  357     // Input: |  357     // Input: | 
|  358     //      - receiveCallback        : The callback object to be used by the mod
     ule when a |  358     //      - receiveCallback        : The callback object to be used by the mod
     ule when a | 
|  359     //                                 frame is ready for rendering. |  359     //                                 frame is ready for rendering. | 
|  360     //                                 De-register with a NULL pointer. |  360     //                                 De-register with a NULL pointer. | 
|  361     // |  361     // | 
|  362     // Return value      : VCM_OK, on success. |  362     // Return value      : VCM_OK, on success. | 
|  363     //                     < 0,         on error. |  363     //                     < 0,    on error. | 
|  364     virtual int32_t RegisterReceiveCallback(VCMReceiveCallback* receiveCallback)
      = 0; |  364     virtual int32_t RegisterReceiveCallback(VCMReceiveCallback* receiveCallback)
      = 0; | 
|  365  |  365  | 
|  366     // Register a receive statistics callback which will be called to deliver in
     formation |  366     // Register a receive statistics callback which will be called to deliver in
     formation | 
|  367     // about the video stream received by the receiving side of the VCM, for ins
     tance the |  367     // about the video stream received by the receiving side of the VCM, for ins
     tance the | 
|  368     // average frame rate and bit rate. |  368     // average frame rate and bit rate. | 
|  369     // |  369     // | 
|  370     // Input: |  370     // Input: | 
|  371     //      - receiveStats  : The callback object to register. |  371     //      - receiveStats  : The callback object to register. | 
|  372     // |  372     // | 
|  373     // Return value      : VCM_OK, on success. |  373     // Return value      : VCM_OK, on success. | 
|  374     //                     < 0,         on error. |  374     //                     < 0,    on error. | 
|  375     virtual int32_t RegisterReceiveStatisticsCallback( |  375     virtual int32_t RegisterReceiveStatisticsCallback( | 
|  376                                VCMReceiveStatisticsCallback* receiveStats) = 0; |  376                                VCMReceiveStatisticsCallback* receiveStats) = 0; | 
|  377  |  377  | 
|  378     // Register a decoder timing callback which will be called to deliver |  378     // Register a decoder timing callback which will be called to deliver | 
|  379     // information about the timing of the decoder in the receiving side of the |  379     // information about the timing of the decoder in the receiving side of the | 
|  380     // VCM, for instance the current and maximum frame decode latency. |  380     // VCM, for instance the current and maximum frame decode latency. | 
|  381     // |  381     // | 
|  382     // Input: |  382     // Input: | 
|  383     //      - decoderTiming  : The callback object to register. |  383     //      - decoderTiming  : The callback object to register. | 
|  384     // |  384     // | 
|  385     // Return value      : VCM_OK, on success. |  385     // Return value      : VCM_OK, on success. | 
|  386     //                     < 0,         on error. |  386     //                     < 0,    on error. | 
|  387     virtual int32_t RegisterDecoderTimingCallback( |  387     virtual int32_t RegisterDecoderTimingCallback( | 
|  388         VCMDecoderTimingCallback* decoderTiming) = 0; |  388         VCMDecoderTimingCallback* decoderTiming) = 0; | 
|  389  |  389  | 
|  390     // Register a frame type request callback. This callback will be called when
      the |  390     // Register a frame type request callback. This callback will be called when
      the | 
|  391     // module needs to request specific frame types from the send side. |  391     // module needs to request specific frame types from the send side. | 
|  392     // |  392     // | 
|  393     // Input: |  393     // Input: | 
|  394     //      - frameTypeCallback      : The callback object to be used by the mod
     ule when |  394     //      - frameTypeCallback      : The callback object to be used by the mod
     ule when | 
|  395     //                                 requesting a specific type of frame from 
     the send side. |  395     //                                 requesting a specific type of frame from 
     the send side. | 
|  396     //                                 De-register with a NULL pointer. |  396     //                                 De-register with a NULL pointer. | 
|  397     // |  397     // | 
|  398     // Return value      : VCM_OK, on success. |  398     // Return value      : VCM_OK, on success. | 
|  399     //                     < 0,         on error. |  399     //                     < 0,    on error. | 
|  400     virtual int32_t RegisterFrameTypeCallback( |  400     virtual int32_t RegisterFrameTypeCallback( | 
|  401                                   VCMFrameTypeCallback* frameTypeCallback) = 0; |  401                                   VCMFrameTypeCallback* frameTypeCallback) = 0; | 
|  402  |  402  | 
|  403     // Registers a callback which is called whenever the receive side of the VCM |  403     // Registers a callback which is called whenever the receive side of the VCM | 
|  404     // encounters holes in the packet sequence and needs packets to be retransmi
     tted. |  404     // encounters holes in the packet sequence and needs packets to be retransmi
     tted. | 
|  405     // |  405     // | 
|  406     // Input: |  406     // Input: | 
|  407     //              - callback      : The callback to be registered in the VCM. |  407     //              - callback      : The callback to be registered in the VCM. | 
|  408     // |  408     // | 
|  409     // Return value     : VCM_OK,     on success. |  409     // Return value     : VCM_OK,     on success. | 
|  410     //                    <0,              on error. |  410     //                    <0,         on error. | 
|  411     virtual int32_t RegisterPacketRequestCallback( |  411     virtual int32_t RegisterPacketRequestCallback( | 
|  412                                         VCMPacketRequestCallback* callback) = 0; |  412                                         VCMPacketRequestCallback* callback) = 0; | 
|  413  |  413  | 
|  414     // Waits for the next frame in the jitter buffer to become complete |  414     // Waits for the next frame in the jitter buffer to become complete | 
|  415     // (waits no longer than maxWaitTimeMs), then passes it to the decoder for d
     ecoding. |  415     // (waits no longer than maxWaitTimeMs), then passes it to the decoder for d
     ecoding. | 
|  416     // Should be called as often as possible to get the most out of the decoder. |  416     // Should be called as often as possible to get the most out of the decoder. | 
|  417     // |  417     // | 
|  418     // Return value      : VCM_OK, on success. |  418     // Return value      : VCM_OK, on success. | 
|  419     //                     < 0,         on error. |  419     //                     < 0,    on error. | 
|  420     virtual int32_t Decode(uint16_t maxWaitTimeMs = 200) = 0; |  420     virtual int32_t Decode(uint16_t maxWaitTimeMs = 200) = 0; | 
|  421  |  421  | 
|  422     // Registers a callback which conveys the size of the render buffer. |  422     // Registers a callback which conveys the size of the render buffer. | 
|  423     virtual int RegisterRenderBufferSizeCallback( |  423     virtual int RegisterRenderBufferSizeCallback( | 
|  424         VCMRenderBufferSizeCallback* callback) = 0; |  424         VCMRenderBufferSizeCallback* callback) = 0; | 
|  425  |  425  | 
|  426     // Reset the decoder state to the initial state. |  426     // Reset the decoder state to the initial state. | 
|  427     // |  427     // | 
|  428     // Return value      : VCM_OK, on success. |  428     // Return value      : VCM_OK, on success. | 
|  429     //                     < 0,         on error. |  429     //                     < 0,    on error. | 
|  430     virtual int32_t ResetDecoder() = 0; |  430     virtual int32_t ResetDecoder() = 0; | 
|  431  |  431  | 
|  432     // API to get the codec which is currently used for decoding by the module. |  432     // API to get the codec which is currently used for decoding by the module. | 
|  433     // |  433     // | 
|  434     // Input: |  434     // Input: | 
|  435     //      - currentReceiveCodec      : Settings for the codec to be registered
     . |  435     //      - currentReceiveCodec      : Settings for the codec to be registered
     . | 
|  436     // |  436     // | 
|  437     // Return value      : VCM_OK, on success. |  437     // Return value      : VCM_OK, on success. | 
|  438     //                     < 0,         on error. |  438     //                     < 0,    on error. | 
|  439     virtual int32_t ReceiveCodec(VideoCodec* currentReceiveCodec) const = 0; |  439     virtual int32_t ReceiveCodec(VideoCodec* currentReceiveCodec) const = 0; | 
|  440  |  440  | 
|  441     // API to get the codec type currently used for decoding by the module. |  441     // API to get the codec type currently used for decoding by the module. | 
|  442     // |  442     // | 
|  443     // Return value      : codecy type,            on success. |  443     // Return value      : codecy type,            on success. | 
|  444     //                     kVideoCodecUnknown, on error or if no receive codec i
     s registered |  444     //                     kVideoCodecUnknown, on error or if no receive codec i
     s registered | 
|  445     virtual VideoCodecType ReceiveCodec() const = 0; |  445     virtual VideoCodecType ReceiveCodec() const = 0; | 
|  446  |  446  | 
|  447     // Insert a parsed packet into the receiver side of the module. Will be plac
     ed in the |  447     // Insert a parsed packet into the receiver side of the module. Will be plac
     ed in the | 
|  448     // jitter buffer waiting for the frame to become complete. Returns as soon a
     s the packet |  448     // jitter buffer waiting for the frame to become complete. Returns as soon a
     s the packet | 
|  449     // has been placed in the jitter buffer. |  449     // has been placed in the jitter buffer. | 
|  450     // |  450     // | 
|  451     // Input: |  451     // Input: | 
|  452     //      - incomingPayload      : Payload of the packet. |  452     //      - incomingPayload      : Payload of the packet. | 
|  453     //      - payloadLength        : Length of the payload. |  453     //      - payloadLength        : Length of the payload. | 
|  454     //      - rtpInfo              : The parsed header. |  454     //      - rtpInfo              : The parsed header. | 
|  455     // |  455     // | 
|  456     // Return value      : VCM_OK, on success. |  456     // Return value      : VCM_OK, on success. | 
|  457     //                     < 0,         on error. |  457     //                     < 0,    on error. | 
|  458     virtual int32_t IncomingPacket(const uint8_t* incomingPayload, |  458     virtual int32_t IncomingPacket(const uint8_t* incomingPayload, | 
|  459                                    size_t payloadLength, |  459                                    size_t payloadLength, | 
|  460                                    const WebRtcRTPHeader& rtpInfo) = 0; |  460                                    const WebRtcRTPHeader& rtpInfo) = 0; | 
|  461  |  461  | 
|  462     // Minimum playout delay (Used for lip-sync). This is the minimum delay requ
     ired |  462     // Minimum playout delay (Used for lip-sync). This is the minimum delay requ
     ired | 
|  463     // to sync with audio. Not included in  VideoCodingModule::Delay() |  463     // to sync with audio. Not included in  VideoCodingModule::Delay() | 
|  464     // Defaults to 0 ms. |  464     // Defaults to 0 ms. | 
|  465     // |  465     // | 
|  466     // Input: |  466     // Input: | 
|  467     //      - minPlayoutDelayMs   : Additional delay in ms. |  467     //      - minPlayoutDelayMs   : Additional delay in ms. | 
|  468     // |  468     // | 
|  469     // Return value      : VCM_OK, on success. |  469     // Return value      : VCM_OK, on success. | 
|  470     //                     < 0,         on error. |  470     //                     < 0,    on error. | 
|  471     virtual int32_t SetMinimumPlayoutDelay(uint32_t minPlayoutDelayMs) = 0; |  471     virtual int32_t SetMinimumPlayoutDelay(uint32_t minPlayoutDelayMs) = 0; | 
|  472  |  472  | 
|  473     // Set the time required by the renderer to render a frame. |  473     // Set the time required by the renderer to render a frame. | 
|  474     // |  474     // | 
|  475     // Input: |  475     // Input: | 
|  476     //      - timeMS        : The time in ms required by the renderer to render 
     a frame. |  476     //      - timeMS        : The time in ms required by the renderer to render 
     a frame. | 
|  477     // |  477     // | 
|  478     // Return value      : VCM_OK, on success. |  478     // Return value      : VCM_OK, on success. | 
|  479     //                     < 0,         on error. |  479     //                     < 0,    on error. | 
|  480     virtual int32_t SetRenderDelay(uint32_t timeMS) = 0; |  480     virtual int32_t SetRenderDelay(uint32_t timeMS) = 0; | 
|  481  |  481  | 
|  482     // The total delay desired by the VCM. Can be less than the minimum |  482     // The total delay desired by the VCM. Can be less than the minimum | 
|  483     // delay set with SetMinimumPlayoutDelay. |  483     // delay set with SetMinimumPlayoutDelay. | 
|  484     // |  484     // | 
|  485     // Return value      : Total delay in ms, on success. |  485     // Return value      : Total delay in ms, on success. | 
|  486     //                     < 0,               on error. |  486     //                     < 0,               on error. | 
|  487     virtual int32_t Delay() const = 0; |  487     virtual int32_t Delay() const = 0; | 
|  488  |  488  | 
|  489     // Returns the number of packets discarded by the jitter buffer due to being |  489     // Returns the number of packets discarded by the jitter buffer due to being | 
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  545         EncodedImageCallback* observer) = 0; |  545         EncodedImageCallback* observer) = 0; | 
|  546     virtual void RegisterPostEncodeImageCallback( |  546     virtual void RegisterPostEncodeImageCallback( | 
|  547         EncodedImageCallback* post_encode_callback) = 0; |  547         EncodedImageCallback* post_encode_callback) = 0; | 
|  548     // Releases pending decode calls, permitting faster thread shutdown. |  548     // Releases pending decode calls, permitting faster thread shutdown. | 
|  549     virtual void TriggerDecoderShutdown() = 0; |  549     virtual void TriggerDecoderShutdown() = 0; | 
|  550 }; |  550 }; | 
|  551  |  551  | 
|  552 }  // namespace webrtc |  552 }  // namespace webrtc | 
|  553  |  553  | 
|  554 #endif // WEBRTC_MODULES_INTERFACE_VIDEO_CODING_H_ |  554 #endif // WEBRTC_MODULES_INTERFACE_VIDEO_CODING_H_ | 
| OLD | NEW |