Re: [webkit-dev] Trying to turn WebRTC's code on - MEDIA_STREAM flags

2015-11-12 Thread Eric Carlson

> On Jul 18, 2014, at 3:17 AM, Jacques-Olivier  wrote:
> 
> I’m new on this mailing so I’ll start by introducing myself:
> My name Jacques-Olivier Haché (J-O), I’m working for Temasys Communication, 
> and I’m entering the WebKit project to work on the implementation of WebRTC 
> inside WebKit.
> For those who would be following the WebRTC’s news, I’m also the main 
> developer of the WebRTC plugin released by Temasys.
> 

  Welcome to the WebKit community!

> I am now trying to enable the WebRTC related features to get a better 
> understanding of the current state of this part of the project. 
> I have to say that I faced a lack of documentation on this area. I found the 
> features list , a document about 
> how to add a new feature  but 
> nothing about how to turn a feature on and off (there is actually a TODO 
> about that in the second link).
> 
> I looked into the files that one needs to change to add a new feature and 
> found two interesting files:
> Source/WTF/wtf/FeatureDefines.h - where the WebRTC related contants were set 
> to 0 instead of 1
> Source/cmake/WebKitFeatures.cmake - where the contants were set to OFF
> I listed the following definitions that look related to WebRTC
> ENABLE_MEDIA_CAPTURE
  This flag is for features in the HTML Media Capture spec: 
http://www.w3.org/TR/html-media-capture/

> ENABLE_MEDIA_CONTROLS_SCRIPT
  This is for the JavaScript-based  and  controls some ports us.

> ENABLE_MEDIA_SOURCE
  This is for the Media Source Extension spec: 
http://www.w3.org/TR/media-source/
  
> ENABLE_MEDIA_STATISTICS
  This is for an experimental HTMLMediaElement statistics feature enabled by 
some ports.

> ENABLE_MEDIA_STREAM
  This is for the Media Capture and Streams spec: 
http://w3c.github.io/mediacapture-main/
> ENABLE_VIDEO
  This is for  and  in general.

> ENABLE_VIDEO_TRACK
  This is for WebVTT.

  You should not need to change any of these flags to build for the Mac.


> I turned those definitions to 1 and ON in the respective file and tried to 
> build.
> The code in the header WebCore/Modules/mediastream/mediastream.h could not 
> compile apparently because the observer did not have a destructor. I created 
> one:
> class Observer {
> public:
> virtual void didAddOrRemoveTrack() = 0;
>   virtual ~Observer() {};
> };
> 
  It sounds like your sources are not up to date, I fixed this in 
https://trac.webkit.org/r175066

> 
> I now have a linking error that I do not understand when building WebCore 
> with Xcode. 
> 
> Ld 
> 
> Undefined symbols for architecture x86_64:
>   "__ZN7WebCore11JSNavigator18webkitGetUserMediaEPN3JSC9ExecStateE", 
> referenced from:
>   
> __ZN7WebCore46jsNavigatorPrototypeFunctionWebkitGetUserMediaEPN3JSC9ExecStateE
>  in JSNavigator.o
>   "__ZN7WebCore15RTCOfferOptions6createERKNS_10DictionaryERi", referenced 
> from:
>  
> __ZN7WebCore17RTCPeerConnection11createOfferEN3WTF10PassRefPtrINS_29RTCSessionDescriptionCallbackEEENS2_INS_30RTCPeerConnectionErrorCallbackEEERKNS_10DictionaryERi
>  in RTCPeerConnection.o
>   
> "__ZN7WebCore20MediaConstraintsMock17verifyConstraintsEN3WTF10PassRefPtrINS_16MediaConstraintsEEE",
>  referenced from:
>   
> __ZN7WebCore21MockMediaStreamCenter26validateRequestConstraintsEN3WTF10PassRefPtrINS_25MediaStreamCreationClientEEENS2_INS_16MediaConstraintsEEES6_
>  in MockMediaStreamCenter.o
>   
> __ZN7WebCore21MockMediaStreamCenter17createMediaStreamEN3WTF10PassRefPtrINS_25MediaStreamCreationClientEEENS2_INS_16MediaConstraintsEEES6_
>  in MockMediaStreamCenter.o
>   "__ZN7WebCore21RTCOfferAnswerOptions6createERKNS_10DictionaryERi", 
> referenced from:
>   
> __ZN7WebCore17RTCPeerConnection12createAnswerEN3WTF10PassRefPtrINS_29RTCSessionDescriptionCallbackEEENS2_INS_30RTCPeerConnectionErrorCallbackEEERKNS_10DictionaryERi
>  in RTCPeerConnection.o
>   
> "__ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_16RTCConfigurationE",
>  referenced from:
>   
> __ZN7WebCore52jsRTCPeerConnectionPrototypeFunctionGetConfigurationEPN3JSC9ExecStateE
>  in JSRTCPeerConnection.o
> ld: symbol(s) not found for architecture x86_64
> clang: error: linker command failed with exit code 1 (use -v to see 
> invocation)
> 
  I don’t get these errors when I build, I suspect they will go away for you 
when you update your sources to TOT.


> 
> Is anyone used to turn the WebRTC code on and off?
> 

  WebKit’s WebRTC implementation is currently in a state of flux, moving from a 
platform API that maps closely to the RTC JavaScript API to a more abstract 
interface will make it easier to use different backend libraries. See bugs 
https://webkit.org/b/150165 and https://webkit.org/b/150166 for example.

eric


___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] Trying to turn WebRTC's code on - MEDIA_STREAM flags

2015-11-11 Thread Darin Adler
> On Jul 18, 2014, at 3:17 AM, Jacques-Olivier  wrote:
> 
>   "__ZN7WebCore11JSNavigator18webkitGetUserMediaEPN3JSC9ExecStateE", 
> referenced from:
>   
> __ZN7WebCore46jsNavigatorPrototypeFunctionWebkitGetUserMediaEPN3JSC9ExecStateE
>  in JSNavigator.o
>   "__ZN7WebCore15RTCOfferOptions6createERKNS_10DictionaryERi", referenced 
> from:
>   
> __ZN7WebCore17RTCPeerConnection11createOfferEN3WTF10PassRefPtrINS_29RTCSessionDescriptionCallbackEEENS2_INS_30RTCPeerConnectionErrorCallbackEEERKNS_10DictionaryERi
>  in RTCPeerConnection.o
>   
> "__ZN7WebCore20MediaConstraintsMock17verifyConstraintsEN3WTF10PassRefPtrINS_16MediaConstraintsEEE",
>  referenced from:
>   
> __ZN7WebCore21MockMediaStreamCenter26validateRequestConstraintsEN3WTF10PassRefPtrINS_25MediaStreamCreationClientEEENS2_INS_16MediaConstraintsEEES6_
>  in MockMediaStreamCenter.o
>   
> __ZN7WebCore21MockMediaStreamCenter17createMediaStreamEN3WTF10PassRefPtrINS_25MediaStreamCreationClientEEENS2_INS_16MediaConstraintsEEES6_
>  in MockMediaStreamCenter.o
>   "__ZN7WebCore21RTCOfferAnswerOptions6createERKNS_10DictionaryERi", 
> referenced from:
>   
> __ZN7WebCore17RTCPeerConnection12createAnswerEN3WTF10PassRefPtrINS_29RTCSessionDescriptionCallbackEEENS2_INS_30RTCPeerConnectionErrorCallbackEEERKNS_10DictionaryERi
>  in RTCPeerConnection.o
>   
> "__ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_16RTCConfigurationE",
>  referenced from:
>   
> __ZN7WebCore52jsRTCPeerConnectionPrototypeFunctionGetConfigurationEPN3JSC9ExecStateE
>  in JSRTCPeerConnection.o

