xine-lib 1.2.11
|
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <linux/videodev.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <errno.h>
#include <xine/xine_internal.h>
#include <xine/xineutils.h>
#include <xine/input_plugin.h>
Data Structures | |
struct | resolution_t |
struct | v4l_input_plugin_t |
struct | pvrscr_s |
Macros | |
#define | _LINUX_TIME_H |
#define | ALSA_PCM_NEW_HW_PARAMS_API |
#define | ALSA_PCM_NEW_SW_PARAMS_API |
#define | XINE_ENABLE_EXPERIMENTAL_FEATURES |
#define | LOG_VERBOSE |
#define | NUM_FRAMES 15 |
#define | MAX_RES 640 |
#define | NUM_RESOLUTIONS (sizeof(resolutions)/sizeof(resolutions[0])) |
#define | RADIO_DEV "/dev/radio0" |
#define | VIDEO_DEV "/dev/video0" |
#define | SCR_PAUSED -2 |
#define | SCR_FW -3 |
#define | SCR_SKIP -4 |
Typedefs | |
typedef struct pvrscr_s | pvrscr_t |
Variables | |
static const resolution_t | resolutions [] |
static const char *const | tv_standard_names [] = { "AUTO", "PAL", "NTSC", "SECAM", "OLD", NULL } |
static const int | tv_standard_values [] = { VIDEO_MODE_AUTO, VIDEO_MODE_PAL, VIDEO_MODE_NTSC, VIDEO_MODE_SECAM, -1 } |
const plugin_info_t xine_plugin_info[] | EXPORTED |
#define _LINUX_TIME_H |
#define ALSA_PCM_NEW_HW_PARAMS_API |
#define ALSA_PCM_NEW_SW_PARAMS_API |
#define LOG_VERBOSE |
#define MAX_RES 640 |
#define NUM_FRAMES 15 |
#define NUM_RESOLUTIONS (sizeof(resolutions)/sizeof(resolutions[0])) |
#define RADIO_DEV "/dev/radio0" |
#define SCR_FW -3 |
#define SCR_PAUSED -2 |
#define SCR_SKIP -4 |
#define VIDEO_DEV "/dev/video0" |
#define XINE_ENABLE_EXPERIMENTAL_FEATURES |
|
inlinestatic |
Allocate an audio frame.
References lprintf, and buf_element_s::next.
Referenced by v4l_plugin_read_block().
|
inlinestatic |
Allocate a video frame.
References lprintf, and buf_element_s::next.
Referenced by v4l_plugin_read_block().
|
static |
|
static |
Referenced by v4l_class_get_instance().
|
inlinestatic |
Get time. Gets a pts time value.
References NULL, and xine_monotonic_clock().
Referenced by v4l_plugin_read_block().
|
static |
|
static |
|
static |
Open audio capture device.
This function opens an alsa capture device. This will be used to capture audio data from.
References lprintf, mode(), NULL, XINE_VERBOSITY_LOG, and xprintf.
Referenced by v4l_plugin_radio_open(), and v4l_plugin_video_open().
|
static |
References _x_stream_info_set(), allocate_frames(), cfg_entry_s::config, config_values_s::lookup_entry, lprintf, set_frequency(), set_input_source(), cfg_entry_s::str_value, unmute_audio(), xine_open_cloexec(), XINE_STREAM_INFO_HAS_AUDIO, XINE_STREAM_INFO_HAS_VIDEO, XINE_VERBOSITY_LOG, and xprintf.
Referenced by v4l_plugin_radio_open().
|
static |
Open the video capture device.
This opens the video capture device and if given, selects a tuner from which the signal should be grabbed.
References _x_stream_info_set(), allocate_frames(), BUF_VIDEO_I420, BUF_VIDEO_YUY2, cfg_entry_s::config, resolution_t::height, config_values_s::lookup_entry, lprintf, MAX_RES, NUM_RESOLUTIONS, resolutions, set_frequency(), set_input_source(), cfg_entry_s::str_value, unmute_audio(), resolution_t::width, xine_get_param(), xine_open_cloexec(), XINE_PARAM_VO_ZOOM_X, XINE_PARAM_VO_ZOOM_Y, xine_set_param(), XINE_STREAM_INFO_HAS_AUDIO, XINE_STREAM_INFO_HAS_VIDEO, XINE_VERBOSITY_LOG, and xprintf.
Referenced by v4l_plugin_video_open().
|
static |
References NULL, and xine_monotonic_clock().
Referenced by pvrscr_init().
|
static |
Referenced by pvrscr_init().
|
static |
References NULL, and xine_monotonic_clock().
Referenced by pvrscr_init().
|
static |
Referenced by pvrscr_init().
|
static |
References NULL, pvrscr_adjust(), pvrscr_exit(), pvrscr_get_current(), pvrscr_get_priority(), pvrscr_set_fine_speed(), pvrscr_speed_tuning(), pvrscr_start(), and XINE_SPEED_PAUSE.
Referenced by v4l_plugin_video_open().
|
static |
References pvrscr_set_pivot(), and XINE_FINE_SPEED_NORMAL.
Referenced by pvrscr_init(), and pvrscr_start().
|
static |
References NULL, and xine_monotonic_clock().
Referenced by pvrscr_set_fine_speed(), and pvrscr_speed_tuning().
|
static |
References pvrscr_set_pivot(), and XINE_FINE_SPEED_NORMAL.
Referenced by pvrscr_init(), and v4l_adjust_realtime_speed().
|
static |
References NULL, pvrscr_set_fine_speed(), XINE_FINE_SPEED_NORMAL, and xine_monotonic_clock().
Referenced by pvrscr_init().
|
static |
References _, xine_progress_data_t::description, xine_progress_data_t::percent, SCR_FW, SCR_PAUSED, XINE_EVENT_PROGRESS, and xine_event_send().
Referenced by v4l_adjust_realtime_speed().
|
static |
References _, cfg_entry_s::config, input(), config_values_s::lookup_entry, lprintf, NULL, cfg_entry_s::num_value, tv_standard_names, tv_standard_values, XINE_VERBOSITY_LOG, and xprintf.
Referenced by set_input_source().
|
static |
Referenced by set_input_source().
|
static |
References lprintf, XINE_VERBOSITY_LOG, and xprintf.
Referenced by open_radio_capture_device(), open_video_capture_device(), and v4l_event_handler().
|
static |
References search_by_channel(), and search_by_tuner().
Referenced by open_radio_capture_device(), open_video_capture_device(), v4l_class_get_radio_instance(), and v4l_class_get_video_instance().
|
static |
Stores an audio frame.
References lprintf, buf_element_s::next, and buf_element_s::source.
Referenced by allocate_frames().
|
static |
Stores a video frame.
References lprintf, buf_element_s::next, and buf_element_s::source.
Referenced by allocate_frames().
|
static |
References lprintf.
Referenced by open_radio_capture_device(), and open_video_capture_device().
|
static |
Adjust realtime speed
If xine is playing at normal speed, tries to adjust xines playing speed to avoid buffer overrun and buffer underrun
References _x_set_speed(), CLOCK_SCR_ADJUSTABLE, NULL, NUM_FRAMES, pvrscr_speed_tuning(), report_progress(), SCR_PAUSED, SCR_SKIP, fifo_buffer_s::size, XINE_SPEED_NORMAL, XINE_SPEED_PAUSE, XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by v4l_plugin_read_block().
|
static |
Create a new instance.
Creates a new instance of the plugin. Doesn't initialise the V4L device, does initialise the structure.
References bits, xine_s::config, extract_mrl(), config_values_s::lookup_entry, NULL, cfg_entry_s::str_value, v4l_plugin_dispose(), v4l_plugin_get_blocksize(), v4l_plugin_get_capabilities(), v4l_plugin_get_current_pos(), v4l_plugin_get_length(), v4l_plugin_get_mrl(), v4l_plugin_get_optional_data(), v4l_plugin_read(), v4l_plugin_read_block(), v4l_plugin_seek(), and xine_stream_s::xine.
Referenced by v4l_class_get_radio_instance(), and v4l_class_get_video_instance().
|
static |
References xine_s::config, config_values_s::lookup_entry, lprintf, NULL, input_plugin_s::open, set_input_source(), cfg_entry_s::str_value, v4l_class_get_instance(), v4l_plugin_dispose(), v4l_plugin_radio_open(), xine_stream_s::xine, xine_open_cloexec(), XINE_VERBOSITY_LOG, and xprintf.
Referenced by init_radio_class().
|
static |
References xine_s::config, config_values_s::lookup_entry, lprintf, NULL, input_plugin_s::open, set_input_source(), cfg_entry_s::str_value, v4l_class_get_instance(), v4l_plugin_dispose(), v4l_plugin_video_open(), xine_stream_s::xine, xine_open_cloexec(), XINE_VERBOSITY_LOG, and xprintf.
Referenced by init_video_class().
|
static |
Event handler.
Processes events from a frontend. This way frequencies can be changed without closing the v4l plugin.
References _x_demux_flush_engine(), xine_set_v4l2_data_t::channel, xine_set_v4l2_data_t::frequency, xine_set_v4l2_data_t::input, input(), lprintf, set_frequency(), xine_event_t::type, xine_event_free(), xine_event_get(), and XINE_EVENT_SET_V4L2.
Referenced by v4l_plugin_read_block().
|
static |
Dispose plugin.
Closes the plugin, restore the V4L device in the initial state (volume) and frees the allocated memory
References _x_freep(), lprintf, NULL, xine_event_dispose_queue(), XINE_PARAM_VO_ZOOM_X, XINE_PARAM_VO_ZOOM_Y, xine_set_param(), XINE_VERBOSITY_LOG, and xprintf.
Referenced by v4l_class_get_instance(), v4l_class_get_radio_instance(), and v4l_class_get_video_instance().
|
static |
Plugin get block size. Unsupported by the plugin.
Referenced by v4l_class_get_instance().
|
static |
Plugin get capabilitiets. This plugin does not support any special capabilities.
Referenced by v4l_class_get_instance().
|
static |
Plugin get current pos. Unsupported by the plugin.
Referenced by v4l_class_get_instance().
|
static |
Plugin get length. This is a live stream, and as such does not have an known end.
Referenced by v4l_class_get_instance().
|
static |
|
static |
References INPUT_OPTIONAL_UNSUPPORTED.
Referenced by v4l_class_get_instance().
|
static |
References open_audio_capture_device(), open_radio_capture_device(), and xine_event_new_queue().
Referenced by v4l_class_get_radio_instance().
|
static |
Plugin read. This function is not supported by the plugin.
References lprintf.
Referenced by v4l_class_get_instance().
|
static |
Plugin read block Reads one data block. This is either an audio frame or an video frame
References _x_get_speed(), alloc_aud_frame(), alloc_vid_frame(), xine_bmiheader::biHeight, xine_bmiheader::biSize, bits, xine_bmiheader::biWidth, BUF_FLAG_FRAME_END, BUF_FLAG_FRAME_START, BUF_FLAG_HEADER, BUF_FLAG_STDHEADER, buf_element_s::content, buf_element_s::decoder_flags, buf_element_s::decoder_info, buf_element_s::free_buffer, get_time(), lprintf, NULL, buf_element_s::pts, buf_element_s::size, v4l_adjust_realtime_speed(), v4l_event_handler(), xine_fast_memcpy, XINE_VERBOSITY_LOG, and xprintf.
Referenced by v4l_class_get_instance().
|
static |
Plugin seek. Not supported by the plugin.
References lprintf.
Referenced by v4l_class_get_instance().
|
static |
References open_audio_capture_device(), open_video_capture_device(), pvrscr_init(), and xine_event_new_queue().
Referenced by v4l_class_get_video_instance().
const plugin_info_t xine_plugin_info [] EXPORTED |
|
static |
Referenced by open_video_capture_device().
|
static |
Referenced by init_video_class(), and search_by_channel().
|
static |
Referenced by search_by_channel().