summaryrefslogtreecommitdiffstats
path: root/media/base
Commit message (Collapse)AuthorAgeFilesLines
* Clean up FFmpeg media formats and switch to using ↵scherkus@chromium.org2009-04-291-1/+9
| | | | | | | | | | av_get_bits_per_sample_format(). Before we were relying on codecs setting bits_per_raw_sample, which turns out isn't a valid assumption at all (i.e., vorbis). However, codecs always set the sample format so we can use the FFmpeg utility function av_get_bits_per_sample_format() to convert the SampleFormat enum to an integer number of bits. Review URL: http://codereview.chromium.org/99160 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14808 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a crash with <video>hclam@chromium.org2009-04-271-1/+1
| | | | | | | | | | | | Having typo in the file, causing a different dll loaded for <video>. When initializing ffmpeg since avformat-52.dll is not loaded, it tries to do LoadLibrary within sandbox and kaboom! TBR=scherkus Review URL: http://codereview.chromium.org/99024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14614 0039d316-1c4b-4281-b951-d872f2087c98
* Prototype audio time shift.fbarchard@chromium.org2009-04-231-1/+1
| | | | | | Review URL: http://codereview.chromium.org/92007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14366 0039d316-1c4b-4281-b951-d872f2087c98
* Move FFmpegDemuxer initialization onto the demuxer thread.scherkus@chromium.org2009-04-221-1/+35
| | | | | | | | We now have all FFmpeg function calls executing on the demuxer thread, meaning DataSource will now always receive IO operations on the demuxer thread. Review URL: http://codereview.chromium.org/87060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14205 0039d316-1c4b-4281-b951-d872f2087c98
* Hacked up delay load code for ffmpeg in posix systems. This isajwong@chromium.org2009-04-212-2/+216
| | | | | | | | | a temporary solution. We need to find a more sustainable way to do this. Review URL: http://codereview.chromium.org/87018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14150 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes FFmpegDemuxerTest.ReadAndSeek test flakiness by using a WaitableEvent.scherkus@chromium.org2009-04-211-10/+4
| | | | | | | | | | Turns out it was the test code that was flaky and not a threading bug in our actual code. Under heavy load it was possible for a thread holding onto a reference to get time sliced long enough that the unit test continued executing until it asserted that the object was deleted when in fact it was not. BUG=10653 Review URL: http://codereview.chromium.org/88010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14113 0039d316-1c4b-4281-b951-d872f2087c98
* DCHECK now allows SetPlaybackRate(0.0f) if the pipeline is stopped.ralphl@chromium.org2009-04-211-1/+2
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14111 0039d316-1c4b-4281-b951-d872f2087c98
* YUV to RGB with arbitrary scaling.fbarchard@chromium.org2009-04-214-29/+450
| | | | | | | | | | | Semi-optimized C code achieving 33 ms for 1080 double sized or 9 ms with openmp enabled. Special case half size which is much faster. Future versions will support mirror and perhaps rotate. (mirror is free) Future versions will be MMX assembly for speed. Review URL: http://codereview.chromium.org/67278 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14092 0039d316-1c4b-4281-b951-d872f2087c98
* Move the ffmpeg loading function into media library.ajwong@chromium.org2009-04-183-0/+114
| | | | | | | | This will allow us to hide the platform specific library loading code from the main chrome code. Review URL: http://codereview.chromium.org/69027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13991 0039d316-1c4b-4281-b951-d872f2087c98
* YV16 unittest which is mostly the same as YV12. Requires YV16 data filesfbarchard@chromium.org2009-04-061-6/+59
| | | | | | Review URL: http://codereview.chromium.org/62060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13208 0039d316-1c4b-4281-b951-d872f2087c98
* Add YV16 convertfbarchard@chromium.org2009-04-062-13/+65
| | | | | | Review URL: http://codereview.chromium.org/62015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13155 0039d316-1c4b-4281-b951-d872f2087c98
* FFmpeg video decoder glue codehclam@chromium.org2009-04-021-2/+3
| | | | | | | | | | Implementation of FFmpeg to perform video decoding. Also added hooks to insert this FFmpeg video decoder filter. Review URL: http://codereview.chromium.org/60069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13056 0039d316-1c4b-4281-b951-d872f2087c98
* FFmpegDemuxer now uses a thread to handle demuxing.scherkus@chromium.org2009-03-311-0/+1
| | | | | | | | | | Since FFmpegDemuxer no longer uses the pipeline thread to demuxer, I had to add a WaitableEvent to TestReader to make sure the read completed (or not!). Downside is that the test for when a read is never completed now waits 500ms before timing out. Oh well :( Review URL: http://codereview.chromium.org/55047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12831 0039d316-1c4b-4281-b951-d872f2087c98
* Enable streaming in ffmpeg based on data sourcemedia::DataSource interface ↵hclam@chromium.org2009-03-302-0/+7
| | | | | | | | has IsSeekable() method to decideon runtime whether the data source is seekable or not. Thisinformation is provided to FFmpeg to decide whether to dostreaming or not. In the case of streaming, FFmpeg does notsupport seeking. Review URL: http://codereview.chromium.org/57015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12802 0039d316-1c4b-4281-b951-d872f2087c98
* Decoders now use standard callback mechanism for Reads. Removed ↵ralphl@chromium.org2009-03-303-69/+12
| | | | | | | | | Assignable<> template. Also includes an update that should provide more accurate timing from the audio renderer. Review URL: http://codereview.chromium.org/55031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12796 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed a lot threading issues during tear down of <video>hclam@chromium.org2009-03-272-5/+4
| | | | | | | | | | | | | | | | | Fixed a lot of dead locks during tead down of <video> due to DataSourceImpl. Most of the issues come from that during a tab close RenderThread is destroyed and new tasks posted on it will not executed, but DataSourceImpl is waiting for those tasks to finish to complete stopping. Another dead lock comes from that when RenderThread is destroyed the owner loop of it (a IO Message Loop) is being destroyed too and DataSourceImpl shouldn't post tasks to that message loop when stopping. Review URL: http://codereview.chromium.org/42675 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12720 0039d316-1c4b-4281-b951-d872f2087c98
* Demuxer stream now uses a callback instead of Assignable template. Cleaning ↵ralphl@chromium.org2009-03-272-3/+5
| | | | | | | | up Pipeine interfaces to conform with Chrome Base design. Review URL: http://codereview.chromium.org/53126 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12652 0039d316-1c4b-4281-b951-d872f2087c98
* Lots of files touched for a very simple change. Everywhere we used a const ↵scherkus@chromium.org2009-03-265-35/+34
| | | | | | | | | | MediaFormat* we now use a const MediaFormat&. This makes for simpler code and for better pointer reference safety. Review URL: http://codereview.chromium.org/42635 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12623 0039d316-1c4b-4281-b951-d872f2087c98
* Ability for demuxer clients to get to FFmpeg's AVStream object exposed as an ↵ralphl@chromium.org2009-03-263-43/+64
| | | | | | | | | extended interface through DemuxerStream object. DemuxerStream now derives from base::RefCountedThreadSafe. Review URL: http://codereview.chromium.org/42521 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12537 0039d316-1c4b-4281-b951-d872f2087c98
* TBR=hclamfbarchard@chromium.org2009-03-241-8/+8
| | | | | | | | | Try to fix buildbot for linux Review URL: http://codereview.chromium.org/52036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12334 0039d316-1c4b-4281-b951-d872f2087c98
* This reordering of instructions and use of movzx improved performance on ↵fbarchard@chromium.org2009-03-241-37/+21
| | | | | | | | | pentium4 without impacting performance on core2 architecture. Performance goes from 2.050 ms to 1.742 ms per frame. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12333 0039d316-1c4b-4281-b951-d872f2087c98
* MMX optimized YUV conversion in GCC and Visual C.fbarchard@chromium.org2009-03-232-64/+528
| | | | | | | | Unittest updated with 640x360 image converted offline with same code. Review URL: http://codereview.chromium.org/43003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12292 0039d316-1c4b-4281-b951-d872f2087c98
* Revert tree bustage cause by r11904.hclam@chromium.org2009-03-1717-169/+417
| | | | | | TBR=agl git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11906 0039d316-1c4b-4281-b951-d872f2087c98
* andrew's patchhclam@chromium.org2009-03-1717-417/+169
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11904 0039d316-1c4b-4281-b951-d872f2087c98
* Removed unneeded includes of base/time.h.thestig@chromium.org2009-03-162-2/+4
| | | | | | Review URL: http://codereview.chromium.org/48019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11766 0039d316-1c4b-4281-b951-d872f2087c98
* Buffer interface is now uint8*. Slight change to way data buffers are ↵ralphl@chromium.org2009-03-164-52/+55
| | | | | | | | | created. Caller passes no parameters to the constructor of a data buffer now. GetWritableData() method is responsible for allocating memory. Review URL: http://codereview.chromium.org/46015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11760 0039d316-1c4b-4281-b951-d872f2087c98
* Removed unneeded includes of base/scoped_ptr.h. Reduce usage from ~800 files ↵thestig@chromium.org2009-03-131-0/+1
| | | | | | | | to ~400. Review URL: http://codereview.chromium.org/46039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11651 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unneeded platform_thread.h includes. Reduces number of includes from ↵thestig@chromium.org2009-03-131-1/+0
| | | | | | | | 598 to 511. Review URL: http://codereview.chromium.org/42165 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11617 0039d316-1c4b-4281-b951-d872f2087c98
* Remove logging.h from cc files that don't use it.thestig@chromium.org2009-03-121-1/+0
| | | | | | Review URL: http://codereview.chromium.org/42155 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11593 0039d316-1c4b-4281-b951-d872f2087c98
* NO CODE CHANGEdeanm@chromium.org2009-03-113-3/+0
| | | | | | | | | Normalize end of file newlines in build/ media/ printing/ testing/ and tools/. All files end in a single newline. Review URL: http://codereview.chromium.org/43082 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11449 0039d316-1c4b-4281-b951-d872f2087c98
* Implementaion of the VideoFrame interaface plus unit tests. Modified the ↵ralphl@chromium.org2009-03-115-82/+355
| | | | | | | | mock video decoder to use the new frame implementation. Review URL: http://codereview.chromium.org/42038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11410 0039d316-1c4b-4281-b951-d872f2087c98
* Implemented AudioRendererImpl in renderer process using APIhclam@chromium.org2009-03-101-1/+1
| | | | | | | | | | provided by RenderView for accessing audio device in the browser using IPC, subclassing from media::AudioRendererBase for buffer filling. Review URL: http://codereview.chromium.org/28081 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11392 0039d316-1c4b-4281-b951-d872f2087c98
* Checking in media::FFmpegGlue, media::FFmpegDemuxer and tests.scherkus@chromium.org2009-03-102-7/+35
| | | | | | | | | | | | | | Fixes build break by including FFmpeg dependency for media project in chrome.sln. This is a second attempt at committing the following changelists: http://codereview.chromium.org/39295 http://codereview.chromium.org/28165 TBR=darin Review URL: http://codereview.chromium.org/42029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11356 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Checking in media::FFmpegDemuxer and tests."scherkus@chromium.org2009-03-102-35/+7
| | | | | | Review URL: http://codereview.chromium.org/43032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11350 0039d316-1c4b-4281-b951-d872f2087c98
* Checking in media::FFmpegDemuxer and tests.scherkus@chromium.org2009-03-101-1/+6
| | | | | | | | FFmpegDemuxer is a Demuxer implemenation using FFmpeg's libavformat. It is written in a way to work with any format and assume that the downstream decoders can interpret FFmpeg's CodecID enumerations. Review URL: http://codereview.chromium.org/39295 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11346 0039d316-1c4b-4281-b951-d872f2087c98
* Checking in media::FFmpegGlue and some common FFmpeg code.scherkus@chromium.org2009-03-101-6/+29
| | | | | | | | FFmpegGlue acts as an adapter between FFmpeg's URLProtocol and the media::DataSource interface, allowing us to use media::DataSource implementations for handling FFmpeg's IO. Review URL: http://codereview.chromium.org/28165 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11345 0039d316-1c4b-4281-b951-d872f2087c98
* DCHECK affects performance in release build.fbarchard@chromium.org2009-03-071-0/+7
| | | | | | | | | OFFICIAL_BUILD is okay, but this ifdef makes DCHECK only work in debug. On 720p DCHECK version is 8.14 ms and without, its 2.68 ms Review URL: http://codereview.chromium.org/40245 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11191 0039d316-1c4b-4281-b951-d872f2087c98
* Moved mock media filter constructors from private to public.scherkus@chromium.org2009-03-061-44/+31
| | | | | | Review URL: http://codereview.chromium.org/40243 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11158 0039d316-1c4b-4281-b951-d872f2087c98
* Pipeline_Impl was modified to properly render a stream that has video but no ↵ralphl@chromium.org2009-03-068-209/+275
| | | | | | | | | | | audio. A unit test accompanies the change. Note that one minor other change was snuck in with this change. The data_source_impl.cc had a TODO to set a more specific error when a read failed. Because I was already updating the pipeline error enum, I added the error code, changed the call to host_->Error(), and removed the TODO. Review URL: http://codereview.chromium.org/39170 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11148 0039d316-1c4b-4281-b951-d872f2087c98
* Cast size_t to int for comparison with ReadFile return value.fbarchard@chromium.org2009-03-061-6/+8
| | | | | | | | | What gcc compile option checks sign on equality? I'd like to test this, even if try server does not. TBR=hclam Review URL: http://codereview.chromium.org/38008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11091 0039d316-1c4b-4281-b951-d872f2087c98
* YUV conversion code.fbarchard@chromium.org2009-03-063-0/+270
| | | | | | | This will be used for reference. Its reasonably simple, fast and high quality. Future versions will be optimized and should try to maintain similar quality. Longer term we may move this to Skia or attempt a hardware version. Review URL: http://codereview.chromium.org/40029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11089 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed up MockFilterHost and MockPipeline to support tasks and callbacks.scherkus@chromium.org2009-03-062-34/+72
| | | | | | | | | | | | I changed the constructor to MockFilterHost to *not* create and initialize filters to allow for testing for conditions where create/initialize would fail. Also multiple MockFilterHosts can now share a common MockPipeline, which simulates how it is supposed to work. Finally, updated the VideoRendererBase tests to be deterministic and completely mocked and fixing failing unittests. BUG=8379 Review URL: http://codereview.chromium.org/39234 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11085 0039d316-1c4b-4281-b951-d872f2087c98
* Changed several references from "char" to "uint8" which is the appropriate ↵ralphl@chromium.org2009-03-043-45/+87
| | | | | | | | | | | | | | | | definition for byte data buffers. This change is small, but modifies the data source interface Read() method, and the VideoSurface data structure. Mocks and tests all have very small changes. There are some changes in the mock_media_filters.h file that go beyond the scope of just changing char to uint8. These changes are required for future tests, and simply fill in parts of mocks that previously were NOTIMPLEMENTED(). The MockVideoFrame was modified to allow other tests to create a video frame directly without using the MockFilterConfiguration data structure. Also, it is now possible to construct a mock pipeline that has no audio. The currently checked-in pipeline will NOT work if you don't have audio. In a 2nd changelist, I will submit a new Pipeline_Impl and unit test that DOES support video without audio. Review URL: http://codereview.chromium.org/40059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10940 0039d316-1c4b-4281-b951-d872f2087c98
* Added IsEndOfStream and IsDiscontiguous flags to buffers.ralphl@chromium.org2009-02-255-92/+131
| | | | | | Review URL: http://codereview.chromium.org/27120 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10406 0039d316-1c4b-4281-b951-d872f2087c98
* Moved most functionality of video renderer into a base class ↵ralphl@chromium.org2009-02-241-0/+42
| | | | | | | | | (video_renderer_base) and implemented mock filter will full functionality execpt that it never draws anything. Review URL: http://codereview.chromium.org/20343 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10239 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes a bug in the media pipeline that resulted in the video dimensions ↵ralphl@chromium.org2009-02-193-51/+328
| | | | | | | | | never getting set. Includes a new unit test, along with new mocks for a video decoder and video renderer. Review URL: http://codereview.chromium.org/20326 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10006 0039d316-1c4b-4281-b951-d872f2087c98
* Reduce the amount of included header files. Vast change like in "Oh God! ↵maruel@chromium.org2009-02-181-1/+0
| | | | | | | | This revision changes half of the source files!". Review URL: http://codereview.chromium.org/20378 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9958 0039d316-1c4b-4281-b951-d872f2087c98
* A very basic implementation of a data source, which opens a file. ↵ralphl@chromium.org2009-02-122-0/+276
| | | | | | | | Implementation of the DataSource media filter interface. Review URL: http://codereview.chromium.org/21111 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9642 0039d316-1c4b-4281-b951-d872f2087c98
* Almost complete implementation of the Chrome video renderer. Still needs to ↵ralphl@chromium.org2009-02-111-2/+14
| | | | | | | | implement color space conversion for final bitblt. Review URL: http://codereview.chromium.org/21037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9575 0039d316-1c4b-4281-b951-d872f2087c98
* Could you guys get on this one ASAP. My video render code depends on these ↵ralphl@chromium.org2009-02-105-20/+216
| | | | | | | | methods. I also slipped in the critical section code stuff here too. Review URL: http://codereview.chromium.org/19547 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9466 0039d316-1c4b-4281-b951-d872f2087c98