Cast: Resample input audio to the configured sample rate

We configure opus to encode at 48khz. But on some platforms like Linux
the incoming data is at 44.1khz. We need to resample the data before
giving it to the cast library.

Fixing this allows us to have proper audio with a receiver.

BUG=349295

Review URL: https://codereview.chromium.org/187493002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255893 0039d316-1c4b-4281-b951-d872f2087c98
cc: modify the waiting condition of forced commit

Forced commit only should proceed to its BeginMainFrame when there is a
scheduled BeginMainFrame().
So, Forced commit only should wait for COMMIT_STATE_BEGIN_MAIN_FRAME_SENT.

R=brianderson@chromium.org
BUG=350585
TEST=cc_unittests

Review URL: https://codereview.chromium.org/189553007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255894 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 255894
cc: Rename FinishCommit to NotifyReadyToCommit

FinishCommit() is used to inform that painting is complete and we can
ready to commit to scheduler.
So, NotifyReadyToCommit() is more suitable for its role.

R=brianderson@chromium.org
BUG=349889
TEST=None (No functional change)

Review URL: https://codereview.chromium.org/191293004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255895 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 255895