summaryrefslogtreecommitdiffstats
path: root/media
Commit message (Collapse)AuthorAgeFilesLines
* Add VideoCaptureDevice::GetDeviceSupportedFormats to interface + ↵mcasas@chromium.org2013-10-169-3/+155
| | | | | | | | | | implementation for Linux and Fake BUG=289494 Review URL: https://codereview.chromium.org/24079003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228904 0039d316-1c4b-4281-b951-d872f2087c98
* GpuVideoDecoder: avoid deleting textures in use by clientsheu@chromium.org2013-10-162-35/+34
| | | | | | | | | | | | | PictureBuffers (and their backing textures) held in dismissed_picture_buffers_ should not be destroyed until the GpuVideoDecoder is itself destroyed, as clients to the GpuVideoDecoder may still be using them. BUG=None TEST=local build, run on CrOS snow, build on desktop Linux Review URL: https://codereview.chromium.org/26273007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228878 0039d316-1c4b-4281-b951-d872f2087c98
* Cast: build fix for win 64pwestin@google.com2013-10-153-6/+18
| | | | | | | | BUG=307582 Review URL: https://codereview.chromium.org/27171004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228791 0039d316-1c4b-4281-b951-d872f2087c98
* Fix crash and memory leak in VideoCaptureDeviceWin.dalecurtis@chromium.org2013-10-151-26/+22
| | | | | | | | | | | | | | - Switch to ScopedCoMem pointer for IAMVideoControl::GetFrameRateList() - Cap frame rate list to 128 items. - Zero initialize and NULL check values. - Cleanup duplicate conditionals. BUG=306237 TEST=capture still works. Review URL: https://codereview.chromium.org/26603008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228774 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 227436 "Plumb PPAPI PlatformVerification into CDM.h"ddorwin@chromium.org2013-10-153-229/+9
| | | | | | | | | | | | | | | | > Plumb PPAPI PlatformVerification into CDM.h > > BUG=270296 > TEST=encrypted media browsertests. > > Review URL: https://codereview.chromium.org/23546014 BUG=306241,307662 R=dalecurtis@chromium.org Review URL: https://codereview.chromium.org/27108003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228752 0039d316-1c4b-4281-b951-d872f2087c98
* Add ODROID-U2 in the camera buggy device list on Android.wjia@chromium.org2013-10-151-0/+1
| | | | | | | | | | | This is based on report in crbug.com/267505. BUG=267505 R=qinmin@chromium.org Review URL: https://codereview.chromium.org/26356005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228735 0039d316-1c4b-4281-b951-d872f2087c98
* Preroll media after a seek is performed for MSEqinmin@chromium.org2013-10-148-54/+144
| | | | | | | | | | After a seek, we keep decoding the data without rendering it until access unit's timestamp is larger than preroll timestamp. BUG=261000 Review URL: https://codereview.chromium.org/25789004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228556 0039d316-1c4b-4281-b951-d872f2087c98
* Handle CdmWrapper::Initialize() failure gracefully.xhwang@chromium.org2013-10-142-21/+26
| | | | | | | | | | | | | | | | | | | | Since CdmWrapper::Initialize() doesn't report error, GenerateKeyRequest() et al can be called even if Initialize() failed previously. For MediaKeys calls, we should fire KeyError when they are called without valid |cdm_|. For Decryptor calls, we should fire the callback with error code. Also added EncryptedMediaTest.ExternalClearKeyInitializeCDMFail test to cover this case. Chrome will claim that the ClearKey CDM supports key system "org.chromium.externalclearkey.fail". But actually ClearKey CDM will return NULL for this key system in CreateCdmInstance(); BUG=306241,179570 TEST=Unit tests added. Review URL: https://codereview.chromium.org/27030007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228528 0039d316-1c4b-4281-b951-d872f2087c98
* Enable cast_unittestspwestin@google.com2013-10-149-35/+42
| | | | | | | | | | And fixed associated errors Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=228002 Review URL: https://codereview.chromium.org/26486005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228515 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a crashing test as releasing a surface texture while binding it to a ↵qinmin@chromium.org2013-10-141-5/+14
| | | | | | | | | | MediaCodec is dangerous internal bug 11173832 Review URL: https://codereview.chromium.org/27017005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228512 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 228002 "Enable cast_unittests"tapted@chromium.org2013-10-145-17/+15
| | | | | | | | | | | | | | | | | | | | Breaks compile on the `All` target on win_x64_rel. Note that this is only built by default on manually submitted tryjobs. Not CQ or waterfall. (see bug). For the errors see, e.g., http://build.chromium.org/p/tryserver.chromium/builders/win_x64_rel/builds/45000/ BUG=304877 > Enable cast_unittests > And fixed associated errors > > Review URL: https://codereview.chromium.org/26486005 TBR=pwestin@google.com Review URL: https://codereview.chromium.org/27141002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228412 0039d316-1c4b-4281-b951-d872f2087c98
* Add browser tests for the Web Speech Recognition API.janx@chromium.org2013-10-122-6/+7
| | | | | | | | | | | | | Introduce an event-driven timeline utility to verify if everything in test scenarii is happening on the right thread and in the right order, and add a simple precheck browser test that opens an HTML test page and verifies that creating a SpeechRecognition object works. BUG=301906 Review URL: https://codereview.chromium.org/23500011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228332 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce SKIP_TEST_IF_MEDIA_CODEC_BRIDGE_IS_NOT_AVAILABLE.xhwang@chromium.org2013-10-112-68/+37
| | | | | | | | | | | We use to skip tests when MediaCodecBridge is not available. BUG=none TEST=none Review URL: https://codereview.chromium.org/27029005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228276 0039d316-1c4b-4281-b951-d872f2087c98
* Cast: Refactored SendPacket to send a burst of packets;pwestin@google.com2013-10-1124-351/+299
| | | | | | | | | | | | | | instead of one packet per callback. The implementer should implement the new virtual function SendPackets that send multiple packets as fast as possible. The purpose is to minimize the number of IPC messages. No changes to the actual pacing logic. In the process also cleaned up the usage of std::set<uint16> even though the define PacketIdSet existed. Review URL: https://codereview.chromium.org/26618002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228088 0039d316-1c4b-4281-b951-d872f2087c98
* Catch more exceptions in MediaCodecBridge.xhwang@chromium.org2013-10-117-24/+43
| | | | | | | | | | | Exceptions could be thrown in start() and/or getOutputBuffers() when we open too many MediaCodec objects and exceed the capacity of a mobile device. BUG=303419,304956 TEST=This prevents crash in tests that create multiple <video> tags. These tests will still fail due to device limitation. Review URL: https://codereview.chromium.org/26880004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228052 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup frame counting code in VideoRendererBase.acolwell@chromium.org2013-10-102-13/+38
| | | | | | | | | | | | Reorganizes frame counting logic to make it easier to see that it is correct and reduces the number of calls on the statistics_cb_. BUG=291731 TEST=All existing unit tests still pass. Review URL: https://codereview.chromium.org/26592007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228016 0039d316-1c4b-4281-b951-d872f2087c98
* Enable cast_unittestspwestin@google.com2013-10-105-15/+17
| | | | | | | | And fixed associated errors Review URL: https://codereview.chromium.org/26486005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228002 0039d316-1c4b-4281-b951-d872f2087c98
* Remove default implementations from Demuxer.rileya@chromium.org2013-10-108-42/+4
| | | | | | | | | | Seek(), Stop(), and OnAudioRendererDisabled() are now pure virtual. SetPlaybackRate() is removed entirely, and moved down to BufferedDataSource. BUG=304990 Review URL: https://codereview.chromium.org/26492004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227979 0039d316-1c4b-4281-b951-d872f2087c98
* Cast: Cleaning up framer code; resolving TODOspwestin@google.com2013-10-106-107/+68
| | | | | | | | | | | | | | // TODO(pwestin): we can deprecate the timeout argument. The timeout argument passed to Framer::GetEncodedVideoFrame and Framer::GetEncodedAudioFrame is removed since is was not used. // TODO(pwestin): only release if we have a complete frame VideoReceiver::GetEncodedVideoFrame and AudioReceiver::PlayoutTimeout() Update logic such that a frame is only checked if it can be released if the incoming packet make a frame complete. Review URL: https://codereview.chromium.org/26686004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227923 0039d316-1c4b-4281-b951-d872f2087c98
* Deal correctly with too-small MediaCodec buffers.fischman@chromium.org2013-10-102-20/+19
| | | | | | | | | | | | | | | | | | | Prior to r221331, MediaCodecBridge::QueueInputBuffer() returned the number of bytes queued in an attempt to deal with clients that tried to queue inputs larger than MediaCodec's buffers could hold. That wasn't completely worked through, though, and doesn't seem to be workable given that MediaCodec's API deals in "Access Units", not bytes, so it is not permitted to queue half of an input in one buffer and half in the next. r221331 (silently) replaced this half-support with a requirement that inputs fit in buffers. This CL turns this DCHECK requirement into an error-triggering one, and fixes a callsite that r221331 missed (AndroidVideoDecodeAccelerator), along with a bunch of plumbing that was only needed while partial-buffer-queueing was possible. BUG=305421 Review URL: https://codereview.chromium.org/26630002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227897 0039d316-1c4b-4281-b951-d872f2087c98
* Fix Reset() during waiting-for-a-key in VideoFrameStream.xhwang@chromium.org2013-10-104-27/+62
| | | | | | | | | | | | | | | | | | When the DecryptingDemuxerStream is in the waiting-for-a-key state, we should reset the DecryptingDemxuerStream in VideoFrameStream::Reset(). Otherwise, the read callback will never fire and VFS::Reset() never finishes. Also fix DecryptingDemuxerStream that when Reset() is called during a pending config-change read, we should return kConfigChanged back to the caller rather than return a kAborted. BUG=304260, 303835 TEST=Added unittests to cover these cases. R=scherkus@chromium.org Review URL: https://codereview.chromium.org/26588003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227879 0039d316-1c4b-4281-b951-d872f2087c98
* Disable use of MediaDrm by default on Android.xhwang@chromium.org2013-10-102-0/+4
| | | | | | | | | | | | | | | - This disables Widevine key system on Chrome for Android. - Developer/Tester can use --enable-mediadrm flag to enable MediaDrm manually. - ClearKey key system still works. R=ddorwin@chromium.org, qinmin@chromium.org TBR=jochen@chromium.org BUG=305422 TEST=Tested on Nexus 10. Review URL: https://codereview.chromium.org/26708002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227878 0039d316-1c4b-4281-b951-d872f2087c98
* Rename cast_unittest to cast_unittestshclam@chromium.org2013-10-091-1/+1
| | | | | | | | | | *_unittests is the common name for all other unit test executables. TBR=hubbe@chromium.org Review URL: https://codereview.chromium.org/26601006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227801 0039d316-1c4b-4281-b951-d872f2087c98
* Bug fixes and nit cleanup, bugs found while writing a new end 2 end test.pwestin@google.com2013-10-0917-42/+86
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/25048005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227781 0039d316-1c4b-4281-b951-d872f2087c98
* Adding encode/decode test: Tests pipeline and bitstream compatibility ↵mikhal@google.com2013-10-095-1/+214
| | | | | | | | between encoder and decoder. In addition, adds utility functionality for video testing, such as psnr. Review URL: https://codereview.chromium.org/24303010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227780 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup how we handle the fake clock.pwestin@google.com2013-10-0954-509/+440
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/25124002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227712 0039d316-1c4b-4281-b951-d872f2087c98
* Simplify VideoFrameStream stopping process.xhwang@chromium.org2013-10-093-60/+82
| | | | | | | | | | | | | | | | When VideoFrameStream::Stop() is called, invalidate all existing weak pointers, satisfy all pending callbacks and start to stop DecryptingDemuxerStream and/or VideoDecoder right away. This also fixes the issue where VideoFrameStream::Stop() is called when DecryptingDemuxerStream is in kWaitingForKey state. BUG=304260,304577,303835 TEST=Added a test where VFS::Stop() is called when DDS is waiting for a key. Review URL: https://codereview.chromium.org/26177002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227652 0039d316-1c4b-4281-b951-d872f2087c98
* Plumb PPAPI PlatformVerification into CDM.hdalecurtis@google.com2013-10-083-9/+229
| | | | | | | | | | | | | BUG=270296 TEST=encrypted media browsertests. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=227436 R=ddorwin@chromium.org, dmichael@chromium.org Review URL: https://codereview.chromium.org/23546014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227619 0039d316-1c4b-4281-b951-d872f2087c98
* Changed receiver API and added cast_receiver_implpwestin@google.com2013-10-0822-346/+683
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/23500012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227529 0039d316-1c4b-4281-b951-d872f2087c98
* Merge AudioRendererImpl::FillBuffer into Render and remove implicit type ↵acolwell@chromium.org2013-10-083-43/+30
| | | | | | | | | | | conversions. BUG=291735 TEST=All existing unit tests still pass. Review URL: https://codereview.chromium.org/26235006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227479 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 227436 "Plumb PPAPI PlatformVerification into CDM.h"jochen@chromium.org2013-10-083-229/+9
| | | | | | | | | | | | | | | | | | Broke chromium os build: media/cdm/ppapi/cdm_wrapper.cc:1326:32: error: narrowing conversion of 'signed_data_var.pp::VarArrayBuffer::ByteLength()' from 'uint32_t {aka unsigned int}' to 'int32_t {aka int}' inside { } is ill-formed in C++11 [-Werror=narrowing] > Plumb PPAPI PlatformVerification into CDM.h > > BUG=270296 > TEST=encrypted media browsertests. > > Review URL: https://codereview.chromium.org/23546014 TBR=dalecurtis@chromium.org Review URL: https://codereview.chromium.org/26448002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227468 0039d316-1c4b-4281-b951-d872f2087c98
* Fix AudioRendererImpl so all state_ transitions and checks happen under lock.acolwell@chromium.org2013-10-082-59/+77
| | | | | | | | | BUG=291735 TEST=All unit tests and LayoutTests still pass. Review URL: https://codereview.chromium.org/26327005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227456 0039d316-1c4b-4281-b951-d872f2087c98
* Plumb PPAPI PlatformVerification into CDM.hdalecurtis@chromium.org2013-10-083-9/+229
| | | | | | | | | BUG=270296 TEST=encrypted media browsertests. Review URL: https://codereview.chromium.org/23546014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227436 0039d316-1c4b-4281-b951-d872f2087c98
* Remove scoped_array<T> reference in media/base/bind_to_loop.h.pump.scherkus@chromium.org2013-10-082-8/+0
| | | | | | | | The autogenerated .h was fixed in r192779 but the .pump file was left untouched. Review URL: https://codereview.chromium.org/26261005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227417 0039d316-1c4b-4281-b951-d872f2087c98
* Drop NeedKeyCB from MediaKeys.xhwang@chromium.org2013-10-084-23/+12
| | | | | | | | | | | | | NeedKey is only fired in the demuxer and we already have media::Demuxer::NeedKeyCB. BUG=none TEST=none R=ddorwin@chromium.org Review URL: https://codereview.chromium.org/23904027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227402 0039d316-1c4b-4281-b951-d872f2087c98
* Report errors occurring during WASAPI startup.dalecurtis@chromium.org2013-10-082-30/+40
| | | | | | | | | | | | | We see a lot of crash reports around closing invalid handles. It's possible these are due to unreported errors that result in unstarted threads being joined. BUG=none TEST=none Review URL: https://codereview.chromium.org/26069003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227400 0039d316-1c4b-4281-b951-d872f2087c98
* Disable PipelineIntegrationTest.MediaSource_Opus_Seeking_WebMjochen@chromium.org2013-10-071-1/+2
| | | | | | | | | BUG=304776 TBR=vigneshv@chromium.org Review URL: https://codereview.chromium.org/26213003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227257 0039d316-1c4b-4281-b951-d872f2087c98
* Call correct method to free up ffmpeg AVFrame objectsjrummell@chromium.org2013-10-054-5/+6
| | | | | | | | | | | | | | | | | | When ffmpeg AVFrame objects are freed, the current code calls avcodec_free_frame(). However, this can cause "use after free" errors. The correct call is to call avcodec_free_frame(). Also updating the remaining places that use av_free() to free up an AVFrame to use avcodec_free_frame() instead. Requires a roll of ffmpeg to pick up avcodec_free_frame(). BUG=303927 TEST=No errors reported by ASAN for repro. Review URL: https://codereview.chromium.org/26023006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227192 0039d316-1c4b-4281-b951-d872f2087c98
* GTTF: move the test launcher files to base/test/launcherphajdan.jr@chromium.org2013-10-041-1/+1
| | | | | | | | | BUG=236893 R=sky@chromium.org Review URL: https://codereview.chromium.org/25770005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227102 0039d316-1c4b-4281-b951-d872f2087c98
* Fix style for cast_unittest: Add newlines at EOFhclam@chromium.org2013-10-042-2/+2
| | | | | | | | | | Add a new line at end of file. TBR=justinlin@chromium.org Review URL: https://codereview.chromium.org/25993005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227055 0039d316-1c4b-4281-b951-d872f2087c98
* Fix cast_unittest warnings on win_x64_relhclam@chromium.org2013-10-041-1/+2
| | | | | | | | | | Fix warnings with size_t casted to int. TBR=justinlin@chromium.org Review URL: https://codereview.chromium.org/26034003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227051 0039d316-1c4b-4281-b951-d872f2087c98
* Enable camera hardware image stabilization -where available- in Clank.mcasas@chromium.org2013-10-041-0/+8
| | | | | | | | | | | | See bug, but in general the API is not implemented in almost any device tested so far. TBR=wjia@chromium.org BUG=303507 Review URL: https://codereview.chromium.org/25661003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227017 0039d316-1c4b-4281-b951-d872f2087c98
* Enable more media unit tests on Android.xhwang@chromium.org2013-10-041-18/+3
| | | | | | | | | BUG=none TEST=These tests work well on Nexus 10. Review URL: https://codereview.chromium.org/25665009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226999 0039d316-1c4b-4281-b951-d872f2087c98
* add newline to end of fileestade@chromium.org2013-10-041-1/+1
| | | | | | | | | BUG=none TBR=hclam@chromium.org Review URL: https://codereview.chromium.org/25971002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226957 0039d316-1c4b-4281-b951-d872f2087c98
* No StartInternal() on OnAddKey() if MediaSourcePlayer isn't waiting for a key.xhwang@chromium.org2013-10-042-2/+20
| | | | | | | | | BUG=302562 TEST=Smooth playback! Review URL: https://codereview.chromium.org/25411007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226919 0039d316-1c4b-4281-b951-d872f2087c98
* Add TRACE_EVENTs for MSE playback on Android.xhwang@chromium.org2013-10-043-1/+32
| | | | | | | | | BUG=none TEST=none Review URL: https://codereview.chromium.org/25751002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226915 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up unused constant globalshans@chromium.org2013-10-031-8/+0
| | | | | | | | | | | Found by clang's new -Wunused-const-variable. BUG=290204 TBR=mark, acolwell, agl, alexeypa, markus, brettw Review URL: https://codereview.chromium.org/25849004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226888 0039d316-1c4b-4281-b951-d872f2087c98
* Fix integer cast warnings for cast_unittesthclam@chromium.org2013-10-031-1/+3
| | | | | | | | TBR=justinlin@chromium.org Review URL: https://codereview.chromium.org/25846005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226884 0039d316-1c4b-4281-b951-d872f2087c98
* Avoid crash when playing corrupt audiojrummell@chromium.org2013-10-031-0/+7
| | | | | | | | | | | | | Corrupt audio data in a media file can cause a crash if the number of channels exceeds the limit that Chrome supports. Fix is to return an error if the number of channels is too large, so that the buffer allocation is not attempted. BUG=301985 TEST=Video now plays without crashing (there is no sound from the corrupt audio portion) Review URL: https://codereview.chromium.org/25772003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226875 0039d316-1c4b-4281-b951-d872f2087c98
* Fix integer cast warnings for cast_unittesthclam@chromium.org2013-10-037-18/+19
| | | | | | | | | | | Disable files that causes warnings for cast_unittest. Also fixed some integer cast warnings. R=justinlin@chromium.org Review URL: https://codereview.chromium.org/25944002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226871 0039d316-1c4b-4281-b951-d872f2087c98