These errors typically mean that some functions are not compiled, but are 
referenced by code that is compiled. You can use the c++filt command line tool 
to un-mangle the function names.

For example, that first one is: 
WebCore::JSNavigator::webkitGetUserMedia(JSC::ExecState*)

So you’d want to look at the JSNavigator.cpp source file and make sure the body 
of that function is present and compiled. Maybe the conditionals are wrong.

— Darin___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] Trying to turn WebRTC's code on - MEDIA_STREAM flags

2014-08-25 Thread Benjamin Poulain

On 8/24/14, 8:37 AM, Alexandre GOUAILLARD wrote:
For clarification of the  goals and the scope, we intend to provide 
patches in webkit for webRTC. We would love to see webRTC support in 
iOS and we understand that having it in apple provided webkit 
(UIWebView) to comply to apple store rule 2.17. We understand we do 
not have complete control over the entire process, especially the 
eventual packaging and deployment, and the timelines, and that apple 
does not comment about this, but we thought implementing it in webkit 
was a necessary prerequisite in any case. For the rest we will have 
faith :-)


During a phone conversation with eric C, we've ben told that we should 
start by making it happen in the macOS X port as we would snot be able 
to build for iOS and because the differences were not so big between 
the iOS and the macOS ports.

Yep, that sounds like a good plan.
JO has been working on the Media Capture and Stream and webRTC APIs 
for almost a year, and developed an IE and Safari plugin that 
implements all of the APIs. He reads/speaks/write web IDL fluently 
now, and now all the subtleties of the constraints, streams, tracks, 
ect. I sit at the standard committees and help with everything that is 
not clear from the specs. Unfortunately, that does not help understand 
webkit intricacies and that's where we are today.


We reached out to Eric C, Thiago from nokia (NIX port), kirun from 
samsung, and started from there. I also speak regularly with adam Be. 
from ericson at the w3c meetings. I will jump in the project and add 
an additional senior staff, so we should be 2~3 FTE starting tuesday. 
Looking at philippe N works in WK2, it looks like you would be a 
reviewer of any patch we would submit, correct? (bug 
https://bugs.webkit.org/show_bug.cgi?id=123158)
I help from time to time but the right reviewers for work on multimedia 
are Brent Fulgham, Eric Carlson, Jer Noble and Philippe Normand.
With our target (iOS/MacOS X) should we target WK1 or WK2? We plan to 
finalize the webcore part first, but we need to target an app, and a 
port for testing. NIX does not seem to be an option anymore.
Usually, what goes into the WebKit layer is small and WK1 and WK2 are 
done simultaneously. For the initial prototype, you can focus on WebKit2 
and port the code to WebKit1 once you have something stable.


On OS X, WebKit2 is used by WKWebView and Safari, WebKit1 is used by the 
WebView API. On iOS, WebKit2 is used by WKWebView and Safari, WebKit1 is 
used by UIWebView.


For initial prototyping, you can generally focus on WebKit2 first.
There also seem to have been a discussion about the design (platform 
vs client) triggered by adam Be.. Anybody knows if there was a 
conclusion? (bug https://bugs.webkit.org/show_bug.cgi?id=67946) We 
would prefer putting a maximum of common code in webcore, as proposed 
by adam.
The architecture depends on the backend but also security considerations 
(especially with the access to hardware). You should ask Eric Carlson 
for input.
We are also contributing some tests to w3c (based on testharness.js, 
testing the bindings and IDL only) that we plan to use for testing. 
Dominique has recently committed the tests for steams and tracks using 
the latest spec (here 
https://github.com/w3c/web-platform-tests/tree/master/mediacapture-streams). 
Is there anything we should prepare in the layout tests for this as 
well? It looks like the media stream tests have been excluded from the 
tests for the time being.

That is a good start. You can import W3C tests into WebKit.

To qualify for a release, you would need to have a lot more testing than 
that. Given the scope of WebRTC, this will require improving the testing 
infrastructure of WebKit.
We are trying to have a working implementation by oct 15th, so we 
could send it for test around and get feedback in time for discussion 
during the W3C technical plenary and advisory committee meeting on 
oct. 27th, in San Jose, CA.
Honestly this seems a little short, WebRTC is big. Most non-trivial 
features take several months to get in good shape with proper testing 
and performance coverage.


It is probably possible to get a working prototype in 2 months, but this 
will require great review cycles.


Benjamin
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] Trying to turn WebRTC's code on - MEDIA_STREAM flags

2014-08-25 Thread santhosh dhamodharan
hi all,

how to unsubscribe

On Mon, Aug 25, 2014 at 11:58 AM, Benjamin Poulain benja...@webkit.org wrote:
 On 8/24/14, 8:37 AM, Alexandre GOUAILLARD wrote:

 For clarification of the  goals and the scope, we intend to provide patches
 in webkit for webRTC. We would love to see webRTC support in iOS and we
 understand that having it in apple provided webkit (UIWebView) to comply to
 apple store rule 2.17. We understand we do not have complete control over
 the entire process, especially the eventual packaging and deployment, and
 the timelines, and that apple does not comment about this, but we thought
 implementing it in webkit was a necessary prerequisite in any case. For the
 rest we will have faith :-)

 During a phone conversation with eric C, we've ben told that we should start
 by making it happen in the macOS X port as we would snot be able to build
 for iOS and because the differences were not so big between the iOS and the
 macOS ports.

 Yep, that sounds like a good plan.

 JO has been working on the Media Capture and Stream and webRTC APIs for
 almost a year, and developed an IE and Safari plugin that implements all of
 the APIs. He reads/speaks/write web IDL fluently now, and now all the
 subtleties of the constraints, streams, tracks, ect. I sit at the standard
 committees and help with everything that is not clear from the specs.
 Unfortunately, that does not help understand webkit intricacies and that's
 where we are today.

 We reached out to Eric C, Thiago from nokia (NIX port), kirun from samsung,
 and started from there. I also speak regularly with adam Be. from ericson at
 the w3c meetings. I will jump in the project and add an additional senior
 staff, so we should be 2~3 FTE starting tuesday. Looking at philippe N works
 in WK2, it looks like you would be a reviewer of any patch we would submit,
 correct? (bug)

 I help from time to time but the right reviewers for work on multimedia are
 Brent Fulgham, Eric Carlson, Jer Noble and Philippe Normand.

 With our target (iOS/MacOS X) should we target WK1 or WK2? We plan to
 finalize the webcore part first, but we need to target an app, and a port
 for testing. NIX does not seem to be an option anymore.

 Usually, what goes into the WebKit layer is small and WK1 and WK2 are done
 simultaneously. For the initial prototype, you can focus on WebKit2 and port
 the code to WebKit1 once you have something stable.

 On OS X, WebKit2 is used by WKWebView and Safari, WebKit1 is used by the
 WebView API. On iOS, WebKit2 is used by WKWebView and Safari, WebKit1 is
 used by UIWebView.

 For initial prototyping, you can generally focus on WebKit2 first.

 There also seem to have been a discussion about the design (platform vs
 client) triggered by adam Be.. Anybody knows if there was a conclusion?
 (bug) We would prefer putting a maximum of common code in webcore, as
 proposed by adam.

 The architecture depends on the backend but also security considerations
 (especially with the access to hardware). You should ask Eric Carlson for
 input.

 We are also contributing some tests to w3c (based on testharness.js, testing
 the bindings and IDL only) that we plan to use for testing. Dominique has
 recently committed the tests for steams and tracks using the latest spec
 (here). Is there anything we should prepare in the layout tests for this as
 well? It looks like the media stream tests have been excluded from the tests
 for the time being.

 That is a good start. You can import W3C tests into WebKit.

 To qualify for a release, you would need to have a lot more testing than
 that. Given the scope of WebRTC, this will require improving the testing
 infrastructure of WebKit.

 We are trying to have a working implementation by oct 15th, so we could send
 it for test around and get feedback in time for discussion during the W3C
 technical plenary and advisory committee meeting on oct. 27th, in San Jose,
 CA.

 Honestly this seems a little short, WebRTC is big. Most non-trivial features
 take several months to get in good shape with proper testing and performance
 coverage.

 It is probably possible to get a working prototype in 2 months, but this
 will require great review cycles.

 Benjamin

 ___
 webkit-dev mailing list
 webkit-dev@lists.webkit.org
 https://lists.webkit.org/mailman/listinfo/webkit-dev

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] Trying to turn WebRTC's code on - MEDIA_STREAM flags

