2015-11-18 21:11:31 +00:00
|
|
|
// Copyright 2015 Google Inc. All rights reserved.
|
|
|
|
//
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file or at
|
|
|
|
// https://developers.google.com/open-source/licenses/bsd
|
|
|
|
|
|
|
|
#ifndef MEDIA_FORMATS_WEBM_ENCRYPTOR_H_
|
|
|
|
#define MEDIA_FORMATS_WEBM_ENCRYPTOR_H_
|
|
|
|
|
2017-03-11 02:49:55 +00:00
|
|
|
#include <vector>
|
|
|
|
|
2015-11-18 21:11:31 +00:00
|
|
|
#include "packager/media/base/status.h"
|
|
|
|
#include "packager/third_party/libwebm/src/mkvmuxer.hpp"
|
|
|
|
|
2016-05-20 21:19:33 +00:00
|
|
|
namespace shaka {
|
2015-11-18 21:11:31 +00:00
|
|
|
namespace media {
|
|
|
|
|
|
|
|
class MediaSample;
|
|
|
|
|
|
|
|
namespace webm {
|
|
|
|
|
2017-03-11 02:49:55 +00:00
|
|
|
/// Adds the encryption info with the specified key_id to the given track.
|
|
|
|
/// @return OK on success, an error status otherwise.
|
|
|
|
Status UpdateTrackForEncryption(const std::vector<uint8_t>& key_id,
|
|
|
|
mkvmuxer::Track* track);
|
2016-08-17 17:41:40 +00:00
|
|
|
|
2017-03-11 02:49:55 +00:00
|
|
|
/// Update the frame with signal bytes and encryption information if it is
|
|
|
|
/// encrypted.
|
|
|
|
void UpdateFrameForEncryption(MediaSample* sample);
|
2015-11-18 21:11:31 +00:00
|
|
|
|
|
|
|
} // namespace webm
|
|
|
|
} // namespace media
|
2016-05-20 21:19:33 +00:00
|
|
|
} // namespace shaka
|
2015-11-18 21:11:31 +00:00
|
|
|
|
|
|
|
#endif // MEDIA_FORMATS_WEBM_ENCRYPTOR_H_
|