Wasabi ExpressPlay SDK for Desktop Systems  1.10
WsbMediaPlayback.h
Go to the documentation of this file.
1 /*****************************************************************
2 |
3 | Wasabi - Media Playback API
4 |
5 | $Id: WsbMediaPlayback.h 10793 2014-06-25 12:46:08Z jebaseelir $
6 | Original author: Gilles Boccon-Gibod
7 |
8 | This software is provided to you pursuant to your agreement
9 | with Intertrust Technologies Corporation ("Intertrust").
10 | This software may be used only in accordance with the terms
11 | of the agreement.
12 |
13 | Copyright (c) 2008-2014 by Intertrust. All rights reserved.
14 |
15 ****************************************************************/
21 #ifndef _WSB_MEDIA_PLAYBACK_H_
22 #define _WSB_MEDIA_PLAYBACK_H_
23 
24 /*----------------------------------------------------------------------
25 | includes
26 +---------------------------------------------------------------------*/
27 #include "WsbTypes.h"
28 #include "ShiData.h"
29 
30 /*----------------------------------------------------------------------
31 | prototypes
32 +---------------------------------------------------------------------*/
38 typedef struct WSB_Player WSB_Player;
39 
40 #if defined(__cplusplus)
41 extern "C" {
42 #endif
43 
44 /*----------------------------------------------------------------------
45 | constants
46 +---------------------------------------------------------------------*/
50 #define WSB_PLAYER_STREAM_INFO_MASK_ALL 0x1FFF
51 
52 #define WSB_PLAYER_STREAM_INFO_MASK_TYPE 0x0001
53 #define WSB_PLAYER_STREAM_INFO_MASK_ID 0x0002
54 #define WSB_PLAYER_STREAM_INFO_MASK_NOMINAL_BITRATE 0x0004
55 #define WSB_PLAYER_STREAM_INFO_MASK_AVERAGE_BITRATE 0x0008
56 #define WSB_PLAYER_STREAM_INFO_MASK_INSTANT_BITRATE 0x0010
57 #define WSB_PLAYER_STREAM_INFO_MASK_SIZE 0x0020
58 #define WSB_PLAYER_STREAM_INFO_MASK_DURATION 0x0040
59 #define WSB_PLAYER_STREAM_INFO_MASK_SAMPLE_RATE 0x0080
60 #define WSB_PLAYER_STREAM_INFO_MASK_CHANNEL_COUNT 0x0100
61 #define WSB_PLAYER_STREAM_INFO_MASK_WIDTH 0x0200
62 #define WSB_PLAYER_STREAM_INFO_MASK_HEIGHT 0x0400
63 #define WSB_PLAYER_STREAM_INFO_MASK_FLAGS 0x0800
64 #define WSB_PLAYER_STREAM_INFO_MASK_DATA_TYPE 0x1000
65 
69 #define WSB_PLAYER_INPUT_FLAG_AUDIO_TRACK 0x0001
70 #define WSB_PLAYER_INPUT_FLAG_VIDEO_TRACK 0x0002
71 #define WSB_PLAYER_INPUT_FLAG_TRACK_BY_INDEX 0x0004
72 
74 #define WSB_PLAYER_STREAM_INFO_FLAG_VBR 0x01
75 
77 #define WSB_PLAYER_STREAM_INFO_FLAG_CONTINUOUS 0x02
78 
90 typedef enum {
94 
98 typedef enum {
113 
117 typedef enum {
133 
137 typedef enum {
143 
147 typedef enum {
151 
155 typedef enum {
160 
165 typedef enum {
170 
171 /*----------------------------------------------------------------------
172 | types
173 +---------------------------------------------------------------------*/
174 
180 typedef struct {
183 
191 typedef struct {
195 
203 typedef struct {
208 
217 typedef struct {
219  const void* cookie;
221 
229 typedef struct {
233 
237 typedef struct {
239  const char* message;
241 
249 typedef struct {
252  union {
254  } details;
256 
264 typedef struct {
266  float volume;
268 
276 typedef struct {
280 
288 typedef struct {
292 
301 typedef struct {
306 
314 typedef struct {
318 
327 typedef struct {
332 
340 typedef struct {
342  const char* goto_url;
344 
352 typedef struct {
355  const char* source;
356  const char* name;
360 
366 typedef struct {
367  void* instance;
368  void (*handler)(void* instance, const WSB_Player_Event* event);
370 
371 /*----------------------------------------------------------------------
372 | functions
373 +---------------------------------------------------------------------*/
374 
393 WSB_EXPORT WSB_Result
395  WSB_Player_MsgThreadModel msg_model,
396  WSB_Player** playback);
397 
415 WSB_EXPORT WSB_Result
416 WSB_Player_PumpMessage(WSB_Player* playback, WSB_Int32 timeout);
417 
428 WSB_EXPORT WSB_Result
429 WSB_Player_SetInput(WSB_Player* playback, const char* name, const char* mime_type);
430 
456 WSB_EXPORT WSB_Result
458  const char* name,
459  const char* mime_type,
460  WSB_Int32 flags,
461  const void* license_data,
462  WSB_Size license_data_size,
463  WSB_Int32 audio_track,
464  WSB_Int32 video_track);
465 
474 WSB_EXPORT WSB_Result
475 WSB_Player_SetVideoOutput(WSB_Player* playback, const char* output_name);
476 
477 
485 WSB_EXPORT WSB_Result
486 WSB_Player_SetAudioOutput(WSB_Player* playback, const char* output_name);
487 
495 WSB_EXPORT WSB_Result
496 WSB_Player_SetVolume(WSB_Player* playback, float volume);
497 
511 WSB_EXPORT WSB_Result
514  const char* target,
515  const char* name,
516  SHI_DataType type,
517  const SHI_DataValue* value);
518 
525 WSB_EXPORT WSB_Result
526 WSB_Player_Play(WSB_Player* playback);
527 
533 WSB_EXPORT WSB_Result
534 WSB_Player_Pause(WSB_Player* playback);
535 
541 WSB_EXPORT WSB_Result
542 WSB_Player_Stop(WSB_Player* playback);
543 
551 WSB_EXPORT WSB_Result
552 WSB_Player_SetFullscreen(WSB_Player* playback, WSB_Boolean fullscreen);
553 
566 WSB_EXPORT WSB_Result
567 WSB_Player_Seek(WSB_Player* playback, WSB_Int32 offset, WSB_Int32 range);
568 
575 WSB_EXPORT WSB_Result
576 WSB_Player_Destroy(WSB_Player* playback);
577 
580 #if defined(__cplusplus)
581 }
582 #endif
583 
584 #endif /* _WSB_MEDIA_PLAYBACK_H_ */