A:
Thank you for all your comments. I have tested many functions and solutions of other users. But all of them failed to open the video file I specified. I also tried to install "ffplay" and followed the instructions on the website, but it failed to work. Finally, I read the document at this website and found the suggested function of returning the error code. I used the suggested function and the video file can now be opened. The codes I used are as follows:
CODE:
struct libvlc_audio_format_t {
unsigned char b; /*!name)) {
a = 1;
} else {
a = 0;
}
if (0 == strcmp("mp3", format->name)) {
b = 1;
} else {
b = 0;
}
format->b = b;
format->width = 1;
format->depth = 1;
format->interleaving = a;
return 0;
}
CODE:
libvlc_audio_format_t format = {};
/* Open a file */
libvlc_media_t *file_open(const char *url, const char *format,...);
/* Get the file at a path */
libvlc_media_t *file_get_at_path(const char * be359ba680
Related links:
Comments