2014-08-24 Thread Alexandre GOUAILLARD
Benjamin,

For clarification of the  goals and the scope, we intend to provide patches
in webkit for webRTC. We would love to see webRTC support in iOS and we
understand that having it in apple provided webkit (UIWebView) to comply to
apple store rule 2.17. We understand we do not have complete control over
the entire process, especially the eventual packaging and deployment, and
the timelines, and that apple does not comment about this, but we thought
implementing it in webkit was a necessary prerequisite in any case. For the
rest we will have faith :-)

During a phone conversation with eric C, we've ben told that we should
start by making it happen in the macOS X port as we would snot be able to
build for iOS and because the differences were not so big between the iOS
and the macOS ports.

JO has been working on the Media Capture and Stream and webRTC APIs for
almost a year, and developed an IE and Safari plugin that implements all of
the APIs. He reads/speaks/write web IDL fluently now, and now all the
subtleties of the constraints, streams, tracks, ect. I sit at the standard
committees and help with everything that is not clear from the specs.
Unfortunately, that does not help understand webkit intricacies and that's
where we are today.

We reached out to Eric C, Thiago from nokia (NIX port), kirun from samsung,
and started from there. I also speak regularly with adam Be. from ericson
at the w3c meetings. I will jump in the project and add an additional
senior staff, so we should be 2~3 FTE starting tuesday. Looking at philippe
N works in WK2, it looks like you would be a reviewer of any patch we would
submit, correct? (bug https://bugs.webkit.org/show_bug.cgi?id=123158)

With our target (iOS/MacOS X) should we target WK1 or WK2? We plan to
finalize the webcore part first, but we need to target an app, and a port
for testing. NIX does not seem to be an option anymore.

There also seem to have been a discussion about the design (platform vs
client) triggered by adam Be.. Anybody knows if there was a conclusion? (bug
https://bugs.webkit.org/show_bug.cgi?id=67946) We would prefer putting a
maximum of common code in webcore, as proposed by adam.

We are also contributing some tests to w3c (based on testharness.js,
testing the bindings and IDL only) that we plan to use for testing.
Dominique has recently committed the tests for steams and tracks using the
latest spec (here
https://github.com/w3c/web-platform-tests/tree/master/mediacapture-streams).
Is there anything we should prepare in the layout tests for this as well?
It looks like the media stream tests have been excluded from the tests for
the time being.

We are trying to have a working implementation by oct 15th, so we could
send it for test around and get feedback in time for discussion during the
W3C technical plenary and advisory committee meeting on oct. 27th, in San
Jose, CA.

looking forward to any feedback.

regards,


   - Alex.
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] Trying to turn WebRTC's code on - MEDIA_STREAM flags

2014-07-31 Thread Benjamin Poulain

On 7/30/14, 2:51 AM, Jacques-Olivier wrote:
I kept working on getting media_stream to work. I think my 
understanding of what is happening improved, but I'm still stuck at 
the same point:


I read some more code and did some research about the Supplement and 
Supplementable classes.
I mainly found this page http://trac.webkit.org/wiki/Modules which 
explains that Supplements are used to extract code from massive 
classes and make then more manageable and maintainable.

Please correct me if I am wrong.
That's right. Supplement are used to manage complexity by encapsulating 
self contained features behind a separate interfaces.
Anyway, it doesn't change that my program has no Supplement for the 
key UserMediaController.

It looks like most of the supplements are being provided in two places:

  * WebKit::WebView::_commonInitializationWithFrameName
  * WebKit2::WebPage 's constructor

is there any other place where it should be done?
+probably another place in the WebKit layer for Windows, you can 
probably ignore that.
WebView actually contains a call to WebCore::provideUserMediaTo which 
creates a supplement, but my debugging show that 
_commonInitializationWithFrameName is never called.

WebPage's constructor does not generate a UserMediaController supplement.

My understanding of the WebView is that it is the rectangle in which 
the webpages are rendered. Is this assumption correct?
I don't understand why _commonInitializationWithFrameName is never 
called when browsing. From the name of the function, I would expect it 
to be called right after the memory allocation.

WebKit1's WebView is not used by Safari.

The WebKit project has two application layers: an old one named 
WebKit1 that handle web pages in-process, and a new one named WebKit2 
that use a multi-process model.

This leaves me with 2 options:
1) Find a way to trigger _commonInitializationWithFrameName.
I have no idea of how to do that at the moment
If you want, you can still use WebKit1 by using the MiniBrowser: 
Tools/Scripts/run-minibrowser (IIRC it runs WebKit1 by default, but if 
not there is a way to get it to run WebKit1).

2) Duplicate the call to WebCore::provideUserMediaTo in WebKit2::WebPage.
I understand this is what is being done for the geolocation supplement.
I started to implement this solution, but it requires to translate 
Objective-C++ code into C++, and I am afraid that the file inclusion 
might never end.


Does any one of these solutions sound more reliable than the other for 
you?
Long term, if you want WebRTC to work in WebKit, it will have to work on 
WebKit2. If you just want to prototype something, it might be easier to 
use WebKit1 if its implementation is in a better shape.


Can you clarify your goals? Do you intent to provide patches for WebRTC 
support in WebKit?


Benjamin



Thanks in advance,
J-O H

--
Haché Jacques-Olivier
RD Engineer at Temasys Communications Pte Ltd
Fr : 06 45 85 48 80
Sg : 9086 3673

On 29 Jul 2014, at 17:45, Jacques-Olivier jo.ha...@temasys.com.sg 
mailto:jo.ha...@temasys.com.sg wrote:



Hi everyone,

I have some updates regarding my enabling of media_stream and some 
new question.


I managed to build the project with the following options ON:

  * ENABLE_MEDIA_CAPTURE
  * ENABLE_MEDIA_CONTROLS_SCRIPT
  * ENABLE_MEDIA_SOURCE
  * ENABLE_MEDIA_STATISTICS
  * ENABLE_MEDIA_STREAM
  * ENABLE_VIDEO
  * ENABLE_VIDEO_TRACK

For this I had to:
1) copy the content of these folders

  * WebKit/WebKitBuild/Debug/DerivedSources/WebCore
  * WebKit/WebKitBuild/Release/DerivedSources/WebCore

into DerivedSources/WebCore

2) Add some header and source files to the Xcode projects. The files 
were present in the repo, but not added to the projects.

3) Add some headers to be copied into WebCore.framework

Given those changes, I was able to build the project with both Xcode 
and the build script;


I tried running a very basic test that only calls 
navigator.webkitGetUserMedia, but the call fails with the folioing error:


[Error] NotSupportedError: DOM Exception 9: The implementation
did not support the requested type of object or operation.


I went into the code with Xcode's debugger and found that the error 
happens in NavigatorUserMedia::webkitGetUserMedia (basically the 
function's entrance).
My understanding is that the NavigatorUserMedia is trying to get the 
content of a supplement for the key UserMediaController
The access to the supplement itself is fine, but its map only 
contains one object with a key value set to NULL.
Therefore the supplement returns NULL, and the NavigatorUserMedia 
triggers an error.


There are some comments in the code about how supplements work, but 
not what they are for. Can anyone enlighten me about this?

Did I miss an initialisation somewhere?

This was what is blocking me now.
I also have a couple of more generic questions about the project:

1) When I build with the script and then with Xcode, Xcode starts 
from the beginning, generates new binaries 

