Skip to content

Commit

Permalink
Rename fakeOut -> wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
elventian committed Apr 1, 2020
1 parent 5f3bb72 commit f662162
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/ntff_es.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,29 +159,29 @@ namespace Ntff

OutStream::OutStream(es_out_t *out, Player *player) : curTime(0), framesNum(0), out(out), player(player)
{
fakeOut.p_sys = (es_out_sys_t *)this;
wrapper.p_sys = (es_out_sys_t *)this;

fakeOut.pf_add = [] (es_out_t *out, const es_format_t *format)
wrapper.pf_add = [] (es_out_t *out, const es_format_t *format)
{
return ((OutStream*)out->p_sys)->addElemental(format);
};

fakeOut.pf_send = [](es_out_t *out, es_out_id_t *id, block_t *block)
wrapper.pf_send = [](es_out_t *out, es_out_id_t *id, block_t *block)
{
return ((OutStream*)out->p_sys)->sendBlock(id, block);
};

fakeOut.pf_del = [](es_out_t *out, es_out_id_t *id)
wrapper.pf_del = [](es_out_t *out, es_out_id_t *id)
{
((OutStream*)out->p_sys)->removeElemental(id);
};

fakeOut.pf_control = [](es_out_t *out, int i_query, va_list va)
wrapper.pf_control = [](es_out_t *out, int i_query, va_list va)
{
return ((OutStream*)out->p_sys)->control(i_query, va);
};

fakeOut.pf_destroy = [](es_out_t *out)
wrapper.pf_destroy = [](es_out_t *out)
{
((OutStream*)out->p_sys)->destroyOutStream();
};
Expand Down
4 changes: 2 additions & 2 deletions src/ntff_es.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class OutStream
void resetFramesNum() { framesNum = 0; }
mtime_t getTime() const { return curTime; }
uint32_t getFramesNum() const { return framesNum; }
es_out_t *getFakeOutStream() { return &fakeOut; }
es_out_t *getWrapperStream() { return &wrapper; }

es_out_id_t *addElemental(const es_format_t *format);
void removeElemental(es_out_id_t *id);
Expand All @@ -61,7 +61,7 @@ class OutStream
uint32_t framesNum;

es_out_t *out;
es_out_t fakeOut;
es_out_t wrapper;
Player *player;
};

Expand Down
2 changes: 1 addition & 1 deletion src/ntff_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ bool Player::isValid() const

void Player::addFile(const Interval &interval, const std::string &filename)
{
items[interval.in] = Item(obj, interval, out->getFakeOutStream(), filename);
items[interval.in] = Item(obj, interval, out->getWrapperStream(), filename);
}

bool Player::timeIsInPlayInterval(mtime_t time) const
Expand Down

0 comments on commit f662162

Please sign in to comment.