This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::{fs::{self, File}, io}; | |
fn main() -> io::Result<()> { | |
// Create the output file | |
let mut output = File::create("catted")?; | |
// Find all files starting with "input_" | |
let mut input_files = fs::read_dir(".")? | |
.filter_map(|entry| { | |
let entry = entry.ok()?; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Taken from tutorials | |
static gboolean print_field (GQuark field, const GValue * value, gpointer pfx) { | |
gchar *str = gst_value_serialize (value); | |
g_print ("%s %15s: %s\n", (gchar *) pfx, g_quark_to_string (field), str); | |
g_free (str); | |
return TRUE; | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
g_print("\nPrint all elements of the pipeline\n"); | |
GValue item = G_VALUE_INIT; | |
GstIterator *iter = gst_bin_iterate_elements(GST_BIN(data.pipeline)); | |
GstIteratorResult res = gst_iterator_next (iter, &item); | |