Re: [webkit-dev] Trying to turn WebRTC's code on - MEDIA_STREAM flags

2014-07-31 Thread Philippe Normand
On Wed, 2014-07-30 at 17:51 +0800, Jacques-Olivier wrote:
 Hi everyone, me again,
 
 
 I kept working on getting media_stream to work. I think my
 understanding of what is happening improved, but I’m still stuck at
 the same point:
 
 
 I read some more code and did some research about the Supplement and
 Supplementable classes.
 I mainly found this page which explains that Supplements are used to
 extract code from “massive” classes and make then more manageable and
 maintainable.
 Please correct me if I am wrong.
 
 
 Anyway, it doesn’t change that my program has no Supplement for the
 key “UserMediaController”.
 It looks like most of the supplements are being provided in two
 places:
   * WebKit::WebView::_commonInitializationWithFrameName
   * WebKit2::WebPage ’s constructor
 is there any other place where it should be done?
 
 
 WebView actually contains a call to WebCore::provideUserMediaTo which
 creates a supplement, but my debugging show that
 _commonInitializationWithFrameName is never called.
 WebPage’s constructor does not generate a UserMediaController
 supplement.
 
 
 My understanding of the WebView is that it is the rectangle in which
 the webpages are rendered. Is this assumption correct?
 I don’t understand why _commonInitializationWithFrameName is never
 called when browsing. From the name of the function, I would expect it
 to be called right after the memory allocation.
 
 
 This leaves me with 2 options:
 1) Find a way to trigger _commonInitializationWithFrameName.
 I have no idea of how to do that at the moment
 
 
 2) Duplicate the call to WebCore::provideUserMediaTo in
 WebKit2::WebPage.
 I understand this is what is being done for the geolocation
 supplement.
 I started to implement this solution, but it requires to translate
 Objective-C++ code into C++, and I am afraid that the file inclusion
 might never end.
 

You might be interested to check this bug:
https://bugs.webkit.org/show_bug.cgi?id=123158

Philippe


___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] Trying to turn WebRTC's code on - MEDIA_STREAM flags

2014-07-31 Thread Jacques-Olivier
Thanks a lot for all your response, that really helps a lot.
My own responses bellow:

--
Haché Jacques-Olivier
RD Engineer at Temasys Communications Pte Ltd
Fr : 06 45 85 48 80
Sg : 9086 3673 

On 31 Jul 2014, at 16:34, Benjamin Poulain benja...@webkit.org wrote:

 On 7/30/14, 2:51 AM, Jacques-Olivier wrote:
 I kept working on getting media_stream to work. I think my understanding of 
 what is happening improved, but I’m still stuck at the same point:
 
 I read some more code and did some research about the Supplement and 
 Supplementable classes.
 I mainly found this page which explains that Supplements are used to extract 
 code from “massive” classes and make then more manageable and maintainable.
 Please correct me if I am wrong.
 That's right. Supplement are used to manage complexity by encapsulating self 
 contained features behind a separate interfaces.
Good

 Anyway, it doesn’t change that my program has no Supplement for the key 
 “UserMediaController”.
 It looks like most of the supplements are being provided in two places:
 WebKit::WebView::_commonInitializationWithFrameName
 WebKit2::WebPage ’s constructor
 is there any other place where it should be done?
 +probably another place in the WebKit layer for Windows, you can probably 
 ignore that.
I will

 WebView actually contains a call to WebCore::provideUserMediaTo which 
 creates a supplement, but my debugging show that 
 _commonInitializationWithFrameName is never called.
 WebPage’s constructor does not generate a UserMediaController supplement.
 
 My understanding of the WebView is that it is the rectangle in which the 
 webpages are rendered. Is this assumption correct?
 I don’t understand why _commonInitializationWithFrameName is never called 
 when browsing. From the name of the function, I would expect it to be called 
 right after the memory allocation.
 WebKit1's WebView is not used by Safari.
 
 The WebKit project has two application layers: an old one named WebKit1 
 that handle web pages in-process, and a new one named WebKit2 that use a 
 multi-process model.

Interesting. Do you know when the shift was done?
That means that Safari is not using it, but other port might.

 This leaves me with 2 options:
 1) Find a way to trigger _commonInitializationWithFrameName.
 I have no idea of how to do that at the moment
 If you want, you can still use WebKit1 by using the MiniBrowser: 
 Tools/Scripts/run-minibrowser (IIRC it runs WebKit1 by default, but if not 
 there is a way to get it to run WebKit1).

Awesome!
I had to comment the permission checking as it seems like a function is 
missing, but I was able to turn on my camera.

More precisely, the UIDelegate does not respond to the selector 
webView:decidePolicyForUserMediaRequestFromOrigin:listener:
It doesn’t sound impossible to fix.

Once once the camera is turned on, the success callback is properly called. 
I tried to render it in a video element by doing (JS)
videoElement.src = stream;
but I guess it would have been a bit too easy :)

There is no error, but nothing happens.
It looks like the video element successfully registers the MediaStream, but 
is not capable of rendering it.

I will have to do some more digging in how the video element is handling a 
MediaStream.

 2) Duplicate the call to WebCore::provideUserMediaTo in WebKit2::WebPage.
 I understand this is what is being done for the geolocation supplement.
 I started to implement this solution, but it requires to translate 
 Objective-C++ code into C++, and I am afraid that the file inclusion might 
 never end.
 
 Does any one of these solutions sound more reliable than the other for you?
 Long term, if you want WebRTC to work in WebKit, it will have to work on 
 WebKit2. If you just want to prototype something, it might be easier to use 
 WebKit1 if its implementation is in a better shape.
 

I just arrived on Webkit, so I’m still in a discovery phase. 
I think I will start by getting the MediaStream to work with WK1, and move to 
WK2 once I will be more familiar with the code.

 Can you clarify your goals? Do you intent to provide patches for WebRTC 
 support in WebKit?
 

Yes, I’m here to complete the implementation of WebRTC in WebKit.
As I said, I’m still just entering the project, but in time, I will start 
providing patches.
I’ll probably get MS to fully work locally, and then move to the PeerConnection.

Regards,
J-O

 Benjamin
 
 
 Thanks in advance,
 J-O H
 
 --
 Haché Jacques-Olivier
 RD Engineer at Temasys Communications Pte Ltd
 Fr : 06 45 85 48 80
 Sg : 9086 3673 
 
 On 29 Jul 2014, at 17:45, Jacques-Olivier jo.ha...@temasys.com.sg wrote:
 
 Hi everyone, 
 
 I have some updates regarding my enabling of media_stream and some new 
 question.
 
 I managed to build the project with the following options ON:
 ENABLE_MEDIA_CAPTURE
 ENABLE_MEDIA_CONTROLS_SCRIPT
 ENABLE_MEDIA_SOURCE
 ENABLE_MEDIA_STATISTICS
 ENABLE_MEDIA_STREAM
 ENABLE_VIDEO
 ENABLE_VIDEO_TRACK
 For this I had to:
 1) copy the content of 

Re: [webkit-dev] Trying to turn WebRTC's code on - MEDIA_STREAM flags

2014-07-30 Thread Jacques-Olivier
Hi everyone, me again,

I kept working on getting media_stream to work. I think my understanding of 
what is happening improved, but I’m still stuck at the same point:

I read some more code and did some research about the Supplement and 
Supplementable classes.
I mainly found this page which explains that Supplements are used to extract 
code from “massive” classes and make then more manageable and maintainable.
Please correct me if I am wrong.

Anyway, it doesn’t change that my program has no Supplement for the key 
“UserMediaController”.
It looks like most of the supplements are being provided in two places:
WebKit::WebView::_commonInitializationWithFrameName
WebKit2::WebPage ’s constructor
is there any other place where it should be done?

