~ubuntu-branches/ubuntu/vivid/vlc/vivid

« back to all changes in this revision

Viewing changes to include/vlc_input.h

  • Committer: Package Import Robot
  • Author(s): Benjamin Drung
  • Date: 2012-02-13 01:34:02 UTC
  • mfrom: (1.1.44)
  • Revision ID: package-import@ubuntu.com-20120213013402-7utx6r7s9dg3r0pf
Tags: 2.0.0~unix-0ubuntu1
* New upstream release (Closes: #499381, #573064, #624027, LP: #455825,
  #573775, #695882, #705151, #708448, #738381, #743581, #747757, #817924,
  #931083).
* Remove dropped mozilla-plugin-vlc, vlc-plugin-ggi, and vlc-plugin-svgalib.
  The Mozilla browser plug-in is now provided by a separate source tarball.
* Add new plugins to and remove dropped plugins from vlc-nox.
* Add new and remove dropped build dependencies:
  + libbluray-dev (for Blu-ray support)
  + libresid-builder-dev
  + libsamplerate0-dev
  + libsidplay2-dev
  + lbspeexdsp-dev
  + libxcb-composite0-dev
  - libgtk2.0-dev
  - xulrunner-dev
* vlc-plugin-fluidsynth depends on fluid-soundfont-gm or
  musescore-soundfont-gm for having a sound font for playing MIDI files.
* Drop all patches (they were either backported or accepted by upstream).
* Update symbols for libvlc5.
* Install plugins.dat instead of running vlc-cache-gen in postinst.
* Update minimum version of build dependencies.
* Change Build-Dependency from libupnp3-dev to unversioned libupnp-dev.
  (Closes: #656831)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************
2
2
 * vlc_input.h: Core input structures
3
3
 *****************************************************************************
4
 
 * Copyright (C) 1999-2006 the VideoLAN team
5
 
 * $Id: 4b161b8ca903d938106c531abb8a0ecfaab6c89e $
 
4
 * Copyright (C) 1999-2006 VLC authors and VideoLAN
 
5
 * $Id: 7d8320a75ce9b2263aa3ec1fe34090cc4f7cf732 $
6
6
 *
7
7
 * Authors: Christophe Massiot <massiot@via.ecp.fr>
8
8
 *          Laurent Aimar <fenrir@via.ecp.fr>
9
9
 *
10
 
 * This program is free software; you can redistribute it and/or modify
11
 
 * it under the terms of the GNU General Public License as published by
12
 
 * the Free Software Foundation; either version 2 of the License, or
 
10
 * This program is free software; you can redistribute it and/or modify it
 
11
 * under the terms of the GNU Lesser General Public License as published by
 
12
 * the Free Software Foundation; either version 2.1 of the License, or
13
13
 * (at your option) any later version.
14
14
 *
15
15
 * This program is distributed in the hope that it will be useful,
16
16
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 
 * GNU General Public License for more details.
 
17
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
18
 * GNU Lesser General Public License for more details.
19
19
 *
20
 
 * You should have received a copy of the GNU General Public License
21
 
 * along with this program; if not, write to the Free Software
22
 
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
 
20
 * You should have received a copy of the GNU Lesser General Public License
 
21
 * along with this program; if not, write to the Free Software Foundation,
 
22
 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23
23
 *****************************************************************************/
24
24
 
25
25
/* __ is need because conflict with <vlc/input.h> */
83
83
    int64_t i_byte_offset;
84
84
    int64_t i_time_offset;
85
85
    char    *psz_name;
86
 
    int     i_level;
87
86
};
88
87
 
89
88
static inline seekpoint_t *vlc_seekpoint_New( void )
91
90
    seekpoint_t *point = (seekpoint_t*)malloc( sizeof( seekpoint_t ) );
92
91
    point->i_byte_offset =
93
92
    point->i_time_offset = -1;
94
 
    point->i_level = 0;
95
93
    point->psz_name = NULL;
96
94
    return point;
97
95
}
160
158
    free( t );
161
159
}
162
160
 
163
 
static inline input_title_t *vlc_input_title_Duplicate( input_title_t *t )
 
