extensions.push_back("dat");
extensions.push_back("flac");
extensions.push_back("mp4");
+ extensions.push_back("mov");
extensions.push_back("m4a");
sc->addServiceFactory(eServiceFactoryMP3::id, this, extensions);
}
sourceinfo.containertype = ctAVI;
sourceinfo.is_video = TRUE;
}
- else if ( strcasecmp(ext, ".mp4") == 0 )
+ else if ( strcasecmp(ext, ".mp4") == 0 || strcasecmp(ext, ".mov") == 0)
{
sourceinfo.containertype = ctMP4;
sourceinfo.is_video = TRUE;
switch (sourceinfo.containertype)
{
case ctMPEGTS:
- demux_type = "flutsdemux";
+ demux_type = "mpegtsdemux";
break;
case ctMPEGPS:
case ctVCD:
- demux_type = "flupsdemux";
+ demux_type = "mpegpsdemux";
break;
case ctMKV:
demux_type = "matroskademux";
RESULT eServiceMP3::start()
{
- assert(m_state == stIdle);
+ ASSERT(m_state == stIdle);
m_state = stRunning;
if (m_gst_pipeline)
RESULT eServiceMP3::stop()
{
- assert(m_state != stIdle);
+ ASSERT(m_state != stIdle);
if (m_state == stStopped)
return -1;
eDebug("MP3: %s stop\n", m_filename.c_str());
// iPausableService
RESULT eServiceMP3::pause()
{
+ if (m_state != stRunning)
+ return;
+
if (!m_gst_pipeline)
return -1;
GstStateChangeReturn res = gst_element_set_state(m_gst_pipeline, GST_STATE_PAUSED);
RESULT eServiceMP3::unpause()
{
+ if (m_state != stRunning)
+ return;
+
if (!m_gst_pipeline)
return -1;
case sGenre:
case sVideoType:
case sTimeCreate:
+ case sUser+10:
case sUser+12:
return resIsString;
case sCurrentTitle:
case sGenre:
tag = GST_TAG_GENRE;
break;
+ case sUser+10:
+ tag = GST_TAG_AUDIO_CODEC;
+ break;
case sVideoType:
tag = GST_TAG_VIDEO_CODEC;
break;
source = GST_MESSAGE_SRC(msg);
sourceName = gst_object_get_name(source);
-#if 0
+#if 1
if (gst_message_get_structure(msg))
{
gchar *string = gst_structure_to_string(gst_message_get_structure(msg));
eWarning("Gstreamer error: %s (%i) from %s", err->message, err->code, sourceName );
if ( err->domain == GST_STREAM_ERROR )
{
- if ( err->code == GST_STREAM_ERROR_CODEC_NOT_FOUND && g_strrstr(sourceName, "videosink") )
- m_event((iPlayableService*)this, evUser+11);
+ if ( err->code == GST_STREAM_ERROR_CODEC_NOT_FOUND )
+ {
+ if ( g_strrstr(sourceName, "videosink") )
+ m_event((iPlayableService*)this, evUser+11);
+ else if ( g_strrstr(sourceName, "audiosink") )
+ m_event((iPlayableService*)this, evUser+10);
+ }
else if ( err->code == GST_STREAM_ERROR_FAILED && g_strrstr(sourceName, "file-source") )
{
eWarning("error in tag parsing, linking mp3parse directly to file-sink, bypassing id3demux...");