summaryrefslogtreecommitdiffstats
path: root/media/base
Commit message (Collapse)AuthorAgeFilesLines
* Fix flaky behavior in pipeline teardown.acolwell@chromium.org2011-01-132-53/+83
| | | | | | | | | BUG=61012 TEST=Covered by existing media tests. Review URL: http://codereview.chromium.org/6179006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71347 0039d316-1c4b-4281-b951-d872f2087c98
* Change CompositeFilter to use ScopedRunnableMethodFactory &acolwell@chromium.org2011-01-112-14/+22
| | | | | | | | | | | | make OnCallback() static to prevent the CompositeFilter from becoming owned by other filter threads. BUG=68784 TEST=None Review URL: http://codereview.chromium.org/6226001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71067 0039d316-1c4b-4281-b951-d872f2087c98
* Change #ifdef _DEBUG test to #ifndef NDEBUG test.tfarina@chromium.org2011-01-101-2/+2
| | | | | | | | | BUG=None TEST=trybots Review URL: http://codereview.chromium.org/5991010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70956 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor PipelineImpl to use CompositeFilter to manage Filter state transitions.acolwell@chromium.org2011-01-059-123/+1761
| | | | | | | | | | | BUG=54110 TEST=media_unittests CompositeFilterTest.* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=70267 Review URL: http://codereview.chromium.org/5744002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70527 0039d316-1c4b-4281-b951-d872f2087c98
* Move lots of GMock stuff out of line.erg@google.com2011-01-056-58/+127
| | | | | | | | | | | | | | Nico did some treemapping of our build time on Mac, and (surprise!) gmock unittests dominated. Gmock works with several large, heavy templates, and previous patches that out of line the ctors/dtors have significantly sped up compilation (e.g.GLMock) and have reduced thrashing. Nico says I should plug this again: http://www.chromium.org/developers/coding-style/cpp-dos-and-donts BUG=none TEST=none Review URL: http://codereview.chromium.org/6056008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70516 0039d316-1c4b-4281-b951-d872f2087c98
* Move base/lock and base/condition_variable to base/synchronization/brettw@chromium.org2011-01-011-1/+1
| | | | | | | | | | | I kept a base/lock.h in place with a using statement to avoid updating all callers in one CL. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/6018013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70363 0039d316-1c4b-4281-b951-d872f2087c98
* Move base/thread.h to base/threading, fix up callers to use the new location.brettw@chromium.org2011-01-011-1/+1
| | | | | | | | TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/6028009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70345 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 70277 - Revert 70275 - Revert 70267 - Refactor PipelineImpl to use ↵acolwell@chromium.org2010-12-298-1703/+120
| | | | | | | | | | | | | | | | | | | CompositeFilter to manage Filter state transitions. BUG=54110 TEST=media_unittests CompositeFilterTest.* Review URL: http://codereview.chromium.org/5744002 TBR=acolwell@chromium.org Review URL: http://codereview.chromium.org/6026013 TBR=acolwell@chromium.org TBR=acolwell@chromium.org Review URL: http://codereview.chromium.org/5974011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70287 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 70275 - Revert 70267 - Refactor PipelineImpl to use CompositeFilter ↵acolwell@chromium.org2010-12-298-120/+1703
| | | | | | | | | | | | | | | | to manage Filter state transitions. BUG=54110 TEST=media_unittests CompositeFilterTest.* Review URL: http://codereview.chromium.org/5744002 TBR=acolwell@chromium.org Review URL: http://codereview.chromium.org/6026013 TBR=acolwell@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70277 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 70267 - Refactor PipelineImpl to use CompositeFilter to manage Filter ↵acolwell@chromium.org2010-12-298-1703/+120
| | | | | | | | | | | | | | state transitions. BUG=54110 TEST=media_unittests CompositeFilterTest.* Review URL: http://codereview.chromium.org/5744002 TBR=acolwell@chromium.org Review URL: http://codereview.chromium.org/6026013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70275 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor PipelineImpl to use CompositeFilter to manage Filter state transitions.acolwell@chromium.org2010-12-298-120/+1703
| | | | | | | | | BUG=54110 TEST=media_unittests CompositeFilterTest.* Review URL: http://codereview.chromium.org/5744002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70267 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 70063 - Refactor PipelineImpl to use CompositeFilter to manage Filter ↵acolwell@chromium.org2010-12-238-1693/+120
| | | | | | | | | | | | | | state transitions. BUG=54110 TEST=media_unittests CompositeFilterTest.* Review URL: http://codereview.chromium.org/5744002 TBR=acolwell@chromium.org Review URL: http://codereview.chromium.org/6016011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70064 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor PipelineImpl to use CompositeFilter to manage Filter state transitions.acolwell@chromium.org2010-12-238-120/+1693
| | | | | | | | | BUG=54110 TEST=media_unittests CompositeFilterTest.* Review URL: http://codereview.chromium.org/5744002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70063 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 69959 - Refactor PipelineImpl to use CompositeFilter to manage Filter ↵acolwell@chromium.org2010-12-228-1693/+120
| | | | | | | | | | | | | | state transitions. BUG=54110 TEST=media_unittests CompositeFilterTest.* Review URL: http://codereview.chromium.org/5744002 TBR=acolwell@chromium.org Review URL: http://codereview.chromium.org/5987008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69962 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor PipelineImpl to use CompositeFilter to manage Filter state transitions.acolwell@chromium.org2010-12-228-120/+1693
| | | | | | | | | BUG=54110 TEST=media_unittests CompositeFilterTest.* Review URL: http://codereview.chromium.org/5744002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69959 0039d316-1c4b-4281-b951-d872f2087c98
* Remove GetVp8CxAlgoAddress hackhclam@chromium.org2010-12-203-64/+0
| | | | | | | | | | | | libvpx has introduced vpx_codec_vp8_cx() and vpx_codec_vp8_dx() use them instead. BUG=None TEST=None Review URL: http://codereview.chromium.org/5831006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69745 0039d316-1c4b-4281-b951-d872f2087c98
* Start deinlining non-empty virtual methods. (This will be automatically checkederg@google.com2010-12-095-3/+11
| | | | | | | | | | | for in the future.) BUG=none TEST=compiles Review URL: http://codereview.chromium.org/5574006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68746 0039d316-1c4b-4281-b951-d872f2087c98
* Move more code from headers to implementation.erg@google.com2010-12-074-10/+13
| | | | | | | | | BUG=none TEST=compiles Review URL: http://codereview.chromium.org/5624002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68534 0039d316-1c4b-4281-b951-d872f2087c98
* Rename MediaFilter and MediaFilterCollection to Filter and FilterCollection, ↵scherkus@chromium.org2010-12-0311-108/+106
| | | | | | | | | | | respectively. BUG=none TEST=compiles Review URL: http://codereview.chromium.org/5527003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68115 0039d316-1c4b-4281-b951-d872f2087c98
* Stopgap fix for crash in issue 53867 comment 15thakis@chromium.org2010-12-012-55/+69
| | | | | | | | | | | | | gwtquake lets the renderer create > 300 threads (one per audio element?), and eventually thread creation fails. This CL makes the media code more robust against thread creation failure (currently, it just crashes the renderer). The Real Fix probably is to have a thread pool for media stuff instead of one thread per media object. And maybe threads just leak under some circumstances. I will file a follow-up bug for that case, hopefully with a reduced test case. BUG=53867,61293 TEST=Completing the first level in gwtquake shouldn't crash the renderer. Review URL: http://codereview.chromium.org/5362003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67824 0039d316-1c4b-4281-b951-d872f2087c98
* Fix clock update behavior at the end of stream.acolwell@chromium.org2010-11-236-21/+120
| | | | | | | | | | | | | | | | | | | | | | | | Sometimes the audio stream is slightly shorter than the video stream. This can result in no audio data being written to the audio device if you seek close to the end of the clip. This causes the pipeline to hang because the video stream hasn't ended, but the clock hasn't been started because no audio data is written to the device. This change makes sure that the clock gets started if the audio stream has ended and we are still waiting for a clock update. I've also included a fix for a related problem where all of the audio data gets written to the device, but clock updates don't occur on playback_delay changes. This was contributing to the issue mentioned above because up to a second worth of audio data can be covered by the playback_delay. If this happens while seeking to within a second of the clip end you won't get clock updates for the audio data. BUG=52887 TEST=PipelineImplTest.AudioStreamShorterThanVideo Review URL: http://codereview.chromium.org/5182008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67170 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Remove unneeded headers from base/ (part 9)thestig@chromium.org2010-11-202-2/+0
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/5091005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66873 0039d316-1c4b-4281-b951-d872f2087c98
* Add shared macros for stringizing and converting ANSI string constantsjoi@chromium.org2010-11-181-6/+4
| | | | | | | | | | | | | | | | | | | | | (in particular defined by macros) to wide string constants. Convert existing locally-defined stringizing to use the shared macros. Unit tests for the shared macros. This also fixes a minor bug in ceee_module_util.cc where I accidentally quoted a string constant I only meant to convert to wide (this caused no bug, but was unintended, so the change in semantics in that file in the current change is intentional). BUG=none TEST=automated tests Review URL: http://codereview.chromium.org/5103001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66579 0039d316-1c4b-4281-b951-d872f2087c98
* Move FilterType into MediaFilterCollectionacolwell@chromium.org2010-11-157-101/+131
| | | | | | | | | | | | | | | MediaFilterCollection is the only code that uses FilterType now so I'm moving the enum into that class and removing all references from the MediaFilter & derived classes. BUG=61823 TEST=No new functionality. Existing tests pass. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=66125 Review URL: http://codereview.chromium.org/4653005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66182 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 66125 -- Broke Windows build - Move FilterType into MediaFilterCollectionlevin@chromium.org2010-11-157-131/+101
| | | | | | | | | | | | | | | | MediaFilterCollection is the only code that uses FilterType now so I'm moving the enum into that class and removing all references from the MediaFilter & derived classes. BUG=61823 TEST=No new functionality. Existing tests pass. Review URL: http://codereview.chromium.org/4653005 TBR=acolwell@chromium.org Review URL: http://codereview.chromium.org/4991003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66139 0039d316-1c4b-4281-b951-d872f2087c98
* Move FilterType into MediaFilterCollectionacolwell@chromium.org2010-11-157-101/+131
| | | | | | | | | | | | | MediaFilterCollection is the only code that uses FilterType now so I'm moving the enum into that class and removing all references from the MediaFilter & derived classes. BUG=61823 TEST=No new functionality. Existing tests pass. Review URL: http://codereview.chromium.org/4653005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66125 0039d316-1c4b-4281-b951-d872f2087c98
* Remove media::StreamSample::IsDiscontinuous() and friends.scherkus@chromium.org2010-11-124-28/+2
| | | | | | | | | | | We don't rely on samples identifying themselves as discontinuous and instead have the pipeline force a flush as part of a seek. BUG=54110 TEST=media_unittests and layout tests Review URL: http://codereview.chromium.org/4878001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66005 0039d316-1c4b-4281-b951-d872f2087c98
* Rename media::StreamSample::kInvalidTimestamp to media::kNoTimestamp.scherkus@chromium.org2010-11-126-28/+23
| | | | | | | | | | | Old name was overly verbose. BUG=54110 TEST=compiles Review URL: http://codereview.chromium.org/4877002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65989 0039d316-1c4b-4281-b951-d872f2087c98
* Remove WriteableBuffer interface as DataBuffer is the only implementation.scherkus@chromium.org2010-11-124-26/+15
| | | | | | | | | | | Turns out we never needed multiple WritableBuffer implementations. BUG=54110 TEST=media_unittests Review URL: http://codereview.chromium.org/4824002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65988 0039d316-1c4b-4281-b951-d872f2087c98
* Delete media::Synchronizer since it's never been used.scherkus@chromium.org2010-11-122-149/+0
| | | | | | | | | | | Code is nearly two years old and has yet to be used anywhere. My original intention was to use it to extract the synchronizing code from VideoRendererBase, but looks like I never got around to it. BUG=54110 TEST=compiles Review URL: http://codereview.chromium.org/4823002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65987 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor Pipeline & PipelineImpl so WebMediaPlayerImpl references a Pipeline ↵acolwell@chromium.org2010-11-114-42/+31
| | | | | | | | | | | instead of PipelineImpl BUG=54110 TEST=PipelineImplTest Review URL: http://codereview.chromium.org/4664005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65817 0039d316-1c4b-4281-b951-d872f2087c98
* Simplified AudioOutputStream interface.sergeyu@chromium.org2010-11-111-0/+1
| | | | | | | | | | | | | 1. Removed packet_size parameter from Open(). 2. Removed OnClose() from the callback. Now the callback is guaranteed to be called only between Start() and Stop(). 3. Added samples_per_packet in the AudioParameters struct. BUG=39825 TEST=Unittests Review URL: http://codereview.chromium.org/4661001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65766 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor code so PipelineImpl doesn't rely on FilterType anymore.scherkus@chromium.org2010-11-044-121/+115
| | | | | | | | | | | | | - Replaced SupportsSetMessageLoop() & GetThreadName() with new methods in MediaFilter. - Reworked pipeline initialization logic so it keeps track of type references instead of downcasting based on filter_type(). Patch by acolwell@chromium.org: http://codereview.chromium.org/4397003/show BUG=61823 TEST=media_unittests git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65129 0039d316-1c4b-4281-b951-d872f2087c98
* Initial StateMatrix idea using composition and void*scherkus@chromium.org2010-11-043-0/+140
| | | | | | | | | BUG=none TEST=media_unittests Review URL: http://codereview.chromium.org/3416001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65128 0039d316-1c4b-4281-b951-d872f2087c98
* Move MediaFilterCollection code into a class.scherkus@chromium.org2010-11-0310-139/+305
| | | | | | | | | | | | | Refactored FilterType usage a bit to remove the need to manually associate FilterType values to filter base classes. Patch by acolwell@chromium.org: http://codereview.chromium.org/4176006/show BUG=60778 TEST=media_unittests git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64885 0039d316-1c4b-4281-b951-d872f2087c98
* Convert implicit scoped_refptr constructor calls to explicit ones, part 2thakis@chromium.org2010-11-021-1/+1
| | | | | | | | | | | | This CL was created automatically by this clang rewriter: http://codereview.appspot.com/2826041 I then did quite a bit of manual editing to fix style issues. BUG=28083 TEST=None Review URL: http://codereview.chromium.org/4291001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64798 0039d316-1c4b-4281-b951-d872f2087c98
* Convert implicit scoped_refptr constructor calls to explicit ones, part 1thakis@chromium.org2010-11-014-14/+14
| | | | | | | | | | | This CL was created automatically by this clang rewriter: http://codereview.appspot.com/2776043/ . I manually fixed a few rough spots of the rewriter output (doh1-3) and fixed all presubmit errors. BUG=28083 TEST=None Review URL: http://codereview.chromium.org/4192012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64573 0039d316-1c4b-4281-b951-d872f2087c98
* Terminate FilterFactory and his nasty friendshclam@chromium.org2010-10-2310-554/+371
| | | | | | | | | | | | | FilterFactory, IsMediaFormatSupported and CreateFactory are the source of evil. They also have have a gang of template functions. This patch terminate them all and make the world a better place. BUG=28207 TEST=<video> runs Review URL: http://codereview.chromium.org/3878001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63609 0039d316-1c4b-4281-b951-d872f2087c98
* Prevent buffered time from being less than the current time.scherkus@chromium.org2010-10-203-38/+88
| | | | | | | | | | Patch by acolwell@chromium.org: http://codereview.chromium.org/3897002/show BUG=56804 TEST=PipelineImplTest.GetBufferedTime git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63292 0039d316-1c4b-4281-b951-d872f2087c98
* Convert LOG(INFO) to VLOG(1) - media/.pkasting@chromium.org2010-10-192-8/+7
| | | | | | | | | | Also, remove some extra {}s, remove "else" after "return", eliminate a "using". BUG=none TEST=none Review URL: http://codereview.chromium.org/3912001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63140 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Even more ctor/virtual deinlining.erg@google.com2010-10-194-11/+35
| | | | | | | | | | | (Only 424k off Linux debug .a files). BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3859003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63059 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Monster ctor patch after changing heuristics in clang plugin.erg@google.com2010-10-182-11/+32
| | | | | | | | | | | (Only 916k this time off Debug Linux .a files) BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3814013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62967 0039d316-1c4b-4281-b951-d872f2087c98
* Make sure to use scoped_refptr for refcounted params in audio/video/remotingwillchan@chromium.org2010-10-181-2/+6
| | | | | | | | | BUG=28083 TEST=existing Review URL: http://codereview.chromium.org/3821005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62949 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Fix more ctor/dtors found by clang plugin.erg@google.com2010-10-132-0/+15
| | | | | | | | | | | (1.2 megs off of Debug Linux .a files) BUG=none TEST=compiles everywhere Review URL: http://codereview.chromium.org/3743001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62420 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 61899 for breaking cookes on file:// URLs.willchan@chromium.org2010-10-081-6/+2
| | | | | | | | | | | | | | | | | | BUG=58553 ================================================= Fix instances of passing raw pointers to RefCounted objects in tasks. Some of these manually handled it correctly by using AddRef()/Release() pairs. I switched them to make_scoped_refptr() to be more consistent. This also makes them cleanup properly on MessageLoop shutdown if we start deleting tasks. BUG=28083 TEST=builds Review URL: http://codereview.chromium.org/3581008 TBR=willchan@chromium.org Review URL: http://codereview.chromium.org/3654001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62043 0039d316-1c4b-4281-b951-d872f2087c98
* Fix instances of passing raw pointers to RefCounted objects in tasks.willchan@chromium.org2010-10-081-2/+6
| | | | | | | | | | | Some of these manually handled it correctly by using AddRef()/Release() pairs. I switched them to make_scoped_refptr() to be more consistent. This also makes them cleanup properly on MessageLoop shutdown if we start deleting tasks. BUG=28083 TEST=builds Review URL: http://codereview.chromium.org/3581008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61899 0039d316-1c4b-4281-b951-d872f2087c98
* GpuVideoDecoderHost runs on IO thread instead of Render threadhclam@chromium.org2010-10-071-0/+2
| | | | | | | | | | | | Move GpuVideoDecoderHost to IO thread and change GpuVideoServiceHost to be a MessageFilter. BUG=53714 TEST=Tree is green. Will pending on WebKit changes to make this work. Review URL: http://codereview.chromium.org/3462015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61854 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup in VideoFramehclam@chromium.org2010-10-072-54/+0
| | | | | | | | | | | | | Remove D3D textures from VideoFrame because it is not used anymore. Remove duration and timestamp when creating a video frame from textures. BUG=53714 TEST=Tree is green. Review URL: http://codereview.chromium.org/3501005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61852 0039d316-1c4b-4281-b951-d872f2087c98
* Implement Gles2VideoDecoderContexthclam@chromium.org2010-10-072-1/+5
| | | | | | | | | | | Allocate textures for video frames in Gles2VideoDecoderContext. BUG=53714 TEST=Tree is green. This doesn't work yet. Review URL: http://codereview.chromium.org/3391022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61825 0039d316-1c4b-4281-b951-d872f2087c98
* Implement GpuVideoDecoderHost and unit testshclam@chromium.org2010-10-071-0/+2
| | | | | | | | | | | | | | Add the following feature to GpuVideoDecoderHost: 1. Video frame allocation / release. 2. ProduceVideoFrame / ConsumeVideoFrame using frames allocated. 3. Change GpuVideoDecoder creation to asynchronous. BUG=53714 TEST=unit_tests --gtest_filter=GpuVideoDecoder* Review URL: http://codereview.chromium.org/3397027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61824 0039d316-1c4b-4281-b951-d872f2087c98