WebView actually contains a call to WebCore::provideUserMediaTo which creates a 
supplement, but my debugging show that _commonInitializationWithFrameName is 
never called.
WebPage’s constructor does not generate a UserMediaController supplement.

My understanding of the WebView is that it is the rectangle in which the 
webpages are rendered. Is this assumption correct?
I don’t understand why _commonInitializationWithFrameName is never called when 
browsing. From the name of the function, I would expect it to be called right 
after the memory allocation.

This leaves me with 2 options:
1) Find a way to trigger _commonInitializationWithFrameName.
I have no idea of how to do that at the moment

2) Duplicate the call to WebCore::provideUserMediaTo in WebKit2::WebPage.
I understand this is what is being done for the geolocation supplement.
I started to implement this solution, but it requires to translate 
Objective-C++ code into C++, and I am afraid that the file inclusion might 
never end.

Does any one of these solutions sound more reliable than the other for you?

Thanks in advance,
J-O H

--
Haché Jacques-Olivier
RD Engineer at Temasys Communications Pte Ltd
Fr : 06 45 85 48 80
Sg : 9086 3673 

On 29 Jul 2014, at 17:45, Jacques-Olivier jo.ha...@temasys.com.sg wrote:

 Hi everyone, 
 
 I have some updates regarding my enabling of media_stream and some new 
 question.
 
 I managed to build the project with the following options ON:
 ENABLE_MEDIA_CAPTURE
 ENABLE_MEDIA_CONTROLS_SCRIPT
 ENABLE_MEDIA_SOURCE
 ENABLE_MEDIA_STATISTICS
 ENABLE_MEDIA_STREAM
 ENABLE_VIDEO
 ENABLE_VIDEO_TRACK
 For this I had to:
 1) copy the content of these folders
 WebKit/WebKitBuild/Debug/DerivedSources/WebCore
 WebKit/WebKitBuild/Release/DerivedSources/WebCore
 into DerivedSources/WebCore
 
 2) Add some header and source files to the Xcode projects. The files were 
 present in the repo, but not added to the projects.
 3) Add some headers to be copied into WebCore.framework
 
 Given those changes, I was able to build the project with both Xcode and the 
 build script;
 
 I tried running a very basic test that only calls 
 navigator.webkitGetUserMedia, but the call fails with the folioing error:
 [Error] NotSupportedError: DOM Exception 9: The implementation did not 
 support the requested type of object or operation.
 
 I went into the code with Xcode’s debugger and found that the error happens 
 in NavigatorUserMedia::webkitGetUserMedia (basically the function’s entrance).
 My understanding is that the NavigatorUserMedia is trying to get the content 
 of a “supplement” for the key “UserMediaController
 The access to the supplement itself is fine, but its map only contains one 
 object with a key value set to NULL.
 Therefore the supplement returns NULL, and the NavigatorUserMedia triggers an 
 error.
 
 There are some comments in the code about how supplements work, but not what 
 they are for. Can anyone enlighten me about this?
 Did I miss an initialisation somewhere?
 
 This was what is blocking me now.
 I also have a couple of more generic questions about the project:
 
 1) When I build with the script and then with Xcode, Xcode starts from the 
 beginning, generates new binaries and links against them. Why are the script 
 and Xcode not using the same files? It feels like a waste of time and space.
 
 2) I had to do a number of modifications to the project to get here. At some 
 point I will send pull requests, but I understand most of the people do not 
 want to have media_stream enabled by default. Does that mean that for each 
 pull request, I will have to remove my changes, send the pull request and do 
 them again?What is the right way of handling this situation?
 
 Regards,
 J-O H
 
 --
 Haché Jacques-Olivier
 RD Engineer at Temasys Communications Pte Ltd
 Fr : 06 45 85 48 80
 Sg : 9086 3673 
 
 On 23 Jul 2014, at 16:49, Alexandre GOUAILLARD agouaill...@gmail.com wrote:
 
 Hi benjamain, thanks for the answers, 
 
 Cmake is not a build system in itself, it is a cross platform build 
 generator. i.e. you can generate a make file, an VS solution file and a 
 Xcode file from CMakeLists.txt (cmake -G).
 
 So you mean to say that the committed make files and Xcode files are not 
 

Re: [webkit-dev] Trying to turn WebRTC's code on - MEDIA_STREAM flags

2014-07-29 Thread Jacques-Olivier
Hi everyone, 

I have some updates regarding my enabling of media_stream and some new question.

I managed to build the project with the following options ON:
ENABLE_MEDIA_CAPTURE
ENABLE_MEDIA_CONTROLS_SCRIPT
ENABLE_MEDIA_SOURCE
ENABLE_MEDIA_STATISTICS
ENABLE_MEDIA_STREAM
ENABLE_VIDEO
ENABLE_VIDEO_TRACK
For this I had to:
1) copy the content of these folders
WebKit/WebKitBuild/Debug/DerivedSources/WebCore
WebKit/WebKitBuild/Release/DerivedSources/WebCore
into DerivedSources/WebCore

2) Add some header and source files to the Xcode projects. The files were 
present in the repo, but not added to the projects.
3) Add some headers to be copied into WebCore.framework

Given those changes, I was able to build the project with both Xcode and the 
build script;

I tried running a very basic test that only calls navigator.webkitGetUserMedia, 
but the call fails with the folioing error:
[Error] NotSupportedError: DOM Exception 9: The implementation did not support 
the requested type of object or operation.

I went into the code with Xcode’s debugger and found that the error happens in 
NavigatorUserMedia::webkitGetUserMedia (basically the function’s entrance).
My understanding is that the NavigatorUserMedia is trying to get the content of 
a “supplement” for the key “UserMediaController
The access to the supplement itself is fine, but its map only contains one 
object with a key value set to NULL.
Therefore the supplement returns NULL, and the NavigatorUserMedia triggers an 
error.

There are some comments in the code about how supplements work, but not what 
they are for. Can anyone enlighten me about this?
Did I miss an initialisation somewhere?

This was what is blocking me now.
I also have a couple of more generic questions about the project:

1) When I build with the script and then with Xcode, Xcode starts from the 
beginning, generates new binaries and links against them. Why are the script 
and Xcode not using the same files? It feels like a waste of time and space.

2) I had to do a number of modifications to the project to get here. At some 
point I will send pull requests, but I understand most of the people do not 
want to have media_stream enabled by default. Does that mean that for each pull 
request, I will have to remove my changes, send the pull request and do them 
again?What is the right way of handling this situation?

Regards,
J-O H

--
Haché Jacques-Olivier
RD Engineer at Temasys Communications Pte Ltd
Fr : 06 45 85 48 80
Sg : 9086 3673 

