From: Justin Dickow Date: Thu, 17 Jul 2014 18:05:21 +0000 (-0400) Subject: Media Manager Update X-Git-Tag: 3.5~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2672b6ac3a0bae05b2cba25cd35af1e65e2bc488;p=profile%2Fivi%2Fsmartdevicelink.git Media Manager Update Authors Dmitriy Klimenko Dmitry Chmerev Signed-off-by: Justin Dickow --- 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 dd0beb5..74c2352 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 15bab01..2c9c27b 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 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);