AvTranscoder  0.9.4
C++APIforLibav/FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Filter.cpp
Go to the documentation of this file.
1 #include "Filter.hpp"
2 
3 extern "C" {
4 #include <libavfilter/avfilter.h>
5 }
6 
7 #include <stdexcept>
8 
9 namespace avtranscoder
10 {
11 
12 Filter::Filter(const std::string& name, const std::string& options, const std::string& instanceName)
13  : _filter(NULL)
14  , _context(NULL)
15  , _options(options)
16  , _instanceName(instanceName.empty() ? name : instanceName)
17 {
18  _filter = avfilter_get_by_name(name.c_str());
19  if(!_filter)
20  {
21  std::string msg("Cannot find filter ");
22  msg += name;
23  msg += ". It will not be added to the filter graph.";
24  throw std::runtime_error(msg);
25  }
26 }
27 
29 {
30  avfilter_free(_context);
31 }
32 
33 std::string Filter::getName() const
34 {
35  return _filter->name ? std::string(_filter->name) : "";
36 }
37 }
Filter(const std::string &name, const std::string &options="", const std::string &instanceName="")
Definition: Filter.cpp:12
std::string getName() const
Definition: Filter.cpp:33
AVFilterContext * _context
Definition: Filter.hpp:34
AVFilter * _filter
Definition: Filter.hpp:33
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy