Changeset e3e9c13799fc03656fe36f9646b77030aff2626c
- Timestamp:
- 02/10/07 18:05:13
(1 year ago)
- Author:
- Rémi Denis-Courmont <rem@videolan.org>
- git-committer:
- Rémi Denis-Courmont <rem@videolan.org> 1191341113 +0000
- git-parent:
[d8fc0a94ed76c7f4d9e441b28010d997ab9890eb]
- git-author:
- Rémi Denis-Courmont <rem@videolan.org> 1191341113 +0000
- Message:
Pass content-type from access to stream
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r6ee1e19 |
re3e9c13 |
|
| 61 | 61 | /* Special for direct access control from demuxer. |
|---|
| 62 | 62 | * XXX: avoid using it by all means */ |
|---|
| 63 | | STREAM_CONTROL_ACCESS /* arg1= int i_access_query, args res: can fail |
|---|
| | 63 | STREAM_CONTROL_ACCESS, /* arg1= int i_access_query, args res: can fail |
|---|
| 64 | 64 | if access unreachable or access control answer */ |
|---|
| | 65 | |
|---|
| | 66 | STREAM_GET_CONTENT_TYPE, /**< arg1= char ** res=can file */ |
|---|
| 65 | 67 | }; |
|---|
| 66 | 68 | |
|---|
| … | … | |
| 92 | 94 | return i_pos; |
|---|
| 93 | 95 | } |
|---|
| | 96 | |
|---|
| 94 | 97 | static inline int stream_MTU( stream_t *s ) |
|---|
| 95 | 98 | { |
|---|
| … | … | |
| 98 | 101 | return i_mtu; |
|---|
| 99 | 102 | } |
|---|
| | 103 | |
|---|
| 100 | 104 | static inline int stream_Seek( stream_t *s, int64_t i_pos ) |
|---|
| 101 | 105 | { |
|---|
| 102 | 106 | return stream_Control( s, STREAM_SET_POSITION, i_pos ); |
|---|
| | 107 | } |
|---|
| | 108 | |
|---|
| | 109 | /** |
|---|
| | 110 | * Get the Content-Type of a stream, or NULL if unknown. |
|---|
| | 111 | * Result must be free()'d. |
|---|
| | 112 | */ |
|---|
| | 113 | static inline char *stream_ContentType( stream_t *s ) |
|---|
| | 114 | { |
|---|
| | 115 | char *res; |
|---|
| | 116 | if( stream_Control( s, STREAM_GET_CONTENT_TYPE, &res ) ) |
|---|
| | 117 | return NULL; |
|---|
| | 118 | return res; |
|---|
| 103 | 119 | } |
|---|
| 104 | 120 | |
|---|
| r528f021 |
re3e9c13 |
|
| 509 | 509 | |
|---|
| 510 | 510 | case STREAM_CONTROL_ACCESS: |
|---|
| | 511 | case STREAM_GET_CONTENT_TYPE: |
|---|
| 511 | 512 | return VLC_EGENERIC; |
|---|
| 512 | 513 | |
|---|
| r6ee1e19 |
re3e9c13 |
|
| 124 | 124 | |
|---|
| 125 | 125 | case STREAM_GET_MTU: |
|---|
| | 126 | case STREAM_GET_CONTENT_TYPE: |
|---|
| 126 | 127 | return VLC_EGENERIC; |
|---|
| 127 | 128 | |
|---|
| rcc3bd15 |
re3e9c13 |
|
| 556 | 556 | } |
|---|
| 557 | 557 | return access2_vaControl( p_access, i_int, args ); |
|---|
| | 558 | |
|---|
| | 559 | case STREAM_GET_CONTENT_TYPE: |
|---|
| | 560 | return access2_Control( p_access, ACCESS_GET_CONTENT_TYPE, |
|---|
| | 561 | va_arg( args, char ** ) ); |
|---|
| 558 | 562 | |
|---|
| 559 | 563 | default: |
|---|