(Auto)update libjingle 68501302-> 68506654
git-svn-id: http://webrtc.googlecode.com/svn/trunk@6321 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
af81b9bffd
commit
0cdcd23a03
@ -261,7 +261,7 @@ int VideoAdapter::GetOutputNumPixels() const {
|
|||||||
|
|
||||||
// TODO(fbarchard): Add AdaptFrameRate function that only drops frames but
|
// TODO(fbarchard): Add AdaptFrameRate function that only drops frames but
|
||||||
// not resolution.
|
// not resolution.
|
||||||
bool VideoAdapter::AdaptFrame(const VideoFrame* in_frame,
|
bool VideoAdapter::AdaptFrame(VideoFrame* in_frame,
|
||||||
VideoFrame** out_frame) {
|
VideoFrame** out_frame) {
|
||||||
talk_base::CritScope cs(&critical_section_);
|
talk_base::CritScope cs(&critical_section_);
|
||||||
if (!in_frame || !out_frame) {
|
if (!in_frame || !out_frame) {
|
||||||
@ -326,12 +326,19 @@ bool VideoAdapter::AdaptFrame(const VideoFrame* in_frame,
|
|||||||
output_format_.height = static_cast<int>(in_frame->GetHeight());
|
output_format_.height = static_cast<int>(in_frame->GetHeight());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!StretchToOutputFrame(in_frame)) {
|
if (!black_output_ &&
|
||||||
LOG(LS_VERBOSE) << "VAdapt Stretch Failed.";
|
in_frame->GetWidth() == static_cast<size_t>(output_format_.width) &&
|
||||||
return false;
|
in_frame->GetHeight() == static_cast<size_t>(output_format_.height)) {
|
||||||
}
|
// The dimensions are correct and we aren't muting, so use the input frame.
|
||||||
|
*out_frame = in_frame;
|
||||||
|
} else {
|
||||||
|
if (!StretchToOutputFrame(in_frame)) {
|
||||||
|
LOG(LS_VERBOSE) << "VAdapt Stretch Failed.";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
*out_frame = output_frame_.get();
|
*out_frame = output_frame_.get();
|
||||||
|
}
|
||||||
|
|
||||||
++frames_out_;
|
++frames_out_;
|
||||||
if (in_frame->GetWidth() != (*out_frame)->GetWidth() ||
|
if (in_frame->GetWidth() != (*out_frame)->GetWidth() ||
|
||||||
|
@ -61,9 +61,13 @@ class VideoAdapter {
|
|||||||
// true and set the output frame to NULL if the input frame is dropped. Return
|
// true and set the output frame to NULL if the input frame is dropped. Return
|
||||||
// true and set the out frame to output_frame_ if the input frame is adapted
|
// true and set the out frame to output_frame_ if the input frame is adapted
|
||||||
// successfully. Return false otherwise.
|
// successfully. Return false otherwise.
|
||||||
// output_frame_ is owned by the VideoAdapter that has the best knowledge on
|
// Note that, if no adaptation is required, |out_frame| will refer directly
|
||||||
// the output frame.
|
// in_frame. If a copy is always required, the caller must do an explicit
|
||||||
bool AdaptFrame(const VideoFrame* in_frame, VideoFrame** out_frame);
|
// copy.
|
||||||
|
// If a copy has taken place, |output_frame_| is owned by the VideoAdapter
|
||||||
|
// and will remain usable until the adapter is destroyed or AdaptFrame is
|
||||||
|
// called again.
|
||||||
|
bool AdaptFrame(VideoFrame* in_frame, VideoFrame** out_frame);
|
||||||
|
|
||||||
void set_scale_third(bool enable);
|
void set_scale_third(bool enable);
|
||||||
bool scale_third() const { return scale_third_; }
|
bool scale_third() const { return scale_third_; }
|
||||||
|
@ -69,10 +69,6 @@
|
|||||||
#if !defined(LIBPEERCONNECTION_LIB)
|
#if !defined(LIBPEERCONNECTION_LIB)
|
||||||
#include "talk/media/webrtc/webrtcmediaengine.h"
|
#include "talk/media/webrtc/webrtcmediaengine.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
#define strtok_r strtok_s
|
|
||||||
#endif // _WIN32
|
|
||||||
|
|
||||||
WRME_EXPORT
|
WRME_EXPORT
|
||||||
cricket::MediaEngineInterface* CreateWebRtcMediaEngine(
|
cricket::MediaEngineInterface* CreateWebRtcMediaEngine(
|
||||||
webrtc::AudioDeviceModule* adm, webrtc::AudioDeviceModule* adm_sc,
|
webrtc::AudioDeviceModule* adm, webrtc::AudioDeviceModule* adm_sc,
|
||||||
@ -149,9 +145,8 @@ static int GetExternalVideoPayloadType(int index) {
|
|||||||
|
|
||||||
static void LogMultiline(talk_base::LoggingSeverity sev, char* text) {
|
static void LogMultiline(talk_base::LoggingSeverity sev, char* text) {
|
||||||
const char* delim = "\r\n";
|
const char* delim = "\r\n";
|
||||||
char* strtok_save;
|
// TODO(fbarchard): Fix strtok lint warning.
|
||||||
for (char* tok = strtok_r(text, delim, &strtok_save);
|
for (char* tok = strtok(text, delim); tok; tok = strtok(NULL, delim)) {
|
||||||
tok; tok = strtok_r(NULL, delim, &strtok_save)) {
|
|
||||||
LOG_V(sev) << tok;
|
LOG_V(sev) << tok;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user