Bug 67544 - FILESAVE: Slide transistion sound(other sound) is not included in presentation file
Summary: FILESAVE: Slide transistion sound(other sound) is not included in presentatio...
Status: ASSIGNED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Presentation (show other bugs)
Version: 4.1.0.4 release
Hardware: Other All
: medium normal
Assignee: Vishv
QA Contact:
URL:
Whiteboard: BSA EasyHack DifficultyInteresting To...
Keywords:
: 57291 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-07-30 15:28 UTC by Zeki Bildirici
Modified: 2014-05-18 08:57 UTC (History)
7 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Other Sound dialog (117.08 KB, image/jpeg)
2013-07-30 15:28 UTC, Zeki Bildirici
Details
Insert - Movie or Sound dialog (138.18 KB, image/jpeg)
2013-07-30 15:29 UTC, Zeki Bildirici
Details

Description Zeki Bildirici 2013-07-30 15:28:37 UTC
Created attachment 83305 [details]
Other Sound dialog

Problem description: 

When adding a custom slide transistion sound, Impress only creates link to that file and plays the sound locally. 

However if you send the presentation to another computer or USB etc, the custom slide trans. sound does not work.

The problem is caused by the Other Sound dialog,under
Slide Transition -> Sound selection, which misses include sound file and inserst the file directly as link.(Screenshot1) While Insert - Movie or Sound dialog inserts direcly the sound file to the presentation, and has Link option too(screenshot2)

Expected behavior:

Having custom transistion sounds within the presentation file which may enable to use custom transition sounds on other computers.
 
              
Operating System: All
Version: 4.1.0.4 release
Comment 1 Zeki Bildirici 2013-07-30 15:29:17 UTC
Created attachment 83306 [details]
Insert - Movie or Sound dialog
Comment 2 David Tardon 2013-07-31 05:13:11 UTC
Should be relatively simple to add this, probably by using the standard open dialog implementation (I do not see anything that would require special treatment). The "Other sound..." dialog is implemented by class SdOpenSoundFileDialog in sd/source/ui/dlg/filedlg.cxx , "Insert -> Movie or Sound" uses the standard open dialog implementation, run from function MediaWindow::executeMediaURLDialog() in avmedia/source/viewer/mediawindow.cxx .
Comment 3 Samuel Mehrbrodt 2013-10-01 21:50:16 UTC
*** Bug 57291 has been marked as a duplicate of this bug. ***
Comment 4 Björn Michaelsen 2013-10-04 18:47:12 UTC
adding LibreOffice developer list as CC to unresolved EasyHacks for better visibility.

see e.g. http://nabble.documentfoundation.org/minutes-of-ESC-call-td4076214.html for details
Comment 5 vulcain 2014-01-30 11:11:10 UTC
Duplicate of bug 44223 ??
Comment 6 Jan Holesovsky 2014-03-20 16:47:46 UTC
Having researched some details here, for the embedding itself, I'd try to use code like http://cgit.freedesktop.org/libreoffice/core/tree/sd/source/ui/view/sdview4.cxx#n277

See the 'realURL' - if it is a link, then the URL is copied there, if it should be embedded, ::avmedia::EmbedMedia will take care of the embedding, and will provide you with the updated URL that will point to the embedded object.

You want to do this in sd/source/ui/animations/CustomAnimationDialog.cxx just after aFile = aFileDialog.GetPath(); I guess - hope this works :-)
Comment 7 Vishv 2014-04-04 18:45:49 UTC
Hi,

My patch related to this bug is at https://gerrit.libreoffice.org/#/c/8700/ . I have tried much but I am kind of stuck since few days. Any help will be really helpful. 
In-order to embed the music in the slidetransition, we have to use EmbedMedia() function.  I have used that function, but I am not successful in embedding the media file.

The EmbedMedia() takes a reference of XModel object and XModel itself takes a reference of SdDrawDocument. And it is initialized like this:
	XModel(GetDoc().GetObjectShell()->GetModel()).

So here GetDoc() returns a reference of SdDrawDocument(i.e SdDrawDocument&) and then it proceeds accordingly.
 
In the SlideTransitionPane.cxx, I have access to "SdDrawDocument* mpDrawDoc". So I do like this:
      uno::Reference<frame::XModel> const xModel(mpDrawDoc->GetObjectShell()->GetModel());
And then use this xModel in the EmbedMedia().

The above code don't give me any compilation error. But, when I open an instance of Impress from my terminal, I could see this messages http://pastebin.ca/2679016. And this seems to be the reason behind the EmbedMedia() not able to create & store the .mp3 file in "Media/" (which is vnd.sun.star.Package:Media).

So I think, I require a reference to SdDrawDocument, but I am not sure how can I get one. Typecasting is not possible because 'Operator=' is not defined for "SdDrawDocument". 

My current patch includes a changed dialog and also it's compiling correctly.

So can someone please look at my patch and let me know their views and guide me?
And let me know if I am in the right direction.
Comment 8 Thorsten Behrens 2014-05-15 07:39:45 UTC
(In reply to comment #7)
> The above code don't give me any compilation error. But, when I open an
> instance of Impress from my terminal, I could see this messages
> http://pastebin.ca/2679016. And this seems to be the reason behind the
> EmbedMedia() not able to create & store the .mp3 file in "Media/" (which is
> vnd.sun.star.Package:Media).
> 
That paste is not really helpful, since you can't tell which part of your code is triggering it. Have you debugged this (both a working call to EmbedMedia, and your snippets)?
Comment 9 Vishv 2014-05-18 08:57:17 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > The above code don't give me any compilation error. But, when I open an
> > instance of Impress from my terminal, I could see this messages
> > http://pastebin.ca/2679016. And this seems to be the reason behind the
> > EmbedMedia() not able to create & store the .mp3 file in "Media/" (which is
> > vnd.sun.star.Package:Media).
> > 
> That paste is not really helpful, since you can't tell which part of your
> code is triggering it. Have you debugged this (both a working call to
> EmbedMedia, and your snippets)?

Yes, I had debugged the working call to "EmbedMedia()", when called by (1) "Insert->Media and Sound"  and (2) and for this case (slide transitions). It seems to work similarly in both cases. But, still for the second case it does not embed the music file.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.