Skip to content

Commit

Permalink
Change to FFmpeg v5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bear101 committed Oct 31, 2024
1 parent fb6f17d commit 0e5b0eb
Show file tree
Hide file tree
Showing 8 changed files with 129 additions and 83 deletions.
7 changes: 3 additions & 4 deletions Library/TeamTalkLib/avstream/AVFVideoInput.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2005-2018, BearWare.dk
*
*
* Contact Information:
*
* Bjoern D. Rasmussen
Expand Down Expand Up @@ -32,7 +32,7 @@ extern "C" {

using namespace vidcap;

bool AVFVideoInput::SetupInput(AVInputFormat *iformat,
bool AVFVideoInput::SetupInput(const AVInputFormat *iformat,
AVDictionary *options,
AVFormatContext*& fmt_ctx,
AVCodecContext*& aud_dec_ctx,
Expand All @@ -42,7 +42,7 @@ bool AVFVideoInput::SetupInput(AVInputFormat *iformat,
{

auto vidfmt = GetMediaOutput().video;

iformat = av_find_input_format(m_dev.api.c_str());
int fps = 1;
if (vidfmt.fps_denominator)
Expand All @@ -67,4 +67,3 @@ bool AVFVideoInput::SetupInput(AVInputFormat *iformat,
audio_stream_index,
video_stream_index);
}

6 changes: 3 additions & 3 deletions Library/TeamTalkLib/avstream/AVFVideoInput.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2005-2018, BearWare.dk
*
*
* Contact Information:
*
* Bjoern D. Rasmussen
Expand Down Expand Up @@ -32,9 +32,9 @@ namespace vidcap {
const media::VideoFormat& fmt)
: FFMpegVideoInput(viddevice, fmt) {
}

// FFMpegStreamer override
bool SetupInput(struct AVInputFormat *iformat,
bool SetupInput(const struct AVInputFormat *iformat,
struct AVDictionary *options,
struct AVFormatContext*& fmt_ctx,
struct AVCodecContext*& aud_dec_ctx,
Expand Down
9 changes: 4 additions & 5 deletions Library/TeamTalkLib/avstream/FFMpegCapture.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2005-2018, BearWare.dk
*
*
* Contact Information:
*
* Bjoern D. Rasmussen
Expand Down Expand Up @@ -55,15 +55,15 @@ namespace vidcap {
const media::VideoFormat& fmt) = 0;
ffmpegvideoinput_t m_videoinput;
VideoCaptureCallback m_callback;

public:
FFmpegCapture();
virtual ~FFmpegCapture();

// VideoCapture interface
bool InitVideoCapture(const ACE_TString& deviceid,
const media::VideoFormat& vidfmt);

bool StartVideoCapture();

void StopVideoCapture();
Expand All @@ -72,7 +72,7 @@ namespace vidcap {

bool RegisterVideoFormat(VideoCaptureCallback callback, media::FourCC fcc);
void UnregisterVideoFormat(media::FourCC fcc);

// MediaStreamListener interface
bool MediaStreamVideoCallback(media::VideoFrame& video_frame,
ACE_Message_Block* mb_video);
Expand All @@ -84,4 +84,3 @@ namespace vidcap {
}

#endif

Loading

0 comments on commit 0e5b0eb

Please sign in to comment.