Add appveyor config for Windows CI
Also fixes additional Windows build failures. Closes #22 Change-Id: I8bc416f1a44810c438f095ec137d0d102f4e08a5
This commit is contained in:
parent
de9667080f
commit
52cbcb321d
|
@ -23,7 +23,7 @@ before_script:
|
|||
- gclient config https://github.com/google/shaka-packager.git --name=src --unmanaged
|
||||
- gclient sync
|
||||
- cd src
|
||||
- ninja -C out/${BUILD_TYPE}
|
||||
- ninja -C out/${BUILD_TYPE} -k 100
|
||||
|
||||
script:
|
||||
- ( find out/${BUILD_TYPE} -name "*_*test" | while read i ; do $i || exit ; done )
|
||||
|
|
6
DEPS
6
DEPS
|
@ -90,12 +90,6 @@ hooks = [
|
|||
'action': ['python', 'src/packager/build/linux/sysroot_scripts/install-sysroot.py',
|
||||
'--running-as-hook'],
|
||||
},
|
||||
{
|
||||
# Update the Windows toolchain if necessary.
|
||||
'name': 'win_toolchain',
|
||||
'pattern': '.',
|
||||
'action': ['python', 'src/packager/build/vs_toolchain.py', 'update'],
|
||||
},
|
||||
{
|
||||
# Update the Mac toolchain if necessary.
|
||||
'name': 'mac_toolchain',
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# ![Shaka Packager](docs/shaka-packager.png)
|
||||
|
||||
[![Build Status](https://travis-ci.org/google/shaka-packager.svg?branch=master)](https://travis-ci.org/google/shaka-packager)
|
||||
[![Build status](https://ci.appveyor.com/api/projects/status/3t8iu603rp25sa74?svg=true)](https://ci.appveyor.com/project/shaka/shaka-packager)
|
||||
|
||||
Media packaging SDK intended for C++ programmers writing DASH/HLS packager applications with common encryption support, Widevine DRM support, Live, and Video-On-Demand.
|
||||
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
platform:
|
||||
- x86
|
||||
- x64
|
||||
|
||||
configuration:
|
||||
- Debug
|
||||
- Release
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- language: cpp
|
||||
|
||||
clone_folder: c:\projects\shaka-packager\src
|
||||
|
||||
install:
|
||||
- git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git ..\depot_tools\
|
||||
|
||||
before_build:
|
||||
- cd ..
|
||||
- depot_tools\gclient config https://github.com/google/shaka-packager.git --name=src --unmanaged
|
||||
- depot_tools\gclient sync
|
||||
|
||||
build_script:
|
||||
- cd src
|
||||
- ..\depot_tools\ninja -C "out\%CONFIGURATION%" -k 100
|
||||
- copy "out\%CONFIGURATION%\packager.exe" packager-win.exe
|
||||
|
||||
test_script:
|
||||
- for %%f in ("out\%CONFIGURATION%\*_*test.exe") do (%%f || exit /b 666)
|
||||
- python "out\%CONFIGURATION%\packager_test.py" -v
|
||||
|
||||
artifacts:
|
||||
- path: packager-win.exe
|
||||
|
||||
deploy:
|
||||
provider: GitHub
|
||||
auth_token:
|
||||
secure: 0XTjRSDCHGH24WSnQRRizvhnaxK8gbq1cfivyuKQRrfwGPm7wpgiPL9SlyQ0aNdY
|
||||
on:
|
||||
appveyor_repo_tag: true
|
||||
platform: x64
|
||||
configuration: Release
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- "/^v\\d+\\./"
|
|
@ -13,6 +13,7 @@
|
|||
#include <map>
|
||||
#include <set>
|
||||
|
||||
#include "packager/base/files/file_path.h"
|
||||
#include "packager/base/strings/string_number_conversions.h"
|
||||
#include "packager/base/strings/stringprintf.h"
|
||||
#include "packager/hls/base/media_playlist.h"
|
||||
|
@ -48,8 +49,12 @@ bool MasterPlaylist::WriteAllPlaylists(const std::string& base_url,
|
|||
}
|
||||
}
|
||||
|
||||
base::FilePath output_path = base::FilePath::FromUTF8Unsafe(output_dir);
|
||||
for (MediaPlaylist* playlist : media_playlists_) {
|
||||
std::string file_path = output_dir + playlist->file_name();
|
||||
std::string file_path =
|
||||
output_path
|
||||
.Append(base::FilePath::FromUTF8Unsafe(playlist->file_name()))
|
||||
.AsUTF8Unsafe();
|
||||
if (!has_set_playlist_target_duration_) {
|
||||
const bool set_target_duration = playlist->SetTargetDuration(
|
||||
static_cast<uint32_t>(ceil(longest_segment_duration)));
|
||||
|
@ -75,7 +80,10 @@ bool MasterPlaylist::WriteAllPlaylists(const std::string& base_url,
|
|||
|
||||
bool MasterPlaylist::WriteMasterPlaylist(const std::string& base_url,
|
||||
const std::string& output_dir) {
|
||||
std::string file_path = output_dir + file_name_;
|
||||
std::string file_path =
|
||||
base::FilePath::FromUTF8Unsafe(output_dir)
|
||||
.Append(base::FilePath::FromUTF8Unsafe(file_name_))
|
||||
.AsUTF8Unsafe();
|
||||
std::unique_ptr<media::File, media::FileCloser> file(
|
||||
media::File::Open(file_path.c_str(), "w"));
|
||||
if (!file) {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "packager/media/base/aes_decryptor.h"
|
||||
|
||||
#include <openssl/aes.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include "packager/base/logging.h"
|
||||
|
||||
namespace {
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include <string.h> // for memcpy
|
||||
|
||||
#include <algorithm>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <list>
|
||||
|
||||
#include "packager/base/logging.h"
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "packager/base/logging.h"
|
||||
#include "packager/media/base/bit_reader.h"
|
||||
#include "packager/media/formats/mp2t/mp2t_common.h"
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#include "packager/media/formats/mp4/mp4_media_parser.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <limits>
|
||||
|
||||
#include "packager/base/callback.h"
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
|
||||
#include "packager/media/formats/mp4/multi_segment_segmenter.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "packager/base/strings/string_number_conversions.h"
|
||||
#include "packager/base/strings/string_util.h"
|
||||
#include "packager/media/base/buffer_writer.h"
|
||||
|
|
|
@ -102,7 +102,7 @@ Status Encryptor::EncryptFrame(scoped_refptr<MediaSample> sample,
|
|||
return Status(error::MUXER_FAILURE,
|
||||
"Maximum number of VPx encryption partitions exceeded.");
|
||||
}
|
||||
uint8_t num_partitions =
|
||||
size_t num_partitions =
|
||||
vpx_frames.size() == 1 ? 1 : vpx_frames.size() * 2;
|
||||
size_t header_size = kWebMSignalByteSize + iv_size +
|
||||
kWebMNumPartitionsSize +
|
||||
|
@ -113,7 +113,8 @@ Status Encryptor::EncryptFrame(scoped_refptr<MediaSample> sample,
|
|||
sample_data[0] = kWebMEncryptedSignal | kWebMPartitionedSignal;
|
||||
memcpy(sample_data + kWebMSignalByteSize, encryptor_->iv().data(),
|
||||
iv_size);
|
||||
sample_data[kWebMSignalByteSize + kWebMIvSize] = num_partitions;
|
||||
sample_data[kWebMSignalByteSize + kWebMIvSize] =
|
||||
static_cast<uint8_t>(num_partitions);
|
||||
uint32_t partition_offset = 0;
|
||||
BufferWriter offsets_buffer(kWebMPartitionOffsetSize * num_partitions);
|
||||
for (const auto& vpx_frame : vpx_frames) {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#include "packager/media/formats/webm/webm_cluster_parser.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
#include "packager/base/logging.h"
|
||||
|
|
Loading…
Reference in New Issue