Skip to content

Commit

Permalink
Merge pull request ammen99#15 from soreau/clean-up
Browse files Browse the repository at this point in the history
Clean up
  • Loading branch information
ammen99 authored Mar 31, 2019
2 parents 5373594 + babb407 commit bfae5d9
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 20 deletions.
5 changes: 0 additions & 5 deletions src/frame-writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,6 @@ void FrameWriter::add_audio(const void* buffer)

void FrameWriter::finish_frame(AVPacket& pkt, bool is_video)
{
static int iframe = 0;

static std::mutex fmt_mutex, pending_mutex;

if (is_video)
Expand Down Expand Up @@ -465,9 +463,6 @@ void FrameWriter::finish_frame(AVPacket& pkt, bool is_video)

if (params.enable_audio)
fmt_mutex.unlock();

// printf("Wrote frame %d, video?: %d\n", iframe++, is_video);
// fflush(stdout);
}

FrameWriter::~FrameWriter()
Expand Down
8 changes: 0 additions & 8 deletions src/frame-writer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,4 @@ extern std::mutex frame_writer_mutex, frame_writer_pending_mutex;
extern std::unique_ptr<FrameWriter> frame_writer;
extern std::atomic<bool> exit_main_loop;

static timespec get_ct()
{
timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);

return ts;
}

#endif // FRAME_WRITER
2 changes: 0 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -616,8 +616,6 @@ int main(int argc, char *argv[])

signal(SIGINT, handle_sigint);

std::cout << "start at " << timespec_to_usec(get_ct()) / 1.0e6<< std::endl;

while(!exit_main_loop)
{
// wait for a free buffer
Expand Down
5 changes: 0 additions & 5 deletions src/pulse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
#include <cstring>
#include <thread>

static uint64_t timespec_to_usec (const timespec& ts)
{
return ts.tv_sec * 1000000ll + 1ll * ts.tv_nsec / 1000ll;
}

PulseReader::PulseReader(PulseReaderParams _p)
: params(_p)
{
Expand Down

0 comments on commit bfae5d9

Please sign in to comment.