Esempio n. 1
0
/** @internal @This allocates an telxf pipe.
 *
 * @param mgr common management structure
 * @param uprobe structure used to raise events
 * @param signature signature of the pipe allocator
 * @param args optional arguments
 * @return pointer to upipe or NULL in case of allocation error
 */
static struct upipe *upipe_telxf_alloc(struct upipe_mgr *mgr,
                                       struct uprobe *uprobe,
                                       uint32_t signature, va_list args)
{
    struct upipe *upipe = upipe_telxf_alloc_void(mgr, uprobe, signature, args);
    if (unlikely(upipe == NULL))
        return NULL;

    struct upipe_telxf *upipe_telxf = upipe_telxf_from_upipe(upipe);
    upipe_telxf_init_urefcount(upipe);
    upipe_telxf_init_sync(upipe);
    upipe_telxf_init_output(upipe);
    upipe_telxf_init_flow_def(upipe);
    /* There is no known implementation of teletext in non-25 Hz systems. */
    upipe_telxf->fps.num = 25;
    upipe_telxf->fps.den = 1;
    upipe_telxf->octetrate = 0;
    upipe_telxf->next_uref = NULL;
    upipe_telxf->next_uref_size = 0;
    uref_init(&upipe_telxf->au_uref_s);
    uref_clock_set_date_sys(&upipe_telxf->au_uref_s, UINT64_MAX,
                            UREF_DATE_NONE);
    uref_clock_set_date_prog(&upipe_telxf->au_uref_s, UINT64_MAX,
                             UREF_DATE_NONE);
    uref_clock_set_date_orig(&upipe_telxf->au_uref_s, UINT64_MAX,
                             UREF_DATE_NONE);
    upipe_throw_ready(upipe);
    return upipe;
}
Esempio n. 2
0
/** @internal @This receives data.
 *
 * @param upipe description structure of the pipe
 * @param uref uref structure
 * @param upump_p reference to pump that generated the buffer
 */
static void upipe_noclock_input(struct upipe *upipe, struct uref *uref,
                                struct upump **upump_p)
{
    int type;
    uint64_t date;
    uref_clock_get_date_prog(uref, &date, &type);
    uref_clock_set_date_sys(uref, date, type);
    upipe_noclock_output(upipe, uref, upump_p);
}
Esempio n. 3
0
/** @internal @This flushes all dates.
 *
 * @param upipe description structure of the pipe
 */
static void upipe_a52f_flush_dates(struct upipe *upipe)
{
    struct upipe_a52f *upipe_a52f = upipe_a52f_from_upipe(upipe);
    uref_clock_set_date_sys(&upipe_a52f->au_uref_s, UINT64_MAX,
                            UREF_DATE_NONE);
    uref_clock_set_date_prog(&upipe_a52f->au_uref_s, UINT64_MAX,
                             UREF_DATE_NONE);
    uref_clock_set_date_orig(&upipe_a52f->au_uref_s, UINT64_MAX,
                             UREF_DATE_NONE);
    uref_clock_delete_dts_pts_delay(&upipe_a52f->au_uref_s);
}