Skip to content

Commit

Permalink
Added stream connection timeout.
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobbo committed Nov 30, 2015
1 parent e38e2f0 commit 597a854
Show file tree
Hide file tree
Showing 22 changed files with 373 additions and 171 deletions.
6 changes: 3 additions & 3 deletions StreamPlayerControl/StreamPlayer/StreamPlayer/Frame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ using namespace std;
using namespace FFmpeg;
using namespace FFmpeg::Facade;

Frame::Frame(uint32_t width, uint32_t height, AVPicture &avPicture)
Frame::Frame(uint32_t width, uint32_t height, AVFrame &avFrame)
: width_(width), height_(height)
{
int32_t lineSize = avPicture.linesize[0];
int32_t lineSize = avFrame.linesize[0];
uint32_t padding = GetPadding(lineSize);

pixelsPtr_ = new uint8_t[height_ * (lineSize + padding)];

for (int32_t y = 0; y < height_; ++y)
{
::CopyMemory(pixelsPtr_ + (lineSize + padding) * y,
avPicture.data[0] + (height_ - y - 1) * lineSize, lineSize);
avFrame.data[0] + (height_ - y - 1) * lineSize, lineSize);

::SecureZeroMemory(pixelsPtr_ + (lineSize + padding) * y + lineSize, padding);
}
Expand Down
4 changes: 2 additions & 2 deletions StreamPlayerControl/StreamPlayer/StreamPlayer/Frame.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ namespace FFmpeg
/// </summary>
/// <param name="width">The width of the frame, in pixels.</param>
/// <param name="height">The height of the frame, in pixels.</param>
/// <param name="avPicture">The AVPicture object to initialize the frame with.</param>
Frame(uint32_t width, uint32_t height, AVPicture &avPicture);
/// <param name="avFrame">The AVFrame object to initialize the frame with.</param>
Frame(uint32_t width, uint32_t height, AVFrame &avFrame);

/// <summary>
/// Gets the width of the frame, in pixels.
Expand Down
Loading

0 comments on commit 597a854

Please sign in to comment.