On 23 Jul 2014, at 16:49, Alexandre GOUAILLARD agouaill...@gmail.com wrote:

 Hi benjamain, thanks for the answers, 
 
 Cmake is not a build system in itself, it is a cross platform build 
 generator. i.e. you can generate a make file, an VS solution file and a Xcode 
 file from CMakeLists.txt (cmake -G).
 
 So you mean to say that the committed make files and Xcode files are not 
 generated from CMake, is that correct? Also, do you have any insight what the 
 people using cmake end up using for building (is it make/gcc/ld, 
 make/clang/ld, other flavors of build/compiler/linker) ?
 
 regards,
 
 Alex.
 
  
 
 
 On Wed, Jul 23, 2014 at 4:24 PM, Benjamin Poulain benja...@webkit.org wrote:
 
 On 7/22/14, 12:48 AM, Jacques-Olivier wrote:
 HI Benjamin,
 
 Thanks for you answer.
 
 I just deleted the XCodeBuild folder and added a couple of files in the 
 project manually. 
 My computer is re-building the project, I will see how it goes.
 A couple of extra questions:
 
 1) After deleting the XCodeBuild folder, I cannot make my first build using 
 Xcode. I end up with a file not found on 
 #include llvm-c/Analysis.h
 in JavaScriptCore/llvm/LLVMHeaders.h
 I actually had the same issue on my first build. After a successful build 
 from build-webkit, I can build again using Xcode (not clean and build).
 Any lead regarding why?
 No idea, I only use build-webkit and make for building.
 A lot of people use Xcode so there must be a way to get it to work.
 
 2) The Xcode projects is versioned on the repo. Is there anyway to 
 re-generate it automatically?
 Having the Xcode project shared sounds very unsafe. What is someone 
 introduces a bug in it someday?
 The Xcode project files are not generated, they are real project files 
 created by Xcode. WebKit contributors maintain 3 build systems in parallel: 
 Xcode, CMake, and VS.
 Regards,
 J-O H
 
 --
 Haché Jacques-Olivier
 RD Engineer at Temasys Communications Pte Ltd
 Fr : 06 45 85 48 80
 Sg : 9086 3673 
 
 On 22 Jul 2014, at 15:16, Benjamin Poulain benja...@webkit.org wrote:
 
 Quick answers inline:
 
 On 7/21/14, 9:22 PM, Jacques-Olivier wrote:
 Note: I already sent this email, but I didn’t get any answer, nor can I 
 see the thread in the archives. Therefore I think it was blocked, maybe 
 because of the attachment that I remove this time.
 
 I’m new on this mailing so I’ll start by introducing myself:
 My name Jacques-Olivier Haché (J-O), I’m working for Temasys 
 Communication, and I’m entering the WebKit project to 

Re: [webkit-dev] Trying to turn WebRTC's code on - MEDIA_STREAM flags

2014-07-22 Thread Benjamin Poulain

Quick answers inline:

On 7/21/14, 9:22 PM, Jacques-Olivier wrote:
Note: I already sent this email, but I didn't get any answer, nor can 
I see the thread in the archives. Therefore I think it was blocked, 
maybe because of the attachment that I remove this time.


I'm new on this mailing so I'll start by introducing myself:
My name Jacques-Olivier Haché (J-O), I'm working for Temasys 
Communication, and I'm entering the WebKit project to work on the 
implementation of WebRTC inside WebKit.
For those who would be following the WebRTC's news, I'm also the main 
developer of the WebRTC plugin released by Temasys.


Back to business:

I was able to download the project, build it and run it inside Safari. 
I did not try to run it in a different browser yet.


My configuration:

  * Macbook Air 2012
  * Mac OS X 10.9.4
  * Revision 171167
  * I'm on master
  * I suppose I'm using the regular Mac port as I didn't see where to
change from one port to another yet.
  * building for debug mode

I am now trying to enable the WebRTC related features to get a better 
understanding of the current state of this part of the project.
I have to say that I faced a lack of documentation on this area. I 
found the features list https://trac.webkit.org/wiki/FeatureFlags, a 
document about how to add a new feature 
https://trac.webkit.org/wiki/AddingFeatures but nothing about how to 
turn a feature on and off (there is actually a TODO about that in the 
second link).


I looked into the files that one needs to change to add a new feature 
and found two interesting files:


  * Source/WTF/wtf/FeatureDefines.h - where the WebRTC related
contants were set to 0 instead of 1
  * Source/cmake/WebKitFeatures.cmake - where the contants were set to OFF

I listed the following definitions that look related to WebRTC

  * ENABLE_MEDIA_CAPTURE
  * ENABLE_MEDIA_CONTROLS_SCRIPT
  * ENABLE_MEDIA_SOURCE
  * ENABLE_MEDIA_STATISTICS
  * ENABLE_MEDIA_STREAM
  * ENABLE_VIDEO
  * ENABLE_VIDEO_TRACK

I turned those definitions to 1 and ON in the respective file and 
tried to build.
The code in the header WebCore/Modules/mediastream/mediastream.h could 
not compile apparently because the observer did not have a destructor. 
I created one:

class Observer {
public:
virtual void didAddOrRemoveTrack() = 0;
  virtual ~Observer() {};
};

and tried to build again.

I now have a linking error when building WebCore with Xcode.

Ld 
/Users/jacquesolivierhache/Workspace/Temasys/WebKitProject/WebKit/WebKitBuild/Debug/WebCore.framework/Versions/A/WebCore 
normal x86_64
cd 
/Users/jacquesolivierhache/Workspace/Temasys/WebKitProject/WebKit/Source/WebCore

export MACOSX_DEPLOYMENT_TARGET=10.9
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ 
-arch x86_64 -dynamiclib -isysroot 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk 
-L/Users/jacquesolivierhache/Workspace/Temasys/WebKitProject/WebKit/WebKitBuild/Debug 
-F/Users/jacquesolivierhache/Workspace/Temasys/WebKitProject/WebKit/WebKitBuild/Debug 
-filelist 
/Users/jacquesolivierhache/Workspace/Temasys/WebKitProject/WebKit/WebKitBuild/WebCore.build/Debug/WebCore.build/Objects-normal/x86_64/WebCore.LinkFileList 
-Xlinker --no-demangle -exported_symbols_list 
/Users/jacquesolivierhache/Workspace/Temasys/WebKitProject/WebKit/WebKitBuild/Debug/DerivedSources/WebCore/WebCore.LP64.exp 
-install_name 
/System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/WebCore 
-mmacosx-version-min=10.9 -lsqlite3 -lobjc -lANGLE -sub_library 
libobjc -umbrella WebKit -allowable_client WebCoreTestSupport 
-allowable_client WebKit2 -allowable_client WebKitLegacy -framework 
ApplicationServices -framework AudioUnit -framework Carbon -framework 
Cocoa -framework IOSurface -framework OpenGL -stdlib=libc++ 
-fobjc-link-runtime -framework Accelerate -framework AudioToolbox 
-framework CoreAudio -framework IOKit -framework JavaScriptCore 
-licucore -lobjc -lxml2 -lz -framework QuartzCore -framework Security 
-framework SystemConfiguration -single_module -compatibility_version 1 
-current_version 600.1 -Xlinker -dependency_info -Xlinker 
/Users/jacquesolivierhache/Workspace/Temasys/WebKitProject/WebKit/WebKitBuild/WebCore.build/Debug/WebCore.build/Objects-normal/x86_64/WebCore_dependency_info.dat 
-o 
/Users/jacquesolivierhache/Workspace/Temasys/WebKitProject/WebKit/WebKitBuild/Debug/WebCore.framework/Versions/A/WebCore


Undefined symbols for architecture x86_64:
__ZN7WebCore11JSNavigator18webkitGetUserMediaEPN3JSC9ExecStateE, 
referenced from:
__ZN7WebCore46jsNavigatorPrototypeFunctionWebkitGetUserMediaEPN3JSC9ExecStateE 
in JSNavigator.o
__ZN7WebCore15RTCOfferOptions6createERKNS_10DictionaryERi, 
referenced from:

Re: [webkit-dev] Trying to turn WebRTC's code on - MEDIA_STREAM flags

2014-07-22 Thread Jacques-Olivier
HI Benjamin,

Thanks for you answer.

I just deleted the XCodeBuild folder and added a couple of files in the project 
manually. 
My computer is re-building the project, I will see how it goes.
A couple of extra questions:

1) After deleting the XCodeBuild folder, I cannot make my first build using 
Xcode. I end up with a file not found on 
#include llvm-c/Analysis.h
in JavaScriptCore/llvm/LLVMHeaders.h
I actually had the same issue on my first build. After a successful build from 
build-webkit, I can build again using Xcode (not clean and build).
Any lead regarding why?

