#include <Ecore_Evas.h>
#include <stdio.h>
#include <string.h>
+#include <getopt.h>
#ifdef _ACTIVATE_EOM_
#include <eom.h>
#endif
static void subtitle_updated_cb(unsigned long duration, char *text, void *user_data)
{
- g_print("[Player_Test] subtitle_updated_cb!!!! [%ld] %s\n", duration, text);
+ printf("[Player_Test] subtitle_updated_cb!!!! [%ld] %s\n", duration, text);
}
static void video_captured_cb(unsigned char *data, int width, int height, unsigned int size, void *user_data)
media_format_unref(g_video_fmt);
}
-void play_with_ini(char *file_path)
-{
- input_filename(file_path);
- _player_play();
-}
-
void _interpret_main_menu(char *cmd)
{
int len = strlen(cmd);
g_menu_state = CURRENT_STATUS_PITCH_CONTROL;
} else if (strncmp(cmd, "pv", 2) == 0) {
g_menu_state = CURRENT_STATUS_PITCH_VALUE;
+ } else if (strncmp(cmd, "qc", 2) == 0) {
+ int len = strlen(g_uri);
+ if (len < 0 || len > MAX_STRING_LEN - 1) {
+ g_print("qc use -u option\n");
+ return;
+ }
+ input_filename(g_uri);
+ len = strlen(g_subtitle_uri);
+ if (len > 0)
+ input_subtitle_filename(g_subtitle_uri);
} else {
g_print("unknown menu \n");
}
int main(int argc, char *argv[])
{
- GIOChannel *stdin_channel;
- stdin_channel = g_io_channel_unix_new(0);
+ GIOChannel *stdin_channel = g_io_channel_unix_new(0);
g_io_channel_set_flags(stdin_channel, G_IO_FLAG_NONBLOCK, NULL);
g_io_add_watch(stdin_channel, G_IO_IN, (GIOFunc)input, NULL);
displaymenu();
memset(&ad, 0x0, sizeof(appdata));
+ while (1) {
+ int opt;
+ int opt_idx = 0;
+
+ static struct option long_options[] = {
+ { "uri", no_argument, 0, 'u' },
+ { "sub_uri", no_argument, 0, 's'},
+ { 0, 0, 0, 0 }
+ };
+
+ if ((opt = getopt_long(argc, argv, "u:s:h", long_options, &opt_idx)) == -1)
+ break;
+
+ switch (opt) {
+ case 'u':
+ g_strlcpy(g_uri, optarg, MAX_STRING_LEN);
+ break;
+ case 's':
+ g_strlcpy(g_subtitle_uri, optarg, MAX_STRING_LEN);
+ break;
+ default:
+ return 0;
+ }
+ }
ops.data = &ad;
return appcore_efl_main(PACKAGE, &argc, &argv, &ops);
virtual void SetUp() override {
ASSERT_EQ(player_create(&_player), PLAYER_ERROR_NONE);
-
std::cout << "SetUp()" << std::endl;
}
virtual void TearDown() override {
ASSERT_EQ(player_destroy(_player), PLAYER_ERROR_NONE);
-
std::cout << "TearDown()" << std::endl;
}
EXPECT_EQ(player_get_codec_info(_player, &audio_codec, &video_codec), PLAYER_ERROR_NONE);
std::string audioCodecName = audio_codec;
- EXPECT_NE(audioCodecName.find(_tcInfos.audio.codecName), std::string::npos);
+ EXPECT_STREQ(audio_codec, _tcInfos.audio.codecName.c_str());
if (audio_codec)
free(audio_codec);
std::string videoCodecName = video_codec;
- EXPECT_NE(videoCodecName.find(_tcInfos.video.codecName), std::string::npos);
+ EXPECT_STREQ(video_codec, _tcInfos.video.codecName.c_str());
if (video_codec)
free(video_codec);
EXPECT_EQ(h, _tcInfos.video.height);
EXPECT_EQ(player_get_codec_info(_player, &audio_codec, &video_codec), PLAYER_ERROR_NONE);
- std::string audioCodecName = audio_codec;
- EXPECT_NE(audioCodecName.find(_tcInfos.audio.codecName), std::string::npos);
+ EXPECT_STREQ(audio_codec, _tcInfos.audio.codecName.c_str());
if (audio_codec)
free(audio_codec);
- std::string videoCodecName = video_codec;
- EXPECT_NE(videoCodecName.find(_tcInfos.video.codecName), std::string::npos);
+ EXPECT_STREQ(video_codec, _tcInfos.video.codecName.c_str());
if (video_codec)
free(video_codec);