161
static inline input_title_t *vlc_input_title_Duplicate( const input_title_t *t )
164
162
{
165
163
    input_title_t *dup = vlc_input_title_New( );
166
164
    int i;
310
308
 *
311
309
 * The read-write variables are:
312
310
 *  - state (\see input_state_e)
313
 
 *  - rate, rate-slower, rate-faster
 
311
 *  - rate
314
312
 *  - position, position-offset
315
313
 *  - time, time-offset
316
314
 *  - title, next-title, prev-title
434
432
    /* cache" has changed */
435
433
    INPUT_EVENT_CACHE,
436
434
 
437
 
    /* A aout_instance_t object has been created/deleted by *the input* */
 
435
    /* A audio_output_t object has been created/deleted by *the input* */
438
436
    INPUT_EVENT_AOUT,
439
437
    /* A vout_thread_t object has been created/deleted by *the input* */
440
438
    INPUT_EVENT_VOUT,
479
477
    INPUT_DEL_INFO,   /* arg1= char* arg2= char*              res=can fail */
480
478
    INPUT_SET_NAME,   /* arg1= char* res=can fail    */
481
479
 
482
 
    /* Input config options */
483
 
    INPUT_ADD_OPTION,      /* arg1= char * arg2= char *  res=can fail*/
484
 
 
485
480
    /* Input properties */
486
481
    INPUT_GET_VIDEO_FPS,         /* arg1= double *        res=can fail */
487
482
 
494
489
    INPUT_DEL_BOOKMARK,    /* arg1= seekpoint_t *  res=can fail   */
495
490
    INPUT_SET_BOOKMARK,    /* arg1= int  res=can fail    */
496
491
 
 
492
    /* titles */
 
493
    INPUT_GET_TITLE_INFO,     /* arg1=input_title_t** arg2= int * res=can fail */
 
494
 
497
495
    /* Attachments */
498
496
    INPUT_GET_ATTACHMENTS, /* arg1=input_attachment_t***, arg2=int*  res=can fail */
499
497
    INPUT_GET_ATTACHMENT,  /* arg1=input_attachment_t**, arg2=char*  res=can fail */
511
509
 
512
510
    /* Input ressources
513
511
     * XXX You must call vlc_object_release as soon as possible */
514
 
    INPUT_GET_AOUT,         /* arg1=aout_instance_t **              res=can fail */
 
512
    INPUT_GET_AOUT,         /* arg1=audio_output_t **              res=can fail */
515
513
    INPUT_GET_VOUTS,        /* arg1=vout_thread_t ***, size_t *        res=can fail */
516
 
    INPUT_GET_ES_OBJECTS,   /* arg1=int id, vlc_object_t **dec, vout_thread_t **, aout_instance_t ** */
 
514
    INPUT_GET_ES_OBJECTS,   /* arg1=int id, vlc_object_t **dec, vout_thread_t **, audio_output_t ** */
517
515
 
518
516
    /* External clock managments */
519
517
    INPUT_GET_PCR_SYSTEM,   /* arg1=mtime_t *, arg2=mtime_t *       res=can fail */
526
524
 * Prototypes
527
525
 *****************************************************************************/
528
526
 
529
 
VLC_EXPORT( input_thread_t *, input_Create, ( vlc_object_t *p_parent, input_item_t *, const char *psz_log, input_resource_t * ) );
 
527
VLC_API input_thread_t * input_Create( vlc_object_t *p_parent, input_item_t *, const char *psz_log, input_resource_t * ) VLC_USED;
530
528
#define input_Create(a,b,c,d) input_Create(VLC_OBJECT(a),b,c,d)
531
529
 
532
 
VLC_EXPORT( input_thread_t *, input_CreateAndStart, ( vlc_object_t *p_parent, input_item_t *, const char *psz_log ) );
 
530
VLC_API input_thread_t * input_CreateAndStart( vlc_object_t *p_parent, input_item_t *, const char *psz_log ) VLC_USED;
533
531
#define input_CreateAndStart(a,b,c) input_CreateAndStart(VLC_OBJECT(a),b,c)
534
532
 
535
 
VLC_EXPORT( int,  input_Start, ( input_thread_t * ) );
536
 
 
537
 
VLC_EXPORT( void, input_Stop, ( input_thread_t *, bool b_abort ) );
538
 
 
539
 
VLC_EXPORT( int, input_Read, ( vlc_object_t *, input_item_t * ) );
 
533
VLC_API int input_Start( input_thread_t * );
 
534
 
 
535
VLC_API void input_Stop( input_thread_t *, bool b_abort );
 
536
 
 
537
VLC_API int input_Read( vlc_object_t *, input_item_t * );
540
538
#define input_Read(a,b) input_Read(VLC_OBJECT(a),b)
541
539
 
542
 
VLC_EXPORT( int, input_vaControl,( input_thread_t *, int i_query, va_list  ) );
543
 
 
544
 
VLC_EXPORT( int, input_Control,  ( input_thread_t *, int i_query, ...  ) );
 
540
VLC_API int input_vaControl( input_thread_t *, int i_query, va_list  );
 
541
 
 
542
VLC_API int input_Control( input_thread_t *, int i_query, ...  );
 
543
 
 
544
VLC_API void input_Close( input_thread_t * );
 
545
void input_Join( input_thread_t * );
 
546
void input_Release( input_thread_t * );
545
547
 
546
548
/**
547
549
 * Get the input item for an input thread
549
551
 * You have to keep a reference to the input or to the input_item_t until
550
552
 * you do not need it anymore.
551
553
 */
552
 
VLC_EXPORT( input_item_t*, input_GetItem, ( input_thread_t * ) );
 
554
VLC_API input_item_t* input_GetItem( input_thread_t * ) VLC_USED;
553
555
 
554
556
/**
555
557
 * It will return the current state of the input.
599
601
 * @return NULL on error, or the audio output (which needs to be
600
602
 * released with vlc_object_release()).
601
603
 */
602
 
static inline aout_instance_t *input_GetAout( input_thread_t *p_input )
 
604
static inline audio_output_t *input_GetAout( input_thread_t *p_input )
603
605
{
604
 
     aout_instance_t *p_aout;
 
606
     audio_output_t *p_aout;
605
607
     return input_Control( p_input, INPUT_GET_AOUT, &p_aout ) ? NULL : p_aout;
606
608
}
607
609
 
613
615
 */
614
616
static inline int input_GetEsObjects( input_thread_t *p_input, int i_id,
615
617
                                      vlc_object_t **pp_decoder,
616
 
                                      vout_thread_t **pp_vout, aout_instance_t **pp_aout )
 
618
                                      vout_thread_t **pp_vout, audio_output_t **pp_aout )
