21 Commits

Author SHA1 Message Date
deadbeef
b236257763 Fixing integer overflow when parsing bandwidth attribute.
It's still valid SDP so just clamp it at INT_MAX.

BUG=chromium:648071

Review-Url: https://codereview.webrtc.org/2571073002
Cr-Commit-Position: refs/heads/master@{#15582}
2016-12-14 00:37:16 +00:00
deadbeef
25ed435afe Implement parsing/serialization of a=bundle-only.
This CL doesn't start *using* a=bundle-only; it just adds support for
parsing it. We need to do this first, because otherwise old versions of
WebRTC will interpret a zero port value as a rejected m= section.

BUG=webrtc:4674

Review-Url: https://codereview.webrtc.org/2562183002
Cr-Commit-Position: refs/heads/master@{#15558}
2016-12-13 02:37:41 +00:00
magjed
509e4fe8e6 Reland of Stop using hardcoded payload types for video codecs (patchset #1 id:1 of https://codereview.webrtc.org/2513633002/ )
Reason for revert:
The WebRtcBrowserTest.NegotiateUnsupportedVideoCodec test has been fixed in Chromium with the following change:
   function removeVideoCodec(offerSdp) {
-    offerSdp = offerSdp.replace('a=rtpmap:100 VP8/90000\r\n',
-                                'a=rtpmap:100 XVP8/90000\r\n');
+    offerSdp = offerSdp.replace(/a=rtpmap:(\d+)\ VP8\/90000\r\n/,
+                                'a=rtpmap:$1 XVP8/90000\r\n');
     return offerSdp;
   }

Original issue's description:
> Revert of Stop using hardcoded payload types for video codecs (patchset #6 id:210001 of https://codereview.webrtc.org/2493133002/ )
>
> Reason for revert:
> Breaks chromium.fyi test:
> WebRtcBrowserTest.NegotiateUnsupportedVideoCodec
>
> Original issue's description:
> > Stop using hardcoded payload types for video codecs
> >
> > This CL stops using hardcoded payload types for different video codecs
> > and will dynamically assign them payload types incrementally from 96 to
> > 127 instead.
> >
> > This CL:
> >  * Replaces 'std::vector<VideoCodec> DefaultVideoCodecList()' in
> >    webrtcvideoengine2.cc with an explicit WebRtcVideoEncoderFactory for
> >    internally supported software codecs instead. The purpose is to
> >    streamline the payload type assignment in webrtcvideoengine2.cc which
> >    will now have two encoder factories of the same
> >    WebRtcVideoEncoderFactory type; one internal and one external.
> >  * Removes webrtc::VideoEncoder::EncoderType and use cricket::VideoCodec
> >    instead.
> >  * Removes 'static VideoEncoder* Create(EncoderType codec_type)' and
> >    moves the create function to the internal encoder factory instead.
> >  * Removes video_encoder.cc. webrtc::VideoEncoder is now just an
> >    interface without any static functions.
> >  * The function GetSupportedCodecs in webrtcvideoengine2.cc unifies
> >    the internal and external codecs and assigns them payload types
> >    incrementally from 96 to 127.
> >  * Updates webrtcvideoengine2_unittest.cc and removes assumptions about
> >    what payload types will be used.
> >
> > BUG=webrtc:6677,webrtc:6705
> > R=hta@webrtc.org, ossu@webrtc.org, stefan@webrtc.org
> >
> > Committed: https://crrev.com/42043b95872b51321f508bf255d804ce3dff366b
> > Cr-Commit-Position: refs/heads/master@{#15135}
>
> TBR=hta@webrtc.org,stefan@webrtc.org,ossu@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6677,webrtc:6705
>
> Committed: https://crrev.com/eacbaea920797ff751ca83050d140821f5055591
> Cr-Commit-Position: refs/heads/master@{#15140}

TBR=hta@webrtc.org,stefan@webrtc.org,ossu@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6677,webrtc:6705

Review-Url: https://codereview.webrtc.org/2511933002
Cr-Commit-Position: refs/heads/master@{#15148}
2016-11-18 09:34:14 +00:00
magjed
eacbaea920 Revert of Stop using hardcoded payload types for video codecs (patchset #6 id:210001 of https://codereview.webrtc.org/2493133002/ )
Reason for revert:
Breaks chromium.fyi test:
WebRtcBrowserTest.NegotiateUnsupportedVideoCodec

Original issue's description:
> Stop using hardcoded payload types for video codecs
>
> This CL stops using hardcoded payload types for different video codecs
> and will dynamically assign them payload types incrementally from 96 to
> 127 instead.
>
> This CL:
>  * Replaces 'std::vector<VideoCodec> DefaultVideoCodecList()' in
>    webrtcvideoengine2.cc with an explicit WebRtcVideoEncoderFactory for
>    internally supported software codecs instead. The purpose is to
>    streamline the payload type assignment in webrtcvideoengine2.cc which
>    will now have two encoder factories of the same
>    WebRtcVideoEncoderFactory type; one internal and one external.
>  * Removes webrtc::VideoEncoder::EncoderType and use cricket::VideoCodec
>    instead.
>  * Removes 'static VideoEncoder* Create(EncoderType codec_type)' and
>    moves the create function to the internal encoder factory instead.
>  * Removes video_encoder.cc. webrtc::VideoEncoder is now just an
>    interface without any static functions.
>  * The function GetSupportedCodecs in webrtcvideoengine2.cc unifies
>    the internal and external codecs and assigns them payload types
>    incrementally from 96 to 127.
>  * Updates webrtcvideoengine2_unittest.cc and removes assumptions about
>    what payload types will be used.
>
> BUG=webrtc:6677,webrtc:6705
> R=hta@webrtc.org, ossu@webrtc.org, stefan@webrtc.org
>
> Committed: https://crrev.com/42043b95872b51321f508bf255d804ce3dff366b
> Cr-Commit-Position: refs/heads/master@{#15135}

TBR=hta@webrtc.org,stefan@webrtc.org,ossu@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6677,webrtc:6705

Review-Url: https://codereview.webrtc.org/2513633002
Cr-Commit-Position: refs/heads/master@{#15140}
2016-11-17 16:52:06 +00:00
Magnus Jedvert
42043b9587 Stop using hardcoded payload types for video codecs
This CL stops using hardcoded payload types for different video codecs
and will dynamically assign them payload types incrementally from 96 to
127 instead.

This CL:
 * Replaces 'std::vector<VideoCodec> DefaultVideoCodecList()' in
   webrtcvideoengine2.cc with an explicit WebRtcVideoEncoderFactory for
   internally supported software codecs instead. The purpose is to
   streamline the payload type assignment in webrtcvideoengine2.cc which
   will now have two encoder factories of the same
   WebRtcVideoEncoderFactory type; one internal and one external.
 * Removes webrtc::VideoEncoder::EncoderType and use cricket::VideoCodec
   instead.
 * Removes 'static VideoEncoder* Create(EncoderType codec_type)' and
   moves the create function to the internal encoder factory instead.
 * Removes video_encoder.cc. webrtc::VideoEncoder is now just an
   interface without any static functions.
 * The function GetSupportedCodecs in webrtcvideoengine2.cc unifies
   the internal and external codecs and assigns them payload types
   incrementally from 96 to 127.
 * Updates webrtcvideoengine2_unittest.cc and removes assumptions about
   what payload types will be used.

BUG=webrtc:6677,webrtc:6705
R=hta@webrtc.org, ossu@webrtc.org, stefan@webrtc.org

Review URL: https://codereview.webrtc.org/2493133002 .

Cr-Commit-Position: refs/heads/master@{#15135}
2016-11-17 15:08:47 +00:00
perkj
267527459b Remove cricket::VideoCodec with, height and framerate properties
Since WebRtcVideoSendStream have reconfigures the send codec to match the incoming captured frames widht and height they have not been used.
Framerate has just been set when parsing sdp to 60fps and not changed elsewhere.

This cl require some upstream projects to change first.

BUG=webrtc:5332

Review-Url: https://codereview.webrtc.org/2408153002
Cr-Commit-Position: refs/heads/master@{#14733}
2016-10-24 08:21:24 +00:00
solenberg
9fa49759e5 - Filter data channel codecs based on codec name instead of payload type, which may have been remapped.
- Rename the data codec payload types to end with "PlType" instead of "Id", for consistency.

BUG=webrtc:2795

Review-Url: https://codereview.webrtc.org/2397413002
Cr-Commit-Position: refs/heads/master@{#14581}
2016-10-08 20:02:51 +00:00
deadbeef
7e146cb97e Fixing heap read overflow when "sctp-port" is in a video description.
This added an SCTP codec, which is later re-interpreted as a video
codec. We shouldn't be adding codecs that don't match the type of the
media description.

BUG=chromium:648062

Review-Url: https://codereview.webrtc.org/2354723002
Cr-Commit-Position: refs/heads/master@{#14421}
2016-09-28 17:04:41 +00:00
johan
2d8d23eec2 RFC 3984 sprop-parameter-sets SDP unit test
BUG=webrtc:5948

Review-Url: https://codereview.webrtc.org/2023913002
Cr-Commit-Position: refs/heads/master@{#13026}
2016-06-03 08:22:47 +00:00
isheriff
6f8d686d35 Remove use of RtpHeaderExtension and clean up
Currently there are two structs that are identical and track extension details:
webrtc::RtpExtension
cricket::RtpHeaderExtension

The use of the structs is mixed in the code to track the extensions being
supported. This results in duplicate definition of
the URI constants and there is code to convert between the two structs.

Clean up to use a single RtpHeader throughout the codebase. The actual location
of RtpHeader may change in future (perhaps to be located in api/). Additionally,
this CL renames some of the constants to clarify Uri and Id use.

BUG= webrtc:5895

Review-Url: https://codereview.webrtc.org/1984983002
Cr-Commit-Position: refs/heads/master@{#12924}
2016-05-26 18:25:04 +00:00
kwiberg
d1fe281e12 Replace scoped_ptr with unique_ptr in webrtc/api/
But keep #including scoped_ptr.h in .h files, so as not to break
WebRTC users who expect those .h files to give them rtc::scoped_ptr.

BUG=webrtc:5520

Review URL: https://codereview.webrtc.org/1930463002

Cr-Commit-Position: refs/heads/master@{#12530}
2016-04-27 13:47:40 +00:00
hta
62a216ee1e Don't write spaces after semicolons in FMTP lines.
Reference: RFC 6184 section 8.2.1 and examples.

BUG=webrtc:5793
NOTRY=True

Review URL: https://codereview.webrtc.org/1888373002

Cr-Commit-Position: refs/heads/master@{#12383}
2016-04-15 18:02:19 +00:00
deadbeef
67cf2c1294 Removing preference field from cricket::Codec.
This field only existed as an implementation detail for getting the
codecs sorted, so it doesn't need to be in the public interface.
It cluttered the code and undesirably affected codec comparisons,
causing the video encoder to be reconfigured if a codec's preference
changed but nothing else did.

BUG=webrtc:5690

Review URL: https://codereview.webrtc.org/1845673002

Cr-Commit-Position: refs/heads/master@{#12349}
2016-04-13 17:07:24 +00:00
hta
a6b99448ee Generate FMTP parameters for the H.264 codec.
This CL generates FMTP parameters that allow H.264 interoperation
with Firefox for the default codec list.

BUG=chromium:591971

Review URL: https://codereview.webrtc.org/1880963002

Cr-Commit-Position: refs/heads/master@{#12333}
2016-04-12 17:29:20 +00:00
honghaiz
a0c44eaa82 Add 16-bit network id to the candidate signaling.
Also include that in the stun-ping request as part of the
network-info attribute.
Change the network cost to be 16 bits.

BUG=

Review URL: https://codereview.webrtc.org/1815473002

Cr-Commit-Position: refs/heads/master@{#12110}
2016-03-23 23:07:54 +00:00
Taylor Brandstetter
5de6b753bd If MSID is encoded in both ways, make the SSRC-level one take priority.
BUG=webrtc:5264
R=pthatcher@webrtc.org

Review URL: https://codereview.webrtc.org/1762003003 .

Cr-Commit-Position: refs/heads/master@{#11933}
2016-03-10 01:02:39 +00:00
kjellander
f475277547 Rename constants files in webrtc/{media,p2p}
Multiple sources with the same names forces ugly GYP hacks in
Chromium's libjingle.gyp. Rename the sources in WebRTC to
enable cleaning this up in Chromium.

To summarize:
webrtc/media/base/constants.{cc,h} -> mediaconstants.{cc,h}
webrtc/p2p/base/constants.{cc,h} -> p2pconstants.{cc,h}

This CL will require coordinating landing a roll in Chromium.

BUG=webrtc:4256
NOTRY=True

Review URL: https://codereview.webrtc.org/1750593002

Cr-Commit-Position: refs/heads/master@{#11842}
2016-03-02 13:42:35 +00:00
deadbeef
9d3584c47e Implementing unified plan encoding of msid.
Meaning "a=msid:...", instead of "a=ssrc:X msid:...".
An additional option to SdpSerialize determines if the
"a=msid" attribute is used.

Review URL: https://codereview.webrtc.org/1688383002

Cr-Commit-Position: refs/heads/master@{#11644}
2016-02-17 01:54:16 +00:00
kjellander@webrtc.org
9b8df25c73 Move talk/session/media -> webrtc/pc
The libjingle_p2p target is renamed to rtc_pc.
The libjingle_p2p_unittest test will be renamed in a
separate follow-up CL, to make it possible to run all
trybots successfully for this CL.

BUG=webrtc:5419
R=deadbeef@webrtc.org, pthatcher@webrtc.org, tommi@webrtc.org

Review URL: https://codereview.webrtc.org/1691463002 .

Cr-Commit-Position: refs/heads/master@{#11592}
2016-02-12 05:48:10 +00:00
kjellander
b24317bfda Fix license headers in webrtc/api.
In addition to the code moved from talk/app/webrtc
there were some files in webrtc/api/objctests that still
had the libjingle license header.

BUG=webrtc:5418
TBR=tkchin@webrtc.org
NOTRY=True

Review URL: https://codereview.webrtc.org/1680293005

Cr-Commit-Position: refs/heads/master@{#11552}
2016-02-10 15:54:53 +00:00
Henrik Kjellander
15583c19d7 Move talk/app/webrtc to webrtc/api
The previously disabled warnings that were inherited from
talk/build/common.gypi are now replaced by target-specific disabling
of only the failing warnings. Additional disabling was needed since the stricter
compilation warnings that applies to code in webrtc/.

License headers will be updated in a follow-up CL.

Other modifications:
* Updated the header guards.
* Sorted the includes using chromium/src/tools/sort-headers.py
  except for these files:
  talk/app/webrtc/peerconnectionendtoend_unittest.cc
  talk/app/webrtc/java/jni/androidmediadecoder_jni.cc
  talk/app/webrtc/java/jni/androidmediaencoder_jni.cc
  webrtc/media/devices/win32devicemanager.cc

The HAVE_SCTP define was added for the peerconnection_unittests target
in api_tests.gyp.

I also checked that none of
SRTP_RELATIVE_PATH
HAVE_SRTP
HAVE_WEBRTC_VIDEO
HAVE_WEBRTC_VOICE
were used by the talk/app/webrtc code.

For Chromium, the following changes will need to be applied to the roll CL that updates the
DEPS for WebRTC and libjingle:
https://codereview.chromium.org/1615433002

BUG=webrtc:5418
NOPRESUBMIT=True
R=deadbeef@webrtc.org, pthatcher@webrtc.org, tommi@webrtc.org

Review URL: https://codereview.webrtc.org/1610243002 .

Cr-Commit-Position: refs/heads/master@{#11545}
2016-02-10 09:53:26 +00:00