2) The Xcode projects is versioned on the repo. Is there anyway to re-generate 
it automatically?
Having the Xcode project shared sounds very unsafe. What is someone introduces 
a bug in it someday?

Regards,
J-O H

--
Haché Jacques-Olivier
RD Engineer at Temasys Communications Pte Ltd
Fr : 06 45 85 48 80
Sg : 9086 3673 

On 22 Jul 2014, at 15:16, Benjamin Poulain benja...@webkit.org wrote:

 Quick answers inline:
 
 On 7/21/14, 9:22 PM, Jacques-Olivier wrote:
 Note: I already sent this email, but I didn’t get any answer, nor can I see 
 the thread in the archives. Therefore I think it was blocked, maybe because 
 of the attachment that I remove this time.
 
 I’m new on this mailing so I’ll start by introducing myself:
 My name Jacques-Olivier Haché (J-O), I’m working for Temasys Communication, 
 and I’m entering the WebKit project to work on the implementation of WebRTC 
 inside WebKit.
 For those who would be following the WebRTC’s news, I’m also the main 
 developer of the WebRTC plugin released by Temasys.
 
 Back to business:
 
 I was able to download the project, build it and run it inside Safari. I did 
 not try to run it in a different browser yet.
 
 My configuration:
 Macbook Air 2012
 Mac OS X 10.9.4
 Revision 171167
 I’m on master
 I suppose I’m using the regular Mac port as I didn’t see where to change 
 from one port to another yet.
 building for debug mode
 I am now trying to enable the WebRTC related features to get a better 
 understanding of the current state of this part of the project. 
 I have to say that I faced a lack of documentation on this area. I found the 
 features list, a document about how to add a new feature but nothing about 
 how to turn a feature on and off (there is actually a TODO about that in the 
 second link).
 
 I looked into the files that one needs to change to add a new feature and 
 found two interesting files:
 Source/WTF/wtf/FeatureDefines.h - where the WebRTC related contants were set 
 to 0 instead of 1
 Source/cmake/WebKitFeatures.cmake - where the contants were set to OFF
 I listed the following definitions that look related to WebRTC
 ENABLE_MEDIA_CAPTURE
 ENABLE_MEDIA_CONTROLS_SCRIPT
 ENABLE_MEDIA_SOURCE
 ENABLE_MEDIA_STATISTICS
 ENABLE_MEDIA_STREAM
 ENABLE_VIDEO
 ENABLE_VIDEO_TRACK
 I turned those definitions to 1 and ON in the respective file and tried to 
 build.
 The code in the header WebCore/Modules/mediastream/mediastream.h could not 
 compile apparently because the observer did not have a destructor. I created 
 one:
 class Observer {
 public:
 virtual void didAddOrRemoveTrack() = 0;
   virtual ~Observer() {};
 };
 
 and tried to build again.
 
 I now have a linking error when building WebCore with Xcode. 
 
 Ld 
 /Users/jacquesolivierhache/Workspace/Temasys/WebKitProject/WebKit/WebKitBuild/Debug/WebCore.framework/Versions/A/WebCore
  normal x86_64
 cd 
 /Users/jacquesolivierhache/Workspace/Temasys/WebKitProject/WebKit/Source/WebCore
 export MACOSX_DEPLOYMENT_TARGET=10.9
 
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
  -arch x86_64 -dynamiclib -isysroot 
 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk
  
 -L/Users/jacquesolivierhache/Workspace/Temasys/WebKitProject/WebKit/WebKitBuild/Debug
  
 -F/Users/jacquesolivierhache/Workspace/Temasys/WebKitProject/WebKit/WebKitBuild/Debug
  -filelist 
 /Users/jacquesolivierhache/Workspace/Temasys/WebKitProject/WebKit/WebKitBuild/WebCore.build/Debug/WebCore.build/Objects-normal/x86_64/WebCore.LinkFileList
  -Xlinker --no-demangle -exported_symbols_list 
 /Users/jacquesolivierhache/Workspace/Temasys/WebKitProject/WebKit/WebKitBuild/Debug/DerivedSources/WebCore/WebCore.LP64.exp
  -install_name 
 /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/WebCore
  -mmacosx-version-min=10.9 -lsqlite3 -lobjc -lANGLE -sub_library libobjc 
 -umbrella WebKit -allowable_client WebCoreTestSupport -allowable_client 
 WebKit2 -allowable_client WebKitLegacy -framework ApplicationServices 
 -framework AudioUnit -framework Carbon -framework Cocoa -framework IOSurface 
 -framework OpenGL -stdlib=libc++ -fobjc-link-runtime -framework Accelerate 
 -framework AudioToolbox -framework CoreAudio -framework IOKit -framework 
 JavaScriptCore -licucore -lobjc -lxml2 -lz -framework 

Re: [webkit-dev] Trying to turn WebRTC's code on - MEDIA_STREAM flags

2014-07-22 Thread Alex Christensen
Welcome to WebKit!  

I have also spent a fair amount of time blindly switching unfamiliar features 
on and off.  You can usually use the ChangeLogs, svn blame and trac.webkit.org 
to find some information, but I think it would be mutually beneficial if 
everyone took a moment to update http://trac.webkit.org/wiki/FeatureFlags which 
hasn’t been updated in 14 months.  People are working on new features, and 
there is often no documentation :(

Alex

 On Jul 22, 2014, at 12:48 AM, Jacques-Olivier jo.ha...@temasys.com.sg wrote:
 
 HI Benjamin,
 
 Thanks for you answer.
 
 I just deleted the XCodeBuild folder and added a couple of files in the 
 project manually. 
 My computer is re-building the project, I will see how it goes.
 A couple of extra questions:
 
 1) After deleting the XCodeBuild folder, I cannot make my first build using 
 Xcode. I end up with a file not found on 
 #include llvm-c/Analysis.h
 in JavaScriptCore/llvm/LLVMHeaders.h
 I actually had the same issue on my first build. After a successful build 
 from build-webkit, I can build again using Xcode (not clean and build).
 Any lead regarding why?
 
 2) The Xcode projects is versioned on the repo. Is there anyway to 
 re-generate it automatically?
 Having the Xcode project shared sounds very unsafe. What is someone 
 introduces a bug in it someday?
 
 Regards,
 J-O H
 
 --
 Haché Jacques-Olivier
 RD Engineer at Temasys Communications Pte Ltd
 Fr : 06 45 85 48 80
 Sg : 9086 3673 
 
 On 22 Jul 2014, at 15:16, Benjamin Poulain benja...@webkit.org wrote:
 
 Quick answers inline:
 
 On 7/21/14, 9:22 PM, Jacques-Olivier wrote:
 Note: I already sent this email, but I didn’t get any answer, nor can I see 
 the thread in the archives. Therefore I think it was blocked, maybe because 
 of the attachment that I remove this time.
 
 I’m new on this mailing so I’ll start by introducing myself:
 My name Jacques-Olivier Haché (J-O), I’m working for Temasys Communication, 
 and I’m entering the WebKit project to work on the implementation of WebRTC 
 inside WebKit.
 For those who would be following the WebRTC’s news, I’m also the main 
 developer of the WebRTC plugin released by Temasys.
 
 Back to business:
 
 I was able to download the project, build it and run it inside Safari. I 
 did not try to run it in a different browser yet.
 
 My configuration:
 Macbook Air 2012
 Mac OS X 10.9.4
 Revision 171167
 I’m on master
 I suppose I’m using the regular Mac port as I didn’t see where to change 
 from one port to another yet.
 building for debug mode
 I am now trying to enable the WebRTC related features to get a better 
 understanding of the current state of this part of the project. 
 I have to say that I faced a lack of documentation on this area. I found 
 the features list, a document about how to add a new feature but nothing 
 about how to turn a feature on and off (there is actually a TODO about that 
 in the second link).
 
 I looked into the files that one needs to change to add a new feature and 
 found two interesting files:
 Source/WTF/wtf/FeatureDefines.h - where the WebRTC related contants were 
 set to 0 instead of 1
 Source/cmake/WebKitFeatures.cmake - where the contants were set to OFF
 I listed the following definitions that look related to WebRTC
 ENABLE_MEDIA_CAPTURE
 ENABLE_MEDIA_CONTROLS_SCRIPT
 ENABLE_MEDIA_SOURCE
 ENABLE_MEDIA_STATISTICS
 ENABLE_MEDIA_STREAM
 ENABLE_VIDEO
 ENABLE_VIDEO_TRACK
 I turned those definitions to 1 and ON in the respective file and tried to 
 build.
 The code in the header WebCore/Modules/mediastream/mediastream.h could not 
 compile apparently because the observer did not have a destructor. I 
 created one:
 class Observer {
 public:
 virtual void didAddOrRemoveTrack() = 0;
   virtual ~Observer() {};
 };
 
 and tried to build again.
 
 I now have a linking error when building WebCore with Xcode. 
 
 Ld 
 /Users/jacquesolivierhache/Workspace/Temasys/WebKitProject/WebKit/WebKitBuild/Debug/WebCore.framework/Versions/A/WebCore
  normal x86_64
 cd 
 /Users/jacquesolivierhache/Workspace/Temasys/WebKitProject/WebKit/Source/WebCore
 export MACOSX_DEPLOYMENT_TARGET=10.9
 
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
  -arch x86_64 -dynamiclib -isysroot 
 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk
  
 -L/Users/jacquesolivierhache/Workspace/Temasys/WebKitProject/WebKit/WebKitBuild/Debug
  
 -F/Users/jacquesolivierhache/Workspace/Temasys/WebKitProject/WebKit/WebKitBuild/Debug
  -filelist 
 /Users/jacquesolivierhache/Workspace/Temasys/WebKitProject/WebKit/WebKitBuild/WebCore.build/Debug/WebCore.build/Objects-normal/x86_64/WebCore.LinkFileList
  -Xlinker --no-demangle -exported_symbols_list 
 /Users/jacquesolivierhache/Workspace/Temasys/WebKitProject/WebKit/WebKitBuild/Debug/DerivedSources/WebCore/WebCore.LP64.exp
  -install_name 
 

