Skip to content

Commit 0bdebd7

Browse files
committed
removed VideoFilter, since it is a worse version of the more general Filter, and fixed all the other input sources so that this would work
1 parent d66b6f2 commit 0bdebd7

21 files changed

+25
-335
lines changed

source/ffmpeg-cpp/decode_audio/decode_audio.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class RawAudioFileSink : public AudioFrameSink, public FrameWriter
2121
return stream;
2222
}
2323

24-
virtual void WriteFrame(int streamIndex, AVFrame* frame, AVRational* timeBase)
24+
virtual void WriteFrame(int streamIndex, AVFrame* frame, StreamData* streamData)
2525
{
2626
// Just write out the samples channel by channel to a file.
2727
int data_size = av_get_bytes_per_sample((AVSampleFormat)frame->format);

source/ffmpeg-cpp/decode_video/decode_video.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class PGMFileSink : public VideoFrameSink, public FrameWriter
2020
return stream;
2121
}
2222

23-
virtual void WriteFrame(int streamIndex, AVFrame* frame, AVRational* timeBase)
23+
virtual void WriteFrame(int streamIndex, AVFrame* frame, StreamData* streamData)
2424
{
2525
++frameNumber;
2626
printf("saving frame %3d\n", frameNumber);

source/ffmpeg-cpp/demo/GeneratedAudioSource.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "GeneratedAudioSource.h"
22

3-
GeneratedAudioSource::GeneratedAudioSource(AudioFrameSink* frameSink)
3+
GeneratedAudioSource::GeneratedAudioSource(FrameSink* frameSink)
44
{
55
this->sampleRate = 44100;
66
this->channels = 2;

source/ffmpeg-cpp/demo/GeneratedAudioSource.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class GeneratedAudioSource : public InputSource
88
{
99
public:
1010

11-
GeneratedAudioSource(AudioFrameSink* frameSink);
11+
GeneratedAudioSource(FrameSink* frameSink);
1212
~GeneratedAudioSource();
1313

1414
virtual void PreparePipeline();

source/ffmpeg-cpp/demo/GeneratedVideoSource.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "GeneratedVideoSource.h"
22

3-
GeneratedVideoSource::GeneratedVideoSource(int width, int height, VideoFrameSink* frameSink)
3+
GeneratedVideoSource::GeneratedVideoSource(int width, int height, FrameSink* frameSink)
44
{
55
// generate a raw video source that will convert the raw format to any other format and pass it on to the encoder
66
// or any other sink (might be a filter as well).

source/ffmpeg-cpp/demo/GeneratedVideoSource.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class GeneratedVideoSource : public InputSource
88
{
99
public:
1010

11-
GeneratedVideoSource(int width, int height, VideoFrameSink* frameSink);
11+
GeneratedVideoSource(int width, int height, FrameSink* frameSink);
1212
~GeneratedVideoSource();
1313

1414
virtual void PreparePipeline();

source/ffmpeg-cpp/demo/demo.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,16 +174,16 @@ void PlayDemo(int argc, char** argv)
174174
* CONFIGURE VIDEO FILTER IF IT IS USED
175175
*/
176176

177-
VideoFrameSink* videoFrameSink = videoEncoder;
177+
FrameSink* videoFrameSink = videoEncoder;
178178

179179
// If a video filter was specified, we inject it into the pipeline here.
180180
// Instead of feeding the video source directly to the encoder, we feed it to
181181
// the video filter instead, which will pass it on to the encoder.
182-
VideoFilter* videoFilter = nullptr;
182+
Filter* videoFilter = nullptr;
183183
if (videoFilterConfig != NULL && videoEncoder != nullptr)
184184
{
185185
printf("Applying filter %s to video...\n", videoFilterConfig);
186-
videoFilter = new VideoFilter(videoFilterConfig, videoEncoder);
186+
videoFilter = new Filter(videoFilterConfig, videoEncoder);
187187
videoFrameSink = videoFilter; // used to feed the source below
188188
}
189189

source/ffmpeg-cpp/difference/difference.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ int main()
2323
VideoEncoder* videoEncoder = new VideoEncoder(videoCodec, muxer);
2424

2525
// Create a video filter and do some funny stuff with the video data.
26-
VideoFilter* filter = new VideoFilter("blend=all_mode=difference", videoEncoder);
26+
Filter* filter = new Filter("blend=all_mode=difference", videoEncoder);
2727
//VideoFilter* filter = new VideoFilter("overlay=0:0", videoEncoder);
2828
//VideoFilter* filter = new VideoFilter("scale=100:800", videoEncoder);
2929

3030
// Create a video filter that will put a vignette on one of the video's,
3131
// so that our difference filter van detect this.
32-
VideoFilter* vignetteFilter = new VideoFilter("vignette", filter);
32+
Filter* vignetteFilter = new Filter("vignette", filter);
3333

3434
// Load both video's
3535
Demuxer* videoContainer1 = new Demuxer("samples/carphone.h264");

source/ffmpeg-cpp/ffmpeg-cpp/Frame Sinks/VideoFilter.cpp

Lines changed: 0 additions & 249 deletions
This file was deleted.

source/ffmpeg-cpp/ffmpeg-cpp/Frame Sinks/VideoFilter.h

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)