mirror of
https://github.com/alexkay/spek.git
synced 2025-04-22 03:10:29 +03:00
Add skeleton spek-audio.{c,h,vapi}
This commit is contained in:
parent
99375b456d
commit
1ea744502a
1
.gitignore
vendored
1
.gitignore
vendored
@ -28,6 +28,7 @@ po/POTFILES
|
||||
po/stamp-it
|
||||
samples/
|
||||
src/*.c
|
||||
!src/spek-audio.c
|
||||
src/*.o
|
||||
src/*.stamp
|
||||
src/spek
|
||||
|
@ -2,6 +2,8 @@ bin_PROGRAMS = spek
|
||||
|
||||
spek_SOURCES = \
|
||||
spek.vala \
|
||||
spek-audio.c \
|
||||
spek-pipeline.vala \
|
||||
spek-ruler.vala \
|
||||
spek-source.vala \
|
||||
spek-spectrogram.vala \
|
||||
@ -16,7 +18,9 @@ INCLUDES = \
|
||||
-DPKGLIBDIR=\""$(pkglibdir)"\"
|
||||
|
||||
VALAFLAGS = \
|
||||
--vapidir=$(srcdir)/../vapi --pkg config \
|
||||
--vapidir=$(srcdir)/../vapi \
|
||||
--pkg config \
|
||||
--pkg spek-audio \
|
||||
@SPEK_PACKAGES@
|
||||
|
||||
spek_LDADD = \
|
||||
|
22
src/spek-audio.c
Normal file
22
src/spek-audio.c
Normal file
@ -0,0 +1,22 @@
|
||||
/* spek-audio.c
|
||||
*
|
||||
* Copyright (C) 2010 Alexander Kojevnikov <alexander@kojevnikov.com>
|
||||
*
|
||||
* Spek is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Spek is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Spek. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "spek-audio.h"
|
||||
|
||||
void spek_audio_open (const char *file_name) {
|
||||
}
|
24
src/spek-audio.h
Normal file
24
src/spek-audio.h
Normal file
@ -0,0 +1,24 @@
|
||||
/* spek-audio.h
|
||||
*
|
||||
* Copyright (C) 2010 Alexander Kojevnikov <alexander@kojevnikov.com>
|
||||
*
|
||||
* Spek is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Spek is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Spek. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __SPEK_AUDIO_H__
|
||||
#define __SPEK_AUDIO_H__
|
||||
|
||||
void spek_audio_open (const char *file_name);
|
||||
|
||||
#endif
|
32
src/spek-pipeline.vala
Normal file
32
src/spek-pipeline.vala
Normal file
@ -0,0 +1,32 @@
|
||||
/* spek-pipeline.vala
|
||||
*
|
||||
* Copyright (C) 2010 Alexander Kojevnikov <alexander@kojevnikov.com>
|
||||
*
|
||||
* Spek is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Spek is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Spek. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace Spek {
|
||||
public class Pipeline {
|
||||
public string file_name { get; private set; }
|
||||
public string audio_codec { get; private set; }
|
||||
|
||||
public Pipeline (string file_name) {
|
||||
this.file_name = file_name;
|
||||
}
|
||||
|
||||
public void open () {
|
||||
Audio.open (file_name);
|
||||
}
|
||||
}
|
||||
}
|
@ -39,7 +39,7 @@ namespace Spek {
|
||||
public delegate void DataCallback (int sample, float[] values);
|
||||
public delegate void InfoCallback ();
|
||||
|
||||
private Pipeline pipeline = null;
|
||||
private Gst.Pipeline pipeline = null;
|
||||
private Element spectrum = null;
|
||||
private Pad pad = null;
|
||||
private int sample;
|
||||
@ -72,7 +72,7 @@ namespace Spek {
|
||||
|
||||
// TODO: Check for gst errors, in particular test the situation when
|
||||
// `spectrum` (good), `decodebin` (base) or `fakesink` (core) plugins are not available.
|
||||
pipeline = new Pipeline ("pipeline");
|
||||
pipeline = new Gst.Pipeline ("pipeline");
|
||||
var filesrc = ElementFactory.make ("filesrc", null);
|
||||
var decodebin = ElementFactory.make ("decodebin", null);
|
||||
pipeline.add_many (filesrc, decodebin);
|
||||
|
@ -1,5 +1,6 @@
|
||||
noinst_DATA = \
|
||||
config.vapi
|
||||
config.vapi \
|
||||
spek-audio.vapi
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(noinst_DATA)
|
||||
|
4
vapi/spek-audio.vapi
Normal file
4
vapi/spek-audio.vapi
Normal file
@ -0,0 +1,4 @@
|
||||
[CCode (cprefix = "SpekAudio", lower_case_cprefix = "spek_audio_", cheader_filename = "spek-audio.h")]
|
||||
namespace Spek.Audio {
|
||||
public static void open (string file_name);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user