617
619
{
618
620
    return input_Control( p_input, INPUT_GET_ES_OBJECTS, i_id,
619
621
                          pp_decoder, pp_vout, pp_aout );
635
637
}
636
638
 
637
639
/* */
638
 
typedef struct input_clock_t input_clock_t;
639
 
VLC_EXPORT( decoder_t *, input_DecoderNew, ( input_thread_t *, es_format_t *, input_clock_t *, sout_instance_t * ) );
640
 
VLC_EXPORT( void, input_DecoderDelete, ( decoder_t * ) );
641
 
VLC_EXPORT( void, input_DecoderDecode,( decoder_t *, block_t *, bool b_do_pace ) );
642
 
 
643
 
/**
644
 
 * This function allows to split a MRL into access, demux and path part.
645
 
 *
646
 
 *  You should not write into access and demux string as they may not point into
647
 
 * the provided buffer.
648
 
 *  The buffer provided by psz_dup will be modified.
649
 
 */
650
 
VLC_EXPORT( void, input_SplitMRL, ( const char **ppsz_access, const char **ppsz_demux, char **ppsz_path, char *psz_dup ) );
 
640
VLC_API decoder_t * input_DecoderCreate( vlc_object_t *, es_format_t *, input_resource_t * ) VLC_USED;
 
641
VLC_API void input_DecoderDelete( decoder_t * );
 
642
VLC_API void input_DecoderDecode( decoder_t *, block_t *, bool b_do_pace );
651
643
 
652
644
/**
653
645
 * This function creates a sane filename path.
654
646
 */
655
 
VLC_EXPORT( char *, input_CreateFilename, ( vlc_object_t *, const char *psz_path, const char *psz_prefix, const char *psz_extension ) );
 
647
VLC_API char * input_CreateFilename( vlc_object_t *, const char *psz_path, const char *psz_prefix, const char *psz_extension ) VLC_USED;
656
648
 
657
649
/**
658
 
 * This function detaches resources from a dead input.
 
650
 * It creates an empty input resource handler.
659
651
 *
660
 
 * It MUST be called on a dead input (p_input->b_dead true) otherwise
661
 
 * it will assert.
662
 
 * It does not support concurrent calls.
 
652
 * The given object MUST stay alive as long as the input_resource_t is
 
653
 * not deleted.
663
654
 */
664
 
VLC_EXPORT(input_resource_t *, input_DetachResource, ( input_thread_t * ) );
 
655
VLC_API input_resource_t * input_resource_New( vlc_object_t * ) VLC_USED;
665
656
 
666
657
/**
667
 
 * This function releases the input resource.
 
658
 * It releases an input resource.
668
659
 */
669
 
VLC_EXPORT(void, input_resource_Delete, ( input_resource_t * ) );
 
660
VLC_API void input_resource_Release( input_resource_t * );
670
661
 
671
662
/**
672
663
 * Forcefully destroys the video output (e.g. when the playlist is stopped).
673
664
 */
674
 
VLC_EXPORT(void, input_resource_TerminateVout, ( input_resource_t * ) );
 
665
VLC_API void input_resource_TerminateVout( input_resource_t * );
 
666
 
 
667
/**
 
668
 * This function releases all resources (object).
 
669
 */
 
670
VLC_API void input_resource_Terminate( input_resource_t * );
675
671
 
676
672
#endif