Commit Graph

16 Commits

Author SHA1 Message Date
KongQun Yang 2db1867951 Write manifests atomically
In the original manifest updating process, the file was truncated first
before was written with new contents. There is a small chance that
the web server may read back empty file or incomplete file.

The new code makes the update operation atomic (by writing to a temporary
file first then replace the old file with the temporary file).

Fixes #186

Change-Id: I2fd564cb12b922b032c0e9f70d2132a5b12ff098
2017-07-07 11:05:19 -07:00
Kongqun Yang 23f2913248 Update DEPS to fix mac build failure
Change-Id: I1cf95d5da8e3b950300cd61cd9286e957ef653ce
2016-08-19 13:49:41 -07:00
Kongqun Yang 644629c616 Replace scoped_ptr with std::unique_ptr
Change-Id: I1ed18bf876b6154d08a1f7913aa7e76c525451f9
2016-08-18 17:12:36 -07:00
Thomas Inskip 336ea5cb34 Windows build working
Change-Id: I6d9cfa0a310c4c6125c839e4d6a085903e981c9c
2016-08-18 08:30:26 -07:00
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
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
Rintaro Kuroiwa 29e14a3d6b VOD text support
Change-Id: Ic69169c31d0a54de4895d49ff8b4a758039733a7
2015-11-11 12:26:25 -08: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 5ce7afeda4 Added threaded I/O.
Change-Id: I2528f5f48dafa1477f2d849b6b86cdda33e47f96
2015-03-20 21:15:39 +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