Skip to content

Commit

Permalink
update to the latest oatpp API.
Browse files Browse the repository at this point in the history
  • Loading branch information
lganzzzo committed Nov 16, 2021
1 parent 5f5386e commit f92b5d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/hls/Playlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ Playlist Playlist::parseFromFile(const char* filename) {
return parse(caret);
}

std::shared_ptr<oatpp::data::stream::ChunkedBuffer> Playlist::generateForTime(v_int64 millis, v_int32 numRecords) {
std::shared_ptr<oatpp::data::stream::BufferOutputStream> Playlist::generateForTime(v_int64 millis, v_int32 numRecords) {
if(m_records.size() == 0) {
throw std::runtime_error("Empty playlist");
}
auto stream = oatpp::data::stream::ChunkedBuffer::createShared();
auto stream = std::make_shared<oatpp::data::stream::BufferOutputStream>();

v_float64 secs = (v_float64) millis / 1000.0;

Expand Down
4 changes: 2 additions & 2 deletions src/hls/Playlist.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#ifndef Playlist_hpp
#define Playlist_hpp

#include "oatpp/core/data/stream/ChunkedBuffer.hpp"
#include "oatpp/core/data/stream/BufferStream.hpp"
#include "oatpp/core/parser/Caret.hpp"

#include <chrono>
Expand Down Expand Up @@ -33,7 +33,7 @@ class Playlist {
static Playlist parse(oatpp::parser::Caret& caret);
static Playlist parseFromFile(const char* filename);

std::shared_ptr<oatpp::data::stream::ChunkedBuffer> generateForTime(v_int64 millis, v_int32 numRecords);
std::shared_ptr<oatpp::data::stream::BufferOutputStream> generateForTime(v_int64 millis, v_int32 numRecords);


};
Expand Down

0 comments on commit f92b5d4

Please sign in to comment.