FFmpegfs Fuse Multi Media Filesystem 2.16
|
Blu-ray disk parser implementation. More...
#include "ffmpegfs.h"
#include "blurayparser.h"
#include "transcode.h"
#include "logging.h"
#include "libbluray/bluray.h"
#include "libbluray/bluray-version.h"
#include <libavutil/rational.h>
Go to the source code of this file.
Functions | |
static bool | audio_stream_info (const std::string &path, BLURAY_STREAM_INFO *ss, int *channels, int *sample_rate) |
Get information about Blu-ray stream. More... | |
static bool | video_stream_info (const std::string &path, BLURAY_STREAM_INFO *ss, int *width, int *height, AVRational *framerate, bool *interleaved) |
Get information about Blu-ray stream. More... | |
static int | parse_find_best_audio_stream () |
Find best match audio stream. More... | |
static int | parse_find_best_video_stream () |
Find best match video stream. More... | |
static bool | create_bluray_virtualfile (BLURAY *bd, const BLURAY_TITLE_INFO *ti, const std::string &path, const struct stat *statbuf, void *buf, fuse_fill_dir_t filler, bool is_main_title, bool full_title, uint32_t title_idx, uint32_t chapter_idx) |
Create a virtual file entry of a Blu-ray chapter or title. More... | |
static int | parse_bluray (const std::string &path, const struct stat *statbuf, void *buf, fuse_fill_dir_t filler) |
Parse Blu-ray directory and get all Blu-ray titles and chapters as virtual files. More... | |
int | check_bluray (const std::string &path, void *buf, fuse_fill_dir_t filler) |
Get number of titles on Blu-ray. More... | |
Blu-ray disk parser implementation.
Definition in file blurayparser.cc.
|
static |
Get information about Blu-ray stream.
[in] | path | - Path to Blu-ray disk. |
[in] | ss | - BLURAY_STREAM_INFO object. |
[out] | channels | - Number of audio channels in stream. |
[out] | sample_rate | - Sample rate of stream. |
Definition at line 61 of file blurayparser.cc.
References Logging::error().
Referenced by create_bluray_virtualfile().
int check_bluray | ( | const std::string & | path, |
void * | buf = nullptr , |
||
fuse_fill_dir_t | filler = nullptr |
||
) |
Get number of titles on Blu-ray.
[in] | path | - Path to check |
[in,out] | buf | - The buffer passed to the readdir() operation. |
[in,out] | filler | - Function to add an entry in a readdir() operation (see https://libfuse.github.io/doxygen/fuse_8h.html#a7dd132de66a5cc2add2a4eff5d435660) |
Definition at line 623 of file blurayparser.cc.
References add_dotdot(), append_sep(), check_path(), load_path(), parse_bluray(), and Logging::trace().
Referenced by ffmpegfs_getattr(), and ffmpegfs_readdir().
|
static |
Create a virtual file entry of a Blu-ray chapter or title.
[in] | bd | - Blu-ray disk clip info. |
[in] | ti | - Blu-ray disk title info. |
[in] | path | - Path to check. |
[in] | statbuf | - File status structure of original file. |
[in,out] | buf | - The buffer passed to the readdir() operation. |
[in,out] | filler | - Function to add an entry in a readdir() operation (see https://libfuse.github.io/doxygen/fuse_8h.html#a7dd132de66a5cc2add2a4eff5d435660) |
[in] | is_main_title | - true if title_idx is the main title |
[in] | full_title | - If true, create virtual file of all title. If false, include single chapter only. |
[in] | title_idx | - Zero-based title index on Blu-ray |
[in] | chapter_idx | - Zero-based chapter index on Blu-ray |
Definition at line 432 of file blurayparser.cc.
References add_fuse_entry(), audio_stream_info(), BITRATE, BLURAY, Logging::error(), ffmpeg_format, format_bitrate(), format_duration(), format_samplerate(), format_size(), insert_dir(), insert_file(), VIRTUALFILE::BLURAY_CHAPTER::m_angle_no, VIRTUALFILE::m_bluray, VIRTUALFILE::m_channels, VIRTUALFILE::BLURAY_CHAPTER::m_chapter_no, VIRTUALFILE::m_duration, VIRTUALFILE::m_format_idx, VIRTUALFILE::m_framerate, VIRTUALFILE::m_full_title, VIRTUALFILE::m_height, VIRTUALFILE::BLURAY_CHAPTER::m_playlist_no, VIRTUALFILE::m_predicted_size, VIRTUALFILE::m_sample_rate, VIRTUALFILE::m_st, VIRTUALFILE::BLURAY_CHAPTER::m_title_no, VIRTUALFILE::m_video_frame_count, VIRTUALFILE::m_width, parse_find_best_audio_stream(), parse_find_best_video_stream(), replace_all(), strsprintf(), Logging::trace(), transcoder_cached_filesize(), transcoder_set_filesize(), VIDEO, and video_stream_info().
Referenced by parse_bluray().
|
static |
Parse Blu-ray directory and get all Blu-ray titles and chapters as virtual files.
[in] | path | - Path to check. |
[in] | statbuf | - File status structure of original file. |
[in,out] | buf | - The buffer passed to the readdir() operation. |
[in,out] | filler | - Function to add an entry in a readdir() operation (see https://libfuse.github.io/doxygen/fuse_8h.html#a7dd132de66a5cc2add2a4eff5d435660) |
Definition at line 568 of file blurayparser.cc.
References create_bluray_virtualfile(), Logging::debug(), and Logging::trace().
Referenced by check_bluray().
|
static |
Find best match audio stream.
Definition at line 401 of file blurayparser.cc.
Referenced by create_bluray_virtualfile().
|
static |
Find best match video stream.
Definition at line 412 of file blurayparser.cc.
Referenced by create_bluray_virtualfile().
|
static |
Get information about Blu-ray stream.
[in] | path | - Path to Blu-ray disk. |
[in] | ss | - BLURAY_STREAM_INFO object. |
[out] | width | - Width of video stream. |
[out] | height | - Height of video stream. |
[out] | framerate | - Frame rate of video stream. |
[out] | interleaved | - true: video stream is interleaved, false: video stream is not interleaved. |
Definition at line 193 of file blurayparser.cc.
References Logging::error().
Referenced by create_bluray_virtualfile().