Reason for revert:
Looks like things are still breaking upstream... :(
Original issue's description:
> Reland of Adds data logging in native AudioDeviceBuffer class (patchset #1 id:1 of https://codereview.webrtc.org/2141413002/ )
>
> Reason for revert:
> Will make one more try since we have now confirmed that our TaskQueue tests works on Android. Let's hope for the best...
>
> Original issue's description:
> > Revert of Adds data logging in native AudioDeviceBuffer class (patchset #1 id:1 of https://codereview.webrtc.org/2138403003/ )
> >
> > Reason for revert:
> > Reverting again since it might have caused this issue:
> >
> > https://build.chromium.org/p/chromium.webrtc.fyi/builders/Android%20Tests%20%28dbg%29%20%28L%20Nexus9%29/builds/13622/steps/content_browsertests/logs/stdio
> >
> > Original issue's description:
> > > Reland of Adds data logging in native AudioDeviceBuffer class (patchset #1 id:1 of https://codereview.webrtc.org/2139233002/ )
> > >
> > > Reason for revert:
> > > My original patch broke things that are now fixed by https://codereview.webrtc.org/2141193002/.
> > >
> > > Hence I am relanding my original change.
> > >
> > > Original issue's description:
> > > > Revert of Adds data logging in native AudioDeviceBuffer class (patchset #10 id:180001 of https://codereview.webrtc.org/2132613002/ )
> > > >
> > > > Reason for revert:
> > > > Seems to break things upstream.
> > > >
> > > > Original issue's description:
> > > > > Adds data logging in native AudioDeviceBuffer class.
> > > > >
> > > > > Goal is to provide periodic logging of most essential audio parameters
> > > > > for playout and recording sides. It will allow us to track if the native audio layer is working as intended.
> > > > >
> > > > > BUG=NONE
> > > > >
> > > > > Committed: https://crrev.com/348e411dd27e6dbe9b84b27ce46e9b7c657c1eae
> > > > > Cr-Commit-Position: refs/heads/master@{#13440}
> > > >
> > > > TBR=stefan@webrtc.org,henrika@webrtc.org
> > > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > > NOPRESUBMIT=true
> > > > NOTREECHECKS=true
> > > > NOTRY=true
> > > > BUG=NONE
> > > >
> > > > Committed: https://crrev.com/025aa94ccb85e4c6fe20a3fecdac5d27ec9ba3da
> > > > Cr-Commit-Position: refs/heads/master@{#13441}
> > >
> > > TBR=stefan@webrtc.org,sprang@webrtc.org
> > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > NOPRESUBMIT=true
> > > NOTREECHECKS=true
> > > NOTRY=true
> > > BUG=NONE
> > >
> > > Committed: https://crrev.com/dd2fdecc78c50377d10ec98b41179acde9218ee7
> > > Cr-Commit-Position: refs/heads/master@{#13455}
> >
> > TBR=stefan@webrtc.org,sprang@webrtc.org
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=NONE
> >
> > Committed: https://crrev.com/5dd941e5a5ccde541d9b40a1df379ed59c5fab5c
> > Cr-Commit-Position: refs/heads/master@{#13457}
>
> TBR=stefan@webrtc.org,sprang@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=NONE
>
> Committed: https://crrev.com/b201da3fab5efc048a4341f39293d2dcf27b2eec
> Cr-Commit-Position: refs/heads/master@{#13462}
TBR=stefan@webrtc.org,henrika@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=NONE
Review-Url: https://codereview.webrtc.org/2148623004
Cr-Commit-Position: refs/heads/master@{#13464}
Reason for revert:
Will make one more try since we have now confirmed that our TaskQueue tests works on Android. Let's hope for the best...
Original issue's description:
> Revert of Adds data logging in native AudioDeviceBuffer class (patchset #1 id:1 of https://codereview.webrtc.org/2138403003/ )
>
> Reason for revert:
> Reverting again since it might have caused this issue:
>
> https://build.chromium.org/p/chromium.webrtc.fyi/builders/Android%20Tests%20%28dbg%29%20%28L%20Nexus9%29/builds/13622/steps/content_browsertests/logs/stdio
>
> Original issue's description:
> > Reland of Adds data logging in native AudioDeviceBuffer class (patchset #1 id:1 of https://codereview.webrtc.org/2139233002/ )
> >
> > Reason for revert:
> > My original patch broke things that are now fixed by https://codereview.webrtc.org/2141193002/.
> >
> > Hence I am relanding my original change.
> >
> > Original issue's description:
> > > Revert of Adds data logging in native AudioDeviceBuffer class (patchset #10 id:180001 of https://codereview.webrtc.org/2132613002/ )
> > >
> > > Reason for revert:
> > > Seems to break things upstream.
> > >
> > > Original issue's description:
> > > > Adds data logging in native AudioDeviceBuffer class.
> > > >
> > > > Goal is to provide periodic logging of most essential audio parameters
> > > > for playout and recording sides. It will allow us to track if the native audio layer is working as intended.
> > > >
> > > > BUG=NONE
> > > >
> > > > Committed: https://crrev.com/348e411dd27e6dbe9b84b27ce46e9b7c657c1eae
> > > > Cr-Commit-Position: refs/heads/master@{#13440}
> > >
> > > TBR=stefan@webrtc.org,henrika@webrtc.org
> > > # Skipping CQ checks because original CL landed less than 1 days ago.
> > > NOPRESUBMIT=true
> > > NOTREECHECKS=true
> > > NOTRY=true
> > > BUG=NONE
> > >
> > > Committed: https://crrev.com/025aa94ccb85e4c6fe20a3fecdac5d27ec9ba3da
> > > Cr-Commit-Position: refs/heads/master@{#13441}
> >
> > TBR=stefan@webrtc.org,sprang@webrtc.org
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=NONE
> >
> > Committed: https://crrev.com/dd2fdecc78c50377d10ec98b41179acde9218ee7
> > Cr-Commit-Position: refs/heads/master@{#13455}
>
> TBR=stefan@webrtc.org,sprang@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=NONE
>
> Committed: https://crrev.com/5dd941e5a5ccde541d9b40a1df379ed59c5fab5c
> Cr-Commit-Position: refs/heads/master@{#13457}
TBR=stefan@webrtc.org,sprang@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=NONE
Review-Url: https://codereview.webrtc.org/2146853003
Cr-Commit-Position: refs/heads/master@{#13462}
Reason for revert:
My original patch broke things that are now fixed by https://codereview.webrtc.org/2141193002/.
Hence I am relanding my original change.
Original issue's description:
> Revert of Adds data logging in native AudioDeviceBuffer class (patchset #10 id:180001 of https://codereview.webrtc.org/2132613002/ )
>
> Reason for revert:
> Seems to break things upstream.
>
> Original issue's description:
> > Adds data logging in native AudioDeviceBuffer class.
> >
> > Goal is to provide periodic logging of most essential audio parameters
> > for playout and recording sides. It will allow us to track if the native audio layer is working as intended.
> >
> > BUG=NONE
> >
> > Committed: https://crrev.com/348e411dd27e6dbe9b84b27ce46e9b7c657c1eae
> > Cr-Commit-Position: refs/heads/master@{#13440}
>
> TBR=stefan@webrtc.org,henrika@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=NONE
>
> Committed: https://crrev.com/025aa94ccb85e4c6fe20a3fecdac5d27ec9ba3da
> Cr-Commit-Position: refs/heads/master@{#13441}
TBR=stefan@webrtc.org,sprang@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=NONE
Review-Url: https://codereview.webrtc.org/2138403003
Cr-Commit-Position: refs/heads/master@{#13455}
Reason for revert:
Seems to break things upstream.
Original issue's description:
> Adds data logging in native AudioDeviceBuffer class.
>
> Goal is to provide periodic logging of most essential audio parameters
> for playout and recording sides. It will allow us to track if the native audio layer is working as intended.
>
> BUG=NONE
>
> Committed: https://crrev.com/348e411dd27e6dbe9b84b27ce46e9b7c657c1eae
> Cr-Commit-Position: refs/heads/master@{#13440}
TBR=stefan@webrtc.org,henrika@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=NONE
Review-Url: https://codereview.webrtc.org/2139233002
Cr-Commit-Position: refs/heads/master@{#13441}
Goal is to provide periodic logging of most essential audio parameters
for playout and recording sides. It will allow us to track if the native audio layer is working as intended.
BUG=NONE
Review-Url: https://codereview.webrtc.org/2132613002
Cr-Commit-Position: refs/heads/master@{#13440}
This is a somewhat involved refactoring of this class. Here's an overview of the changes:
* FileWrapper can now be used as a regular class and instances allocated on the stack.
* The type now has support for move semantics and copy isn't allowed.
* New public ctor with FILE* that can be used instead of OpenFromFileHandle.
* New static Open() method. The intent of this is to allow opening a file and getting back a FileWrapper instance. Using this method instead of Create(), will allow us in the future to make the FILE* member pointer, to be const and simplify threading (get rid of the lock).
* Rename the Open() method to is_open() and make it inline.
* The FileWrapper interface is no longer a pure virtual interface. There's only one implementation so there's no need to go through a vtable for everything.
* Functionality offered by the class, is now reduced. No support for looping (not clear if that was actually useful to users of that flag), no need to implement the 'read_only_' functionality in the class, since file APIs implement that already, no support for *not* managing the file handle (this wasn't used). OpenFromFileHandle always "manages" the file.
* Delete the unused WriteText() method and don't support opening files in text mode. Text mode is only different on Windows and on Windows it translates \n to \r\n, which means that files such as log files, could have a slightly different format on Windows than other platforms. Besides, tools on Windows can handle UNIX line endings.
* Remove FileName(), change Trace code to manage its own path.
* Rename id_ member variable to file_.
* Removed the open_ member variable since the same functionality can be gotten from just checking the file pointer.
* Don't call CloseFile inside of Write. Write shouldn't be changing the state of the class beyond just attempting to write.
* Remove concept of looping from FileWrapper and never close inside of Read()
* Changed stream base classes to inherit from a common base class instead of both defining the Rewind method. Ultimately, Id' like to remove these interfaces and just have FileWrapper.
* Remove read_only param from OpenFromFileHandle
* Renamed size_in_bytes_ to position_, since it gets set to 0 when Rewind() is called (and the size actually does not change).
* Switch out rw lock for CriticalSection. The r/w lock was only used for reading when checking the open_ flag.
BUG=
Review-Url: https://codereview.webrtc.org/2054373002
Cr-Commit-Position: refs/heads/master@{#13155}
This includes changes like:
* Attempt to break lines at better positions
* Use "override" in more places, don't use "virtual" with it
* Use {} where the body is more than one line
* Make declaration and definition arg names match
* Eliminate unused code
* EXPECT_EQ(expected, actual) (but use (actual, expected) for e.g. _GT)
* Correct #include order
* Use anonymous namespaces in preference to "static" for file-scoping
* Eliminate unnecessary casts
* Update reference code in comments of ARM assembly sources to match actual current C code
* Fix indenting to be more style-guide compliant
* Use arraysize() in more places
* Use bool instead of int for "boolean" values (0/1)
* Shorten and simplify code
* Spaces around operators
* 80 column limit
* Use const more consistently
* Space goes after '*' in type name, not before
* Remove unnecessary return values
* Use "(var == const)", not "(const == var)"
* Spelling
* Prefer true, typed constants to "enum hack" constants
* Avoid "virtual" on non-overridden functions
* ASSERT(x == y) -> ASSERT_EQ(y, x)
BUG=none
R=andrew@webrtc.org, asapersson@webrtc.org, henrika@webrtc.org, juberti@webrtc.org, kjellander@webrtc.org, kwiberg@webrtc.org
Review URL: https://codereview.webrtc.org/1172163004
Cr-Commit-Position: refs/heads/master@{#9420}
This makes a variety of small changes to synchronize bits of code using different types, remove useless code or casts, and add explicit casts in some places previously doing implicit ones. For example:
* Change a few type declarations to better match how the majority of code uses those objects.
* Eliminate "< 0" check for unsigned values.
* Replace "(float)sin(x)", where |x| is also a float, with "sinf(x)", and similar.
* Add casts to uint32_t in many places timestamps were used and the existing code stored signed values into the unsigned objects.
* Remove downcasts when the results would be passed to a larger type, e.g. calling "foo((int16_t)x)" with an int |x| when foo() takes an int instead of an int16_t.
* Similarly, add casts when passing a larger type to a function taking a smaller one.
* Add casts to int16_t when doing something like "int16_t = int16_t + int16_t" as the "+" operation would implicitly upconvert to int, and similar.
* Use "false" instead of "0" for setting a bool.
* Shift a few temp types when doing a multi-stage calculation involving typecasts, so as to put the most logical/semantically correct type possible into the temps. For example, when doing "int foo = int + int; size_t bar = (size_t)foo + size_t;", we might change |foo| to a size_t and move the cast if it makes more sense for |foo| to be represented as a size_t.
BUG=none
R=andrew@webrtc.org, asapersson@webrtc.org, henrika@webrtc.org, juberti@webrtc.org, kwiberg@webrtc.org
TBR=andrew, asapersson, henrika
Review URL: https://codereview.webrtc.org/1168753002
Cr-Commit-Position: refs/heads/master@{#9419}
The class doesn't do anything in almost all cases except for grabbing and releasing locks + allocate memory. There are a couple of methods there such as WaitForKey and GetTimeInMs that are used, but those methods aren't specific to audio and we have implementations of these elsewhere. The third method, StringCompare isn't used anywhere (and also isn't specific to audio).
BUG=
R=henrika@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/50009004
Cr-Commit-Position: refs/heads/master@{#9220}
* In AudioCodingModuleImpl::PlayoutData10Ms, don't reset the timestamp got from GetAudio.
* When there're more than one participant, set AudioFrame's RTP timestamp to 0.
* Copy ntp_time_ms_ in AudioFrame::CopyFrom method.
* In RemixAndResample, pass src frame's timestamp_ and ntp_time_ms_ to the dst frame.
* Fix how |elapsed_time_ms| is computed in channel.cc by adding GetPlayoutFrequency.
Tweaks on ntp_time_ms_:
* Init ntp_time_ms_ to -1 in AudioFrame ctor.
* When there're more than one participant, set AudioFrame's ntp_time_ms_ to an invalid value. I.e. we don't support ntp_time_ms_ in multiple participants case before the mixing is moved to chrome.
Added elapsed_time_ms to AudioFrame and pass it to chrome, where we don't have the information about the rtp timestmp's sample rate, i.e. can't convert rtp timestamp to ms.
BUG=3111
R=henrik.lundin@webrtc.org, turaj@webrtc.org, xians@webrtc.org
TBR=andrew
andrew to take another look on audio_conference_mixer_impl.cc
Review URL: https://webrtc-codereview.appspot.com/14559004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@6346 4adac7df-926f-26a2-2b94-8c16560cd09d
The addition of logging.h in r4729 was causing the win trybot to fail
with "#pragma deprecated" errors in standard library headers. This
turned out to be due to including strsafe.h (via audio_device_config.h)
before sstream (via logging.h).
strsafe.h was only being included for the unused DEBUG_PRINT macro. I
removed all references to it.
This incidentally removes a bunch of other unneeded headers discovered
while trying to track the problem down.
This didn't show up in the commitbots; my guess is that the trybots are
using the VC10 toolchain and the commitbots the VC11 toolchain.
TBR=pbos
Review URL: https://webrtc-codereview.appspot.com/2204004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4738 4adac7df-926f-26a2-2b94-8c16560cd09d