Sailfish OS 用のオーディオ プレーヤーを開発していて、gstreamer 経由でファイルを再生しようとしていますが、問題: 音が出ません。
コンソール経由で gstream を確認しました:
gst-launch-0.10 filesrc location=/path/to/file.ogg ! デコードビン!自動オーディオシンク
そして、それはうまく機能しています!
オーディオファイルをオーディオファイルに変換することをテストしました:
int
main (int argc,
char *argv[])
{
GstElement *pipeline;
GstBus *bus;
GstMessage *msg;
gst_init (&argc, &argv);
pipeline = gst_parse_launch ("filesrc location=/home/nemo/Music/Ringtones/Myfile.mp3 ! decodebin ! audioconvert ! vorbisenc ! oggmux ! filesink location=test.ogg", NULL);
gst_element_set_state (pipeline, GST_STATE_PLAYING);
bus = gst_element_get_bus (pipeline);
msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE, (GstMessageType)(GST_MESSAGE_ERROR | GST_MESSAGE_EOS));
if (msg != NULL)
gst_message_unref (msg);
gst_object_unref (bus);
gst_element_set_state (pipeline, GST_STATE_NULL);
gst_object_unref (pipeline);
return 0;
}
そして、それはうまく機能しています!
しかし、私がそれを再生しようとしているとき、音はありません:
pipeline = gst_parse_launch ("filesrc location=/home/nemo/Music/Ringtones/Myfile.mp3 ! decodebin ! audioconvert ! autoaudiosink", NULL);
Gstreamer バージョン: 0.10