Skip to content

Commit

Permalink
plugins: move project from c to cpp
Browse files Browse the repository at this point in the history
Since our goal is to create a simple video filter using some random
computer vision API like OpenCV is better to switch to C++

Signed-off-by: Tommaso Merciai <tomm.merciai@gmail.com>
  • Loading branch information
Scott31393 committed Dec 5, 2022
1 parent 70009c9 commit 9e16950
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
project('gst-simplefilter', 'c',
project('gst-simplefilter', 'cpp',
version : '0.1.0',
default_options : [ 'warning_level=1',
'buildtype=debugoptimized' ])
Expand Down
4 changes: 1 addition & 3 deletions plugins/gstsimplefilter.c → plugins/gstsimplefilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,12 @@
#include <gst/gst.h>
#include <gst/video/video.h>
#include <gst/video/gstvideofilter.h>
#include "gstsimplefilter.h"
#include "gstsimplefilter.hpp"

GST_DEBUG_CATEGORY_STATIC (gst_simplefilter_debug_category);
#define GST_CAT_DEFAULT gst_simplefilter_debug_category

/* prototypes */


static void gst_simplefilter_set_property (GObject * object,
guint property_id, const GValue * value, GParamSpec * pspec);
static void gst_simplefilter_get_property (GObject * object,
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions plugins/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ gstvideo_dep = dependency('gstreamer-video-1.0',

# sources used to compile this plug-in
plugin_sources = [
'gstsimplefilter.c',
'gstsimplefilter.h'
'gstsimplefilter.cpp',
'gstsimplefilter.hpp'
]

shlib = shared_library('gstsimplefilter',
Expand Down
11 changes: 11 additions & 0 deletions tools/gstsimplefilter.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* This file should be replaced by application source generated by
* gst-app-maker, or by your own source code. To generate suitable
* app source using gst-app-maker, run:
*
* gst-app-maker simplefilter
*
* Then copy the resulting gstsimplefilter.c file over this file.
*/
/* The rest of this file is shim code to allow the project to compile */
#include <stdio.h>
int main (void) { printf ("FIXME\n"); return 0; }
2 changes: 1 addition & 1 deletion tools/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ exe_args = common_args + []

# sources used to compile this program
tool_sources = [
'gstsimplefilter.c',
'gstsimplefilter.cpp',
]

executable('gstsimplefilter',
Expand Down

0 comments on commit 9e16950

Please # to comment.