Commit graph

13 commits

Author SHA1 Message Date
Peter Hanspers
d9b64cdd32 Fixing some of the issues found by clang static analyzer.
Bug: webrtc:8737
Change-Id: Ib436449c493336e7c35a72a96dc88cccdbb5bbaf
Reviewed-on: https://webrtc-review.googlesource.com/39200
Commit-Queue: Peter Hanspers <peterhanspers@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21607}
2018-01-12 16:35:09 +00:00
Anders Carlsson
4df8e1ab94 iOS: H264 encoder crash on disabled stream
The H264 encoder defaults to using the kCVPixelFormatType_420YpCbCr8BiPlanarFullRange
pixel format. If the frames coming into the encoder is RTCCVPixelBuffer frames,
we check the pixel format in the contained CVPixelBuffer and send the same format
to the encoder when possible, by switching the encoder's pixel format. When we
receive frames with buffers conforming to the RTCI420Buffer protocol, we copy
the frame contents to the target pixel buffer, hardcoded to be the default NV12.

This works except when switching incoming frames from RTCCVPixelBuffer frames to
I420 frames during runtime. If we received RTCCVPixelBuffers wrapping e.g. an
RGB CVPixelBuffer, the encoder's pixel format have been changed to RGB. If we
now get incoming frames in I420, we must convert these to RGB instead of NV12
to match the encoder's format.

This bug can be triggered by calling `[_localVideoTrack setIsEnabled:NO]` in
`ARDAppClient.m`. This will make the stream start sending black i420 frames to
the encoder.

This CL fixes this by resetting the compression session with the default NV12
format if the input frame type changes from native to I420.

Bug: webrtc:8638
Change-Id: I5d784d204b7b1d09313a0f4cea6302ea72e9ed94
Reviewed-on: https://webrtc-review.googlesource.com/33260
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21382}
2017-12-20 13:42:06 +00:00
Mirko Bonadei
654320666d Including libyuv headers using fully qualified paths.
Using fully qualified paths to include libyuv headers allows WebRTC to
avoid to rely on the //third_party/libyuv:libyuv_config target to
set the -I compiler flag.

Today some WebRTC targets depend on //third_party/libyuv only to
include //third_party/libyuv:libyuv_config but with fully qualified
paths this should not be needed anymore.

A follow-up CL will remove //third_party/libyuv from some targets that
don't need it because they are not including libyuv headers.

Bug: webrtc:8605
Change-Id: Icec707ca761aaf2ea8088e7f7a05ddde0de2619a
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/28220
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21209}
2017-12-11 15:51:26 +00:00
Mirko Bonadei
675513b96a Stop using LOG macros in favor of RTC_ prefixed macros.
This CL has been generated with the following script:

for m in PLOG \
  LOG_TAG \
  LOG_GLEM \
  LOG_GLE_EX \
  LOG_GLE \
  LAST_SYSTEM_ERROR \
  LOG_ERRNO_EX \
  LOG_ERRNO \
  LOG_ERR_EX \
  LOG_ERR \
  LOG_V \
  LOG_F \
  LOG_T_F \
  LOG_E \
  LOG_T \
  LOG_CHECK_LEVEL_V \
  LOG_CHECK_LEVEL \
  LOG
do
  git grep -l $m | xargs sed -i "s,\b$m\b,RTC_$m,g"
done
git checkout rtc_base/logging.h
git cl format

Bug: webrtc:8452
Change-Id: I1a53ef3e0a5ef6e244e62b2e012b864914784600
Reviewed-on: https://webrtc-review.googlesource.com/21325
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20617}
2017-11-09 11:56:32 +00:00
Anders Carlsson
ed2b1c954c Ignore output callbacks with null parameters in iOS H264 encode.
This can occur if there are callbacks in-flight when the compression
session is destroyed. Has been observed but is rare.

Bug: webrtc:8489
Change-Id: I5d4b35c555f6ff68af48edfcc7acf53395fa86fe
Reviewed-on: https://webrtc-review.googlesource.com/18220
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20561}
2017-11-06 13:40:27 +00:00
Anders Carlsson
f3ee3b7478 Support RGB frames in RTCCVPixelBuffer
In addition to NV12 frames, also support cropping/scaling RGB frames and
converting RGB frames to i420.

This CL also removes the hardcoding of pixel format in
RTCCameraVideoCapturer. Instead, use the first available format for the
output device that our pipeline supports.

Bug: webrtc:8351
Change-Id: If479b4934c47cd2994936913f55e60fbbee3893b
Reviewed-on: https://webrtc-review.googlesource.com/8920
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Daniela Jovanoska Petrenko <denicija@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20396}
2017-10-23 15:34:28 +00:00
Kári Tristan Helgason
fc313dcda6 Add prefix to codec name constants.
Bug: webrtc:8401
Change-Id: I8cd4685df3609e8b91a79b19789aadef484138d4
Reviewed-on: https://webrtc-review.googlesource.com/14140
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20390}
2017-10-23 12:49:17 +00:00
Kári Tristan Helgason
117c48291c Replace use of codec name strings with constants.
Bug: webrtc:8401
Change-Id: I2aee61e026330ec233eb8b3bfe2d529187562249
Reviewed-on: https://webrtc-review.googlesource.com/10814
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20340}
2017-10-19 07:28:12 +00:00
Anders Carlsson
7e04281870 Injectable software video codecs in Obj-C.
When injecting video codec factories in the Obj-C SDK, use the new
peer connection API that uses webrtc::Video{De,En}CoderFactory classes
and does not automatically add internal software codecs. Instead the
injected factory can support internal VP8 and VP9 codecs through the
included Obj-C classes RTCVideo{De,En}coderVP{8,9}.

When not explicitly injecting any video codec factory, the old code
path is still used and injects only H264 as an external codec and
the internal codec factory is used.

Bug: webrtc:7925
Change-Id: I657d30dfde71da9c0be341e213ab9f97a04caa58
Reviewed-on: https://webrtc-review.googlesource.com/3620
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20175}
2017-10-06 07:36:34 +00:00
Daniela
f328282cbf Fix memory leak in video encoder.
Bug: webrtc:8306
Change-Id: Iadc7a584ccf70a4f1df3f7f7af29e66a3698d93a
Reviewed-on: https://webrtc-review.googlesource.com/4425
Commit-Queue: Daniela Jovanoska Petrenko <denicija@webrtc.org>
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20043}
2017-09-29 13:07:37 +00:00
Kári Tristan Helgason
0bf6071c04 Remove internal methods from global namespace.
It's rude to clobber our consumers global namespace.

Bug: None
Change-Id: If8073820fcae6399def1717775fa64bc6e20051c
Reviewed-on: https://webrtc-review.googlesource.com/3165
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19942}
2017-09-25 11:05:10 +00:00
Mirko Bonadei
92ea95e34a Fixing WebRTC after moving from src/webrtc to src/
In https://webrtc-review.googlesource.com/c/src/+/1560 we moved WebRTC
from src/webrtc to src/ (in order to preserve an healthy git history).
This CL takes care of fixing header guards, #include paths, etc...

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org


Bug: chromium:611808
Change-Id: Iea91618212bee0af16aa3f05071eab8f93706578
Reviewed-on: https://webrtc-review.googlesource.com/1561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19846}
2017-09-15 05:02:56 +00:00
Mirko Bonadei
bb547203bf Moving src/webrtc into src/.
In order to eliminate the WebRTC Subtree mirror in Chromium, 
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org

Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}
2017-09-15 04:25:06 +00:00
Renamed from webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm (Browse further)