filmstro_ffmpeg
 All Classes Files Functions Friends Macros
filmstro_ffmpeg_FFmpegVideoListener.h
Go to the documentation of this file.
1 /*
2  ==============================================================================
3  Copyright (c) 2017, Filmstro Ltd. - Daniel Walz
4  All rights reserved.
5 
6  Redistribution and use in source and binary forms, with or without modification,
7  are permitted provided that the following conditions are met:
8  1. Redistributions of source code must retain the above copyright notice, this
9  list of conditions and the following disclaimer.
10  2. Redistributions in binary form must reproduce the above copyright notice,
11  this list of conditions and the following disclaimer in the documentation
12  and/or other materials provided with the distribution.
13  3. Neither the name of the copyright holder nor the names of its contributors
14  may be used to endorse or promote products derived from this software without
15  specific prior written permission.
16 
17  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
21  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
22  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
24  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
26  OF THE POSSIBILITY OF SUCH DAMAGE.
27  ==============================================================================
28  \class FFmpegVideoListener
29  \file filmstro_ffmpeg_FFmpegVideoListener.h
30  \brief Interface for video related callbacks from FFmpeg
31 
32  \author Daniel Walz @ filmstro.com
33  \date January 25th 2017
34 
35  \description This is an interface for objects, that want to receive video frames
36 
37  ==============================================================================
38  */
39 
40 
41 #ifndef FILMSTRO_FFMPEG_FFMPEGVIDEOLISTENER_H_INCLUDED
42 #define FILMSTRO_FFMPEG_FFMPEGVIDEOLISTENER_H_INCLUDED
43 
45 
46 public:
47 
49 
50  virtual ~FFmpegVideoListener() {}
51 
53  virtual void presentationTimestampChanged (const double) {}
54 
56  virtual void videoSizeChanged (const int width, const int height, const AVPixelFormat) {}
57 
61  virtual void readRawFrame (const AVFrame*) {}
62 
65  virtual void displayNewFrame (const AVFrame*) {}
66 
68  virtual void videoFileChanged (const juce::File& newSource) {}
69 
70 };
71 
72 #endif /* FILMSTRO_FFMPEG_FFMPEGVIDEOLISTENER_H_INCLUDED */
virtual void videoFileChanged(const juce::File &newSource)
This is called when the video source file has changed.
Definition: filmstro_ffmpeg_FFmpegVideoListener.h:68
virtual ~FFmpegVideoListener()
Definition: filmstro_ffmpeg_FFmpegVideoListener.h:50
virtual void presentationTimestampChanged(const double)
This will notify about advancing the presentation timestamp.
Definition: filmstro_ffmpeg_FFmpegVideoListener.h:53
Definition: filmstro_ffmpeg_FFmpegVideoListener.h:44
virtual void videoSizeChanged(const int width, const int height, const AVPixelFormat)
This is called whenever the size changed, so a framebuffer can be resized.
Definition: filmstro_ffmpeg_FFmpegVideoListener.h:56
virtual void readRawFrame(const AVFrame *)
This is called when a frame is read from the video stream.
Definition: filmstro_ffmpeg_FFmpegVideoListener.h:61
virtual void displayNewFrame(const AVFrame *)
This is called when a frame is due to be displayed according to audio's presentation timestamp PTS as...
Definition: filmstro_ffmpeg_FFmpegVideoListener.h:65
FFmpegVideoListener()
Definition: filmstro_ffmpeg_FFmpegVideoListener.h:48