After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 583595 - cannot load a saved project with multiple streams
cannot load a saved project with multiple streams
Status: VERIFIED FIXED
Product: pitivi
Classification: Other
Component: General
Git
Other Linux
: Normal blocker
: 0.13.1
Assigned To: Pitivi maintainers
Pitivi maintainers
Depends on:
Blocks:
 
 
Reported: 2009-05-22 20:18 UTC by Jean-François Fortin Tam
Modified: 2009-05-23 16:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
load audio/video/interfaces helper libraries when loading pitivi (398 bytes, patch)
2009-05-23 08:45 UTC, Edward Hervey
committed Details | Review

Description Jean-François Fortin Tam 2009-05-22 20:18:34 UTC
I imported a mkv file which has a video track (H.264), an AC-3 audio track and a subtitle track. I then saved the project, exited pitivi and tried loading the project.

Traceback (most recent call last):
  • File "/home/jeff/trunks/pitivi/pitivi/pitivi/ui/mainwindow.py", line 500 in _openProjectCb
    self.app.loadProject(uri = uri)
  • File "pitivi/application.py", line 189 in loadProject
    formatter.loadProject(uri, project)
  • File "pitivi/formatters/base.py", line 120 in loadProject
    for x in self._getSources():
  • File "pitivi/formatters/etree.py", line 562 in _getSources
    return self._loadSources()
  • File "pitivi/formatters/etree.py", line 238 in _loadSources
    return self._loadFactories(sources, FileSourceFactory)
  • File "pitivi/formatters/etree.py", line 231 in _loadFactories
    obj = self._loadObjectFactory(klass, fact)
  • File "pitivi/formatters/etree.py", line 191 in _loadObjectFactory
    stream = self._loadStream(stream_element)
  • File "pitivi/formatters/etree.py", line 111 in _loadStream
    caps = gst.Caps(element.attrib["caps"])
TypeError: wrong arguments when creating GstCaps object

Comment 1 Edward Hervey 2009-05-23 08:42:39 UTC
There could be several reasons why this would fail. I managed to trigger it with another case : a file with the following caps:

'audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)48000, channels=(int)6, channel-positions=(GstAudioChannelPosition)< GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT, GST_AUDIO_CHANNEL_POSITION_LFE >'

In order for the GstAudioChannelPosition to be properly converted, gst.audio (the audio helper library) must be loaded for that type (and underlying GType) to be loaded.

My guess is that it's not the subtitles which are making the loading fail, but the AC-3 track (which would have audio positions in the caps).

Comment 2 Edward Hervey 2009-05-23 08:45:16 UTC
Created attachment 135226 [details] [review]
load audio/video/interfaces helper libraries when loading pitivi

This patch loads the 3 helper libraries (audio/video/interfaces) as early as possible in pitivi in order to have all the available GTypes loaded and ready for usage.
Comment 3 Edward Hervey 2009-05-23 08:45:38 UTC
Jeff, could you try with the patch applied ?
Comment 4 Jean-François Fortin Tam 2009-05-23 15:53:27 UTC
Seems to work.
Comment 5 Edward Hervey 2009-05-23 16:11:34 UTC
commit 6550234a2a6cebb2aa2a793c054ad444fd1ecbca
Author: Edward Hervey <bilboed@bilboed.com>
Date:   Sat May 23 18:08:56 2009 +0200

    gst: import gst modules to have GTypes loaded. Fixes #583595
    
    This is so we can load caps that have GstAudioChannelPosition for
    example.