Changeset 8fa65a4d5895a0cf3e6567dcf1115189580a7439
- Timestamp:
- 28/06/08 21:52:16
(3 months ago)
- Author:
- Rémi Denis-Courmont <rdenis@simphalempin.com>
- git-committer:
- Rémi Denis-Courmont <rdenis@simphalempin.com> 1214682736 +0300
- git-parent:
[7ca46db5b0de9a4f15de790990303cc46b496e24]
- git-author:
- Rémi Denis-Courmont <rdenis@simphalempin.com> 1214682736 +0300
- Message:
Qt4: weak reference the video output...
...so we don't try to vout_Control() it after it's been destroyed.
We cannot yield the video output for real either, as it would prevent
it from being destroyed once it is not needed anymore.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r02fac42 |
r8fa65a4 |
|
| 61 | 61 | { |
|---|
| 62 | 62 | /* Init */ |
|---|
| 63 | | p_vout = NULL; |
|---|
| | 63 | i_vout = 0; |
|---|
| 64 | 64 | hide(); setMinimumSize( 16, 16 ); |
|---|
| 65 | 65 | videoSize.rwidth() = -1; |
|---|
| … | … | |
| 98 | 98 | VideoWidget::~VideoWidget() |
|---|
| 99 | 99 | { |
|---|
| | 100 | vout_thread_t *p_vout = i_vout |
|---|
| | 101 | ? (vout_thread_t *)vlc_object_get( i_vout ) : NULL; |
|---|
| | 102 | |
|---|
| 100 | 103 | if( p_vout ) |
|---|
| 101 | 104 | { |
|---|
| … | … | |
| 110 | 113 | vout_Control( p_vout, VOUT_CLOSE ); |
|---|
| 111 | 114 | } |
|---|
| | 115 | vlc_object_release( p_vout ); |
|---|
| 112 | 116 | } |
|---|
| 113 | 117 | } |
|---|
| … | … | |
| 121 | 125 | msg_Dbg( p_intf, "Video was requested %i, %i", *pi_x, *pi_y ); |
|---|
| 122 | 126 | emit askVideoWidgetToShow( *pi_width, *pi_height ); |
|---|
| 123 | | if( p_vout ) |
|---|
| | 127 | if( i_vout ) |
|---|
| 124 | 128 | { |
|---|
| 125 | 129 | msg_Dbg( p_intf, "embedded video already in use" ); |
|---|
| 126 | 130 | return NULL; |
|---|
| 127 | 131 | } |
|---|
| 128 | | p_vout = p_nvout; |
|---|
| | 132 | i_vout = p_nvout->i_object_id; |
|---|
| 129 | 133 | msg_Dbg( p_intf, "embedded video ready (handle %p)", winId() ); |
|---|
| 130 | 134 | return ( void* )winId(); |
|---|
| … | … | |
| 146 | 150 | { |
|---|
| 147 | 151 | msg_Dbg( p_intf, "Video is not needed anymore" ); |
|---|
| 148 | | p_vout = NULL; |
|---|
| | 152 | i_vout = 0; |
|---|
| 149 | 153 | videoSize.rwidth() = 0; |
|---|
| 150 | 154 | videoSize.rheight() = 0; |
|---|