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 f661a5c commit c7aeead
Show file tree
Hide file tree
Showing 8 changed files with 130 additions and 84 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
11 changes: 5 additions & 6 deletions Library/TeamTalkLib/avstream/FFMpeg3Capture.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 @@ -47,23 +47,23 @@ namespace vidcap {
};

typedef std::unique_ptr<FFMpegVideoInput> ffmpegvideoinput_t;

class FFMpeg3Capture : public VideoCapture
{
protected:
virtual ffmpegvideoinput_t createStreamer(const VidCapDevice& viddevice,
const media::VideoFormat& fmt) = 0;
ffmpegvideoinput_t m_videoinput;
VideoCaptureCallback m_callback;

public:
FFMpeg3Capture();
virtual ~FFMpeg3Capture();

// 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 c7aeead

Please sign in to comment.