diff options
author | Justin Dickow <jjdickow@gmail.com> | 2014-07-17 14:05:21 -0400 |
---|---|---|
committer | Justin Dickow <jjdickow@gmail.com> | 2014-07-17 14:05:21 -0400 |
commit | 2672b6ac3a0bae05b2cba25cd35af1e65e2bc488 (patch) | |
tree | 47b6a6df6f5d460eb4f06da3b26eaf6b812ec305 | |
parent | bdf307f94621e23a06af68177c37d7837cbbc474 (diff) | |
download | smartdevicelink-2672b6ac3a0bae05b2cba25cd35af1e65e2bc488.tar.gz |
Media Manager Update
Authors
Dmitriy Klimenko
Dmitry Chmerev
Signed-off-by: Justin Dickow <jjdickow@gmail.com>
-rw-r--r-- | src/components/media_manager/src/audio/from_mic_to_file_recorder_thread.cc | 11 | ||||
-rw-r--r-- | src/components/media_manager/src/media_manager_impl.cc | 14 |
2 files changed, 9 insertions, 16 deletions
diff --git a/src/components/media_manager/src/audio/from_mic_to_file_recorder_thread.cc b/src/components/media_manager/src/audio/from_mic_to_file_recorder_thread.cc index dd0beb521..74c23523e 100644 --- a/src/components/media_manager/src/audio/from_mic_to_file_recorder_thread.cc +++ b/src/components/media_manager/src/audio/from_mic_to_file_recorder_thread.cc @@ -97,7 +97,7 @@ void FromMicToFileRecorderThread::threadMain() { initArgs(); GstElement* pipeline; - GstElement* alsasrc, *panorama, *wavenc, *filesink; + GstElement* alsasrc, *wavenc, *filesink; GstBus* bus; const gchar* device = "hw:0,0"; @@ -158,26 +158,23 @@ void FromMicToFileRecorderThread::threadMain() { // 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); diff --git a/src/components/media_manager/src/media_manager_impl.cc b/src/components/media_manager/src/media_manager_impl.cc index 15bab011c..2c9c27bff 100644 --- a/src/components/media_manager/src/media_manager_impl.cc +++ b/src/components/media_manager/src/media_manager_impl.cc @@ -157,10 +157,6 @@ void MediaManagerImpl::StartMicrophoneRecording( 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) @@ -182,21 +178,21 @@ void MediaManagerImpl::StartMicrophoneRecording( 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); |