[webkit-dev] Trying to turn WebRTC's code on - MEDIA_STREAM flags

2014-07-21 Thread Jacques-Olivier
Hi everyone,

Note: I already sent this email, but I didn’t get any answer, nor can I see the 
thread in the archives. Therefore I think it was blocked, maybe because of the 
attachment that I remove this time.

I’m new on this mailing so I’ll start by introducing myself:
My name Jacques-Olivier Haché (J-O), I’m working for Temasys Communication, and 
I’m entering the WebKit project to work on the implementation of WebRTC inside 
WebKit.
For those who would be following the WebRTC’s news, I’m also the main developer 
of the WebRTC plugin released by Temasys.

Back to business:

I was able to download the project, build it and run it inside Safari. I did 
not try to run it in a different browser yet.

My configuration:
Macbook Air 2012
Mac OS X 10.9.4
Revision 171167
I’m on master
I suppose I’m using the regular Mac port as I didn’t see where to change from 
one port to another yet.
building for debug mode
I am now trying to enable the WebRTC related features to get a better 
understanding of the current state of this part of the project. 
I have to say that I faced a lack of documentation on this area. I found the 
features list, a document about how to add a new feature but nothing about how 
to turn a feature on and off (there is actually a TODO about that in the second 
link).

I looked into the files that one needs to change to add a new feature and found 
two interesting files:
Source/WTF/wtf/FeatureDefines.h - where the WebRTC related contants were set to 
0 instead of 1
Source/cmake/WebKitFeatures.cmake - where the contants were set to OFF
I listed the following definitions that look related to WebRTC
ENABLE_MEDIA_CAPTURE
ENABLE_MEDIA_CONTROLS_SCRIPT
ENABLE_MEDIA_SOURCE
ENABLE_MEDIA_STATISTICS
ENABLE_MEDIA_STREAM
ENABLE_VIDEO
ENABLE_VIDEO_TRACK
I turned those definitions to 1 and ON in the respective file and tried to 
build.
The code in the header WebCore/Modules/mediastream/mediastream.h could not 
compile apparently because the observer did not have a destructor. I created 
one:
class Observer {
public:
virtual void didAddOrRemoveTrack() = 0;
  virtual ~Observer() {};
};

and tried to build again.

I now have a linking error when building WebCore with Xcode. 

Ld 
/Users/jacquesolivierhache/Workspace/Temasys/WebKitProject/WebKit/WebKitBuild/Debug/WebCore.framework/Versions/A/WebCore
 normal x86_64
cd 
/Users/jacquesolivierhache/Workspace/Temasys/WebKitProject/WebKit/Source/WebCore
export MACOSX_DEPLOYMENT_TARGET=10.9

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
 -arch x86_64 -dynamiclib -isysroot 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk
 
-L/Users/jacquesolivierhache/Workspace/Temasys/WebKitProject/WebKit/WebKitBuild/Debug
 
-F/Users/jacquesolivierhache/Workspace/Temasys/WebKitProject/WebKit/WebKitBuild/Debug
 -filelist 
/Users/jacquesolivierhache/Workspace/Temasys/WebKitProject/WebKit/WebKitBuild/WebCore.build/Debug/WebCore.build/Objects-normal/x86_64/WebCore.LinkFileList
 -Xlinker --no-demangle -exported_symbols_list 
/Users/jacquesolivierhache/Workspace/Temasys/WebKitProject/WebKit/WebKitBuild/Debug/DerivedSources/WebCore/WebCore.LP64.exp
 -install_name 
/System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/WebCore
 -mmacosx-version-min=10.9 -lsqlite3 -lobjc -lANGLE -sub_library libobjc 
-umbrella WebKit -allowable_client WebCoreTestSupport -allowable_client WebKit2 
-allowable_client WebKitLegacy -framework ApplicationServices -framework 
AudioUnit -framework Carbon -framework Cocoa -framework IOSurface -framework 
OpenGL -stdlib=libc++ -fobjc-link-runtime -framework Accelerate -framework 
AudioToolbox -framework CoreAudio -framework IOKit -framework JavaScriptCore 
-licucore -lobjc -lxml2 -lz -framework QuartzCore -framework Security 
-framework SystemConfiguration -single_module -compatibility_version 1 
-current_version 600.1 -Xlinker -dependency_info -Xlinker 
/Users/jacquesolivierhache/Workspace/Temasys/WebKitProject/WebKit/WebKitBuild/WebCore.build/Debug/WebCore.build/Objects-normal/x86_64/WebCore_dependency_info.dat
 -o 
/Users/jacquesolivierhache/Workspace/Temasys/WebKitProject/WebKit/WebKitBuild/Debug/WebCore.framework/Versions/A/WebCore

Undefined symbols for architecture x86_64:
  __ZN7WebCore11JSNavigator18webkitGetUserMediaEPN3JSC9ExecStateE, referenced 
from:
  
__ZN7WebCore46jsNavigatorPrototypeFunctionWebkitGetUserMediaEPN3JSC9ExecStateE 
in JSNavigator.o
  __ZN7WebCore15RTCOfferOptions6createERKNS_10DictionaryERi, referenced from:
  
__ZN7WebCore17RTCPeerConnection11createOfferEN3WTF10PassRefPtrINS_29RTCSessionDescriptionCallbackEEENS2_INS_30RTCPeerConnectionErrorCallbackEEERKNS_10DictionaryERi
 in RTCPeerConnection.o
  
__ZN7WebCore20MediaConstraintsMock17verifyConstraintsEN3WTF10PassRefPtrINS_16MediaConstraintsEEE,
 referenced from: