Commit Graph

30 Commits

Author SHA1 Message Date
Kongqun Yang fae7874c4c Add a runtime flag to use dts in timeline for mp4
This flag is needed to workaround the Chromium bug
https://crbug.com/398130, which uses decoding timestamp
in buffered range.

Closes #113

Change-Id: Ib8f18be7165dd968bdc36c18ce29f694235c0c26
2016-07-19 18:56:08 +00:00
Kongqun Yang 4f9c8ea781 Rename top level namespace to shaka
Issue #103

Change-Id: I67945c8ec6d2c178494d3b5400e5ec0170e9d115
2016-05-24 21:55:55 +00:00
Kongqun Yang bbcca29013 Move all code inside top level namespace
Change-Id: I83bc081f523dbc5071796a79c2d89b7367ed8d27
2016-05-24 21:55:21 +00:00
Rintaro Kuroiwa 49e87a34a3 Expose memory file system prefix
- Memory file system prefix should be exposed for testing.

Change-Id: Id284d77084b98c8175cdd485480f2fc49241e137
2016-04-13 23:17:42 -07:00
KongQun Yang cef1729652 Replace vector_as_array(...) with vector::data()
vector::data() introduced in C++11 does exactly what vector_as_array does.

Change-Id: Iab436b6f1ce7db7678bd240256d9ae80208be07b
2016-03-02 10:22:15 -08:00
Anders Hasselqvist 4195c5e505 MacOSX: Fix run_all_unittests target name conflict
There is a target name conflict between packager/base/base.gyp:run_all_unittests and
media_test.gyp:run_all_unittests. Change to media_test.gyp:run_tests_with_atexit_manager to
resolve the conflict.
2016-01-22 18:50:05 -08:00
Anders Hasselqvist db7bebe3fa MacOSX: Solve libbase.a conflict link error
On Linux the generated ninja files use path/libbase.a as target name.
In the Mac ninja file the target is just libbase.a.
As we have two libbase.a (base/base.gyp and media/base/media_base.gyp) the linking stage fails to include both libs.

Solve by renaming media_base.gyp's base target to media_base
2016-01-22 18:50:05 -08:00
KongQun Yang b17d240060 Fix a memory leak due to thread object tracking
ThreadedIoFile spawns a new thread for every new file. Thread
information is stored for tracking purpose by base::tracked_objects.
The tracking object remains even if the thread itself is destroyed.
This results in memory usage increased by a couple of bytes for every
new segment created in live mode (new segments spawns new threads).

Use WorkerPool instead to avoid spawning new threads.

Fixes Issue #61.

Change-Id: Id93283903c3ba8ebf172a0d58e19b082a72c6cf0
2016-01-08 23:41:41 +00:00
Jacob Trimble 7b52f0a3ed Added unit tests for WebM Segmenters.
* Changed Segmenters to accept StreamInfo rather than MediaStream
  to help in testing.
* Changed MemoryFile behavior to mirror local file:
  * Read non-existent file is an error.
  * Write deletes any existing file.
* Fixed a bug in SingleSegmentSegmenter.

Change-Id: I339e35597ca4661b7a26c6fdbbfa2f9f511c7da0
2016-01-07 17:07:02 +00:00
Jacob Trimble 8a0458c17b Added MemoryFile, a File type stored in memory.
This can be used for unit tests to reduce the need for temporary
files.  A MemoryFile acts the same as any other File object, but
stores the contents in memory.  The memory pointer can be accessed
directly.  A file with the 'memory://' prefix will be a memory file.

Change-Id: I10ae3ed5391c8fd838e6dfb33106dec959bdc224
2016-01-04 22:50:07 +00:00
Jacob Trimble 07378e806c Added WebM muxer.
* Added WebM muxer that supports both single and multi-segment modes.
* WebM muxer supports MPD generation.
* Enabled WebM muxer and demuxer in packager.

b/22463220
b/25089245
b/25089714

Change-Id: I9f6e8fc51e08fbb1d685229c5cb54ea60f7bed8f
2015-12-15 20:34:44 +00:00
Thomas Inskip 329afd0ade Added Seek & Tell functionality to ThreadedIoFile.
Change-Id: I3c714014e961d08110ce194ad865322e0b487fcb
2015-12-08 22:55:08 +00:00
Thomas Inskip 7b74ca12de Fixed a miniscule odds race condition found by tsan (Thread sanitizer)
in ThreadedIofile.
Added loop to handle partial writes in ThreadedIoFile.

Change-Id: Ib62855ab849ffbfd00afc5b226dd81d4cd38ff51
2015-11-17 18:42:10 +00:00
KongQun Yang d60cc9416f Fix a possible crash if a file fails to be closed
Change-Id: I6bc806a68b81ea5bde09bada1175f257c296afcd
2015-11-13 10:07:13 -08:00
Rintaro Kuroiwa 29e14a3d6b VOD text support
Change-Id: Ic69169c31d0a54de4895d49ff8b4a758039733a7
2015-11-11 12:26:25 -08:00
Thomas Inskip 05f80f961c Fix for race condition when flushing ThreadedIoFile.
Change-Id: I46f26fa9fddf53ca5231c31d6442053ab5202ade
2015-10-20 16:44:15 +00:00
Kongqun Yang 47c79d08ce Update code to resolve problems due to base updates.
Notably deprecate of OVERRIDE, to be replaced with C++11 override.

Bug: 22463130
Bug: 22664127

Change-Id: I12c82e092e9e8eb0870da4363307c3563a3531b7
2015-10-16 20:09:56 +00:00
Kongqun Yang 2a95367dd4 Move SAR extraction out of video_stream_info.cc
This fixes a circular dependency of media_base depends on filter and
filter depends on media_base.

Also added code to extract sar in WvmMediaParser if it is not yet
extracted when setting extra_data.

Change-Id: I1b5aef2444e4134c9b6663911ac5e5c4c220404a
2015-08-24 23:16:49 +00:00
Rintaro Kuroiwa 8d84ebfed7 Change LocalFileTest to use CreateTemporaryFile
- The tests couldn't run in parallel using gtest-parallel
  (https://github.com/google/gtest-parallel) because all the tests
  used the same file.

Change-Id: I9a3d2c20c290fbf4bee2a1d79c4ce9bf802aefcf
2015-07-22 00:28:57 -07:00
Thomas Inskip ada218c089 Added File Seek and Tell functionality.
Added ability to open files in direct-access mode (no buffering).

Change-Id: Icca71a60f6697967e7535a030c71414de95d8044
2015-05-21 12:48:20 -07:00
Thomas Inskip 14a1e06542 Changes for source code portability.
Change-Id: I06ebb0bb0cbf16c85eff066e606af5ec9033a206
2015-03-24 22:35:53 +00:00
KongQun Yang 7cac9da421 Fix various misc build issues in Windows
This is part of the effort to get edash_packager builds on Windows.

Change-Id: I1339f8f41a30ad3d5808ab19276d46ee902065e2
2015-03-24 13:52:18 -07:00
Thomas Inskip e3d18b684c Added static initialization and cleanup of libxml and libcurl.
Change-Id: I31cfc9a76c3c90c66059998ffc77371619a43acc
2015-03-24 11:01:10 -07:00
Thomas Inskip 0ff596e75b Deprecated File::Eof.
Change-Id: I0cca5e175babcdeeb982f981f97f8dd1b0ae9649
2015-03-23 09:39:05 -07:00
Thomas Inskip 5ce7afeda4 Added threaded I/O.
Change-Id: I2528f5f48dafa1477f2d849b6b86cdda33e47f96
2015-03-20 21:15:39 +00:00
Thomas Inskip f494f1f760 Fix for build break with clang.
Change-Id: I7af0b6b787324aa478c654f9a20e9008823a6378
2015-03-18 14:35:25 -07:00
Thomas Inskip 055ccde14f Added implementation and tests of IoCache (thread-safe circular memory buffer).
Change-Id: Id057b641e4eb6f61d18ec3e0565580b23d1e4297
2015-03-18 19:24:57 +00:00
Thomas Inskip a82bab9f3f Added File::Delete as well as deletion of temporary files created by SingleSegmentSegmenter.
Change-Id: Id0aec2f83955f81d2a059c2d077e8381ec7ec1f7
2015-03-11 15:23:19 -07:00
KongQun Yang 15ae26e12f Modify include headers to have "packager" in the path
This is a follow up to previous CL.

Generated using command:
find {media,app,mpd} -type f -exec sed -r -i 's/#include "(.*)"/#include
"packager\/\1"/' {} \;

common.gypi and mpd.gyp are also modified to take the path change into
consideration.

Change-Id: I1fb102b4eb73ae5fde5f4ab303a12cec09b05c33
2014-10-02 12:53:29 -07:00
KongQun Yang b8126bc9da Move source code into packager directory
Make it easier to be included and integrated into other code.

Change-Id: I609881688cc20f8fac676cbd91fde4753af32ee5
2014-10-02 12:32:14 -07:00