initArgs();
GstElement* pipeline;
- GstElement* alsasrc, *panorama, *wavenc, *filesink;
+ GstElement* alsasrc, *wavenc, *filesink;
GstBus* bus;
const gchar* device = "hw:0,0";
// Create all of the elements to be added to the pipeline
alsasrc = gst_element_factory_make("alsasrc", "alsasrc0");
- panorama = gst_element_factory_make("audiopanorama", "panorama0");
wavenc = gst_element_factory_make("wavenc", "wavenc0");
filesink = gst_element_factory_make("filesink", "filesink0");
// Assert that all the elements were created
- if (!alsasrc || !panorama || !wavenc || !filesink) {
+ if (!alsasrc || !wavenc || !filesink) {
g_error("Failed creating one or more of the pipeline elements.\n");
}
// Set input and output destinations
g_object_set(G_OBJECT(alsasrc), "device", device, NULL);
- g_object_set(G_OBJECT(panorama), "panorama", 0.5, NULL);
g_object_set(G_OBJECT(filesink), "location", outfile, NULL);
// Add the elements to the pipeline
- gst_bin_add_many(GST_BIN(pipeline), alsasrc,
- panorama, wavenc, filesink, NULL);
+ gst_bin_add_many(GST_BIN(pipeline), alsasrc, wavenc, filesink, NULL);
// Link the elements
- gst_element_link_many(alsasrc, panorama, wavenc, filesink, NULL);
+ gst_element_link_many(alsasrc, wavenc, filesink, NULL);
gst_element_set_state(pipeline, GST_STATE_PLAYING);
application(application_key);
std::string file_path = profile::Profile::instance()->app_storage_folder();
file_path += "/";
- file_path += app->folder_name();
- file_system::CreateDirectory(file_path);
-
- file_path += "/";
file_path += output_file;
from_mic_listener_ = new FromMicRecorderListener(file_path);
#if defined(EXTENDED_MEDIA_MODE)
LOG4CXX_WARN(logger_, "Could not remove file " << output_file);
}
}
- const std::string predefined_rec_file =
+ const std::string record_file_source =
profile::Profile::instance()->app_resourse_folder() + "/" +
- profile::Profile::instance()->recording_file();
+ profile::Profile::instance()->recording_file_source();
std::vector<uint8_t> buf;
- if (file_system::ReadBinaryFile(predefined_rec_file, buf)) {
+ if (file_system::ReadBinaryFile(record_file_source, buf)) {
if (file_system::Write(file_path, buf)) {
LOG4CXX_INFO(logger_,
- "File " << predefined_rec_file << " copied to " << output_file);
+ "File " << record_file_source << " copied to " << output_file);
}
else {
LOG4CXX_WARN(logger_, "Could not write to file " << output_file);
}
}
else {
- LOG4CXX_WARN(logger_, "Could not read file " << predefined_rec_file);
+ LOG4CXX_WARN(logger_, "Could not read file " << record_file_source);
}
#endif
from_mic_listener_->OnActivityStarted(application_key);